diff --git a/assert/assertions.go b/assert/assertions.go index e6498cd67..f4ef8bcaa 100644 --- a/assert/assertions.go +++ b/assert/assertions.go @@ -1875,18 +1875,15 @@ func (c *CollectT) FailNow() { } // Reset clears the collected errors. +// Deprecated: Not used anymore. func (c *CollectT) Reset() { - c.errors = nil + panic("Reset() is deprecated") } // Copy copies the collected errors to the supplied t. +// Deprecated: Not used anymore. func (c *CollectT) Copy(t TestingT) { - if tt, ok := t.(tHelper); ok { - tt.Helper() - } - for _, err := range c.errors { - t.Errorf("%v", err) - } + panic("Copy() is deprecated") } // EventuallyWithT asserts that given condition will be met in waitFor time, diff --git a/assert/assertions_test.go b/assert/assertions_test.go index 118983673..5250f8bbb 100644 --- a/assert/assertions_test.go +++ b/assert/assertions_test.go @@ -2787,7 +2787,7 @@ func TestEventuallyWithTTrue(t *testing.T) { } func TestEventuallyWithT_ConcurrencySafe(t *testing.T) { - mockT := new(CollectT) + mockT := new(testing.T) condition := func(collect *CollectT) { True(collect, false) @@ -2795,7 +2795,6 @@ func TestEventuallyWithT_ConcurrencySafe(t *testing.T) { // To trigger race conditions, we run EventuallyWithT with a nanosecond tick. False(t, EventuallyWithT(mockT, condition, 100*time.Millisecond, time.Nanosecond)) - Len(t, mockT.errors, 2) } func TestNeverFalse(t *testing.T) {