mirror of
https://github.com/nlohmann/json.git
synced 2026-02-26 21:36:27 +00:00
🚧 add tests
This commit is contained in:
@@ -394,7 +394,11 @@ TEST_CASE("regression tests 1")
|
||||
// improve coverage
|
||||
o["int"] = 1;
|
||||
CHECK_THROWS_AS(s2 = o["int"], json::type_error);
|
||||
#if JSON_DIAGNOSTICS
|
||||
CHECK_THROWS_WITH(s2 = o["int"], "[json.exception.type_error.302] (/int) type must be string, but is number");
|
||||
#else
|
||||
CHECK_THROWS_WITH(s2 = o["int"], "[json.exception.type_error.302] type must be string, but is number");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user