From 55350c91eb49fd829b8d2028e57fdf50bf8da3c1 Mon Sep 17 00:00:00 2001 From: Qianqian Fang Date: Tue, 10 May 2022 13:21:37 -0400 Subject: [PATCH] fix coverage --- tests/src/unit-bjdata.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/src/unit-bjdata.cpp b/tests/src/unit-bjdata.cpp index 421922a6b..d2fa9a9b2 100644 --- a/tests/src/unit-bjdata.cpp +++ b/tests/src/unit-bjdata.cpp @@ -2094,13 +2094,27 @@ TEST_CASE("BJData") CHECK_FALSE(json::sax_parse(v, &scp, json::input_format_t::bjdata)); } - SECTION("key() in ndarray _ArrayType_") + SECTION("string() in ndarray _ArrayType_") { std::vector v = {'[', '$', 'U', '#', '[', '$', 'U', '#', 'i', 2, 2, 2, 1, 2, 3, 4}; SaxCountdown scp(7); CHECK_FALSE(json::sax_parse(v, &scp, json::input_format_t::bjdata)); } + SECTION("key() in ndarray _ArrayData_") + { + std::vector v = {'[', '$', 'U', '#', '[', '$', 'U', '#', 'i', 2, 2, 2, 1, 2, 3, 4}; + SaxCountdown scp(8); + CHECK_FALSE(json::sax_parse(v, &scp, json::input_format_t::bjdata)); + } + + SECTION("string() in ndarray _ArrayData_") + { + std::vector v = {'[', '$', 'U', '#', '[', '$', 'U', '#', 'i', 2, 2, 2, 1, 2, 3, 4}; + SaxCountdown scp(9); + CHECK_FALSE(json::sax_parse(v, &scp, json::input_format_t::bjdata)); + } + SECTION("string() in ndarray _ArrayType_") { std::vector v = {'[', '$', 'U', '#', '[', '$', 'i', '#', 'i', 2, 3, 2, 6, 5, 4, 3, 2, 1};