Documentation ¶
Overview ¶
Package assert is lightweight framework of common assertions to make unit testing easier and readable
Index ¶
- func Equals(t *testing.T, exp interface{}, act interface{}) (result bool)
- func IsFalse(t *testing.T, v bool) bool
- func IsNil(t *testing.T, v interface{}) bool
- func IsNotNil(t *testing.T, v interface{}) bool
- func IsTrue(t *testing.T, v bool) bool
- func NotEquals(t *testing.T, exp interface{}, act interface{}) (result bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Equals ¶
Equals asserts the equality of the given arguments
assert.Equals(t, 111, 111)
Returns true if the arguments are equal and false if different.
func IsFalse ¶
IsFalse asserts the given bool argument is false
assert.IsFalse(t, false)
Returns the negated value of the argument
func IsNil ¶
IsNil asserts the given argument is nil
assert.IsNil(t, nil)
Returns true if the argument is nil and false if initialized to something.
func IsNotNil ¶
IsNotNil asserts the given argument is initialized
assert.IsNotNil(t, 1)
Returns true if the argument is initialized and false if nil.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.