(t *testing.T)
| 277 | } |
| 278 | |
| 279 | func TestWithinDuration(t *testing.T) { |
| 280 | t.Parallel() |
| 281 | |
| 282 | a := time.Now() |
| 283 | b := a.Add(10 * time.Second) |
| 284 | |
| 285 | WithinDuration(t, a, b, 15*time.Second) |
| 286 | |
| 287 | mockT := new(MockT) |
| 288 | WithinDuration(mockT, a, b, 5*time.Second) |
| 289 | if !mockT.Failed { |
| 290 | t.Error("Check should fail") |
| 291 | } |
| 292 | } |
| 293 | |
| 294 | func TestInDelta(t *testing.T) { |
| 295 | t.Parallel() |
nothing calls this directly
no test coverage detected