diff options
Diffstat (limited to 'libgo/go/context/context_test.go')
-rw-r--r-- | libgo/go/context/context_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libgo/go/context/context_test.go b/libgo/go/context/context_test.go index 90e78e57ecc..cf182110fbd 100644 --- a/libgo/go/context/context_test.go +++ b/libgo/go/context/context_test.go @@ -255,6 +255,12 @@ func TestDeadline(t *testing.T) { o = otherContext{c} c, _ = WithDeadline(o, time.Now().Add(4*time.Second)) testDeadline(c, "WithDeadline+otherContext+WithDeadline", 2*time.Second, t) + + c, _ = WithDeadline(Background(), time.Now().Add(-time.Millisecond)) + testDeadline(c, "WithDeadline+inthepast", time.Second, t) + + c, _ = WithDeadline(Background(), time.Now()) + testDeadline(c, "WithDeadline+now", time.Second, t) } func TestTimeout(t *testing.T) { |