parsertest

package
v0.0.0-...-2bc12df Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Case

type Case struct {
	Input           string
	RemInput        string
	SatisfyingValue interface{}
	ErrRegex        *regexp.Regexp
	IsMatchError    bool
	// contains filtered or unexported fields
}

Case represents a parser test case

type Suite

type Suite struct {
	suite.Suite
	Parser                     predicate.Parser
	SchemaPParser              predicate.Parser
	IsTopLevelExpressionParser bool
}

Suite represents a type that tests `wash find` predicate parsers

func (*Suite) RETC

func (suite *Suite) RETC(input string, errRegex string, isMatchError bool)

RETC => RunErrorTestCase

func (*Suite) RNSTC

func (suite *Suite) RNSTC(input string, remInput string, falseValue interface{})

RNSTC => RunNegativeSchemaTestCase. Saves some typing

func (*Suite) RNTC

func (suite *Suite) RNTC(input string, remInput string, falseValue interface{})

RNTC => RunNegativeTestCase. Saves some typing

func (*Suite) RSTC

func (suite *Suite) RSTC(input string, remInput string, trueValue interface{}, falseValue ...interface{})

RSTC => RunSchemaTestCase. Saves some typing.

func (*Suite) RTC

func (suite *Suite) RTC(input string, remInput string, trueValue interface{}, falseValue ...interface{})

RTC => RunTestCase. Saves some typing

func (*Suite) SetupTest

func (suite *Suite) SetupTest()

SetupTest sets the ReferenceTime

func (*Suite) TeardownTest

func (suite *Suite) TeardownTest()

TeardownTest resets the ReferenceTime

func (*Suite) ToTks

func (suite *Suite) ToTks(s string) []string

ToTks => ToTokens. Saves some typing

Jump to

Keyboard shortcuts

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