common

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockT

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

MockT is designed to be used in tests to make sure that Testy fails in the appropriate ways.

func (*MockT) Error

func (t *MockT) Error(_ ...any)

func (*MockT) Fail

func (t *MockT) Fail()

func (*MockT) FailNow

func (t *MockT) FailNow()

func (*MockT) Failed

func (t *MockT) Failed() bool

func (*MockT) FailedNow

func (t *MockT) FailedNow() bool

func (*MockT) Helper

func (t *MockT) Helper()

func (*MockT) Log

func (t *MockT) Log(_ ...any)

type T

type T interface {
	// These are the methods on *testing.T that Testy actually uses.
	Error(args ...any) // log a message, mark as failed, continue
	Fail()             // mark as failed, continue
	FailNow()          // mark as failed, exit

	// These methods are needed to test Testy. (Say that three times fast)
	Helper()      // mark as a helper
	Failed() bool // yes if the test has failed
}

T is an interface implemented by *testing.T, for compatibility and (lol) testing purposes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳