testutil

package
v3.0.0-rc19+incompatible Latest Latest
Warning

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

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

Documentation

Overview

Reimport the go-cmp package as the name 'cmp' conflicts with the cmp instruction in the vm.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowUnexported

func AllowUnexported(types ...interface{}) cmp.Option

func Diff

func Diff(a, b interface{}, opts ...cmp.Option) string

func IgnoreUnexported

func IgnoreUnexported(types ...interface{}) cmp.Option

func TestChdir

func TestChdir(tb testing.TB, dir string) func()

TestChdir changes current working directory, and returns a cleanup function to return to the previous directory.

func TestOpenFile

func TestOpenFile(tb testing.TB, name string) *os.File

TestOpenFile creates a new file called name and returns the opened file.

func TestSetFlag

func TestSetFlag(tb testing.TB, name, value string) func()

TestSetFlag sets the value of the commandline flag, and returns a cleanup function that restores the flag value.

func TestTempDir

func TestTempDir(tb testing.TB) (string, func())

TestTempDir creates a temporary directory for use during tests. It returns the pathname, and a cleanup function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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