assert

package
v0.0.0-...-1f67a73 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package assert provides tiny asserting functions for testing. Inspired by github.com/stretchr/testify/assert and https://github.com/benbjohnson/testing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNil

func IsNil(object interface{}) bool

IsNil checks an interface{} with the reflect package.

func ObjectsAreEqual

func ObjectsAreEqual(expected, actual interface{}) bool

ObjectsAreEqual checks two interfaces with reflect.DeepEqual.

Types

type Assert

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

Assert wraps a testing.TB for convenient asserting calls.

func NewAssert

func NewAssert(t testing.TB) *Assert

NewAssert provides an Assert instance.

func (*Assert) Equal

func (a *Assert) Equal(expected, actual interface{}, msg string)

func (*Assert) Nil

func (a *Assert) Nil(obj interface{}, msg string)

func (*Assert) NoError

func (a *Assert) NoError(err error, msg string)

func (*Assert) NotEqual

func (a *Assert) NotEqual(expected, actual interface{}, msg string)

func (*Assert) NotNil

func (a *Assert) NotNil(obj interface{}, msg string)

func (*Assert) True

func (a *Assert) True(cond bool, msg string)

Jump to

Keyboard shortcuts

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