I'm playing around with oUnit2 and I'm wondering: is there any usage for the test_ctxt
parameter, as here:
let test1 test_ctxt = assert_equal "x" (Foo.unity "x");;
Is seems superfluous to me. Is there any way to omit it while defining tests as variables?
A value of type
test_ctxt
is accepted as an optional parameter inassert_command
andassert_equal
functions, that are main basic blocks for building tests. The test context contains, in particular, a references to loggers, that allows to run tests in parallel. Using your example a correct invocation would be: