core_test

package
v0.0.0-...-40e84bd Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaPiTaLiZe

func CaPiTaLiZe(s string) string

Change some of the characters in the string to uppercase

func NaughtyParser

func NaughtyParser[T any]() Parser[T]

NaughtyParser parser consumes input but does not rollback This is useful for testing that combinators rollback input correctly

func RunTests

func RunTests[T any](t *testing.T, tests []ParserTest[T])

Types

type ParserTest

type ParserTest[T any] struct {
	Name           string
	Input          string
	Parser         Parser[T]
	ExpectedMatch  T
	ExpectedOK     bool
	WantErr        bool
	RemainingInput string
}

Jump to

Keyboard shortcuts

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