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

Function TestComparingMsgAndArgsForwarding

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

Source from the content-addressed store, hash-verified

476}
477
478func TestComparingMsgAndArgsForwarding(t *testing.T) {
479 msgAndArgs := []interface{}{"format %s %x", "this", 0xc001}
480 expectedOutput := "format this c001\n"
481 funcs := []func(t TestingT){
482 func(t TestingT) { Greater(t, 1, 2, msgAndArgs...) },
483 func(t TestingT) { GreaterOrEqual(t, 1, 2, msgAndArgs...) },
484 func(t TestingT) { Less(t, 2, 1, msgAndArgs...) },
485 func(t TestingT) { LessOrEqual(t, 2, 1, msgAndArgs...) },
486 func(t TestingT) { Positive(t, 0, msgAndArgs...) },
487 func(t TestingT) { Negative(t, 0, msgAndArgs...) },
488 }
489 for _, f := range funcs {
490 out := &outputT{buf: bytes.NewBuffer(nil)}
491 f(out)
492 Contains(t, out.buf.String(), expectedOutput)
493 }
494}

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