aboutsummaryrefslogtreecommitdiff
path: root/internal/compress/flate/fuzz_test.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-05 21:17:08 +0800
committerGravatar Runxi Yu2026-03-05 21:17:08 +0800
commit77d651d2fcef14a55d21649435bb02836fbc3415 (patch)
tree36663447db71560f908bf43c97b0ad8ca9c1bbf7 /internal/compress/flate/fuzz_test.go
parentinternal/compress/zlib: Check errors properly and prettify (diff)
signatureNo signature
*: Prettify
Diffstat (limited to 'internal/compress/flate/fuzz_test.go')
-rw-r--r--internal/compress/flate/fuzz_test.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/internal/compress/flate/fuzz_test.go b/internal/compress/flate/fuzz_test.go
index b97cd055..5c361956 100644
--- a/internal/compress/flate/fuzz_test.go
+++ b/internal/compress/flate/fuzz_test.go
@@ -14,11 +14,13 @@ import (
)
// Fuzzing tweaks:
-var fuzzStartF = flag.Int("start", HuffmanOnly, "Start fuzzing at this level")
-var fuzzEndF = flag.Int("end", BestCompression, "End fuzzing at this level (inclusive)")
-var fuzzMaxF = flag.Int("max", 1<<20, "Maximum input size")
-var fuzzSLF = flag.Bool("sl", true, "Include stateless encodes")
-var fuzzWindow = flag.Bool("windows", true, "Include windowed encodes")
+var (
+ fuzzStartF = flag.Int("start", HuffmanOnly, "Start fuzzing at this level")
+ fuzzEndF = flag.Int("end", BestCompression, "End fuzzing at this level (inclusive)")
+ fuzzMaxF = flag.Int("max", 1<<20, "Maximum input size")
+ fuzzSLF = flag.Bool("sl", true, "Include stateless encodes")
+ fuzzWindow = flag.Bool("windows", true, "Include windowed encodes")
+)
func TestMain(m *testing.M) {
flag.Parse()
@@ -118,7 +120,7 @@ func FuzzEncoding(f *testing.F) {
t.Error(err)
}
if !bytes.Equal(data, data2) {
- //fmt.Printf("want:%x\ngot: %x\n", data1, data2)
+ // fmt.Printf("want:%x\ngot: %x\n", data1, data2)
t.Error(msg + "not equal")
}
}