Fix several unescaping issues
This commit is contained in:
16
src/fuzz.cpp
16
src/fuzz.cpp
@@ -37,9 +37,19 @@ std::pair<std::string, parser3::Status> runBatch(std::string copy) {
|
||||
}
|
||||
|
||||
void testStreaming(std::string const &json) {
|
||||
auto result1 = runStreaming(json);
|
||||
auto result2 = runBatch(json);
|
||||
if (result1 != result2) {
|
||||
auto streaming = runStreaming(json);
|
||||
auto batch = runBatch(json);
|
||||
if (streaming != batch) {
|
||||
if (streaming.second == batch.second && streaming.second != parser3::S_OK) {
|
||||
// It's ok if the processed data doesn't match if parsing failed
|
||||
return;
|
||||
}
|
||||
printf("streaming: %s, %s\n",
|
||||
streaming.second == parser3::S_OK ? "accept" : "reject",
|
||||
streaming.first.c_str());
|
||||
printf("batch: %s, %s\n",
|
||||
streaming.second == parser3::S_OK ? "accept" : "reject",
|
||||
batch.first.c_str());
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user