mirror of
https://github.com/nlohmann/json.git
synced 2026-02-21 19:06:27 +00:00
increase test coverage
This commit is contained in:
@@ -392,7 +392,7 @@ $ make
|
||||
$ ./json_unit
|
||||
|
||||
===============================================================================
|
||||
All tests passed (4332 assertions in 18 test cases)
|
||||
All tests passed (4463 assertions in 18 test cases)
|
||||
```
|
||||
|
||||
For more information, have a look at the file [.travis.yml](https://github.com/nlohmann/json/blob/master/.travis.yml).
|
||||
|
||||
@@ -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