expect

package module
v0.0.0-...-340d18e Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Expector

type Expector[T any] interface {
	To(matcher Matcher[T]) error
	NotTo(matcher Matcher[T]) error
}

func Error

func Error(err error) Expector[error]

func Value

func Value[T any](value T) Expector[T]

type Matcher

type Matcher[T any] interface {
	PositiveMatch(value T) bool
	PositiveError(value T) error
	NegativeMatch(value T) bool
	NegativeError(value T) error
}

func BeEq

func BeEq[T comparable](value T) Matcher[T]

func BeError

func BeError() Matcher[error]

Jump to

Keyboard shortcuts

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