1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-07-20 04:04:15 -04:00
v2fly/context_test.go

21 lines
280 B
Go
Raw Normal View History

2018-10-21 14:33:08 -04:00
package core_test
import (
"context"
"testing"
2021-04-05 21:55:14 -04:00
_ "unsafe"
2018-10-21 14:33:08 -04:00
. "github.com/v2fly/v2ray-core/v5"
2018-10-21 14:33:08 -04:00
)
func TestFromContextPanic(t *testing.T) {
2018-10-21 14:33:08 -04:00
defer func() {
r := recover()
if r == nil {
t.Error("expect panic, but nil")
}
}()
MustFromContext(context.Background())
}