func BenchmarkEncode(b *testing.B) { … } type errorWriter … func (e *errorWriter) Write(b []byte) (int, error) { … } // Test if errors from the underlying writer is passed upwards. func TestWriteError(t *testing.T) { … } // Test if two runs produce identical results // even when writing different sizes to the Writer. func TestDeterministic(t *testing.T) { … } func testDeterministic(i int, t *testing.T) { … } // TestDeflateFast_Reset will test that encoding is consistent // across a warparound of the table offset. // See https://github.com/golang/go/issues/34121 func TestDeflateFast_Reset(t *testing.T) { … }