Skip to content

Commit

Permalink
Merge pull request #9 from odo/master
Browse files Browse the repository at this point in the history
logging test names and success/failure
  • Loading branch information
hukl committed Aug 16, 2013
2 parents 52a7ad1 + 52cad22 commit 16c0332
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/etest_runner.erl
Expand Up @@ -41,9 +41,11 @@ run(Module) ->
ToRun = lists:flatten([BeforeSuite, FunsWithCallbacks, AfterSuite]),
TryTest = fun (Test) ->
try
Test()
Test(),
io:format("Etest passed.\n")
catch
_:Error ->
io:format("Etest failed.\n"),
inc(errors),
io:format("::~p~n", [Error]),
CleanTrace = clean_trace(erlang:get_stacktrace()),
Expand Down Expand Up @@ -79,6 +81,11 @@ testfuns(Module) ->
MakeApplicative = fun({FunName, _}) ->
fun() ->
inc(tests),
Msg = lists:flatten(io_lib:format("~p:~p ", [Module, FunName])),
io:format(
string:left(Msg, 80, $.) ++ "\n" ++
string:left("", 80, $=) ++ "\n"
),
Module:FunName(),
inc(success)
end
Expand Down

0 comments on commit 16c0332

Please sign in to comment.