Skip to content

Commit 7aa11e2

Browse files
committed
test case for context
1 parent 2fbf0e0 commit 7aa11e2

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

context_test.go

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package core_test
2+
3+
import (
4+
"context"
5+
"testing"
6+
7+
. "v2ray.com/core"
8+
)
9+
10+
func TestContextPanic(t *testing.T) {
11+
defer func() {
12+
r := recover()
13+
if r == nil {
14+
t.Error("expect panic, but nil")
15+
}
16+
}()
17+
18+
MustFromContext(context.Background())
19+
}

0 commit comments

Comments
 (0)