Skip to content

Commit

Permalink
Fix regression test for nlohmann#2958
Browse files Browse the repository at this point in the history
  • Loading branch information
falbrechtskirchinger committed Apr 6, 2022
1 parent d58ee35 commit a8a4748
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/src/unit-regression2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,6 @@ TEST_CASE("regression tests 2")
{
std::string p = "/root";

// matching types
json test1;
test1[json::json_pointer(p)] = json::object();
CHECK(test1.dump() == "{\"root\":{}}");
Expand All @@ -724,10 +723,11 @@ TEST_CASE("regression tests 2")
test2[ordered_json::json_pointer(p)] = json::object();
CHECK(test2.dump() == "{\"root\":{}}");

// mixed type - the JSON Pointer is implicitly converted into a string "/root"
// json::json_pointer and ordered_json::json_pointer are the same type; behave as above
ordered_json test3;
test3[json::json_pointer(p)] = json::object();
CHECK(test3.dump() == "{\"/root\":{}}");
CHECK(std::is_same<json::json_pointer::string_t, ordered_json::json_pointer::string_t>::value);
CHECK(test3.dump() == "{\"root\":{}}");
}

SECTION("issue #2982 - to_{binary format} does not provide a mechanism for specifying a custom allocator for the returned type")
Expand Down

0 comments on commit a8a4748

Please sign in to comment.