summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2018-05-06 12:13:34 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2018-05-06 12:13:34 +0100
commit29eb10288455612f8af12e11f8c04042da45d736 (patch)
tree26c9a0d6117dde93f4f2db66ba25ca87ae2edb48
parentRemove dead code (diff)
downloadlibjsonpp-29eb10288455612f8af12e11f8c04042da45d736.tar.bz2
libjsonpp-29eb10288455612f8af12e11f8c04042da45d736.tar.xz
libjsonpp-29eb10288455612f8af12e11f8c04042da45d736.zip
Add test case over default encodinglibjsonpp-0.11.0
-rw-r--r--libjsonpp/testEncoding.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libjsonpp/testEncoding.cpp b/libjsonpp/testEncoding.cpp
index f13afb7..26386df 100644
--- a/libjsonpp/testEncoding.cpp
+++ b/libjsonpp/testEncoding.cpp
@@ -30,3 +30,11 @@ BOOST_AUTO_TEST_CASE( write_latin1 )
BOOST_REQUIRE_EQUAL("\"A \xD9\xF1\xEE\xE7\xF4\xD0\xE8 string.\"", writeString(Glib::ustring("A ÙñîçôÐè string."), "latin1"));
}
+BOOST_AUTO_TEST_CASE( defaultEncoding )
+{
+ json::String s("Some string value");
+ std::stringstream ss;
+ json::serializeValue(s, ss, "");
+ BOOST_REQUIRE_EQUAL(ss.str(), R"S("Some string value")S");
+}
+