(t *testing.T)
| 45 | } |
| 46 | |
| 47 | func TestSingleTimout(t *testing.T) { |
| 48 | // Timeout for 1 second and wait. |
| 49 | start := time.Now() |
| 50 | timer := NewTimer(time.Second) |
| 51 | <-timer.C |
| 52 | if int(time.Since(start).Seconds()) != 1 { |
| 53 | t.Errorf("took ~%v seconds, should be ~1 seconds\n", int(time.Since(start).Seconds())) |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | func TestMultipleTimouts(t *testing.T) { |
| 58 | start := time.Now() |
nothing calls this directly
no test coverage detected
searching dependent graphs…