Documentation
¶
Index ¶
Constants ¶
View Source
const ( AssertionPrefix = "##" NbAssertionComponents = 6 NbAssertionComponentsWithErrName = 7 )
Variables ¶
View Source
var ( ErrInvalidNbComponents = errors.New("invalid number of components") ErrInvalidAssertion = errors.New("invalid assertion") ErrInvalidGroup = errors.New("invalid group") ErrInvalidKey = errors.New("invalid key") ErrInvalidLineNumber = errors.New("invalid line number") ErrInvalidColumnNumber = errors.New("invalid column number") )
Functions ¶
This section is empty.
Types ¶
type Assertion ¶
type Assertion struct {
Type AssertionType
ErrCategory string
ErrName string
Group string
Key string
Line int
Column int
}
func ParseAssertionFromLine ¶
type AssertionType ¶
type AssertionType string
const (
AssertError AssertionType = "assert-error"
)
func ParseAssertionType ¶
func ParseAssertionType(assertion string) (AssertionType, error)
type Assertions ¶
type Assertions []Assertion
func ParseAndReadAssertions ¶
func ParseAndReadAssertions(filename string) (model.UnitFile, Assertions, error)
func (Assertions) RunAssertions ¶
func (a Assertions) RunAssertions(t *testing.T, errors []V.ValidationError)
Click to show internal directories.
Click to hide internal directories.