testutil

package
v0.0.0-...-6f3d572 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmp

func Cmp[T any](t *testing.T, prefix string, want, got T, opts ...cmp.Option)

func CmpError

func CmpError(t *testing.T, funcString string, wantErr, err error, opts ...cmp.Option)

func CmpPanic

func CmpPanic[T any](t *testing.T, funcString string, f func() T, want interface{}, opts ...cmp.Option) T

func FilepathAbs

func FilepathAbs(t *testing.T, s ...string) string

func StubValue

func StubValue[T any](t *testing.T, originalValue *T, newValue T)

func TempFile

func TempFile(t *testing.T, pattern string) *os.File

func Write

func Write(t *testing.T, iow io.Writer, contents []string)

Types

type GenericTest

type GenericTest interface {
	Run(t *testing.T)
}

Jump to

Keyboard shortcuts

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