Documentation ¶
Index ¶
- Variables
- func JsonDiff(expectedData string, parsedData string) (string, error)
- func Log(vals ...interface{})
- func LogDebug(vals ...interface{})
- func LogPass(name string)
- func LogRun(name string)
- func Logf(s string, vals ...interface{})
- func SetDebug()
- func TestPathFromName(name string) string
- func TestPathsFromDirectory(dir string) ([]string, error)
- type Test
Constants ¶
This section is empty.
Variables ¶
View Source
var ( StdLogger = klog.NewNopLogger() LogExcludes log.LoggerExcludes LoggerConfig log.Config )
View Source
var TestDataFiles []string
Contains absolute file paths for the test data
Functions ¶
func SetDebug ¶
func SetDebug()
SetDebug is typically called from the init() function in a test file. SetDebug parses debug flags passed to the test binary and also sets the template for logging output.
func TestPathFromName ¶
TestPathFromName loops through TestDataFiles until name is matched.
func TestPathsFromDirectory ¶
testPathsFromDirectory walks through the file tree in the testdata directory containing all of the tests and returns a string slice of all the discovered paths.
Types ¶
type Test ¶
type Test struct { Path string // The path including directory and basename Data string // The input data to be parsed ExpectItemData string // The expected lex items output in json ExpectParseData string // The expected parse nodes in json }
Contains a single test with data loaded from test files in the testdata directory
Click to show internal directories.
Click to hide internal directories.