|
|
|
@ -286,7 +286,7 @@ BOOST_AUTO_TEST_CASE(univalue_object)
@@ -286,7 +286,7 @@ BOOST_AUTO_TEST_CASE(univalue_object)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static const char *json1 = |
|
|
|
|
"[1.10000000,{\"key1\":\"str\",\"key2\":800,\"key3\":{\"name\":\"martian\"}}]"; |
|
|
|
|
"[1.10000000,{\"key1\":\"str\\u0000\",\"key2\":800,\"key3\":{\"name\":\"martian\"}}]"; |
|
|
|
|
|
|
|
|
|
BOOST_AUTO_TEST_CASE(univalue_readwrite) |
|
|
|
|
{ |
|
|
|
@ -306,7 +306,9 @@ BOOST_AUTO_TEST_CASE(univalue_readwrite)
@@ -306,7 +306,9 @@ BOOST_AUTO_TEST_CASE(univalue_readwrite)
|
|
|
|
|
BOOST_CHECK_EQUAL(obj.size(), 3); |
|
|
|
|
|
|
|
|
|
BOOST_CHECK(obj["key1"].isStr()); |
|
|
|
|
BOOST_CHECK_EQUAL(obj["key1"].getValStr(), "str"); |
|
|
|
|
std::string correctValue("str"); |
|
|
|
|
correctValue.push_back('\0'); |
|
|
|
|
BOOST_CHECK_EQUAL(obj["key1"].getValStr(), correctValue); |
|
|
|
|
BOOST_CHECK(obj["key2"].isNum()); |
|
|
|
|
BOOST_CHECK_EQUAL(obj["key2"].getValStr(), "800"); |
|
|
|
|
BOOST_CHECK(obj["key3"].isObject()); |
|
|
|
|