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_float_value.cpp
diff --git
a/tests/argument/handles_negative_float_value.cpp
b/tests/argument/handles_negative_float_value.cpp
index 0279cac8617dd0a8e704dfc670becb59f5b7271d..0111502e48a1df7e921f46d08625f452f44db159 100644
(file)
--- a/
tests/argument/handles_negative_float_value.cpp
+++ b/
tests/argument/handles_negative_float_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 float values\n";
+ return 1;
+ }
if (test == std::stof(VALUE)) {
cout << "Argument class handles negative float values\n";
if (test == std::stof(VALUE)) {
cout << "Argument class handles negative float values\n";
@@
-29,6
+33,5
@@
int main() {
cout << "Argument class do not handle negative float values\n";
cout << "Argument class do not handle negative float values\n";
-
return 1;
}
return 1;
}