Documentation ¶
Overview ¶
Package assert contains functions for making assertions in unit tests From github.com/docker/docker/pkg/testutil/assert
Index ¶
- func Contains(t TestingT, actual, contains string)
- func DeepEqual(t TestingT, actual, expected interface{})
- func Equal(t TestingT, actual, expected interface{}, msg string)
- func EqualStringSlice(t TestingT, actual, expected []string)
- func Error(t TestingT, err error, contains string)
- func False(t TestingT, obj bool)
- func Less(t TestingT, x, y interface{})
- func Must(b bool)
- func MustNoError(err error)
- func Nil(t TestingT, obj interface{})
- func NilError(t TestingT, err error)
- func NotEqual(t TestingT, actual, expected interface{}, msg string)
- func NotNil(t TestingT, obj interface{})
- func True(t TestingT, obj bool)
- type T
- type TestingT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeepEqual ¶
func DeepEqual(t TestingT, actual, expected interface{})
DeepEqual compare the actual value to the expected value and fails the test if they are not "deeply equal".
func Equal ¶
Equal compare the actual value to the expected value and fails the test if they are not equal.
func EqualStringSlice ¶
EqualStringSlice compares two slices and fails the test if they do not contain the same items.
func Error ¶
Error asserts that error is not nil, and contains the expected text, otherwise it fails the test.
func MustNoError ¶
func MustNoError(err error)
Types ¶
Click to show internal directories.
Click to hide internal directories.