Documentation
¶
Index ¶
- func CheckPanic(t *testing.T, fn func(), contains string) bool
- func EqualBool(t *testing.T, got, expected bool, args ...interface{}) bool
- func EqualErrorMessage(t *testing.T, got, expected interface{}, args ...interface{})
- func EqualInt(t *testing.T, got, expected int, args ...interface{}) bool
- func EqualStr(t *testing.T, got, expected string, args ...interface{}) bool
- func IsFalse(t *testing.T, got bool, args ...interface{}) bool
- func IsTrue(t *testing.T, got bool, args ...interface{}) bool
- type TestingT
- type TestingTB
- func (t *TestingTB) Cleanup(fn func())
- func (t *TestingTB) Error(args ...interface{})
- func (t *TestingTB) Errorf(format string, args ...interface{})
- func (t *TestingTB) Fail()
- func (t *TestingTB) FailNow()
- func (t *TestingTB) Failed() bool
- func (t *TestingTB) Fatal(args ...interface{})
- func (t *TestingTB) Fatalf(format string, args ...interface{})
- func (t *TestingTB) Helper()
- func (t *TestingTB) Log(args ...interface{})
- func (t *TestingTB) Logf(format string, args ...interface{})
- func (t *TestingTB) Name() string
- func (t *TestingTB) Skip(args ...interface{})
- func (t *TestingTB) SkipNow()
- func (t *TestingTB) Skipf(format string, args ...interface{})
- func (t *TestingTB) Skipped() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPanic ¶
CheckPanic checks that fn() panics and that the panic() arg is a string that contains contains.
func EqualErrorMessage ¶
EqualErrorMessage prints a test error message of the form:
Message Failed test got: got_value expected: expected_value
Types ¶
type TestingT ¶
TestingT is a type implementing td.TestingT intended to be used in tests.
func NewTestingT ¶ added in v1.2.0
func NewTestingT() *TestingT
NewTestingT returns a new instance of *TestingT.
func (*TestingT) Error ¶
func (t *TestingT) Error(args ...interface{})
Fatal mocks testing.T Error method.
type TestingTB ¶ added in v1.6.0
TestingTB is a type implementing testing.TB intended to be used in tests.
func NewTestingTB ¶ added in v1.6.0
NewTestingTB returns a new instance of *TestingTB.
func (*TestingTB) Cleanup ¶ added in v1.6.0
func (t *TestingTB) Cleanup(fn func())
Cleanup mocks testing.T Cleanup method. Not thread-safe but we don't care in tests.
func (*TestingTB) Error ¶ added in v1.6.0
func (t *TestingTB) Error(args ...interface{})
Fatal mocks testing.T Error method.
func (*TestingTB) Fail ¶ added in v1.6.0
func (t *TestingTB) Fail()
Fail mocks testing.T Fail method.
func (*TestingTB) FailNow ¶ added in v1.6.0
func (t *TestingTB) FailNow()
FailNow mocks testing.T FailNow method.
func (*TestingTB) Fatal ¶ added in v1.6.0
func (t *TestingTB) Fatal(args ...interface{})
Fatal mocks testing.T Fatal method.
func (*TestingTB) Helper ¶ added in v1.6.0
func (t *TestingTB) Helper()
Helper mocks testing.T Helper method.
func (*TestingTB) Log ¶ added in v1.6.0
func (t *TestingTB) Log(args ...interface{})
Log mocks testing.T Log method.
func (*TestingTB) Skip ¶ added in v1.6.0
func (t *TestingTB) Skip(args ...interface{})
Skip mocks testing.T Skip method.
func (*TestingTB) SkipNow ¶ added in v1.6.0
func (t *TestingTB) SkipNow()
SkipNow mocks testing.T SkipNow method.