Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckMethod ¶
CheckMethod is any function that takes a test and returns true if the test passed. The value it got when testing can be stored in t.Got and t.Passed should be set to true if passed.
type Section ¶
type Section struct {
Name string `yaml:"Name,omitempty"`
Notes string `yaml:"Notes,omitempty"`
Tests []Test `yaml:"Tests,omitempty"`
}
Section of tests.
type Spec ¶
type Spec struct {
Name string `yaml:"Name,omitempty"`
Version string `yaml:"Version,omitempty"`
Source string `yaml:"Source,omitempty"`
Issues string `yaml:"Issues,omitempty"`
Discuss string `yaml:"Discuss,omitempty"`
Notes string `yaml:"Notes,omitempty"`
Date string `yaml:"Date,omitempty"`
License string `yaml:"License,omitempty"`
Tests []Test `yaml:"Tests,omitempty"`
Sections []Section `yaml:"Sections,omitempty"`
}
Spec represents a test specification of inputs and outputs.
func (*Spec) Check ¶
func (s *Spec) Check(ok CheckMethod) *Test
Check takes a function as an argument that takes in CheckMethod function. It then calls the CheckMethod on all the s.Tests and s.Sections[].Tests until it finds the first one that does not pass and returns a pointer to it. Returns nil if all pass.
Click to show internal directories.
Click to hide internal directories.