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

Improve sjson package fuzzing #3071

Merged
merged 5 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
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
follow the review comments
  • Loading branch information
quasilyte committed Jul 19, 2023
commit ca5a8b26d80bb175d6f971f9ed573e0e514570ae
2 changes: 1 addition & 1 deletion internal/handlers/sjson/array_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ var arrayTestCases = []testCase{
},
j: `["",false,{"key":"value"},-32589.300000101,349,-21424182,null,"a string that is somewhat longer"]`,
}, {
name: "array_all",
name: "schema_null_error",
v: convertArray(must.NotFail(types.NewArray("a"))),
sch: &elem{
Type: elemTypeArray,
Expand Down
2 changes: 1 addition & 1 deletion internal/handlers/sjson/sjson_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ func fuzzJSONWithFixedDocuments(f *testing.F, testCases []testCase, newFunc func
j: d.j,
}
if err := unmarshalJSON(actualV, &tc); err == nil {
// if there was no error (which is a rare occasion),
// if there was no error,
// check that the documents match each other
assertEqualForFuzz(t, d.value, actualV)
chilagrow marked this conversation as resolved.
Show resolved Hide resolved
}
Expand Down