From 7901839bde9d2e8dc03293277530327b246d87ed Mon Sep 17 00:00:00 2001 From: Qianqian Fang Date: Wed, 2 Mar 2022 08:56:42 -0500 Subject: [PATCH] complete test coverage --- test/src/unit-bjdata.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/src/unit-bjdata.cpp b/test/src/unit-bjdata.cpp index 5946181c7..0b077c10e 100644 --- a/test/src/unit-bjdata.cpp +++ b/test/src/unit-bjdata.cpp @@ -2786,6 +2786,12 @@ TEST_CASE("BJData") CHECK_THROWS_AS(_ = json::from_bjdata(vU), json::parse_error&); CHECK_THROWS_WITH(_ = json::from_bjdata(vU), "[json.exception.parse_error.110] parse error at byte 18: syntax error while parsing BJData number: unexpected end of input"); CHECK(json::from_bjdata(vU, true, false).is_discarded()); + + std::vector vT1 = {'[', '$', 'T', '#', '[', '$', 'i', '#', 'i', 2, 2, 3}; + CHECK(json::from_bjdata(vT1, true, false).is_discarded()); + + std::vector vh = {'[', '$', 'h', '#', '[', '$', 'i', '#', 'i', 2, 2, 3}; + CHECK(json::from_bjdata(vh, true, false).is_discarded()); } SECTION("objects")