Documentation ¶
Overview ¶
Package test defines a tree structure that describes the tests loaded from one or more Aureus Markdown documents.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Content ¶
type Content struct { // ContentMetaData is additional information about the content. ContentMetaData // Data is the content itself. Data []byte }
Content is data used as input or output in tests.
type ContentMetaData ¶
type ContentMetaData struct { // File is the path of the file from which the content was loaded. File string // Line is the line number within the file where the content begins, or 0 if // the content represents the entire file. Line int // The half-open range [Begin, End) is the section within the file that // contains the content, given in bytes. // // If the range is [0, 0), the content represents the entire file. Begin, End int64 // Language is the language of the content, if known, e.g. "json", "yaml", // etc. Content with an empty language is treated as plain text. Language string // Attributes is a set of key-value pairs that provide additional // loader-specific information about the data. Attributes map[string]string }
ContentMetaData contains information about input or output content.
func (ContentMetaData) IsEntireFile ¶ added in v0.2.4
func (m ContentMetaData) IsEntireFile() bool
IsEntireFile returns true if the content occupies the entire file.
type Option ¶
type Option func(*Test)
Option is an option that controls how a test is created by New.
func WithAssertions ¶ added in v0.2.0
WithAssertions is a [TestOption] thatadds assertions to the test.
func WithSubTests ¶
WithSubTests is a [TestOption] that adds sub-tests to the test.
type Test ¶
Test is a (possibly nested) test.
func Merge ¶ added in v0.2.2
Merge recursively combines tests with the same name into a single test.
type TestingT ¶
type TestingT interface {
Helper()
}
TestingT is the subset of the *testing.T interface that is used when dispatching a visitor to ensure that the internals of the visitor mechanism are properly marked as test helpers.
type VisitOption ¶
type VisitOption func(*visitConfig)
VisitOption is an option for configuring a visitor.
func WithT ¶
func WithT(t TestingT) VisitOption
WithT configures the visitor to use t to mark the internal mechanism of the visitor as test helpers.