diff --git a/tests/src/unit-json_view.cpp b/tests/src/unit-json_view.cpp index 5f695e1f2..8dc60e912 100644 --- a/tests/src/unit-json_view.cpp +++ b/tests/src/unit-json_view.cpp @@ -1616,9 +1616,9 @@ TEST_CASE("json_view get() of a boolean (#5988)") SECTION("the exceptions of the exact number types") { const json_document d = json_document::parse("true"); - CHECK_THROWS_WITH_AS(d.root().get(), "[json.exception.type_error.302] type must be number, but is boolean", json::type_error&); - CHECK_THROWS_WITH_AS(d.root().get(), "[json.exception.type_error.302] type must be number, but is boolean", json::type_error&); - CHECK_THROWS_WITH_AS(d.root().get(), "[json.exception.type_error.302] type must be number, but is boolean", json::type_error&); + CHECK_THROWS_WITH_AS(d.root().get(), json_view_test::message("type_error.302", "", 0, 4, "type must be number, but is boolean").c_str(), json::type_error&); + CHECK_THROWS_WITH_AS(d.root().get(), json_view_test::message("type_error.302", "", 0, 4, "type must be number, but is boolean").c_str(), json::type_error&); + CHECK_THROWS_WITH_AS(d.root().get(), json_view_test::message("type_error.302", "", 0, 4, "type must be number, but is boolean").c_str(), json::type_error&); CHECK(d.root().get() == 1); // get_to() and value() go through get() json::number_float_t x = 0;