From 29eb10288455612f8af12e11f8c04042da45d736 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 6 May 2018 12:13:34 +0100 Subject: Add test case over default encoding --- libjsonpp/testEncoding.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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"); +} + -- cgit v1.2.3