(t *testing.T)
| 2965 | } |
| 2966 | |
| 2967 | func TestEventuallyTrue(t *testing.T) { |
| 2968 | state := 0 |
| 2969 | condition := func() bool { |
| 2970 | defer func() { |
| 2971 | state += 1 |
| 2972 | }() |
| 2973 | return state == 2 |
| 2974 | } |
| 2975 | |
| 2976 | True(t, Eventually(t, condition, 100*time.Millisecond, 20*time.Millisecond)) |
| 2977 | } |
| 2978 | |
| 2979 | // errorsCapturingT is a mock implementation of TestingT that captures errors reported with Errorf. |
| 2980 | type errorsCapturingT struct { |
nothing calls this directly
no test coverage detected