Documentation
¶
Index ¶
- func AssertContains[T comparable](t *testing.T, slice []T, value T, message string)
- func AssertEqual[T comparable](t *testing.T, actual, expected T, message string)
- func AssertError(t *testing.T, err error, message string)
- func AssertNoError(t *testing.T, err error, message string)
- func Eventually(t *testing.T, condition func() bool, timeout time.Duration, message string)
- func EventuallyEqual[T comparable](t *testing.T, getter func() T, expected T, timeout time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertContains ¶
func AssertContains[T comparable](t *testing.T, slice []T, value T, message string)
AssertContains fails the test if the slice doesn't contain the value.
func AssertEqual ¶
func AssertEqual[T comparable](t *testing.T, actual, expected T, message string)
AssertEqual fails the test if actual != expected.
func AssertError ¶
AssertError fails the test if err is nil.
func AssertNoError ¶
AssertNoError fails the test if err is not nil.
func Eventually ¶
Eventually waits for a condition to be true within the timeout period. It checks the condition every 10ms until it returns true or the timeout expires.
func EventuallyEqual ¶
func EventuallyEqual[T comparable](t *testing.T, getter func() T, expected T, timeout time.Duration)
EventuallyEqual waits for a function to return the expected value.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.