| // Copyright 2014 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| func TestReset(t *testing.T) { |
| "lorem ipsum izzle fo rizzle", |
| "the quick brown fox jumped over", |
| deflated := make([]bytes.Buffer, 2) |
| w, _ := NewWriter(&deflated[i], 1) |
| inflated := make([]bytes.Buffer, 2) |
| f := NewReader(&deflated[0]) |
| f.(Resetter).Reset(&deflated[1], nil) |
| if s != inflated[i].String() { |
| t.Errorf("inflated[%d]:\ngot %q\nwant %q", i, inflated[i], s) |