assert

package
v0.3.22 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package assert 测试断言.

包括各种测试断言.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains[T comparable](errorf errorfer, contains []T, sub T, msgAndArgs ...any) bool

func Equal

func Equal[T comparable](errorf errorfer, expected, actual T, msgAndArgs ...any) bool

func Equals

func Equals[T comparable](errorf errorfer, expected, actual []T, msgAndArgs ...any) bool

func Fail

func Fail(errorf errorfer, failureMessage string, msgAndArgs ...any) bool

func False

func False(errorf errorfer, value bool, msgAndArgs ...interface{}) bool

func Greater

func Greater[T constraints.Ordered](errorf errorfer, big, small T, msgAndArgs ...any) bool

func GreaterOrEqual

func GreaterOrEqual[T constraints.Ordered](errorf errorfer, big, small T, msgAndArgs ...any) bool

func Less

func Less[T constraints.Ordered](errorf errorfer, small, big T, msgAndArgs ...any) bool

func LessOrEqual

func LessOrEqual[T constraints.Ordered](errorf errorfer, small, big T, msgAndArgs ...any) bool

func Message

func Message(args ...any) string

func Nil

func Nil(errorf errorfer, value any, msgAndArgs ...any) bool

func NotEqual

func NotEqual[T comparable](errorf errorfer, expected, actual T, msgAndArgs ...any) bool

func NotEquals added in v0.3.22

func NotEquals[T comparable](errorf errorfer, expected, actual []T, msgAndArgs ...any) bool

func NotNil

func NotNil(errorf errorfer, value any, msgAndArgs ...any) bool

func Panics

func Panics(errorf errorfer, call panicFunc, msgAndArgs ...any) bool

func PanicsWithError

func PanicsWithError(errorf errorfer, errString string, call panicFunc, msgAndArgs ...any) bool

func True

func True(errorf errorfer, value bool, msgAndArgs ...any) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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