Commit a033f6b7 authored by Olivier Stasse's avatar Olivier Stasse Committed by olivier stasse
Browse files

[tests] Improve value coverage.

parent d8f7e613
...@@ -53,7 +53,7 @@ BOOST_AUTO_TEST_CASE(value_exceptions) { ...@@ -53,7 +53,7 @@ BOOST_AUTO_TEST_CASE(value_exceptions) {
Value value1; Value value1;
dg::command::EitherType anet(value1); dg::command::EitherType anet(value1);
output_test_stream output; output_test_stream output,output2;
// Check if the exception is working when calling intValue // Check if the exception is working when calling intValue
// while we are having a none. // while we are having a none.
...@@ -62,9 +62,13 @@ BOOST_AUTO_TEST_CASE(value_exceptions) { ...@@ -62,9 +62,13 @@ BOOST_AUTO_TEST_CASE(value_exceptions) {
int aInt(anet); int aInt(anet);
output << aInt; output << aInt;
} catch (const dg::ExceptionAbstract &aea) { } catch (const dg::ExceptionAbstract &aea) {
output << aea.getExceptionName();
output2 << aea.what();
res = (aea.getCode() == dg::ExceptionAbstract::TOOLS); res = (aea.getCode() == dg::ExceptionAbstract::TOOLS);
} }
BOOST_CHECK(res); 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 // Check if the exception is working when calling boolValue
// while we are having a none. // while we are having a none.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment