🚧 add tests

This commit is contained in:
Niels Lohmann
2021-01-02 16:13:04 +01:00
parent 09cd4ed125
commit 7323a8eb4e
6 changed files with 262 additions and 162 deletions

View File

@@ -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