1
2
3
4
5
6
7
8 package boring
9
10 import "testing"
11
12
13 func TestInit(t *testing.T) {}
14
15
16 func TestUnreachable(t *testing.T) {
17 defer func() {
18 if Enabled {
19 if err := recover(); err == nil {
20 t.Fatal("expected Unreachable to panic")
21 }
22 } else {
23 if err := recover(); err != nil {
24 t.Fatalf("expected Unreachable to be a no-op")
25 }
26 }
27 }()
28 Unreachable()
29 }
30
31
32 func TestUnreachableExceptTests(t *testing.T) {
33 UnreachableExceptTests()
34 }
35
View as plain text