X-Git-Url: https://git.dlugolecki.net.pl/?p=command.git;a=blobdiff_plain;f=tests%2Fargument%2Fhandles_negative_int_value.cpp;h=3116526f2c752f092ad15f5c67fa5277f1d62b9a;hp=3f53f1aea97015593fbcf29b8af3dcd3469902ee;hb=ae6743a2a2c69b7a927f64ff1d3abf38a5e7d4bc;hpb=e440905b4cbc8761e62ab645e686ceeada0bb5e6 diff --git a/tests/argument/handles_negative_int_value.cpp b/tests/argument/handles_negative_int_value.cpp index 3f53f1a..3116526 100644 --- a/tests/argument/handles_negative_int_value.cpp +++ b/tests/argument/handles_negative_int_value.cpp @@ -11,16 +11,20 @@ typedef int ArgumentType; ArgumentType test; -void function(ArgumentType value) { +void _function(ArgumentType value) { test = value; } int main() { - Argument argument("Argument as negative int", function); + Argument argument("Argument as negative int", _function); if (argument.understand(VALUE)) { argument.handle(); } + else { + cout << "Argument class do not understand negative int values\n"; + return 1; + } if (test == std::stoi(VALUE)) { cout << "Argument class handles negative int values\n";