Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
dynamic-graph
Commits
a033f6b7
Commit
a033f6b7
authored
Jan 15, 2020
by
Olivier Stasse
Committed by
olivier stasse
Jan 16, 2020
Browse files
[tests] Improve value coverage.
parent
d8f7e613
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/value.cpp
View file @
a033f6b7
...
...
@@ -53,7 +53,7 @@ BOOST_AUTO_TEST_CASE(value_exceptions) {
Value
value1
;
dg
::
command
::
EitherType
anet
(
value1
);
output_test_stream
output
;
output_test_stream
output
,
output2
;
// Check if the exception is working when calling intValue
// while we are having a none.
...
...
@@ -62,9 +62,13 @@ BOOST_AUTO_TEST_CASE(value_exceptions) {
int
aInt
(
anet
);
output
<<
aInt
;
}
catch
(
const
dg
::
ExceptionAbstract
&
aea
)
{
output
<<
aea
.
getExceptionName
();
output2
<<
aea
.
what
();
res
=
(
aea
.
getCode
()
==
dg
::
ExceptionAbstract
::
TOOLS
);
}
BOOST_CHECK
(
res
);
BOOST_CHECK
(
output
.
is_equal
(
"Abstract"
));
BOOST_CHECK
(
output2
.
is_equal
(
"value is not an int int"
));
// Check if the exception is working when calling boolValue
// while we are having a none.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment