(t *testing.T)
| 84 | } |
| 85 | |
| 86 | func TestGzReadErrorInvalid(t *testing.T) { |
| 87 | wrong := "ciaociaociaociao" |
| 88 | |
| 89 | r, err := newFastGzReader(strings.NewReader(wrong)) |
| 90 | if err != nil { |
| 91 | // Error detected, OK |
| 92 | t.Log(err) |
| 93 | return |
| 94 | } |
| 95 | |
| 96 | _, err = io.ReadAll(r) |
| 97 | if err != nil { |
| 98 | // Error detected, OK |
| 99 | t.Log(err) |
| 100 | return |
| 101 | } |
| 102 | |
| 103 | err = r.Close() |
| 104 | if err != nil { |
| 105 | // Error detected, OK |
| 106 | t.Log(err) |
| 107 | return |
| 108 | } |
| 109 | |
| 110 | t.Fatal("error not detected") |
| 111 | } |
| 112 | |
| 113 | func BenchmarkGzip(b *testing.B) { |
| 114 | data := getCorpus() |
nothing calls this directly
no test coverage detected