(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func TestNullTimout(t *testing.T) { |
| 10 | // Timeout for 0 seconds. |
| 11 | start := time.Now() |
| 12 | timer := NewTimer(0) |
| 13 | <-timer.C |
| 14 | if int(time.Since(start).Seconds()) != 0 { |
| 15 | t.Errorf("took ~%v seconds, should be ~0 seconds\n", int(time.Since(start).Seconds())) |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | func TestNegativeTimout(t *testing.T) { |
| 20 | // Timeout for -1 seconds. |
nothing calls this directly
no test coverage detected
searching dependent graphs…