Hi,<br><br><div><span class="gmail_quote">On 9/7/07, <b class="gmail_sendername">Filippo Pacini</b> <<a href="mailto:pacini@sgconsulting.it">pacini@sgconsulting.it</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>-module(eunit_simple).<br>-include_lib("eunit/include/eunit.hrl").<br><br>setup() -><br> io:format("Setup called", []).<br><br>do_test_() -><br> {setup, fun setup_test/0, [?_assert(1=:=0)]}.
</blockquote><div><br>I suppose you meant<br> {setup, fun <span style="font-weight: bold;">setup</span>/0, [?_assert(1=:=0)]}.<br><br></div></div>The problem is that the output of io:format goes to the test process' group_leader, which in normal cases is printing it to the console, but in this case the eunit framework replaces it so that the output can be handled by test's parent, if necessary.
<br><br>Try replacing it with erlang:display("Setup called") and you will see the message as expected.<br><br>BTW your test should fail, so make sure that if you make changes you reload it after recompiling before re-running the tests.
<br><br>best regards,<br>Vlad<br><br>