Documentation
¶
Overview ¶
Minimalistic drop in eplacement for github.com/stretchr/testify/assert
Index ¶
- func Assert(t *testing.T, cond bool, msg string, rest ...interface{})
- func CheckEquals(t *testing.T, actual interface{}, expected interface{}, msg interface{})
- func Contains(t *testing.T, haystack, needle string, msg ...string)
- func Equal(t *testing.T, a, b interface{}, msg ...string)
- func EqualValues(t *testing.T, a, b interface{}, msg ...string)
- func Error(t *testing.T, err error, msg ...string)
- func Errorf(t *testing.T, format string, rest ...interface{})
- func Fail(t *testing.T, msg string)
- func False(t *testing.T, b bool, msg ...string)
- func NoError(t *testing.T, err error, msg ...string)
- func NotEqual(t *testing.T, a, b interface{}, msg ...string)
- func ObjectsAreEqualValues(a, b interface{}) bool
- func Run(t *testing.T, suite hasT)
- func True(t *testing.T, b bool, msg ...string)
- type TestSuite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Assert ¶ added in v1.1.0
Assert is similar to True() under a different name and earlier fortio/stats test implementation.
func CheckEquals ¶ added in v1.1.0
CheckEquals checks if actual == expect and fails the test and logs failure (including filename:linenum if they are not equal).
func EqualValues ¶
EqualValues checks for a equal b.
func ObjectsAreEqualValues ¶
func ObjectsAreEqualValues(a, b interface{}) bool
ObjectsAreEqualValues returns true if a == b (through refection).
func Run ¶
Run runs the test suite with SetupTest first and TearDownTest after. replaces https://pkg.go.dev/github.com/stretchr/testify/suite#Run
Types ¶
type TestSuite ¶
type TestSuite struct {
// contains filtered or unexported fields
}
TestSuite to be used as base struct for test suites. replaces https://pkg.go.dev/github.com/stretchr/testify@v1.8.0/suite