Documentation ¶
Index ¶
- func NewTestParser(text *[]rune, origArgs ...interface{}) *parser.Parser
- func NewTestProgramContext(args ...interface{}) *parser.ProgramContext
- func NewTestProgramParser(text *[]rune, origArgs ...interface{}) *parser.ProgramParser
- func NewTestUnitContext(args ...interface{}) *parser.UnitContext
- func NewTestUnitParser(text *[]rune, origArgs ...interface{}) *parser.UnitParser
- func RunBlockTest(t *testing.T, name string, text []rune, expected *ast.Block, ...)
- func RunProgramTest(t *testing.T, name string, text []rune, expected *ast.Program, ...)
- func RunStatementTest(t *testing.T, name string, text []rune, expected *ast.Statement, ...)
- func RunTypeSection(t *testing.T, name string, text []rune, expected ast.TypeSection, ...)
- func RunTypeTest(t *testing.T, name string, text []rune, expected ast.Type, args ...interface{})
- func RunUnitTest(t *testing.T, name string, text []rune, expected *ast.Unit, ...)
- func RunVarSectionTest(t *testing.T, name string, text []rune, expected ast.VarSection, ...)
- type BaseTestRunner
- type BaseTestRunnerFunc
- type BaseTestRunnerFuncs
- type BlockTestRunner
- type ParserArgFunc
- type ParserArgFuncs
- type ProgramTestRunner
- type StatementTestRunner
- type TypeSectionTestRunner
- type TypeTestRunner
- type UnitTestRunner
- type UnitTestRunnerFunc
- type UnitTestRunnerFuncs
- type VarSectionTestRunner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTestParser ¶
func NewTestProgramContext ¶
func NewTestProgramContext(args ...interface{}) *parser.ProgramContext
func NewTestProgramParser ¶
func NewTestProgramParser(text *[]rune, origArgs ...interface{}) *parser.ProgramParser
func NewTestUnitContext ¶
func NewTestUnitContext(args ...interface{}) *parser.UnitContext
func NewTestUnitParser ¶
func NewTestUnitParser(text *[]rune, origArgs ...interface{}) *parser.UnitParser
func RunBlockTest ¶
func RunProgramTest ¶
func RunStatementTest ¶
func RunTypeSection ¶
func RunTypeTest ¶
func RunUnitTest ¶
func RunVarSectionTest ¶
Types ¶
type BaseTestRunner ¶
type BaseTestRunner struct { T *testing.T Name string Text *[]rune ClearLocations bool ParserArgFuncs ParserArgFuncs }
func NewBaseTestRunner ¶
func NewBaseTestRunner( t *testing.T, name string, text *[]rune, clearLocations bool, parserArgFuncs ParserArgFuncs, runnerFuncs BaseTestRunnerFuncs, ) *BaseTestRunner
func (*BaseTestRunner) NewParser ¶
func (tt *BaseTestRunner) NewParser() *parser.Parser
type BaseTestRunnerFunc ¶
type BaseTestRunnerFunc = func(*BaseTestRunner)
type BaseTestRunnerFuncs ¶
type BaseTestRunnerFuncs []BaseTestRunnerFunc
func FilterBaseTestRunnerFuncs ¶
func FilterBaseTestRunnerFuncs(args []interface{}) (BaseTestRunnerFuncs, []interface{})
type BlockTestRunner ¶
type BlockTestRunner struct { *BaseTestRunner Expected *ast.Block }
func NewBlockTestRunner ¶
func (*BlockTestRunner) Run ¶
func (tt *BlockTestRunner) Run() *BlockTestRunner
type ParserArgFunc ¶
type ParserArgFunc = func() interface{}
type ParserArgFuncs ¶
type ParserArgFuncs []ParserArgFunc
func FilterParserArgFuncs ¶
func FilterParserArgFuncs(args []interface{}) (ParserArgFuncs, []interface{})
func (ParserArgFuncs) Interfaces ¶
func (s ParserArgFuncs) Interfaces() []interface{}
func (ParserArgFuncs) Results ¶
func (s ParserArgFuncs) Results() []interface{}
type ProgramTestRunner ¶
type ProgramTestRunner struct { *BaseTestRunner Expected *ast.Program }
func NewProgramTestRunner ¶
func (*ProgramTestRunner) Run ¶
func (tt *ProgramTestRunner) Run() *ProgramTestRunner
type StatementTestRunner ¶
type StatementTestRunner struct { *BaseTestRunner Expected *ast.Statement }
func NewStatementTestRunner ¶
func (*StatementTestRunner) Run ¶
func (tt *StatementTestRunner) Run() *StatementTestRunner
type TypeSectionTestRunner ¶
type TypeSectionTestRunner struct { *BaseTestRunner Expected ast.TypeSection }
func NewTypeSectionTestRunner ¶
func NewTypeSectionTestRunner(t *testing.T, name string, text []rune, expected ast.TypeSection, args ...interface{}) *TypeSectionTestRunner
func (*TypeSectionTestRunner) Run ¶
func (tt *TypeSectionTestRunner) Run() *TypeSectionTestRunner
type TypeTestRunner ¶
type TypeTestRunner struct { *BaseTestRunner Expected ast.Type }
func NewTypeTestRunner ¶
func (*TypeTestRunner) Run ¶
func (tt *TypeTestRunner) Run() *TypeTestRunner
func (*TypeTestRunner) RunTypeSection ¶
func (tt *TypeTestRunner) RunTypeSection(declName string) *TypeTestRunner
func (*TypeTestRunner) RunVarSection ¶
func (tt *TypeTestRunner) RunVarSection(declName string) *TypeTestRunner
type UnitTestRunner ¶
type UnitTestRunner struct { *BaseTestRunner Expected *ast.Unit ClearUnitDeclMaps bool }
func NewUnitTestRunner ¶
func (*UnitTestRunner) Run ¶
func (tt *UnitTestRunner) Run() *UnitTestRunner
type UnitTestRunnerFunc ¶
type UnitTestRunnerFunc = func(*UnitTestRunner)
type UnitTestRunnerFuncs ¶
type UnitTestRunnerFuncs []UnitTestRunnerFunc
func FilterUnitTestRunnerFuncs ¶
func FilterUnitTestRunnerFuncs(args []interface{}) (UnitTestRunnerFuncs, []interface{})
func (UnitTestRunnerFuncs) Call ¶
func (s UnitTestRunnerFuncs) Call(tt *UnitTestRunner)
type VarSectionTestRunner ¶
type VarSectionTestRunner struct { *BaseTestRunner Expected ast.VarSection }
func NewVarSectionTestRunner ¶
func NewVarSectionTestRunner(t *testing.T, name string, text []rune, expected ast.VarSection, args ...interface{}) *VarSectionTestRunner
func (*VarSectionTestRunner) Run ¶
func (tt *VarSectionTestRunner) Run() *VarSectionTestRunner
Click to show internal directories.
Click to hide internal directories.