From c0c0c398b6f9c630323216775dbf08b775dbce63 Mon Sep 17 00:00:00 2001 From: "Philipp A. Hartmann" Date: Mon, 11 Aug 2014 15:26:17 +0200 Subject: [PATCH] jsoncheckertest: skip "fail1.json", as it is now accepted by RapidJSON --- test/unittest/jsoncheckertest.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/unittest/jsoncheckertest.cpp b/test/unittest/jsoncheckertest.cpp index d661528..75ef3e8 100644 --- a/test/unittest/jsoncheckertest.cpp +++ b/test/unittest/jsoncheckertest.cpp @@ -46,6 +46,8 @@ TEST(JsonChecker, Reader) { // jsonchecker/failXX.json for (int i = 1; i <= 33; i++) { + if (i == 1) // fail1.json is valid in rapidjson, which has no limitation on type of root element (RFC 7159). + continue; if (i == 18) // fail18.json is valid in rapidjson, which has no limitation on depth of nesting. continue; @@ -57,14 +59,15 @@ TEST(JsonChecker, Reader) { json = ReadFile(filename, length); if (!json) { printf("jsonchecker file %s not found", filename); + ADD_FAILURE(); continue; } } GenericDocument, CrtAllocator> document; // Use Crt allocator to check exception-safety (no memory leak) if (!document.Parse((const char*)json).HasParseError()) - FAIL(); - //printf("%s(%u):%s\n", filename, (unsigned)document.GetErrorOffset(), document.GetParseError()); + ADD_FAILURE_AT(filename, document.GetErrorOffset()); + free(json); }