Documentation
¶
Index ¶
- Variables
- func Benchmark(b *testing.B, fn StageFunc, cases []TestCase)
- func Debug() bool
- func Open(name string) io.Reader
- func Print(a ...any) (n int, err error)
- func Printf(format string, a ...any) (n int, err error)
- func Println(a ...any) (n int, err error)
- func Reader(input any) (io.Reader, error)
- func RunCLI(input any, fns ...StageFunc)
- func SetFS(f fs.FS)
- func Test(t *testing.T, fn StageFunc, cases []TestCase)
- func Verbose() bool
- type StageFunc
- type TestCase
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnimplemented = fmt.Errorf("unimplemented")
Functions ¶
Types ¶
type TestCase ¶
type TestCase struct { // Name of the test Name string // Input can be []byte, string, or io.Reader Input any // Result can be of any type Result any // Error Err error }
TestCase represents the input and expected result of a test. Tests will individually run under the provided name. Input supports different types that will be converted to io.Reader. Result can be of any type, but it has to match the function result to succeed. Err is usually nil, but if we expect one, it can be given here.
Click to show internal directories.
Click to hide internal directories.