splittest

package
v0.86.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateBytes

func GenerateBytes(length int) []byte

func New added in v0.86.0

func New(splitFunc bufio.SplitFunc, input []byte, steps ...Step) func(*testing.T)

Types

type Step added in v0.86.0

type Step struct {
	// contains filtered or unexported fields
}

func ExpectAdvanceNil added in v0.86.0

func ExpectAdvanceNil(expectAdvance int) Step

func ExpectAdvanceToken added in v0.86.0

func ExpectAdvanceToken(expectAdvance int, expectToken string) Step

func ExpectError added in v0.86.0

func ExpectError(expectErr string) Step

func ExpectToken added in v0.86.0

func ExpectToken(expectToken string) Step

type TestCase

type TestCase struct {
	Name                 string
	Pattern              string
	OmitPattern          bool
	Input                []byte
	ExpectedTokens       []string
	ExpectedError        error
	Sleep                time.Duration
	AdditionalIterations int
}

func (TestCase) Run

func (tc TestCase) Run(splitFunc bufio.SplitFunc) func(t *testing.T)

Jump to

Keyboard shortcuts

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