Help us shape the future of Go! Take the 2026 Go Developer Survey

testutils

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T

type T struct {
	*testing.T
}

T is a wrapper around testing.T which provides additional methods defined in this package. See below for details.

func (*T) Assert

func (t *T) Assert(cond bool)

Assert calls t.Fatal if the condition is false. Also the text of the assertion is printed.

func (*T) AssertDeepEqual

func (t *T) AssertDeepEqual(val, ref interface{})

AssertDeepEqual asserts that the value is equal to some reference.

func (*T) AssertEqual

func (t *T) AssertEqual(val, ref interface{})

AssertEqual asserts that the value is equal to some reference.

func (*T) Check

func (t *T) Check(cond bool)

Check calls t.Error if the condition is false. Also the text of the condition is printed.

func (*T) CheckDeepEqual

func (t *T) CheckDeepEqual(val, ref interface{})

CheckDeepEqual checks that the value is equal to some reference.

func (*T) CheckEqual

func (t *T) CheckEqual(val, ref interface{})

CheckEqual checks that the value is equal to some reference.

func (*T) CheckRegexpEqual

func (t *T) CheckRegexpEqual(val, regexs string)

CheckRegexpEqual checks that the value is matched by some regular expression.

func (*T) Run

func (t *T) Run(testName string, testFn func(t T))

Run runs the specified sub-test and passes it a T instance from this package.

Jump to

Keyboard shortcuts

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