assert

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assert

type Assert struct {
	// contains filtered or unexported fields
}

Assert implements just enough github.com/stretchr/testify/assert functionality to test this package. The source package has a more limited set of Go versions I'd like to support.

func New

func New(t *testing.T) *Assert

New creates a new assert type.

func (*Assert) Equal

func (me *Assert) Equal(expected, actual interface{})

Equal checks if expected == actual.

func (*Assert) Error

func (me *Assert) Error(err error)

Error checks if err is an error.

func (*Assert) InDelta

func (me *Assert) InDelta(expected interface{}, actual interface{}, delta interface{})

InDelta checks that (expected - delta) <= actual <= (expected + delta)

func (*Assert) Nil

func (me *Assert) Nil(v interface{})

Nil checks that v is nil or a nillable value set to nil (such as a nil map, nil slice, etc).

func (*Assert) NoError

func (me *Assert) NoError(err error)

NoError checks if err is not an error.

func (*Assert) NotEqual

func (me *Assert) NotEqual(expected, actual interface{})

NotEqual checks if expected != actual.

func (*Assert) NotNil

func (me *Assert) NotNil(v interface{})

NotNil checks that v is not nil.

Jump to

Keyboard shortcuts

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