Documentation
¶
Overview ¶
Package testassert checks the conditions of tests, as testify's assert and require do, so tests which use them can be ported without testify
Index ¶
- Variables
- type Checker
- func (c Checker) Contains(t *testing.T, container, element any, msgAndArgs ...any) bool
- func (c Checker) Empty(t *testing.T, object any, msgAndArgs ...any) bool
- func (c Checker) Equal(t *testing.T, want, got any, msgAndArgs ...any) bool
- func (c Checker) ErrorIs(t *testing.T, err, target error, msgAndArgs ...any) bool
- func (c Checker) Len(t *testing.T, object any, n int, msgAndArgs ...any) bool
- func (c Checker) Less(t *testing.T, a, b any, msgAndArgs ...any) bool
- func (c Checker) NoError(t *testing.T, err error, msgAndArgs ...any) bool
- func (c Checker) NotContains(t *testing.T, container, element any, msgAndArgs ...any) bool
- func (c Checker) NotEmpty(t *testing.T, object any, msgAndArgs ...any) bool
- func (c Checker) True(t *testing.T, value bool, msgAndArgs ...any) bool
Constants ¶
This section is empty.
Variables ¶
var ( // Assert fails a test when a condition is false, and carries on Assert = Checker{/* contains filtered or unexported fields */} // Require fails a test when a condition is false, and stops it Require = Checker{/* contains filtered or unexported fields */} )
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker struct {
// contains filtered or unexported fields
}
Checker checks a condition of a test, and fails the test when it's false, which stops the test when it's fatal, as testify's require does, and otherwise carries on, as testify's assert does