projects
/
go-signalcontext.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add project documentation and licensing
[go-signalcontext.git]
/
context_test.go
diff --git
a/context_test.go
b/context_test.go
index
0fa10d7
..
bc755a4
100644
(file)
--- a/
context_test.go
+++ b/
context_test.go
@@
-64,7
+64,7
@@
func TestCancelAfterSignal(t *testing.T) {
assert.Equal(t, Error{syscall.SIGUSR2}, ctx.Err())
}
assert.Equal(t, Error{syscall.SIGUSR2}, ctx.Err())
}
-func TestPrec
omplet
ed(t *testing.T) {
+func TestPrec
ancel
ed(t *testing.T) {
parent, cancel := context.WithCancel(context.Background())
cancel()
<-parent.Done()
parent, cancel := context.WithCancel(context.Background())
cancel()
<-parent.Done()
@@
-75,7
+75,7
@@
func TestPrecompleted(t *testing.T) {
case _, ok := <-ctx.Done():
assert.False(t, ok, "Done() should be closed")
default:
case _, ok := <-ctx.Done():
assert.False(t, ok, "Done() should be closed")
default:
- assert.False(t, true, "
context should be complete
")
+ assert.False(t, true, "
Done() should be closed
")
}
assert.Equal(t, context.Canceled, ctx.Err())
}
}
assert.Equal(t, context.Canceled, ctx.Err())
}
@@
-121,7
+121,7
@@
func BenchmarkCanceledAsChild(b *testing.B) {
}
}
}
}
-func BenchmarkPrec
omplet
ed(b *testing.B) {
+func BenchmarkPrec
ancel
ed(b *testing.B) {
parent, cancel := context.WithCancel(context.Background())
cancel()
<-parent.Done()
parent, cancel := context.WithCancel(context.Background())
cancel()
<-parent.Done()