(t *testing.T)
| 35 | } |
| 36 | |
| 37 | func TestTimeValue(t *testing.T) { |
| 38 | // Timeout for 0 seconds. |
| 39 | start := time.Now() |
| 40 | timer := NewTimer(time.Second) |
| 41 | v := <-timer.C |
| 42 | if diff := v.Sub(start).Seconds(); int(diff) != 1 { |
| 43 | t.Errorf("invalid time value: %v", int(diff)) |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | func TestSingleTimout(t *testing.T) { |
| 48 | // Timeout for 1 second and wait. |
nothing calls this directly
no test coverage detected
searching dependent graphs…