@@ -8,15 +8,15 @@ import (
88)
99
1010func TestWithDone (t * testing.T ) {
11- t .Run ("CancelParent " , func (t * testing.T ) {
11+ t .Run ("WithParentCancel " , func (t * testing.T ) {
1212 ctx , cancel := context .WithCancel (context .Background ())
1313 done := make (chan struct {})
1414 ctx1 , _ := WithDone (ctx , done )
1515 require .NoError (t , ctx1 .Err ())
1616 cancel ()
1717 require .Error (t , ctx1 .Err ())
1818 })
19- t .Run ("StopWithDone " , func (t * testing.T ) {
19+ t .Run ("WithExplicitCancel " , func (t * testing.T ) {
2020 ctx , cancel := context .WithCancel (context .Background ())
2121 defer cancel ()
2222 done := make (chan struct {})
@@ -26,7 +26,7 @@ func TestWithDone(t *testing.T) {
2626 require .NoError (t , ctx .Err ())
2727 require .Error (t , ctx1 .Err ())
2828 })
29- t .Run ("CloseDone " , func (t * testing.T ) {
29+ t .Run ("WithExplicitCloseDone " , func (t * testing.T ) {
3030 done := make (chan struct {})
3131 ctx , cancel := WithDone (context .Background (), done )
3232 require .NoError (t , ctx .Err ())
@@ -35,14 +35,14 @@ func TestWithDone(t *testing.T) {
3535 require .Error (t , ctx .Err ())
3636 cancel ()
3737 })
38- t .Run ("ClosedDone " , func (t * testing.T ) {
38+ t .Run ("WithClosedDone " , func (t * testing.T ) {
3939 done := make (chan struct {})
4040 close (done )
4141 ctx , cancel := WithDone (context .Background (), done )
4242 require .Error (t , ctx .Err ())
4343 cancel ()
4444 })
45- t .Run ("NilDone " , func (t * testing.T ) {
45+ t .Run ("WithNilDone " , func (t * testing.T ) {
4646 var done chan struct {}
4747 ctx , cancel := WithDone (context .Background (), done )
4848 require .NoError (t , ctx .Err ())
0 commit comments