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

Function True

assert/assertions.go:851–860  ·  assert/assertions.go::True

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

849//
850// assert.True(t, myBool)
851func True(t TestingT, value bool, msgAndArgs ...interface{}) bool {
852 if !value {
853 if h, ok := t.(tHelper); ok {
854 h.Helper()
855 }
856 return Fail(t, "Should be true", msgAndArgs...)
857 }
858
859 return true
860}
861
862// False asserts that the specified value is false.
863//

Calls 2

FailFunction · 0.70
HelperMethod · 0.65