@@ -69,45 +69,26 @@ def runAllTests(jsontest_executable_path, input_dir = None,
69
69
input_dir = os .path .join (os .getcwd (), 'data' )
70
70
tests = glob (os .path .join (input_dir , '*.json' ))
71
71
if with_json_checker :
72
- all_test_jsonchecker = glob (os .path .join (input_dir , '../jsonchecker' , '*.json' ))
73
- # These tests fail with strict json support, but pass with jsoncpp extra lieniency
74
- """
75
- Failure details:
76
- * Test ../jsonchecker/fail25.json
77
- Parsing should have failed:
78
- [" tab character in string "]
79
-
80
- * Test ../jsonchecker/fail13.json
81
- Parsing should have failed:
82
- {"Numbers cannot have leading zeroes": 013}
83
-
84
- * Test ../jsonchecker/fail18.json
85
- Parsing should have failed:
86
- [[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]
87
-
88
- * Test ../jsonchecker/fail8.json
89
- Parsing should have failed:
90
- ["Extra close"]]
91
-
92
- * Test ../jsonchecker/fail7.json
93
- Parsing should have failed:
94
- ["Comma after the close"],
95
-
96
- * Test ../jsonchecker/fail10.json
97
- Parsing should have failed:
98
- {"Extra value after close": true} "misplaced quoted value"
99
-
100
- * Test ../jsonchecker/fail27.json
101
- Parsing should have failed:
102
- ["line
103
- break"]
104
- """
105
- known_differences_withjsonchecker = [ "fail25.json" , "fail13.json" , "fail18.json" , "fail8.json" ,
106
- "fail7.json" , "fail10.json" , "fail27.json" ]
107
- test_jsonchecker = [ test for test in all_test_jsonchecker if os .path .basename (test ) not in known_differences_withjsonchecker ]
72
+ all_tests = glob (os .path .join (input_dir , '../jsonchecker' , '*.json' ))
73
+ # These tests fail with strict json support, but pass with JsonCPP's
74
+ # extra leniency features. When adding a new exclusion to this list,
75
+ # remember to add the test's number and reasoning here:
76
+ known = ["fail{}.json" .format (n ) for n in [
77
+ 4 , 9 , # fail because we allow trailing commas
78
+ 7 , # fails because we allow commas after close
79
+ 8 , # fails because we allow extra close
80
+ 10 , # fails because we allow extra values after close
81
+ 13 , # fails because we allow leading zeroes in numbers
82
+ 18 , # fails because we allow deeply nested values
83
+ 25 , # fails because we allow tab characters in strings.
84
+ 27 , # fails because we allow string line breaks
85
+ ]]
86
+ test_jsonchecker = [ test for test in all_tests
87
+ if os .path .basename (test ) not in known ]
108
88
109
89
else :
110
90
test_jsonchecker = []
91
+
111
92
failed_tests = []
112
93
valgrind_path = use_valgrind and VALGRIND_CMD or ''
113
94
for input_path in tests + test_jsonchecker :
0 commit comments