testutils

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2019 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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