test

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(t *testing.T, s, substr string)

Contains reports whether a substr is inside s

func CreateTempFile

func CreateTempFile(t *testing.T, data string) string

func Equal

func Equal[A any](t *testing.T, expected, received A)

Equal asserts expected and received have deep equality

func False

func False(t *testing.T, val bool)

func GetFileContent added in v0.4.8

func GetFileContent(t *testing.T, name string) string

GetFileContent returns the contents of a file

it errors if file doesn't exist

func Nil

func Nil(t *testing.T, val interface{})

func NoError added in v0.4.8

func NoError(t *testing.T, err error)

func NotCalled

func NotCalled(t *testing.T)

NotCalled is going to mark a test as failed if called

func True

func True(t *testing.T, val bool)

Types

type MockTestingT

type MockTestingT struct {
	MockHelper  func()
	MockName    func() string
	MockSkip    func(args ...interface{})
	MockSkipf   func(format string, args ...interface{})
	MockSkipNow func()
	MockError   func(args ...interface{})
	MockLog     func(args ...interface{})
}

func (MockTestingT) Error

func (m MockTestingT) Error(args ...interface{})

func (MockTestingT) Helper

func (m MockTestingT) Helper()

func (MockTestingT) Log

func (m MockTestingT) Log(args ...interface{})

func (MockTestingT) Name

func (m MockTestingT) Name() string

func (MockTestingT) Skip

func (m MockTestingT) Skip(args ...interface{})

func (MockTestingT) SkipNow

func (m MockTestingT) SkipNow()

func (MockTestingT) Skipf

func (m MockTestingT) Skipf(format string, args ...interface{})

Jump to

Keyboard shortcuts

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