testutils

package
v0.28.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Diff

func Diff(t *testing.T, a, b string)

Diff checks the equality of two strings and reports its diff if they differ.

func DiffLine added in v0.24.4

func DiffLine(t *testing.T, a, b string)

DiffLine checks the equality of two strings and reports its diff by lines if they differ.

func Differs added in v0.28.0

func Differs(t *testing.T, a, b interface{})

Differs checks the equality of two objects.

func Equals

func Equals(t *testing.T, a, b interface{})

Equals checks the equality of two objects using go-test/deep.

func Panics

func Panics(t *testing.T, f func())

Panics will test if the given function panics.

func ReadGolden

func ReadGolden(t *testing.T) string

ReadGolden will attempt to read the golden file associated to the test.

func ReadTestfile

func ReadTestfile(t *testing.T, path string) string

ReadTestfile will open a file in the testdata directory.

func ReadTestfilePkg added in v0.23.1

func ReadTestfilePkg(t *testing.T, path, pkg string) string

ReadTestfilePkg will open a file in the testdata directory of the gievn pkg.

Types

This section is empty.

Jump to

Keyboard shortcuts

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