Documentation ¶
Overview ¶
Package mtest implements functionality useful for testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Env ¶
Env sets the given environment variable on the given Component, such that it will be used as if it was a real environment variable when the Run function from this package is called.
This function will panic if not called on the root Component.
func Run ¶
Run performs the following using the given Component:
- Calls mrun.Init, which calls mcfg.Populate using any variables set by Env.
- Calls the passed in body callback.
- Calls mrun.Shutdown
The intention is that Run is used within a test on a Component created via this package's Component function, after any instantiation functions have been called (e.g. mnet.InstListener).
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package massert implements an assertion framework which is useful in tests.
|
Package massert implements an assertion framework which is useful in tests. |
Package mchk implements a framework for writing property checker tests, where test cases are generated randomly and performed, and failing test cases are output in a way so as to easily be able to rerun them.
|
Package mchk implements a framework for writing property checker tests, where test cases are generated randomly and performed, and failing test cases are output in a way so as to easily be able to rerun them. |