Skip to content

Commit

Permalink
✅ improved test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Dec 30, 2016
1 parent f0edab2 commit d7029c3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/src/unit-cbor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ SOFTWARE.

#include "catch.hpp"

#define private public
#include "json.hpp"
using nlohmann::json;

Expand Down Expand Up @@ -1262,6 +1263,12 @@ TEST_CASE("CBOR regressions")
}
}
}

SECTION("improve code coverage")
{
// exotic edge case
CHECK_THROWS_AS(json::check_length(0xffffffffffffffff, 0xfffffffffffffff0, 0xff), std::out_of_range);
}
}

TEST_CASE("CBOR roundtrips", "[hide]")
Expand Down

0 comments on commit d7029c3

Please sign in to comment.