suite

package
v23.0.10+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package suite is a simplified version of testify's suite package which has unnecessary dependencies. Please remove this package whenever possible.

Index

Constants

This section is empty.

Variables

View Source
var TimeoutFlag = flag.Duration("timeout", 0, "DO NOT USE")

TimeoutFlag is the flag to set a per-test timeout when running tests. Defaults to `-timeout`.

Functions

func Run

func Run(t *testing.T, suite interface{})

Run takes a testing suite and runs all of the tests attached to it.

Types

type SetupAllSuite

type SetupAllSuite interface {
	SetUpSuite(t *testing.T)
}

SetupAllSuite has a SetupSuite method, which will run before the tests in the suite are run.

type SetupTestSuite

type SetupTestSuite interface {
	SetUpTest(t *testing.T)
}

SetupTestSuite has a SetupTest method, which will run before each test in the suite.

type TearDownAllSuite

type TearDownAllSuite interface {
	TearDownSuite(t *testing.T)
}

TearDownAllSuite has a TearDownSuite method, which will run after all the tests in the suite have been run.

type TearDownTestSuite

type TearDownTestSuite interface {
	TearDownTest(t *testing.T)
}

TearDownTestSuite has a TearDownTest method, which will run after each test in the suite.

type TimeoutTestSuite

type TimeoutTestSuite interface {
	OnTimeout()
}

TimeoutTestSuite has a OnTimeout method, which will run after a single test times out after a period specified by -timeout flag.

Jump to

Keyboard shortcuts

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