mirror of
https://github.com/nlohmann/json.git
synced 2026-03-02 15:26:25 +00:00
⬆️ updated to Catch 2.0.1
Update required all CHECK_THROWS_AS macros to pass the exception type without reference, because this is now done by Catch2.
This commit is contained in:
@@ -131,7 +131,7 @@ TEST_CASE("iterator class")
|
||||
{
|
||||
json j(json::value_t::null);
|
||||
json::iterator it = j.begin();
|
||||
CHECK_THROWS_AS(*it, json::invalid_iterator&);
|
||||
CHECK_THROWS_AS(*it, json::invalid_iterator);
|
||||
CHECK_THROWS_WITH(*it, "[json.exception.invalid_iterator.214] cannot get value");
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ TEST_CASE("iterator class")
|
||||
json::iterator it = j.begin();
|
||||
CHECK(*it == json(17));
|
||||
it = j.end();
|
||||
CHECK_THROWS_AS(*it, json::invalid_iterator&);
|
||||
CHECK_THROWS_AS(*it, json::invalid_iterator);
|
||||
CHECK_THROWS_WITH(*it, "[json.exception.invalid_iterator.214] cannot get value");
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ TEST_CASE("iterator class")
|
||||
{
|
||||
json j(json::value_t::null);
|
||||
json::iterator it = j.begin();
|
||||
CHECK_THROWS_AS(std::string(it->type_name()), json::invalid_iterator&);
|
||||
CHECK_THROWS_AS(std::string(it->type_name()), json::invalid_iterator);
|
||||
CHECK_THROWS_WITH(std::string(it->type_name()), "[json.exception.invalid_iterator.214] cannot get value");
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ TEST_CASE("iterator class")
|
||||
json::iterator it = j.begin();
|
||||
CHECK(std::string(it->type_name()) == "number");
|
||||
it = j.end();
|
||||
CHECK_THROWS_AS(std::string(it->type_name()), json::invalid_iterator&);
|
||||
CHECK_THROWS_AS(std::string(it->type_name()), json::invalid_iterator);
|
||||
CHECK_THROWS_WITH(std::string(it->type_name()), "[json.exception.invalid_iterator.214] cannot get value");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user