expect

package
v0.0.0-...-1056671 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type V

type V[T comparable] struct {
	// contains filtered or unexported fields
}

V is a generic container to expect values to be received. Useful when creating mocks.

func Value

func Value[T comparable](exp T) V[T]

Value creates a V instance that expects the value to be received.

func (*V[T]) Got

func (v *V[T]) Got(t T)

Got stores the value as received.

func (*V[T]) Validate

func (v *V[T]) Validate(t *testing.T, name string)

Validate that the expectations where met, i.e. that the got value matches the expected one.

Jump to

Keyboard shortcuts

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