test

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GopPackage = true
)

Variables

This section is empty.

Functions

func Gopt_App_TestMain

func Gopt_App_TestMain(app interface{ initApp(m *testing.M) }, m *testing.M)

Gopt_App_TestMain is required by Go+ compiler as the entry of a Go+ testing project.

func Gopt_Case_TestMain

func Gopt_Case_TestMain(c interface{ initCase(t *testing.T) }, t *testing.T)

Gopt_Case_TestMain is required by Go+ compiler as the test case entry.

Types

type App

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

App represents a Go+ testing main application.

func (App) M added in v1.2.2

func (p App) M() *testing.M

M returns the *testing.M object.

type Case

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

Case represents a Go+ testcase.

func (Case) Run

func (p Case) Run(name string, f func(t *testing.T)) bool

Run runs f as a subtest of t called name. It runs f in a separate goroutine and blocks until f returns or calls t.Parallel to become a parallel test. Run reports whether f succeeded (or at least did not fail before calling t.Parallel).

func (Case) T

func (p Case) T() *testing.T

T returns the *testing.T object .

Jump to

Keyboard shortcuts

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