diff --git a/tests/src/unit-json_view.cpp b/tests/src/unit-json_view.cpp index 8d825e606..708f76b4e 100644 --- a/tests/src/unit-json_view.cpp +++ b/tests/src/unit-json_view.cpp @@ -942,7 +942,7 @@ TEST_CASE("json_view values") // a duplicate key: the last value, as parse() CHECK((json_document::parse(R"({"a":1,"a":2})").root().get>() == std::map {{"a", 2}})); - const json_view invalid; + const json_view invalid{}; CHECK_THROWS_WITH_AS(invalid.get(), "[json.exception.type_error.302] type must be number, but is discarded", json::type_error&); CHECK(invalid.get().is_discarded()); }