Skip to content

Commit

Permalink
test case for context
Browse files Browse the repository at this point in the history
  • Loading branch information
DarienRaymond committed Oct 21, 2018
1 parent 2fbf0e0 commit 7aa11e2
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions context_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package core_test

import (
"context"
"testing"

. "v2ray.com/core"
)

func TestContextPanic(t *testing.T) {
defer func() {
r := recover()
if r == nil {
t.Error("expect panic, but nil")
}
}()

MustFromContext(context.Background())
}

0 comments on commit 7aa11e2

Please sign in to comment.