From c8c49dae5d4705a7e9ea57c09b38b0eac2c4516c Mon Sep 17 00:00:00 2001 From: Niels Date: Wed, 18 Feb 2015 22:43:25 +0100 Subject: [PATCH] fixed coverage --- test/unit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/unit.cpp b/test/unit.cpp index 2b13eba4..25b4d979 100644 --- a/test/unit.cpp +++ b/test/unit.cpp @@ -2211,9 +2211,10 @@ TEST_CASE("element access") SECTION("null") { json j_nonobject(json::value_t::null); + json j_nonobject2(json::value_t::null); const json j_const_nonobject(j_nonobject); CHECK_NOTHROW(j_nonobject["foo"]); - CHECK_NOTHROW(j_nonobject[json::object_t::key_type("foo")]); + CHECK_NOTHROW(j_nonobject2[json::object_t::key_type("foo")]); CHECK_THROWS_AS(j_const_nonobject["foo"], std::runtime_error); CHECK_THROWS_AS(j_const_nonobject[json::object_t::key_type("foo")], std::runtime_error); }