mirror of https://github.com/Icinga/icinga2.git
Make base_value/format test easier to understand
The old test looked really strange where it reads 3 into a Value and then checks that it's not 3. However, what's going on there is that operator>> for Value actually always reads a String, so instead check for what v should be, not what it should not be.
This commit is contained in:
parent
8b516f0c08
commit
7012774f57
|
@ -46,7 +46,8 @@ BOOST_AUTO_TEST_CASE(format)
|
|||
std::istringstream ibuf("3");
|
||||
ibuf >> v;
|
||||
|
||||
BOOST_CHECK(v != 3);
|
||||
BOOST_CHECK_MESSAGE(v.IsString(), "type of v should be String (is " << v.GetTypeName() << ")");
|
||||
BOOST_CHECK_MESSAGE(v == "3", "v should be '3' (is '" << v << "')");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
|
Loading…
Reference in New Issue