-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathautofuzz_test.go
59 lines (47 loc) · 1.05 KB
/
autofuzz_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package ascii85fuzz
// Edit if desired. Code generated by "fzgen encoding/ascii85".
import (
"encoding/ascii85"
"io"
"testing"
"github.com/thepudds/fzgen/fuzzer"
)
func Fuzz_CorruptInputError_Error(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
var e ascii85.CorruptInputError
fz := fuzzer.NewFuzzer(data)
fz.Fill(&e)
e.Error()
})
}
func Fuzz_Decode(f *testing.F) {
f.Fuzz(func(t *testing.T, dst []byte, src []byte, flush bool) {
ascii85.Decode(dst, src, flush)
})
}
func Fuzz_Encode(f *testing.F) {
f.Fuzz(func(t *testing.T, dst []byte, src []byte) {
ascii85.Encode(dst, src)
})
}
func Fuzz_MaxEncodedLen(f *testing.F) {
f.Fuzz(func(t *testing.T, n int) {
ascii85.MaxEncodedLen(n)
})
}
func Fuzz_NewDecoder(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
var r io.Reader
fz := fuzzer.NewFuzzer(data)
fz.Fill(&r)
ascii85.NewDecoder(r)
})
}
func Fuzz_NewEncoder(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
var w io.Writer
fz := fuzzer.NewFuzzer(data)
fz.Fill(&w)
ascii85.NewEncoder(w)
})
}