TestSuiteRequireTwice checks for regressions of issue #149 where suite.requirements was not initialized in suite.SetT() A regression would result on these tests panicking rather than failing.
(t *testing.T)
| 29 | // suite.requirements was not initialized in suite.SetT() |
| 30 | // A regression would result on these tests panicking rather than failing. |
| 31 | func TestSuiteRequireTwice(t *testing.T) { |
| 32 | ok := testing.RunTests( |
| 33 | allTestsFilter, |
| 34 | []testing.InternalTest{{ |
| 35 | Name: t.Name() + "/SuiteRequireTwice", |
| 36 | F: func(t *testing.T) { |
| 37 | suite := new(SuiteRequireTwice) |
| 38 | Run(t, suite) |
| 39 | }, |
| 40 | }}, |
| 41 | ) |
| 42 | assert.False(t, ok) |
| 43 | } |
| 44 | |
| 45 | func (s *SuiteRequireTwice) TestRequireOne() { |
| 46 | r := s.Require() |