4
%% Copyright Ericsson AB 2009. All Rights Reserved.
6
%% The contents of this file are subject to the Erlang Public License,
7
%% Version 1.1, (the "License"); you may not use this file except in
8
%% compliance with the License. You should have received a copy of the
9
%% Erlang Public License along with this software. If not, it can be
10
%% retrieved online at http://www.erlang.org/.
12
%% Software distributed under the License is distributed on an "AS IS"
13
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
%% the License for the specific language governing rights and limitations
19
-include_lib("wx/include/wx.hrl").
21
-define(log(Format,Args), reltool_test_lib:log(Format,Args,?FILE,?LINE)).
22
-define(warning(Format,Args), ?log("<WARNING>\n " ++ Format,Args)).
23
-define(error(Format,Args), reltool_test_lib:error(Format,Args,?FILE,?LINE)).
24
-define(verbose(Format,Args), reltool_test_lib:verbose(Format,Args,?FILE,?LINE)).
26
-define(fatal(Format,Args),
28
exit({test_case_fatal, Format, Args, ?FILE, ?LINE})).
30
-define(skip(Format,Args),
31
?warning(Format, Args),
32
exit({skipped, ?flat_format(Format, Args)})).
36
AcTuAlReS = (catch (Expr)),
37
?verbose("ok: ~p\n",[AcTuAlReS]),
41
-define(msym(ExpectedRes, Expr),
43
AcTuAlReS = (catch (Expr)),
46
?verbose("ok: ~p\n",[AcTuAlReS]),
49
reltool_test_lib:error("Not matching actual result was:\n ~p \nExpected ~s\n",
50
[AcTuAlReS, ??ExpectedRes],
56
-define(m(ExpectedRes, Expr),
58
AcTuAlReS = (catch (Expr)),
61
?verbose("ok: ~p\n",[AcTuAlReS]),
64
reltool_test_lib:error("Not matching actual result was:\n\t~p \nExpected:\n\t~p\n",
65
[AcTuAlReS, ExpectedRes],
71
-define(m_receive(ExpectedMsg),
72
?m(ExpectedMsg,reltool_test_lib:pick_msg())).
74
-define(m_multi_receive(ExpectedMsgs),
76
TmPeXpCtEdMsGs = lists:sort(ExpectedMsgs),
78
lists:sort(lists:map(fun(_) ->
79
reltool_test_lib:pick_msg()
80
end, TmPeXpCtEdMsGs)),
83
?verbose("ok: ~p\n",[AcTuAlReS]),
86
reltool_test_lib:error("Not matching actual result was:\n ~p \nExpected ~p\n",
87
[AcTuAlReS, ExpectedMsgs],