Documentation ¶
Index ¶
- Variables
- func DecodeRootFile(f []byte) ([32]byte, error)
- func ExtractCases(tgz io.Reader, filter TestIdent) (map[TestIdent]Fixture, error)
- func GroupByFork(cases map[TestIdent]Fixture) map[Fork][]TestIdent
- func GroupByType(ti []TestIdent) map[string][]TestIdent
- func IdentFilter(ident TestIdent) func([]TestIdent) []TestIdent
- func RootAndSerializedFromFixture(dir string) ([32]byte, []byte, error)
- func WriteSpecTestFiles(cases map[TestIdent]Fixture, rels *SpecRelationships, fs afero.Fs) error
- type Fixture
- type FixtureFile
- type Fork
- type ForkTypeDefinitions
- type Preset
- type SpecRelationships
- type TestCaseTpl
- type TestIdent
- type TypeRelation
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPathParse = errors.New("spectest path not in expected format, could not parse identifiers")
View Source
var ErrUnknownFork = errors.New("unknown fork name")
View Source
var ErrUnknownPreset = errors.New("unknown preset name")
var ForkOrder = []Fork{Phase0, Altair, Bellatrix, Capella, EIP4844}
Functions ¶
func DecodeRootFile ¶
func ExtractCases ¶
func GroupByType ¶
func IdentFilter ¶
func WriteSpecTestFiles ¶
Types ¶
type Fixture ¶
type Fixture struct { Directory string Root FixtureFile Serialized FixtureFile Yaml FixtureFile }
type FixtureFile ¶
type ForkTypeDefinitions ¶
type ForkTypeDefinitions struct { Fork Fork `json:"fork"` Types []TypeRelation `json:"types"` }
type SpecRelationships ¶
type SpecRelationships struct { Package string `json:"package"` Preset Preset `json:"preset"` Defs []ForkTypeDefinitions `json:"defs"` }
func ParseConfigFile ¶
func ParseConfigFile(path string) (*SpecRelationships, error)
func (SpecRelationships) GoTypes ¶
func (sr SpecRelationships) GoTypes() []string
func (SpecRelationships) RelationsAtFork ¶
func (sr SpecRelationships) RelationsAtFork(f Fork) (map[string]string, error)
type TestCaseTpl ¶
type TestCaseTpl struct {
// contains filtered or unexported fields
}
func (*TestCaseTpl) FixtureDirectory ¶
func (tpl *TestCaseTpl) FixtureDirectory() string
func (*TestCaseTpl) GoTypeName ¶
func (tpl *TestCaseTpl) GoTypeName() string
func (*TestCaseTpl) Render ¶
func (tpl *TestCaseTpl) Render() (string, error)
func (*TestCaseTpl) TestFuncName ¶
func (tpl *TestCaseTpl) TestFuncName() string
type TestIdent ¶
type TypeRelation ¶
Click to show internal directories.
Click to hide internal directories.