MCPcopy
hub / github.com/stretchr/testify / TestSuiteRequireTwice

Function TestSuiteRequireTwice

suite/suite_test.go:31–43  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

29// suite.requirements was not initialized in suite.SetT()
30// A regression would result on these tests panicking rather than failing.
31func 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
45func (s *SuiteRequireTwice) TestRequireOne() {
46 r := s.Require()

Callers

nothing calls this directly

Calls 3

FalseFunction · 0.92
RunFunction · 0.85
NameMethod · 0.65

Tested by

no test coverage detected