package
1.0.10
Repository: https://github.com/jucardi/go-testx.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
Eval uses a EvalFunc to assert a complex condition.
Fail reports a failure through.
FailNow fails test.
InDelta asserts that the two numerals are within delta of each other.
IsType asserts that the specified objects are of the same type.
JSONEq asserts that two JSON strings are equivalent.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
OnFailure registers a callback that will be executed if a test fails.
No description provided by the author
ShouldBeEmpty asserts that the specified object is empty.
ShouldBeFalse asserts that the specified value is false.
ShouldBeNil asserts that the specified object is nil.
ShouldBeTrue asserts that the specified value is true.
ShouldContain asserts that the specified string, list(array, slice...) or map contains the specified substring or element.
ShouldEqual asserts that two objects are equal.
ShouldEqualError asserts that a function returned an error (i.e.
ShouldEqualValues asserts that two objects are equal or convertable to the same types and equal.
ShouldError asserts that a function returned an error (i.e.
ShouldHaveSubset asserts that the specified list(array, slice...) contains all elements given in the specified subset(array, slice...).
ShouldImplement asserts that an object is implemented by the specified interface.
ShouldLen asserts that the specified object has specific length.
ShouldMatchElements asserts that the specified listA(array, slice...) is equal to specified listB(array, slice...) ignoring the order of the elements.
ShouldMatchExactly asserts that two objects are equal in value and type.
ShouldMatchRegexp asserts that a specified regexp matches a string.
ShouldNotBeEmpty asserts that the specified object is NOT empty.
ShouldNotBeEqual asserts that the specified values are NOT equal.
ShouldNotBeNil asserts that the specified object is not nil.
ShouldNotContain asserts that the specified string, list(array, slice...) or map does NOT contain the specified substring or element.
ShouldNotError asserts that a function returned no error (i.e.
ShouldNotHaveSubset asserts that the specified list(array, slice...) contains not all elements given in the specified subset(array, slice...).
ShouldNotMatchRegexp asserts that a specified regexp does not match a string.
ShouldNotPanic asserts that the code inside the specified PanicTestFunc does NOT panic.
NotZero asserts that i is not the zero value for its type.
ShouldPanic asserts that the code inside the specified PanicTestFunc panics.
ShouldPanicWithValue asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value equals the expected panic value.
ShouldZero asserts that i is the zero value for its type.
WithinDuration asserts that the two times are within duration delta of each other.