Skip to content

Commit 8a91cec

Browse files
lemirejkeiser
authored andcommitted
testing only with ok documents.
1 parent 04e8710 commit 8a91cec

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

tests/parse_many_test.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,13 @@ bool validate(const char *dirname) {
101101
printf("size of file in bytes: %zu \n", json.size());
102102
everything_fine = false;
103103
}
104-
// issue 570, we just want to check for segfault
105-
simdjson::document::parser parser;
106-
for (const simdjson::document &doc : parser.load_many(fullpath)) {
107-
auto iter = simdjson::document::iterator(doc);
108-
//do something
104+
if(!error) {
105+
// issue 570, we just want to check for segfault
106+
simdjson::document::parser parser;
107+
for (const simdjson::document &doc : parser.load_many(fullpath)) {
108+
auto iter = simdjson::document::iterator(doc);
109+
//do something
110+
}
109111
}
110112
free(fullpath);
111113
}

0 commit comments

Comments
 (0)