Documentation ¶
Index ¶
- func Sample()
- type Suite
- func (s *Suite) BenchmarkSetUp(BeforeEachBenchmarkFunc func(*testing.B, string)) *Suite
- func (s *Suite) BenchmarkTearDown(AfterEachBenchmarkFunc func(*testing.B, string)) *Suite
- func (s *Suite) ExampleSetUp(BeforeEachExampleFunc func(string)) *Suite
- func (s *Suite) ExampleTearDown(AfterEachExampleFunc func(string)) *Suite
- func (s *Suite) Run(m *testing.M) int
- func (s *Suite) TestSetUp(BeforeEachTestFunc func(*testing.T, string)) *Suite
- func (s *Suite) TestTearDown(AfterEachTestFunc func(*testing.T, string)) *Suite
- type TestDeps
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Sample ¶ added in v0.5.0
func Sample()
Sample is a fake function that does nothing. It is intended only to serve as an identifier for the ExampleSample() test to use
Example ¶
===================================================
exampleSignature = testMsg fmt.Printf("During Test : %s\n", exampleSignature)
Output: During SetUp : SETUP WAS HIT During Test : TEST WAS HIT During TearDown : TEARDOWN WAS HIT
Types ¶
type Suite ¶
type Suite struct { Name string `json:"name"` // contains filtered or unexported fields }
Suite is a builder type for wrapping test cases with SetUp and TearDown methods
func (*Suite) BenchmarkSetUp ¶
BenchmarkSetUp adds a Set Up method for Benchmarks Inputs:
- *testing.B object
- string representing the Benchmark name
func (*Suite) BenchmarkTearDown ¶
BenchmarkTearDown adds a Tear Down method for Benchmarks Inputs:
- *testing.B object
- string representing the Benchmark name
func (*Suite) ExampleSetUp ¶
ExampleSetUp adds a Set Up method for Examples Inputs:
- string representing the Example name
func (*Suite) ExampleTearDown ¶
ExampleTearDown adds a Tear Down method for Examples Inputs:
- string representing the Example name
func (*Suite) Run ¶
Run takes in a *testing.M object, instruments it according to the builder rules, and runs it. The return integer is the result of the instrumented M's .Run() method.
type TestDeps ¶
type TestDeps struct{}
TestDeps is an implementation of the testing.testDeps interface, This is a copy of testing/internal/testdeps/deps.go
func (TestDeps) StopCPUProfile ¶
func (TestDeps) StopCPUProfile()