4
%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
4
%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
6
6
%% The contents of this file are subject to the Erlang Public License,
7
7
%% Version 1.1, (the "License"); you may not use this file except in
20
20
-module(exception_SUITE).
22
-export([all/1, badmatch/1, pending_errors/1, nil_arith/1,
22
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
23
init_per_group/2,end_per_group/2,
24
badmatch/1, pending_errors/1, nil_arith/1,
23
25
stacktrace/1, nested_stacktrace/1, raise/1, gunilla/1, per/1,
24
26
exception_with_heap_frag/1]).
26
28
-export([bad_guy/2]).
28
-include("test_server.hrl").
30
-include_lib("test_server/include/test_server.hrl").
29
31
-import(lists, [foreach/2]).
32
[badmatch, pending_errors, nil_arith,
33
stacktrace, nested_stacktrace, raise, gunilla, per,
33
suite() -> [{ct_hooks,[ts_install_cth]}].
36
[badmatch, pending_errors, nil_arith, stacktrace,
37
nested_stacktrace, raise, gunilla, per,
34
38
exception_with_heap_frag].
43
init_per_suite(Config) ->
46
end_per_suite(_Config) ->
49
init_per_group(_GroupName, Config) ->
52
end_per_group(_GroupName, Config) ->
36
56
-define(try_match(E),
37
57
catch ?MODULE:bar(),
38
58
{'EXIT', {{badmatch, nomatch}, _}} = (catch E = id(nomatch))).