asserts

package
v2.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Never

func Never(
	t *testing.T,
	conditionFunc func(ctx context.Context) bool,
	waitTime,
	tickTime time.Duration,
	msgAndArgs ...any,
)

Never asserts that the provided conditionFunc never returns true within the specified waitTime, checking the condition every tickTime. If the conditionFunc returns true at any point, the test fails with the provided message and arguments. The conditionFunc receives a context.Context which is derived from the testing.T context, allowing for cancellation and timeouts. The conditionFunc is run immediately upon entering the function, in the same goroutine as the caller, thus it's a blocking call.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL