test

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertErrorMatch

func AssertErrorMatch(t *testing.T, msg string, testErr error)

AssertErrorMatch (t, "failed to open", err) would fail with a Fatal error if the string did not match.

func AssertNoError

func AssertNoError(t *testing.T, err error)

AssertNoError fails if there's an error

func ErrorMatch

func ErrorMatch(t *testing.T, msg string, testErr error) bool

ErrorMatch returns true if an error matches the required string.

e.g. ErrorMatch(t, "failed to open", err) would return true if the err passed in had a string that matched.

The message can be a regular expression, and if this fails to compile, then the test will fail.

Types

This section is empty.

Jump to

Keyboard shortcuts

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