github.com/v2fly/v2ray-core/v4@v4.45.2/context_test.go (about) 1 package core_test 2 3 import ( 4 "context" 5 "testing" 6 _ "unsafe" 7 8 . "github.com/v2fly/v2ray-core/v4" 9 ) 10 11 func TestFromContextPanic(t *testing.T) { 12 defer func() { 13 r := recover() 14 if r == nil { 15 t.Error("expect panic, but nil") 16 } 17 }() 18 19 MustFromContext(context.Background()) 20 }