aboutsummaryrefslogtreecommitdiff
path: root/internal/compress/flate/flate_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/flate_test.go
parentinternal/compress/zlib: Check errors properly and prettify (diff)
*: Prettify
Diffstat (limited to 'internal/compress/flate/flate_test.go')
-rw-r--r--internal/compress/flate/flate_test.go14
1 files changed, 9 insertions, 5 deletions
diff --git a/internal/compress/flate/flate_test.go b/internal/compress/flate/flate_test.go
index 9817efef..7b019548 100644
--- a/internal/compress/flate/flate_test.go
+++ b/internal/compress/flate/flate_test.go
@@ -21,9 +21,11 @@ import (
// The following test should not panic.
func TestIssue5915(t *testing.T) {
- bits := []int{4, 0, 0, 6, 4, 3, 2, 3, 3, 4, 4, 5, 0, 0, 0, 0, 5, 5, 6,
+ bits := []int{
+ 4, 0, 0, 6, 4, 3, 2, 3, 3, 4, 4, 5, 0, 0, 0, 0, 5, 5, 6,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 6, 0, 11, 0, 8, 0, 6, 6, 10, 8}
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 6, 0, 11, 0, 8, 0, 6, 6, 10, 8,
+ }
var h huffmanDecoder
if h.init(bits) {
t.Fatalf("Given sequence of bits is bad, and should not succeed.")
@@ -32,8 +34,10 @@ func TestIssue5915(t *testing.T) {
// The following test should not panic.
func TestIssue5962(t *testing.T) {
- bits := []int{4, 0, 0, 6, 4, 3, 2, 3, 3, 4, 4, 5, 0, 0, 0, 0,
- 5, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11}
+ bits := []int{
+ 4, 0, 0, 6, 4, 3, 2, 3, 3, 4, 4, 5, 0, 0, 0, 0,
+ 5, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11,
+ }
var h huffmanDecoder
if h.init(bits) {
t.Fatalf("Given sequence of bits is bad, and should not succeed.")
@@ -164,7 +168,7 @@ func TestRegressions(t *testing.T) {
t.Error(err)
}
if !bytes.Equal(data1, data2) {
- //fmt.Printf("want:%x\ngot: %x\n", data1, data2)
+ // fmt.Printf("want:%x\ngot: %x\n", data1, data2)
t.Error("not equal")
}
})