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

Function True

require/require.go:2063–2071  ·  view source on GitHub ↗

True asserts that the specified value is true. require.True(t, myBool)

(t TestingT, value bool, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

2061//
2062// require.True(t, myBool)
2063func True(t TestingT, value bool, msgAndArgs ...interface{}) {
2064 if h, ok := t.(tHelper); ok {
2065 h.Helper()
2066 }
2067 if assert.True(t, value, msgAndArgs...) {
2068 return
2069 }
2070 t.FailNow()
2071}
2072
2073// Truef asserts that the specified value is true.
2074//

Callers 5

Test_MockMethodCalledFunction · 0.92
TrueMethod · 0.70
TestTrueFunction · 0.70
TestEventuallyWithTFalseFunction · 0.70
TestEventuallyWithTTrueFunction · 0.70

Calls 3

TrueFunction · 0.92
HelperMethod · 0.65
FailNowMethod · 0.65

Tested by 4

Test_MockMethodCalledFunction · 0.74
TestTrueFunction · 0.56
TestEventuallyWithTFalseFunction · 0.56
TestEventuallyWithTTrueFunction · 0.56