tester

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTimeout = errors.New("Timeout")
)

Functions

This section is empty.

Types

type Debugger

type Debugger struct {
	// contains filtered or unexported fields
}

func NewDebugger

func NewDebugger() *Debugger

func (*Debugger) Message

func (d *Debugger) Message(msg string)

func (*Debugger) Run

func (d *Debugger) Run(node ast.Node) interpreter.DebugState

type TestCase

type TestCase struct {
	Name  string
	Error error
	Scope string
	Time  int64 // msec order
}

func (*TestCase) MarshalJSON

func (t *TestCase) MarshalJSON() ([]byte, error)

type TestCounter

type TestCounter struct {
	Asserts int `json:"asserts"`
	Passes  int `json:"passes"`
	Fails   int `json:"fails"`
}

func NewTestCounter

func NewTestCounter() *TestCounter

func (*TestCounter) Fail

func (c *TestCounter) Fail()

func (*TestCounter) Pass

func (c *TestCounter) Pass()

type TestFactory

type TestFactory struct {
	Results    []*TestResult
	Statistics *TestCounter
	Logs       []string
}

type TestResult

type TestResult struct {
	Filename string       `json:"file"`
	Cases    []*TestCase  `json:"suites"`
	Lexer    *lexer.Lexer `json:"-"`
}

func (*TestResult) IsPassed

func (t *TestResult) IsPassed() bool

type Tester

type Tester struct {
	// contains filtered or unexported fields
}

func New

func New(c *config.TestConfig, opts []icontext.Option) *Tester

func (*Tester) Run

func (t *Tester) Run(main string) (*TestFactory, error)

Only expose function for running tests

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL