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:
Julian Brost 2021-05-31 17:28:35 +02:00
parent 8b516f0c08
commit 7012774f57
1 changed files with 2 additions and 1 deletions

View File

@ -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()