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
Add Option tests.
[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 0111502e48a1df7e921f46d08625f452f44db159..7c97467244bb8be08e306d5edf31570006df88d1 100644
(file)
--- a/
tests/argument/handles_negative_float_value.cpp
+++ b/
tests/argument/handles_negative_float_value.cpp
@@
-16,22
+16,22
@@
void function(ArgumentType value) {
}
int main() {
}
int main() {
- Argument<ArgumentType> argument("Argument as float", function);
+ Argument<ArgumentType> argument("Argument as
negative
float", function);
if (argument.understand(VALUE)) {
argument.handle();
}
else {
if (argument.understand(VALUE)) {
argument.handle();
}
else {
- cout <<
"Argument class do not understand negative float values
\n";
+ cout <<
argument.describe() << " do not understand " << VALUE " value
\n";
return 1;
}
if (test == std::stof(VALUE)) {
return 1;
}
if (test == std::stof(VALUE)) {
- cout <<
"Argument class
handles negative float values\n";
+ cout <<
argument.describe() << "
handles negative float values\n";
return 0;
}
return 0;
}
- cout <<
"Argument class
do not handle negative float values\n";
+ cout <<
argument.describe() << "
do not handle negative float values\n";
return 1;
}
return 1;
}