| 712 | } |
| 713 | |
| 714 | func TestSubtestPanic(t *testing.T) { |
| 715 | suite := new(subtestPanicSuite) |
| 716 | ok := testing.RunTests( |
| 717 | allTestsFilter, |
| 718 | []testing.InternalTest{{ |
| 719 | Name: t.Name() + "/subtestPanicSuite", |
| 720 | F: func(t *testing.T) { |
| 721 | Run(t, suite) |
| 722 | }, |
| 723 | }}, |
| 724 | ) |
| 725 | assert.False(t, ok, "TestSubtestPanic/subtest should make the testsuite fail") |
| 726 | assert.True(t, suite.inTearDownSubTest) |
| 727 | assert.True(t, suite.inTearDownTest) |
| 728 | assert.True(t, suite.inTearDownSuite) |
| 729 | } |
| 730 | |
| 731 | type unInitializedSuite struct { |
| 732 | Suite |