Skip to content

Commit 81a641d

Browse files
committed
address review comments
1 parent d99998a commit 81a641d

2 files changed

Lines changed: 5 additions & 9 deletions

File tree

assert/assertions.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1875,18 +1875,15 @@ func (c *CollectT) FailNow() {
18751875
}
18761876

18771877
// Reset clears the collected errors.
1878+
// Deprecated: Not used anymore.
18781879
func (c *CollectT) Reset() {
1879-
c.errors = nil
1880+
panic("Reset() is deprecated")
18801881
}
18811882

18821883
// Copy copies the collected errors to the supplied t.
1884+
// Deprecated: Not used anymore.
18831885
func (c *CollectT) Copy(t TestingT) {
1884-
if tt, ok := t.(tHelper); ok {
1885-
tt.Helper()
1886-
}
1887-
for _, err := range c.errors {
1888-
t.Errorf("%v", err)
1889-
}
1886+
panic("Copy() is deprecated")
18901887
}
18911888

18921889
// EventuallyWithT asserts that given condition will be met in waitFor time,

assert/assertions_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2787,15 +2787,14 @@ func TestEventuallyWithTTrue(t *testing.T) {
27872787
}
27882788

27892789
func TestEventuallyWithT_ConcurrencySafe(t *testing.T) {
2790-
mockT := new(CollectT)
2790+
mockT := new(testing.T)
27912791

27922792
condition := func(collect *CollectT) {
27932793
True(collect, false)
27942794
}
27952795

27962796
// To trigger race conditions, we run EventuallyWithT with a nanosecond tick.
27972797
False(t, EventuallyWithT(mockT, condition, 100*time.Millisecond, time.Nanosecond))
2798-
Len(t, mockT.errors, 2)
27992798
}
28002799

28012800
func TestNeverFalse(t *testing.T) {

0 commit comments

Comments
 (0)