improve coverage

This commit is contained in:
Niels Lohmann 2021-11-20 13:24:21 +01:00
parent 25ca594ff7
commit 5379b5d091
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69

View File

@ -736,6 +736,10 @@ TEST_CASE("regression tests 2")
const auto j_path = j.get<std::filesystem::path>(); const auto j_path = j.get<std::filesystem::path>();
CHECK(j_path == text_path); CHECK(j_path == text_path);
json j_integer = 1;
std::filesystem::path p;
CHECK_THROWS_WITH_AS(j_integer.get_to(p), "[json.exception.type_error.302] type must be string, but is number", json::type_error);
} }
#endif #endif