diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp index aeb8a26..f477d27 100644 --- a/src/test_lib_json/main.cpp +++ b/src/test_lib_json/main.cpp @@ -1817,7 +1817,7 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, StaticString) { JSONTEST_FIXTURE_LOCAL(ValueTest, WideString) { // https://github.com/open-source-parsers/jsoncpp/issues/756 - const std::string uni = u8"\u5f0f\uff0c\u8fdb"; // "式,进" + const std::string uni = reinterpret_cast(u8"\u5f0f\uff0c\u8fdb"); // "式,进" std::string styled; { Json::Value v; @@ -2905,8 +2905,8 @@ JSONTEST_FIXTURE_LOCAL(ReaderTest, strictModeParseNumber) { } JSONTEST_FIXTURE_LOCAL(ReaderTest, parseChineseWithOneError) { - checkParse(R"({ "pr)" - u8"\u4f50\u85e4" // 佐藤 + checkParse(R"({ "pr)" + + std::string(reinterpret_cast(u8"\u4f50\u85e4")) + // 佐藤 R"(erty" :: "value" })", {{18, 19, "Syntax error: value, object or array expected."}}, "* Line 1, Column 19\n Syntax error: value, object or array " @@ -3008,7 +3008,7 @@ JSONTEST_FIXTURE_LOCAL(CharReaderTest, parseString) { bool ok = reader->parse(doc, doc + std::strlen(doc), &root, &errs); JSONTEST_ASSERT(ok); JSONTEST_ASSERT(errs.empty()); - JSONTEST_ASSERT_EQUAL(u8"\u8A2a", root[0].asString()); // "訪" + JSONTEST_ASSERT_EQUAL((const char*)u8"\u8A2a", root[0].asString()); // "訪" } { char const doc[] = R"([ "\uD801" ])";