dlugolecki.net.pl
Dziennik
Polecane
Software
projects
/
command.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added mechanism to understand passed Option without value.
[command.git]
/
tests
/
argument
/
handles_negative_int_value.cpp
diff --git
a/tests/argument/handles_negative_int_value.cpp
b/tests/argument/handles_negative_int_value.cpp
index 3f53f1aea97015593fbcf29b8af3dcd3469902ee..f9c222f9d80caa3f43ec85b3bd616b21c3c7e064 100644
(file)
--- a/
tests/argument/handles_negative_int_value.cpp
+++ b/
tests/argument/handles_negative_int_value.cpp
@@
-21,6
+21,10
@@
int main() {
if (argument.understand(VALUE)) {
argument.handle();
}
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";
if (test == std::stoi(VALUE)) {
cout << "Argument class handles negative int values\n";