testutil

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

testutil package is a utility for testing. This package is inspired by morikuni/failure testutil_test.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal added in v0.3.0

func Equal(t testing.TB, want, got any, msg ...any)

func Equalf added in v0.3.0

func Equalf(t testing.TB, want, got any, format string, msg ...any)

func MustEqual

func MustEqual(t testing.TB, want, got any, msg ...any)

func MustEqualf added in v0.3.0

func MustEqualf(t testing.TB, want, got any, format string, msg ...any)

func MustNoError added in v0.3.0

func MustNoError(t testing.TB, err error)

func NewHereDoc

func NewHereDoc(s string) string

func NewHereDocf

func NewHereDocf(s string, args ...interface{}) string

func NoError added in v0.3.0

func NoError(t testing.TB, err error)

func Setenv added in v0.1.0

func Setenv(t testing.TB, key, value string)

Setenv is a helper function for setting environment variables in tests. If the value is empty, then the environment variable is unset. At the end of the test (using testing.TB.Cleanup) the environment variable is unset.

Types

This section is empty.

Jump to

Keyboard shortcuts

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