assert

package
v0.0.0-...-d14ae1d Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(t *testing.T, expected, got interface{})

Equal asserts given two values are equal. If it's not equal, it logs the error trace. It supports all the values supported by `reflect.DeepEqual`

func Equalf

func Equalf(t *testing.T, expected, got interface{}, msg string, args ...interface{})

Equalf asserts given two values are equal. If it's not equal, it logs the error trace. It supports all the values supported by `reflect.DeepEqual`

func Fail

func Fail(t *testing.T, msg string, args ...interface{})

Fail reports fail through and logs the error trace

func FailNowOnError

func FailNowOnError(t *testing.T, err error, msg string)

FailNowOnError asserts given `error` if it's not nil. It reports the error trace and fails the test

func FailNowOnErrorf

func FailNowOnErrorf(t *testing.T, err error, msg string, args ...interface{})

FailNowOnErrorf asserts given `error` if it's not nil. It reports the error trace and fails the test

func FailOnError

func FailOnError(t *testing.T, err error, msg string)

FailOnError asserts given `error` if it's not nil. It reports the error trace

func FailOnErrorf

func FailOnErrorf(t *testing.T, err error, msg string, args ...interface{})

FailOnErrorf asserts given `error` if it's not nil. It reports the error trace

func False

func False(t *testing.T, v interface{})

False asserts the given value is false, if not false it log the error trace

func Falsef

func Falsef(t *testing.T, v interface{}, msg string, args ...interface{})

Falsef asserts the given value is false, if not false it log the error trace

func Nil

func Nil(t *testing.T, v interface{})

Nil asserts the given value is `nil`. If it's not nil, it log the error trace

func Nilf

func Nilf(t *testing.T, v interface{}, msg string, args ...interface{})

Nilf asserts the given value is `nil`. If it's not nil, it log the error trace

func NotEqual

func NotEqual(t *testing.T, expected, got interface{})

NotEqual asserts given two values are not equal. If it's equal, it logs the error trace. It supports all the values supported by `reflect.DeepEqual`

func NotEqualf

func NotEqualf(t *testing.T, expected, got interface{}, msg string, args ...interface{})

NotEqualf asserts given two values are not equal. If it's equal, it logs the error trace. It supports all the values supported by `reflect.DeepEqual`

func NotNil

func NotNil(t *testing.T, v interface{})

NotNil asserts the given value is not `nil`. If it's nil, it log the error trace

func NotNilf

func NotNilf(t *testing.T, v interface{}, msg string, args ...interface{})

NotNilf asserts the given value is not `nil`. If it's nil, it log the error trace

func True

func True(t *testing.T, v interface{})

True asserts the given value is true, if not true it log the error trace

func Truef

func Truef(t *testing.T, v interface{}, msg string, args ...interface{})

Truef asserts the given value is true, if not true it log the error trace

Types

This section is empty.

Jump to

Keyboard shortcuts

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