testing only with ok documents.

This commit is contained in:
Daniel Lemire 2020-03-20 16:30:35 -04:00 committed by John Keiser
parent 04e8710cf5
commit 8a91cecf41
1 changed files with 7 additions and 5 deletions

View File

@ -101,11 +101,13 @@ bool validate(const char *dirname) {
printf("size of file in bytes: %zu \n", json.size());
everything_fine = false;
}
// issue 570, we just want to check for segfault
simdjson::document::parser parser;
for (const simdjson::document &doc : parser.load_many(fullpath)) {
auto iter = simdjson::document::iterator(doc);
//do something
if(!error) {
// issue 570, we just want to check for segfault
simdjson::document::parser parser;
for (const simdjson::document &doc : parser.load_many(fullpath)) {
auto iter = simdjson::document::iterator(doc);
//do something
}
}
free(fullpath);
}