eunit_data

Interpretation of symbolic test representation.

Interpretation of symbolic test representation

DATA TYPES

appName() = atom()
fileName() = string()
functionName() = atom()
moduleName() = atom()
testItem() = #test{} | #group{}
testIterator()
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() | {test, M::moduleName(), F::functionName()} | {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()) -> none | {testItem(), testIterator()}

iter_prev(Iter::testIterator()) -> none | {testItem(), testIterator()}

get_module_tests(M) -> term()

enter_context(Tests::#context{}, I::Instantiate, F::Callback) -> any()

  • Instantiate = (any()) -> tests()
  • Callback = (tests()) -> any()

See also

eunit

Richard Carlsson carlsson.richard@gmail.com
View Functions