requirex

package
v0.0.729 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EqualAsJSON

func EqualAsJSON(t *testing.T, expected, actual interface{}, args ...interface{})

func EqualDuration added in v0.0.451

func EqualDuration(t require.TestingT, expected, actual, precision time.Duration)

EqualDuration fails if expected and actual are more distant than precision Note: The previous implementation incorrectly passed on durations bigger than time.maxDuration (i.e. with zero-time involved) and incorrectly failed on zero durations.

func EqualTime added in v0.0.451

func EqualTime(t require.TestingT, expected, actual time.Time, precision time.Duration)

EqualTime fails if expected and actual are more distant than precision Deprecated: use require.WithinDuration instead Note: The previous implementation incorrectly passed on durations bigger than time.maxDuration (i.e. with zero-time involved) and incorrectly failed on zero durations.

Types

This section is empty.

Jump to

Keyboard shortcuts

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