| // Copyright 2015 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 (s) String() string { return "lazy string" } |
| // TestReset checks whether all the fields are zeroed after reset. |
| func TestReset(t *testing.T) { |
| tr.SetRecycler(func(_ interface{}) {}) |
| if !reflect.DeepEqual(tr, new(trace)) { |
| t.Errorf("reset didn't clear all fields: %+v", tr) |
| // TestResetLog checks whether all the fields are zeroed after reset. |
| func TestResetLog(t *testing.T) { |
| el := NewEventLog("foo", "bar") |
| if !reflect.DeepEqual(el, new(eventLog)) { |
| t.Errorf("reset didn't clear all fields: %+v", el) |