From 1f84cc2c88c6522e5c953483d741f39bf384df08 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Thu, 17 May 2018 16:50:37 +0200 Subject: [PATCH] :white_check_mark: adjusted test cases --- test/src/unit-testsuites.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/test/src/unit-testsuites.cpp b/test/src/unit-testsuites.cpp index 7de00c55..24c4195d 100644 --- a/test/src/unit-testsuites.cpp +++ b/test/src/unit-testsuites.cpp @@ -1139,7 +1139,6 @@ TEST_CASE("nst's JSONTestSuite (2)") "test/data/nst_json_testsuite2/test_parsing/n_string_unescaped_tab.json", "test/data/nst_json_testsuite2/test_parsing/n_string_unicode_CapitalU.json", "test/data/nst_json_testsuite2/test_parsing/n_string_with_trailing_garbage.json", - //"test/data/nst_json_testsuite2/test_parsing/n_structure_100000_opening_arrays.json", "test/data/nst_json_testsuite2/test_parsing/n_structure_U+2060_word_joined.json", "test/data/nst_json_testsuite2/test_parsing/n_structure_UTF8_BOM_no_data.json", "test/data/nst_json_testsuite2/test_parsing/n_structure_angle_bracket_..json", @@ -1165,7 +1164,6 @@ TEST_CASE("nst's JSONTestSuite (2)") "test/data/nst_json_testsuite2/test_parsing/n_structure_object_with_trailing_garbage.json", "test/data/nst_json_testsuite2/test_parsing/n_structure_open_array_apostrophe.json", "test/data/nst_json_testsuite2/test_parsing/n_structure_open_array_comma.json", - //"test/data/nst_json_testsuite2/test_parsing/n_structure_open_array_object.json", "test/data/nst_json_testsuite2/test_parsing/n_structure_open_array_open_object.json", "test/data/nst_json_testsuite2/test_parsing/n_structure_open_array_open_string.json", "test/data/nst_json_testsuite2/test_parsing/n_structure_open_array_string.json", @@ -1199,6 +1197,21 @@ TEST_CASE("nst's JSONTestSuite (2)") } } + SECTION("n (previously overflowed)") + { + for (auto filename : + { + "test/data/nst_json_testsuite2/test_parsing/n_structure_100000_opening_arrays.json", + "test/data/nst_json_testsuite2/test_parsing/n_structure_open_array_object.json" + } + ) + { + CAPTURE(filename); + std::ifstream f(filename); + CHECK(not json::accept(f)); + } + } + SECTION("i -> y") { for (auto filename :