goldenfile

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTestDirectory    = "./testdata/"
	DefaultGoldenFileSuffix = ".golden"
)

Variables

View Source
var Update = flag.Bool("update", false, "Update golden files")

Functions

func AssertBytesEq

func AssertBytesEq(t TestingT, filepath string, actual []byte, msgAndArgs ...interface{}) bool

func AssertJSONEq

func AssertJSONEq(t TestingT, filepath string, actual string, msgAndArgs ...interface{}) bool

func AssertStringEq

func AssertStringEq(t TestingT, filepath string, actual string, msgAndArgs ...interface{}) bool

func AssertYAMLEq

func AssertYAMLEq(t TestingT, filepath string, actual string, msgAndArgs ...interface{}) bool

func MakeDefaultName

func MakeDefaultName(name string) string

func RequireBytesEq

func RequireBytesEq(t TestingT, filepath string, actual []byte, msgAndArgs ...interface{})

func RequireJSONEq

func RequireJSONEq(t TestingT, filepath string, actual string, msgAndArgs ...interface{})

func RequireStringEq

func RequireStringEq(t TestingT, filepath string, actual string, msgAndArgs ...interface{})

func RequireYAMLEq

func RequireYAMLEq(t TestingT, filepath string, actual string, msgAndArgs ...interface{})

Types

type GoldenFileComparisonAssertionFunc

type GoldenFileComparisonAssertionFunc func(t TestingT, expected []byte, actual []byte, msgAndArgs ...interface{}) bool

type StringComparisonAssertionFunc

type StringComparisonAssertionFunc func(t assert.TestingT, expected string, actual string, msgAndArgs ...interface{}) bool

type TestingT

type TestingT interface {
	Errorf(format string, args ...interface{})
	FailNow()
	Fatal(msgAndArgs ...interface{})
	Log(args ...interface{})
	Skip(msgAndArgs ...interface{})
}

Jump to

Keyboard shortcuts

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