Documentation ¶
Index ¶
- func BenchmarkParse(path string, r func() lisp.Reader) func(*testing.B)
- func RunTestSuite(t *testing.T, tests TestSuite)
- type Logger
- type Runner
- func (r *Runner) LispError(t *testing.T, err error)
- func (r *Runner) LoadTests(t *testing.T, path string, source io.Reader) []string
- func (r *Runner) NewEnv(t *testing.T) (*lisp.LEnv, error)
- func (r *Runner) RunTest(t *testing.T, i int, path string, source io.Reader)
- func (r *Runner) RunTestFile(t *testing.T, path string)
- type TestSequence
- type TestSuite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunTestSuite ¶
RunTestSuite runs each TestSequence in tests on isolated lisp.LEnvs.
Types ¶
type Runner ¶
type Runner struct { // Loader is the package loader used to initialize the test environment. // When Loader is nil lisplib.LoadLibrary is used. Loader func(*lisp.LEnv) *lisp.LVal // Teardown runs code to teardown an environment after each test declared // in the testing package has been run. Any error returned by the teardown // function is reported as a test failure. Teardown func(*lisp.LEnv) *lisp.LVal // contains filtered or unexported fields }
Runner is a test runner.
type TestSequence ¶
type TestSequence []struct { Expr string // a lisp expression Result string // the evaluated result Output string // debug output written to Runtime.Stderr }
TestSequence is a sequence of lisp expressions which are evaluated sequentially by a lisp.LEnv.
type TestSuite ¶
type TestSuite []struct { Name string TestSequence }
TestSuite is a set of named TestSequences
Click to show internal directories.
Click to hide internal directories.