diff --git a/test/unit.cpp b/test/unit.cpp index 86d903fe..4dd4edc0 100644 --- a/test/unit.cpp +++ b/test/unit.cpp @@ -5514,6 +5514,12 @@ TEST_CASE("lexer class") } } } + + SECTION("to_unicode") + { + CHECK(json::lexer::to_unicode(0x1F4A9) == "💩"); + CHECK_THROWS_AS(json::lexer::to_unicode(0x110000), std::out_of_range); + } } TEST_CASE("parser class")