Fix issue with fuzz test
Previously an implementation could never call on_begin_number or on_end_number and still pass
This commit is contained in:
11
src/test.cpp
11
src/test.cpp
@@ -10,7 +10,6 @@
|
||||
#include <simdjson.h>
|
||||
|
||||
#include "callbacks.h"
|
||||
#include "minify.h"
|
||||
#include "parser3.h"
|
||||
|
||||
// This is the JSON grammar in McKeeman Form.
|
||||
@@ -147,9 +146,9 @@ const std::string json = R"({
|
||||
})";
|
||||
|
||||
void testStreaming(std::string const &json) {
|
||||
MinifyState streaming;
|
||||
MinifyState batch;
|
||||
auto c = minifyCallbacks();
|
||||
SerializeState streaming;
|
||||
SerializeState batch;
|
||||
auto c = serializeCallbacks();
|
||||
{
|
||||
auto copy = json;
|
||||
parser3::Parser3 parser(&c, &streaming);
|
||||
@@ -170,8 +169,8 @@ void testStreaming(std::string const &json) {
|
||||
} // namespace
|
||||
|
||||
TEST_CASE("parser3") {
|
||||
Callbacks c = minifyCallbacks();
|
||||
MinifyState state;
|
||||
Callbacks c = serializeCallbacks();
|
||||
SerializeState state;
|
||||
{
|
||||
auto copy = json;
|
||||
parser3::Parser3 parser(&c, &state);
|
||||
|
||||
Reference in New Issue
Block a user