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

Function TestComparingMsgAndArgsForwarding

assert/assertion_compare_test.go:456–472  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

454}
455
456func TestComparingMsgAndArgsForwarding(t *testing.T) {
457 msgAndArgs := []interface{}{"format %s %x", "this", 0xc001}
458 expectedOutput := "format this c001\n"
459 funcs := []func(t TestingT){
460 func(t TestingT) { Greater(t, 1, 2, msgAndArgs...) },
461 func(t TestingT) { GreaterOrEqual(t, 1, 2, msgAndArgs...) },
462 func(t TestingT) { Less(t, 2, 1, msgAndArgs...) },
463 func(t TestingT) { LessOrEqual(t, 2, 1, msgAndArgs...) },
464 func(t TestingT) { Positive(t, 0, msgAndArgs...) },
465 func(t TestingT) { Negative(t, 0, msgAndArgs...) },
466 }
467 for _, f := range funcs {
468 out := &outputT{buf: bytes.NewBuffer(nil)}
469 f(out)
470 Contains(t, out.buf.String(), expectedOutput)
471 }
472}

Callers

nothing calls this directly

Calls 8

GreaterFunction · 0.70
GreaterOrEqualFunction · 0.70
LessFunction · 0.70
LessOrEqualFunction · 0.70
PositiveFunction · 0.70
NegativeFunction · 0.70
ContainsFunction · 0.70
StringMethod · 0.45

Tested by

no test coverage detected