mirror of
https://github.com/nlohmann/json.git
synced 2026-02-20 02:16:24 +00:00
increase test coverage
This commit is contained in:
@@ -3022,6 +3022,18 @@ TEST_CASE("element access")
|
||||
{
|
||||
SECTION("erase with one valid iterator")
|
||||
{
|
||||
SECTION("null")
|
||||
{
|
||||
{
|
||||
json j;
|
||||
CHECK_THROWS_AS(j.erase(j.begin()), std::runtime_error);
|
||||
}
|
||||
{
|
||||
json j;
|
||||
CHECK_THROWS_AS(j.erase(j.cbegin()), std::runtime_error);
|
||||
}
|
||||
}
|
||||
|
||||
SECTION("string")
|
||||
{
|
||||
{
|
||||
@@ -3140,6 +3152,18 @@ TEST_CASE("element access")
|
||||
|
||||
SECTION("erase with two valid iterators")
|
||||
{
|
||||
SECTION("null")
|
||||
{
|
||||
{
|
||||
json j;
|
||||
CHECK_THROWS_AS(j.erase(j.begin(), j.end()), std::runtime_error);
|
||||
}
|
||||
{
|
||||
json j;
|
||||
CHECK_THROWS_AS(j.erase(j.cbegin(), j.cend()), std::runtime_error);
|
||||
}
|
||||
}
|
||||
|
||||
SECTION("string")
|
||||
{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user