-module(test).
-export([test/0, t/1]).

test() ->
    [io:format("~p~n", [{N, (catch test:t(N))}]) || N <- lists:seq(0,8)],
    ok.

t(0) ->
    abcd:f();
    
t(1) ->
    A = 1,
    exit({error, A});

t(2) ->
    A = 0,
    100 / A;

t(3) ->
    A = abc,
    {error, test} = {error, A};

t(4) ->
    throw({error, test});

t(5) ->
    erlang:error(bad_error);
    
t(6) ->
    erlang:fault(bad_fault);

t(7) ->
    pid ! test.
