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

Function Truef

assert/assertion_format.go:800–805  ·  view source on GitHub ↗

Truef asserts that the specified value is true. assert.Truef(t, myBool, "error message %s", "formatted")

(t TestingT, value bool, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

798//
799// assert.Truef(t, myBool, "error message %s", "formatted")
800func Truef(t TestingT, value bool, msg string, args ...interface{}) bool {
801 if h, ok := t.(tHelper); ok {
802 h.Helper()
803 }
804 return True(t, value, append([]interface{}{msg}, args...)...)
805}
806
807// WithinDurationf asserts that the two times are within duration delta of each other.
808//

Callers 2

TruefFunction · 0.92
TruefMethod · 0.70

Calls 2

TrueFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected