assert

package module
v0.0.0-...-c8cc508 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2016 License: MIT Imports: 7 Imported by: 0

README

testbuddy

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetFailFunc func(t *testing.T) FailFunc
View Source
var NoNil = StructNotNil{}

Functions

func AutoTest

func AutoTest(data []TestData) error

func CallFunction

func CallFunction(f interface{}, args []interface{}) ([]interface{}, error)

func ConvertTo

func ConvertTo(i interface{}, to reflect.Type) (interface{}, error)

func Equal

func Equal(t *testing.T, val, expect interface{})

func False

func False(t *testing.T, val bool)

func GetFullFuncName

func GetFullFuncName(i interface{}) string

func GetShortFuncName

func GetShortFuncName(i interface{}) string

func HasError

func HasError(t *testing.T, vals []interface{})

func MustPanic

func MustPanic(t *testing.T, f TestFunc)

func Nil

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

func NoError

func NoError(t *testing.T, vals []interface{})

func NotEqual

func NotEqual(t *testing.T, val, expect interface{})

func NotNil

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

func Pack

func Pack(vals ...interface{}) []interface{}

pack a number of values into a slice containing those values

func SourceInfo

func SourceInfo(skip ...int) string

func True

func True(t *testing.T, val bool)

Types

type CallerInfo

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

func GetCallerInfo

func GetCallerInfo(skip int) (CallerInfo, bool)

type DoTestFunc

type DoTestFunc func(args ...interface{}) *Results

func Make

func Make(t *testing.T, f ...failFunc) DoTestFunc

type Expect

type Expect []interface{}

type FailFunc

type FailFunc func(format string, args ...interface{})

type Ignore

type Ignore struct {
}

type Params

type Params []interface{}

type Results

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

func (*Results) Equal

func (r *Results) Equal(expect ...interface{}) *Results

func (*Results) HasError

func (r *Results) HasError() *Results

func (*Results) IsNil

func (r *Results) IsNil() *Results

func (*Results) NoError

func (r *Results) NoError() *Results

func (*Results) NotEqual

func (r *Results) NotEqual(expect ...interface{}) *Results

func (*Results) NotNil

func (r *Results) NotNil() *Results

type StructNotNil

type StructNotNil struct {
}

type TestData

type TestData struct {
	F interface{}
	P Params
	E Expect
}

type TestFunc

type TestFunc func(t *testing.T)

Jump to

Keyboard shortcuts

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