test

package
v0.0.0-...-d26976d Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parallel

func Parallel(t *testing.T)

Parallel enables parallel tests only if testing is not verbose this prevents the debug logs from being mixed together

func RunAll

func RunAll[F unix.Filter](t *testing.T, testCases []Case[F])

func Testdata

func Testdata(t *testing.T, key string) string

Testdata returns and (absolute) path to internal/test/testdata file

Types

type Case

type Case[F unix.Filter] struct {
	Name     string // Name is test case name
	Input    string // Input is test case input
	Expected string // Expected is what filter is expected to produce
	Filter   F      // Filter is a pointer to type implementing the pipe.Filter
	FromArgs F      // Optional Filter constructed via FromArgs helper, expected to be equal to Filter
}

Case is a single test case testing gonix filter It contains a pointer (PF) to type implementing the pipe.Filter interface

type IOError

type IOError struct {
	Reads    [][]byte
	Writes   int
	Err      error
	CloseErr error
}

func (IOError) Close

func (i IOError) Close() error

func (*IOError) Read

func (i *IOError) Read(p []byte) (int, error)

func (*IOError) Write

func (i *IOError) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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