[erlang-questions] Problems with dynamically compiled eunit test
T Ty
tty.erlang@REDACTED
Fri Jun 13 19:47:34 CEST 2014
Glad you found the issue. My fav one is having a module called c.erl /
c.beam. erts *does not* like that one at all!
On Fri, Jun 13, 2014 at 11:30 AM, Martin Koroudjiev <mrtndimitrov@REDACTED>
wrote:
> Just for the record.
>
> It turned out I had a module in the code path called eunit_test. There
> is a module called the same in eunit lib.
>
> Martin
>
> On 6/12/2014 8:20 AM, Martin Koroudjiev wrote:
> > Hello,
> >
> > I've used eunit framework many times before with no problems but now I
> > try to compile dynamically a test module and to run the tests. I get
> > this error:
> >
> > undefined
> > *unexpected termination of test process*
> > ::{undef,[{eunit_test,mf_wrapper,[my_test,fib_test_],[]},
> > {eunit_data,parse,1,[{file,"eunit_data.erl"},{line,245}]},
> > {eunit_data,next,1,[{file,"eunit_data.erl"},{line,170}]},
> > {eunit_data,lookahead,1,[{file,"eunit_data.erl"},{line,530}]},
> > {eunit_data,group,1,[{file,[...]},{line,...}]},
> > {eunit_data,next,1,[{file,...},{...}]},
> > {eunit_data,iter_next,1,[{...}|...]},
> > {eunit_proc,get_next_item,1,[...]}]}
> >
> > =======================================================
> > Failed: 0. Skipped: 0. Passed: 0.
> > One or more tests were cancelled.
> >
> > =ERROR REPORT==== 12-Jun-2014::08:10:16 ===
> > Error in process <0.185.0> on node 'dilbert@REDACTED' with exit value:
> >
> {undef,[{eunit_test,mf_wrapper,[my_test,fib_test_],[]},{eunit_data,parse,1,[{file,"eunit_data.erl"},{line,245}]},{eunit_data,next,1,[{file,"eunit_data.erl"},{line,170}]},{eunit_data,lookahead,1,[{file,"eunit_data.erl"},{line...
> >
> >
> > error
> >
> > The test module is the fib example from the doc page:
> >
> > -module(my_test).
> >
> > -include_lib("eunit/include/eunit.hrl").
> >
> > -export([fib/1]).
> >
> > fib(0) -> 1;
> > fib(1) -> 1;
> > fib(N) when N > 1 -> fib(N-1) + fib(N-2).
> >
> > fib_test_() ->
> > [?_assert(fib(0) =:= 1),
> > ?_assert(fib(1) =:= 1),
> > ?_assert(fib(2) =:= 2),
> > ?_assert(fib(3) =:= 3),
> > ?_assert(fib(4) =:= 5),
> > ?_assert(fib(5) =:= 8),
> > ?_assertException(error, function_clause, fib(-1)),
> > ?_assert(fib(31) =:= 2178309)
> > ].
> >
> > Does anyone know what can be wrong? Thanks in advance for your time.
> >
> > Regards,
> > Martin
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140613/535a939a/attachment.htm>
More information about the erlang-questions
mailing list