Skip to content

Commit

Permalink
fuzz: skip too long code
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Nov 16, 2023
1 parent e9607c7 commit 5de348e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/fuzz/fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ func FuzzExpr(f *testing.F) {
env := NewEnv()

f.Fuzz(func(t *testing.T, code string) {
if len(code) > 1000 {
t.Skip("too long code")
}

program, err := expr.Compile(code, expr.Env(env))
if err != nil {
t.Skipf("compile error: %s", err)
Expand Down

0 comments on commit 5de348e

Please sign in to comment.