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

Function Condition

require/require.go:13–21  ·  view source on GitHub ↗

Condition uses a Comparison to assert a complex condition.

(t TestingT, comp assert.Comparison, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

11
12// Condition uses a Comparison to assert a complex condition.
13func Condition(t TestingT, comp assert.Comparison, msgAndArgs ...interface{}) {
14 if h, ok := t.(tHelper); ok {
15 h.Helper()
16 }
17 if assert.Condition(t, comp, msgAndArgs...) {
18 return
19 }
20 t.FailNow()
21}
22
23// Conditionf uses a Comparison to assert a complex condition.
24func Conditionf(t TestingT, comp assert.Comparison, msg string, args ...interface{}) {

Callers 1

ConditionMethod · 0.70

Calls 3

ConditionFunction · 0.92
HelperMethod · 0.65
FailNowMethod · 0.65

Tested by

no test coverage detected