(t *testing.T)
| 57 | } |
| 58 | |
| 59 | func TestGzReadErrorEmpty(t *testing.T) { |
| 60 | var empty bytes.Buffer |
| 61 | |
| 62 | r, err := newFastGzReader(&empty) |
| 63 | if err != nil { |
| 64 | // Error detected, OK |
| 65 | t.Log(err) |
| 66 | return |
| 67 | } |
| 68 | |
| 69 | _, err = io.ReadAll(r) |
| 70 | if err != nil { |
| 71 | // Error detected, OK |
| 72 | t.Log(err) |
| 73 | return |
| 74 | } |
| 75 | |
| 76 | err = r.Close() |
| 77 | if err != nil { |
| 78 | // Error detected, OK |
| 79 | t.Log(err) |
| 80 | return |
| 81 | } |
| 82 | |
| 83 | t.Fatal("error not detected") |
| 84 | } |
| 85 | |
| 86 | func TestGzReadErrorInvalid(t *testing.T) { |
| 87 | wrong := "ciaociaociaociao" |
nothing calls this directly
no test coverage detected