X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fargument%2Fhandles_int_value.cpp;h=4295286063ed4c9ef192c6b363a09040426cb835;hb=ae6743a2a2c69b7a927f64ff1d3abf38a5e7d4bc;hp=552a2e35e30d114bcde6145c3d258ab036dc65fa;hpb=e440905b4cbc8761e62ab645e686ceeada0bb5e6;p=command.git diff --git a/tests/argument/handles_int_value.cpp b/tests/argument/handles_int_value.cpp index 552a2e3..4295286 100644 --- a/tests/argument/handles_int_value.cpp +++ b/tests/argument/handles_int_value.cpp @@ -12,16 +12,20 @@ typedef int ArgumentType; ArgumentType test; -void function(ArgumentType value) { +void _function(ArgumentType value) { test = value; } int main() { - Argument argument("Argument as int", function); + Argument argument("Argument as int", _function); if (argument.understand(VALUE)) { argument.handle(); } + else { + cout << "Argument class do not understand int values\n"; + return 1; + } if (test == std::stoi(VALUE)) { cout << "Argument class handles int values\n";