MCPcopy Create free account
hub / github.com/stretchr/testify / True

Function True

assert/assertions.go:813–823  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

811//
812// assert.True(t, myBool)
813func True(t TestingT, value bool, msgAndArgs ...interface{}) bool {
814 if !value {
815 if h, ok := t.(tHelper); ok {
816 h.Helper()
817 }
818 return Fail(t, "Should be true", msgAndArgs...)
819 }
820
821 return true
822
823}
824
825// False asserts that the specified value is false.
826//

Calls 2

FailFunction · 0.70
HelperMethod · 0.65