goism

package
v0.0.0-...-9dcd13a Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package goism is a collection of high level quality tests. They can be classified as integration tests.

Sub-packages are dedicated to specific test types: * conformance - checks compiled programs adherence to specs * regress - check that previously fixed bugs remain fixed

As a package itself, it provides utilities to implement integration tests.

Index

Constants

This section is empty.

Variables

View Source
var Home = func() string {
	res := os.Getenv("GOISM_HOME")
	if res == "" {
		panic("GOISM_HOME environment variable is not set")
	}
	return res
}()

Home is a path to directory that contains goism repository (sources, scripts, etc).

Functions

func Eval

func Eval(expr string) string

Eval is a fundamental way to communicate with Emacs daemon. It sends Lisp S-expression (function argument) to Emacs for evaluation. The result is returned as a string.

It does not perform any expression transformation, it is passed "as is". In practive, it means that you must mangle goism-generated symbols by hand.

Also note that this call modifies Emacs daemon state. Side effects are preserved between calls.

If error occurs, its message is returned as a result. Error message is prepended with "error: " string to reduce probability of mixing up erroneous result with correct result.

Example: Eval("(+ 1 2)") => "3" Eval("nil") => "nil"

func EvalCall

func EvalCall(pkg string, call string) string

EvalCall runs call evaluates function call expression. For convenience, $var arguments are permitted (auto symbol mangling).

Example: EvalCall("identity 1") => "1" EvalCall("list 1 2 3") => "(1 2 3)"

func EvalVar

func EvalVar(pkg string, name string) string

EvalVar evaluates variable and returns its value.

func LoadPackage

func LoadPackage(pkg string) string

LoadPackage loads package of specified name into Emacs daemon.

func RunTestCalls

func RunTestCalls(pkg string, t *testing.T, table CallTests)

RunTestCalls runs every function from given CallTests table. Every result is checked with tst.CheckError.

Types

type CallTests

type CallTests map[string]string

CallTests is a simple "call"=>"result" table. Used with RunTestCalls.

Directories

Path Synopsis
pairwise
Package pairwise is a second layer of conformance tests.
Package pairwise is a second layer of conformance tests.

Jump to

Keyboard shortcuts

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