Fixed dumping of strings
This commit is contained in:
1 parent
0cd2ecf48f
commit
7b97ec884e
3 files changed
+59
-2
No files matched your search
@@ -819,6 +819,17 @@ TEST_CASE("string")
|
||||
j1.clear();
|
||||
CHECK(j1.get<std::string>() == "");
|
||||
}
|
||||
|
||||
SECTION("Dumping")
|
||||
{
|
||||
CHECK(json("\"").dump(0) == "\"\\\"\"");
|
||||
CHECK(json("\\").dump(0) == "\"\\\\\"");
|
||||
CHECK(json("\n").dump(0) == "\"\\n\"");
|
||||
CHECK(json("\t").dump(0) == "\"\\t\"");
|
||||
CHECK(json("\b").dump(0) == "\"\\b\"");
|
||||
CHECK(json("\f").dump(0) == "\"\\f\"");
|
||||
CHECK(json("\r").dump(0) == "\"\\r\"");
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("boolean")
|
||||
|
||||
Reference in new issue
Block a user