This repository was archived by the owner on Jul 22, 2020. It is now read-only.
File tree 2 files changed +21
-3
lines changed
2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ clang -fsanitize=fuzzer parse-complex.a -o parse-complex
22
22
23
23
# # Install fuzzit specific version for production or latest version for development :
24
24
# https://github.com/fuzzitdev/fuzzit/releases/latest/download/fuzzit_Linux_x86_64
25
- wget -q -O fuzzit https://github.com/fuzzitdev/fuzzit/releases/download/v2.4.29 /fuzzit_Linux_x86_64
25
+ wget -q -O fuzzit https://github.com/fuzzitdev/fuzzit/releases/download/v2.4.46 /fuzzit_Linux_x86_64
26
26
chmod a+x fuzzit
27
27
28
28
# # upload fuzz target for long fuzz testing on fuzzit.dev server or run locally for regression
Original file line number Diff line number Diff line change @@ -4,15 +4,33 @@ package parser
4
4
// This won't find the results for never probabbly ...
5
5
6
6
import (
7
- "github.com/google/gofuzz"
7
+ fuzz "github.com/google/gofuzz"
8
8
"testing"
9
9
)
10
10
11
- func TestParseComplex (t * testing.T ) {
11
+ func TestGenerationalFuzzerParseComplex (t * testing.T ) {
12
12
f := fuzz .New ()
13
13
var inputString string
14
14
for true {
15
15
f .Fuzz (& inputString )
16
16
ParseComplex ([]byte (inputString ))
17
17
}
18
18
}
19
+
20
+ func TestParseComplex (t * testing.T ) {
21
+ var parseTests = []struct {
22
+ in string
23
+ out bool
24
+ }{
25
+ {"invalid" , false },
26
+ {"invalid2" , false },
27
+ {"invalid3" , false },
28
+ }
29
+
30
+ for _ , tc := range parseTests {
31
+ res := ParseComplex ([]byte (tc .in ))
32
+ if res != tc .out {
33
+ t .Errorf ("was expecting %v but receieved %v" , tc .out , res )
34
+ }
35
+ }
36
+ }
You can’t perform that action at this time.
0 commit comments