From 5379b5d0910f5f712b80da09952c667e1ea21b29 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 20 Nov 2021 13:24:21 +0100 Subject: [PATCH] :white_check_mark: improve coverage --- test/src/unit-regression2.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/src/unit-regression2.cpp b/test/src/unit-regression2.cpp index 3ae73ce18..e3e4aa4d3 100644 --- a/test/src/unit-regression2.cpp +++ b/test/src/unit-regression2.cpp @@ -736,6 +736,10 @@ TEST_CASE("regression tests 2") const auto j_path = j.get(); CHECK(j_path == text_path); + + json j_integer = 1; + std::filesystem::path p; + CHECK_THROWS_WITH_AS(j_integer.get_to(p), "[json.exception.type_error.302] type must be string, but is number", json::type_error); } #endif