module_test

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NProcesses = 5

Functions

func Benchmark

func Benchmark(root *testing.B, mod module.Module, env *environment)

Custom module benchmark tool

func HaveState

func HaveState(state byte, module ...module.Module) types.GomegaMatcher

func NewEnvironment

func NewEnvironment(factory definitionFactory, pre preTest, post postTest, tick time.Duration) *environment

Create new test environment for module

func Test

func Test(t *testing.T, m module.Module, e *environment)

custom module test tool

Types

type ExternalStateMatcher

type ExternalStateMatcher struct {
	// input
	State  byte
	Module module.Module
}

func (*ExternalStateMatcher) FailureMessage

func (matcher *ExternalStateMatcher) FailureMessage(a interface{}) (message string)

func (*ExternalStateMatcher) Match

func (matcher *ExternalStateMatcher) Match(a interface{}) (success bool, err error)

func (*ExternalStateMatcher) NegatedFailureMessage

func (matcher *ExternalStateMatcher) NegatedFailureMessage(a interface{}) (message string)

type ModuleExpectation

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

func ExpectFor

func ExpectFor(m module.Module) ModuleExpectation

func (ModuleExpectation) FailedWith

func (m ModuleExpectation) FailedWith(state byte) types.GomegaMatcher

func (ModuleExpectation) Panic

func (ModuleExpectation) SucceedWith

func (m ModuleExpectation) SucceedWith(state byte) types.GomegaMatcher

Jump to

Keyboard shortcuts

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