From 487ab8cb4ab66faa1609b22311baa86e69b48d26 Mon Sep 17 00:00:00 2001 From: Qianqian Fang Date: Sun, 22 May 2022 10:32:49 -0400 Subject: [PATCH] complete coverage --- tests/src/unit-bjdata.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/src/unit-bjdata.cpp b/tests/src/unit-bjdata.cpp index fd77608e8..ac0b99a9b 100644 --- a/tests/src/unit-bjdata.cpp +++ b/tests/src/unit-bjdata.cpp @@ -2772,6 +2772,10 @@ TEST_CASE("BJData") std::vector vR5 = {'[', '$', 'i', '#', '[', '[', '[', ']', ']', ']'}; CHECK_THROWS_WITH_AS(_ = json::from_bjdata(vR5), "[json.exception.parse_error.113] parse error at byte 6: syntax error while parsing BJData size: ndarray dimention vector can only contain integers", json::parse_error&); CHECK(json::from_bjdata(vR5, true, false).is_discarded()); + + std::vector vR6 = {'[', '$', 'i', '#', '[', '$', 'i', '#', '[', 'i', '2', 'i', 2, ']'}; + CHECK_THROWS_WITH_AS(_ = json::from_bjdata(vR6), "[json.exception.parse_error.112] parse error at byte 14: syntax error while parsing BJData size: ndarray can not be recursive", json::parse_error&); + CHECK(json::from_bjdata(vR6, true, false).is_discarded()); } SECTION("objects")