v2fly/context_test.go

21 lines
280 B
Go
Raw Normal View History

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