diff --git a/test/src/unit-constructor1.cpp b/test/src/unit-constructor1.cpp index 15fc7f82b..9fdb97f47 100644 --- a/test/src/unit-constructor1.cpp +++ b/test/src/unit-constructor1.cpp @@ -246,18 +246,6 @@ TEST_CASE("constructors") CHECK(j == j_reference); } - SECTION("std::pair") - { - std::pair p{1.0f, "string"}; - json j(p); - - CHECK(j.type() == json::value_t::array); - CHECK(j.get() == p); - REQUIRE(j.size() == 2); - CHECK(j[0] == std::get<0>(p)); - CHECK(j[1] == std::get<1>(p)); - } - SECTION("std::pair with discarded values") { json j{1, 2.0, "string"}; diff --git a/test/src/unit-conversions.cpp b/test/src/unit-conversions.cpp index fbdc53296..4379334b7 100644 --- a/test/src/unit-conversions.cpp +++ b/test/src/unit-conversions.cpp @@ -1282,60 +1282,6 @@ TEST_CASE("value conversion") j5.get>(); } - SECTION("std::map (array of pairs)") - { - std::map m{{0, 1}, {1, 2}, {2, 3}}; - json j6 = m; - - auto m2 = j6.get>(); - CHECK(m == m2); - - json j7 = {0, 1, 2, 3}; - json j8 = 2; - CHECK_THROWS_AS((j7.get>()), json::type_error&); - CHECK_THROWS_AS((j8.get>()), json::type_error&); - CHECK_THROWS_WITH((j7.get>()), - "[json.exception.type_error.302] type must be array, " - "but is number"); - CHECK_THROWS_WITH((j8.get>()), - "[json.exception.type_error.302] type must be array, " - "but is number"); - - SECTION("superfluous entries") - { - json j9 = {{0, 1, 2}, {1, 2, 3}, {2, 3, 4}}; - m2 = j9.get>(); - CHECK(m == m2); - } - } - - SECTION("std::unordered_map (array of pairs)") - { - std::unordered_map m{{0, 1}, {1, 2}, {2, 3}}; - json j6 = m; - - auto m2 = j6.get>(); - CHECK(m == m2); - - json j7 = {0, 1, 2, 3}; - json j8 = 2; - CHECK_THROWS_AS((j7.get>()), json::type_error&); - CHECK_THROWS_AS((j8.get>()), json::type_error&); - CHECK_THROWS_WITH((j7.get>()), - "[json.exception.type_error.302] type must be array, " - "but is number"); - CHECK_THROWS_WITH((j8.get>()), - "[json.exception.type_error.302] type must be array, " - "but is number"); - - SECTION("superfluous entries") - { - json j9{{0, 1, 2}, {1, 2, 3}, {2, 3, 4}}; - m2 = j9.get>(); - CHECK(m == m2); - } - } - SECTION("exception in case of a non-object type") { CHECK_THROWS_AS((json().get>()), json::type_error&);