Documentation ¶
Index ¶
- func Equal(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool
- func Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool
- func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool
- func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool
- func ObjectsAreEqual(expected, actual interface{}) bool
- type TestingT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Equal ¶
Equal asserts that two objects are equal.
assert.Equal(t, 123, 123)
Pointer variable equality is determined based on the equality of the referenced values (as opposed to the memory addresses). Function equality cannot be determined and will always fail.
func JSONEq ¶
JSONEq asserts that two JSON strings are equivalent.
assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`)
func ObjectsAreEqual ¶
func ObjectsAreEqual(expected, actual interface{}) bool
ObjectsAreEqual determines if two objects are considered equal.
This function does no assertion of any kind.
Types ¶
Click to show internal directories.
Click to hide internal directories.