This commit is contained in:
Niels Lohmann
2023-09-23 17:19:28 +02:00
committed by GitHub
parent 5fec803493
commit 1ce29fa22f
16 changed files with 88 additions and 42 deletions

View File

@@ -123,8 +123,7 @@ TEST_CASE("JSON pointers")
CHECK(j.contains(json::json_pointer("/a~1b")));
CHECK(j.contains(json::json_pointer("/m~0n")));
// unescaped access
// access to nonexisting values yield object creation
// unescaped access to nonexisting values yield object creation
CHECK(!j.contains(json::json_pointer("/a/b")));
CHECK_NOTHROW(j[json::json_pointer("/a/b")] = 42);
CHECK(j.contains(json::json_pointer("/a/b")));