assertx

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Closed

func Closed[T any](t *testing.T, ch <-chan T, args ...any)

Closed requires a channel to be closed within a grace period

func Drain

func Drain[T any](ch <-chan T) []T

Drain returns all elements of the given channel until no element appear in a grace period.

func Element

func Element[T any](t *testing.T, ch <-chan T, args ...any) T

Element requires an element in the given channel within a grace period.

func Equal

func Equal[T any](t *testing.T, actual, expected T, args ...any)

Equal is a typed convenience wrapper over assert.Equal to make constants the correct type. Also uses the idiomatic "have before want" parameter ordering.

func EqualProtobuf

func EqualProtobuf(t *testing.T, actual, expected proto.Message, args ...any)

func NoElement

func NoElement[T any](t *testing.T, ch <-chan T, args ...any)

NoElement requires no element in the given channel in a grace period.

func NotEqual

func NotEqual[T any](t *testing.T, actual, expected T, args ...any)

NotEqual is a typed convenience wrapper over assert.NotEqual to make constants the correct type. Also uses the idiomatic "have before want" parameter ordering.

Types

This section is empty.

Jump to

Keyboard shortcuts

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