testutil

package
v0.0.0-...-c5e374d Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareWithFixture

func CompareWithFixture(t *testing.T, golden, output string)

CompareWithFixture will compare output files with a test fixture and allows to automatically update them by setting the UPDATE env var. The output and golden paths are relative to the test's directory.

func CompareWithFixtureDir

func CompareWithFixtureDir(t *testing.T, golden, output string)

CompareWithFixtureDir will compare all files in a directory with a corresponding test fixture directory.

func CompareWithSerializedFixture

func CompareWithSerializedFixture(t *testing.T, data interface{})

CompareWithSerializedFixture compares an object that can be marshalled with a golden file containing the serialized version of the data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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