eunit_data
Interpretation of symbolic test representation.
Interpretation of symbolic test representation
DATA TYPES
appName() = atom()
fileName() = string()
functionName() = atom()
lineNumber() = integer()
Proper line numbers are always >= 1.
moduleName() = atom()
testId() = [integer()]
testInfoList() = [Entry]
Entry = {item, testId(), Description, testName()} | {group, testId(), Description, testInfoList}
Description = string()
testItem() = #test{} | #group{}
testIterator()
testName() = {moduleName(), functionName()} | {moduleName(), functionName(), lineNumber()}
tests() = SimpleTest | [tests()] | moduleName() | {module, moduleName()} | {application, appName()} | {application, appName(), [term()]} | fileName() | {file, fileName()} | {string(), tests()} | {generator, () -> tests()} | {generator, M::moduleName(), F::functionName()} | {spawn, tests()} | {spawn, Node::atom(), tests()} | {timeout, T::number(), tests()} | {inorder, tests()} | {inparallel, tests()} | {inparallel, N::integer(), tests()} | {with, X::any(), [AbstractTestFunction]} | {setup, Where::local | spawn | {spawn, Node::atom()}, Setup::() -> R::any(), Cleanup::(R::any()) -> any(), tests() | Instantiator} | {setup, Setup, Cleanup, tests() | Instantiator} | {setup, Where, Setup, tests() | Instantiator} | {setup, Setup, tests() | Instantiator} | {foreach, Where::local | spawn | {spawn, Node::atom()}, Setup::() -> R::any(), Cleanup::(R::any()) -> any(), [tests() | Instantiator]} | {foreach, Setup, Cleanup, [tests() | Instantiator]} | {foreach, Where, Setup, [tests() | Instantiator]} | {foreach, Setup, [tests() | Instantiator]} | {foreachx, Where::local | spawn | {spawn, Node::atom()}, SetupX::(X::any()) -> R::any(), CleanupX::(X::any(), R::any()) -> any(), Pairs::[{X::any(), (X::any(), R::any()) -> tests()}]} | {foreachx, SetupX, CleanupX, Pairs} | {foreachx, Where, SetupX, Pairs} | {foreachx, SetupX, Pairs} | {node, Node::atom(), tests() | Instantiator} | {node, Node, Args::string(), tests() | Instantiator}
SimpleTest = TestFunction | {Line::integer(), SimpleTest}
TestFunction = () -> any() | {M::moduleName(), F::functionName()}
AbstractTestFunction = (X::any()) -> any()
Instantiator = (R::any()) -> tests() | {with, [AbstractTestFunction]}
Note that {string(), ...}
is a short-hand for {string(), {...}}
if the tuple contains more than two elements.
Functions
iter_init(Tests::tests(), ParentID::[integer()]) -> testIterator()
iter_id(Iter::testIterator()) -> [integer()]
iter_next(I::testIterator(), H::Handler) -> none | {testItem(), testIterator()}
Handler = (term()) -> term()
iter_prev(I::testIterator(), H::Handler) -> none | {testItem(), testIterator()}
Handler = (term()) -> term()
enter_context(Tests::#context{}, I::Instantiate, F::Callback) -> any()
Instantiate = (any()) -> tests()
Callback = (tests()) -> any()