testhlp

package
v0.0.0-...-1c63abb Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareFS

func CompareFS(t TestingT, expected fs.FS, actual fs.FS)

func FSContents

func FSContents(t TestingT, fsys fs.FS) map[string]FSItem

Types

type FSItem

type FSItem struct {
	IsDir   bool
	Content string
}

func (*FSItem) TypeString

func (f *FSItem) TypeString() string

type MockTestingT

type MockTestingT struct {
	mock.Mock
}

MockTestingT is an autogenerated mock type for the TestingT type

func NewMockTestingT

func NewMockTestingT(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTestingT

NewMockTestingT creates a new instance of MockTestingT. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockTestingT) EXPECT

func (_m *MockTestingT) EXPECT() *MockTestingT_Expecter

func (*MockTestingT) Errorf

func (_m *MockTestingT) Errorf(format string, args ...interface{})

Errorf provides a mock function with given fields: format, args

func (*MockTestingT) Fail

func (_m *MockTestingT) Fail()

Fail provides a mock function with given fields:

func (*MockTestingT) FailNow

func (_m *MockTestingT) FailNow()

FailNow provides a mock function with given fields:

func (*MockTestingT) Helper

func (_m *MockTestingT) Helper()

Helper provides a mock function with given fields:

func (*MockTestingT) Log

func (_m *MockTestingT) Log(args ...interface{})

Log provides a mock function with given fields: args

func (*MockTestingT) Logf

func (_m *MockTestingT) Logf(format string, args ...interface{})

Logf provides a mock function with given fields: format, args

type MockTestingT_Errorf_Call

type MockTestingT_Errorf_Call struct {
	*mock.Call
}

MockTestingT_Errorf_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Errorf'

func (*MockTestingT_Errorf_Call) Return

func (*MockTestingT_Errorf_Call) Run

func (_c *MockTestingT_Errorf_Call) Run(run func(format string, args ...interface{})) *MockTestingT_Errorf_Call

func (*MockTestingT_Errorf_Call) RunAndReturn

func (_c *MockTestingT_Errorf_Call) RunAndReturn(run func(string, ...interface{})) *MockTestingT_Errorf_Call

type MockTestingT_Expecter

type MockTestingT_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockTestingT_Expecter) Errorf

func (_e *MockTestingT_Expecter) Errorf(format interface{}, args ...interface{}) *MockTestingT_Errorf_Call

Errorf is a helper method to define mock.On call

  • format string
  • args ...interface{}

func (*MockTestingT_Expecter) Fail

Fail is a helper method to define mock.On call

func (*MockTestingT_Expecter) FailNow

FailNow is a helper method to define mock.On call

func (*MockTestingT_Expecter) Helper

Helper is a helper method to define mock.On call

func (*MockTestingT_Expecter) Log

func (_e *MockTestingT_Expecter) Log(args ...interface{}) *MockTestingT_Log_Call

Log is a helper method to define mock.On call

  • args ...interface{}

func (*MockTestingT_Expecter) Logf

func (_e *MockTestingT_Expecter) Logf(format interface{}, args ...interface{}) *MockTestingT_Logf_Call

Logf is a helper method to define mock.On call

  • format string
  • args ...interface{}

type MockTestingT_FailNow_Call

type MockTestingT_FailNow_Call struct {
	*mock.Call
}

MockTestingT_FailNow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FailNow'

func (*MockTestingT_FailNow_Call) Return

func (*MockTestingT_FailNow_Call) Run

func (*MockTestingT_FailNow_Call) RunAndReturn

func (_c *MockTestingT_FailNow_Call) RunAndReturn(run func()) *MockTestingT_FailNow_Call

type MockTestingT_Fail_Call

type MockTestingT_Fail_Call struct {
	*mock.Call
}

MockTestingT_Fail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Fail'

func (*MockTestingT_Fail_Call) Return

func (*MockTestingT_Fail_Call) Run

func (_c *MockTestingT_Fail_Call) Run(run func()) *MockTestingT_Fail_Call

func (*MockTestingT_Fail_Call) RunAndReturn

func (_c *MockTestingT_Fail_Call) RunAndReturn(run func()) *MockTestingT_Fail_Call

type MockTestingT_Helper_Call

type MockTestingT_Helper_Call struct {
	*mock.Call
}

MockTestingT_Helper_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Helper'

func (*MockTestingT_Helper_Call) Return

func (*MockTestingT_Helper_Call) Run

func (*MockTestingT_Helper_Call) RunAndReturn

func (_c *MockTestingT_Helper_Call) RunAndReturn(run func()) *MockTestingT_Helper_Call

type MockTestingT_Log_Call

type MockTestingT_Log_Call struct {
	*mock.Call
}

MockTestingT_Log_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Log'

func (*MockTestingT_Log_Call) Return

func (*MockTestingT_Log_Call) Run

func (_c *MockTestingT_Log_Call) Run(run func(args ...interface{})) *MockTestingT_Log_Call

func (*MockTestingT_Log_Call) RunAndReturn

func (_c *MockTestingT_Log_Call) RunAndReturn(run func(...interface{})) *MockTestingT_Log_Call

type MockTestingT_Logf_Call

type MockTestingT_Logf_Call struct {
	*mock.Call
}

MockTestingT_Logf_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Logf'

func (*MockTestingT_Logf_Call) Return

func (*MockTestingT_Logf_Call) Run

func (_c *MockTestingT_Logf_Call) Run(run func(format string, args ...interface{})) *MockTestingT_Logf_Call

func (*MockTestingT_Logf_Call) RunAndReturn

func (_c *MockTestingT_Logf_Call) RunAndReturn(run func(string, ...interface{})) *MockTestingT_Logf_Call

type TestingT

type TestingT interface {
	require.TestingT
	Helper()
	Log(args ...any)
	Logf(format string, args ...any)
	Fail()
}

Jump to

Keyboard shortcuts

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