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

Function TestOrderingMsgAndArgsForwarding

assert/assertion_order_test.go:196–213  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

194}
195
196func TestOrderingMsgAndArgsForwarding(t *testing.T) {
197 t.Parallel()
198
199 msgAndArgs := []interface{}{"format %s %x", "this", 0xc001}
200 expectedOutput := "format this c001\n"
201 collection := []int{1, 2, 1}
202 funcs := []func(t TestingT){
203 func(t TestingT) { IsIncreasing(t, collection, msgAndArgs...) },
204 func(t TestingT) { IsNonIncreasing(t, collection, msgAndArgs...) },
205 func(t TestingT) { IsDecreasing(t, collection, msgAndArgs...) },
206 func(t TestingT) { IsNonDecreasing(t, collection, msgAndArgs...) },
207 }
208 for _, f := range funcs {
209 out := &outputT{buf: bytes.NewBuffer(nil)}
210 f(out)
211 Contains(t, out.buf.String(), expectedOutput)
212 }
213}

Callers

nothing calls this directly

Calls 6

IsIncreasingFunction · 0.70
IsNonIncreasingFunction · 0.70
IsDecreasingFunction · 0.70
IsNonDecreasingFunction · 0.70
ContainsFunction · 0.70
StringMethod · 0.45

Tested by

no test coverage detected