diff --git a/test/src/unit-diagnostics.cpp b/test/src/unit-diagnostics.cpp index bdae90226..c77030b66 100644 --- a/test/src/unit-diagnostics.cpp +++ b/test/src/unit-diagnostics.cpp @@ -81,6 +81,6 @@ TEST_CASE("Better diagnostics") json j; j["a/b"]["m~n"] = 1; std::string s; - CHECK_THROWS_WITH_AS(s = j["a/b"]["m~n"], "[json.exception.type_error.302] (/a~1b/m~0n) type must be string, but is number", json::type_error); + CHECK_THROWS_WITH_AS(s = j["a/b"]["m~n"].get(), "[json.exception.type_error.302] (/a~1b/m~0n) type must be string, but is number", json::type_error); } }