mirror of
https://github.com/nlohmann/json.git
synced 2026-02-28 14:26:26 +00:00
✅ add tests to improve coverage
This commit is contained in:
@@ -464,6 +464,11 @@ TEST_CASE("regression tests")
|
||||
s2 = o["name"];
|
||||
|
||||
CHECK(s2 == "value");
|
||||
|
||||
// improve coverage
|
||||
o["int"] = 1;
|
||||
CHECK_THROWS_AS(s2 = o["int"], json::type_error);
|
||||
CHECK_THROWS_WITH(s2 = o["int"], "[json.exception.type_error.302] type must be string, but is number");
|
||||
}
|
||||
|
||||
SECTION("issue #146 - character following a surrogate pair is skipped")
|
||||
|
||||
Reference in New Issue
Block a user