check

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepEqual

func DeepEqual(t checkmate.TestingT, actual, expected any, msgAndArgs ...any) bool

DeepEqual checks if two values are deeply equal. If they are not equal, it logs the differences.

func Equal

func Equal(t checkmate.TestingT, actual, expected any, msgAndArgs ...any) bool

Equal checks if two primitive values are equal.

func ErrorContains

func ErrorContains(t checkmate.TestingT, err error, errText string, msgAndArgs ...any) bool

ErrorContains checks whether the given err contains the errText in the err.Error() output.

func ErrorIs

func ErrorIs(t checkmate.TestingT, err error, target error, msgAndArgs ...any) bool

ErrorIs checks whether the target error occurs within err's error tree.

func False

func False(t checkmate.TestingT, condition bool, msgAndArgs ...any) bool

False checks whether the condition is false.

func Nil

func Nil(t checkmate.TestingT, value any, msgAndArgs ...any) bool

Nil checks whether the value equals nil.

func NotDeepEqual

func NotDeepEqual(t checkmate.TestingT, actual, expected any, msgAndArgs ...any) bool

NotDeepEqual checks if two values are not deeply equal.

func NotEqual

func NotEqual(t checkmate.TestingT, actual, expected any, msgAndArgs ...any) bool

NotEqual checks if two values are not equal. It fails the test if the values are equal.

func NotErrorContains

func NotErrorContains(t checkmate.TestingT, err error, errText string, msgAndArgs ...any) bool

NotErrorContains checks whether the given err does not contain the errText in the err.Error() output.

func NotErrorIs

func NotErrorIs(t checkmate.TestingT, err error, target error, msgAndArgs ...any) bool

NotErrorIs checks whether the target error does not occur within the err's error tree.

func NotNil

func NotNil(t checkmate.TestingT, value any, msgAndArgs ...any) bool

NotNil checks whether the value does not equal nil.

func True

func True(t checkmate.TestingT, condition bool, msgAndArgs ...any) bool

True checks whether the condition is true.

Types

This section is empty.

Jump to

Keyboard shortcuts

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