testing

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EqualWithNaNs

func EqualWithNaNs(
	t assert.TestingT,
	expected, actual interface{},
	msgAndArgs ...interface{},
) bool

EqualWithNaNs compares two numbers for equality, accounting for NaNs.

func Equalish

func Equalish(
	t assert.TestingT,
	expected, actual interface{},
	msgAndArgs ...interface{},
) bool

Equalish asserts that two objects are equal. Looser than assert.Equal since it checks for equality of printing expected vs printing actual.

assert.Equal(t, 123, 123, "123 and 123 should be equal")

Returns whether the assertion was successful (true) or not (false).

func InDeltaWithNaNs

func InDeltaWithNaNs(
	t assert.TestingT,
	expected, actual interface{},
	delta float64,
	msgAndArgs ...interface{},
) bool

InDeltaWithNaNs compares two floats for equality within a delta, accounting for NaNs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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