♻️ remove diagnostics_t class

This commit is contained in:
Niels Lohmann
2021-01-25 13:47:50 +01:00
parent e8dba10f53
commit 74cc0ab470
12 changed files with 231 additions and 290 deletions

View File

@@ -496,8 +496,11 @@ TEST_CASE("JSON pointers")
// error for nonprimitve values
CHECK_THROWS_AS(json({{"/1", {1, 2, 3}}}).unflatten(), json::type_error&);
CHECK_THROWS_WITH(json({{"/1", {1, 2, 3}}}).unflatten(),
"[json.exception.type_error.315] values in object must be primitive");
#if JSON_DIAGNOSTICS
CHECK_THROWS_WITH(json({{"/1", {1, 2, 3}}}).unflatten(), "[json.exception.type_error.315] (/~11) values in object must be primitive");
#else
CHECK_THROWS_WITH(json({{"/1", {1, 2, 3}}}).unflatten(), "[json.exception.type_error.315] values in object must be primitive");
#endif
// error for conflicting values
json j_error = {{"", 42}, {"/foo", 17}};