(t *testing.T)
| 476 | } |
| 477 | |
| 478 | func 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 | } |
nothing calls this directly
no test coverage detected