Documentation ¶
Overview ¶
Package assert contains helpers for test assertions.
Index ¶
- func CmpDiff(exp, act interface{}) string
- func Equal(t testing.TB, exp, act interface{}, name string)
- func Error(t testing.TB, err error, name string)
- func ErrorContains(t testing.TB, err error, sub, name string)
- func False(t testing.TB, act bool, name string)
- func Len(t testing.TB, n int, a interface{}, name string)
- func Nil(t testing.TB, v interface{}, name string)
- func NotEqual(t testing.TB, exp, act interface{}, name string)
- func Success(t testing.TB, err error, name string)
- func True(t testing.TB, act bool, name string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CmpDiff ¶
func CmpDiff(exp, act interface{}) string
CmpDiff compares exp to act and returns a human readable string representing their diff. https://github.com/google/go-cmp/issues/40#issuecomment-328615283
func ErrorContains ¶
ErrorContains asserts the error string from err contains sub.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.