[erlang-questions] EUnit fixture: return of Setup

Ludovic Coquelle lcoquelle@REDACTED
Sat Nov 3 03:53:57 CET 2007


I have some problem with the EUnit fixture {setup, Setup, Clearup,
Instanciator}.

>From the doc, I understand that the Instanciator should get the value return
by the Setup.
But in the following case, the test fail because assertion is "undefined ==
foo".
Am I missing something?
(EUnit version that I'm using is from SVN
http://svn.process-one.net/contribs/trunk/eunit)

simple_init() ->
    foo.
simple_close(R) ->
    R.
simple_do(R) ->
    ?assert(R == foo).
simple_test_() ->
    {
        setup,
        fun simple_init/0,
        fun simple_close/1,
        fun simple_do/1
    }.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20071103/26a7733d/attachment.htm>


More information about the erlang-questions mailing list