Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to RFC7159 (closes #90) #101

Merged
merged 15 commits into from
Aug 11, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
jsoncheckertest: skip "fail1.json", as it is now accepted by RapidJSON
  • Loading branch information
pah committed Aug 11, 2014
commit c0c0c398b6f9c630323216775dbf08b775dbce63
7 changes: 5 additions & 2 deletions test/unittest/jsoncheckertest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -57,14 +59,15 @@ TEST(JsonChecker, Reader) {
json = ReadFile(filename, length);
if (!json) {
printf("jsonchecker file %s not found", filename);
ADD_FAILURE();
continue;
}
}

GenericDocument<UTF8<>, 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);
}

Expand Down