Skip to content

Commit

Permalink
⚗️ fix string representation
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Dec 29, 2020
1 parent bdb2469 commit fc7e181
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/src/unit-class_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ TEST_CASE("parser class")
CHECK(parser_helper("\"\"").get<json::string_t>() == "");
CHECK(parser_helper("\"🎈\"").get<json::string_t>() == "🎈");

CHECK(parser_helper("\"\\ud80c\\udc60\"").get<json::string_t>() == "\U00013060");
CHECK(parser_helper("\"\\ud80c\\udc60\"").get<json::string_t>() == "\xf0\x93\x81\xa0");
CHECK(parser_helper("\"\\ud83c\\udf1e\"").get<json::string_t>() == "🌞");
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/src/unit-regression1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ TEST_CASE("regression tests 1")

SECTION("issue #146 - character following a surrogate pair is skipped")
{
CHECK(json::parse("\"\\ud80c\\udc60abc\"").get<json::string_t>() == "\U00013060abc");
CHECK(json::parse("\"\\ud80c\\udc60abc\"").get<json::string_t>() == "\xf0\x93\x81\xa0\x61\x62\x63");
}

SECTION("issue #171 - Cannot index by key of type static constexpr const char*")
Expand Down

0 comments on commit fc7e181

Please sign in to comment.