Documentation ¶
Overview ¶
Package testingx contains functions and data to facilitate testing using the testing package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TestCase ¶
type TestCase[T, U any] struct { Name string Input T SetupFn func(context.Context) context.Context CheckFn func(context.Context, *testing.T, TestResult[U]) CleanupFn func(context.Context) }
TestCase represents a named test case, combining the input with a function for checking the observed result.
type TestFunc ¶
type TestFunc[T, U any] func(context.Context, T) TestResult[U]
TestFunc represents a function that consumes a test input and returns a result.
type TestResult ¶
TestResult represents the result of a test.
Click to show internal directories.
Click to hide internal directories.