From e993afa1fb9c7143e09c55dee58aee32e9876d78 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 4 Oct 2010 19:03:41 +0200 Subject: Updated test cases to work with ts conversion algorithm --- lib/megaco/test/megaco_codec_v2_test.erl | 53 ++++++++++++++++---------------- 1 file changed, 27 insertions(+), 26 deletions(-) (limited to 'lib/megaco/test/megaco_codec_v2_test.erl') diff --git a/lib/megaco/test/megaco_codec_v2_test.erl b/lib/megaco/test/megaco_codec_v2_test.erl index 1df1c6c93b..8b218a5250 100644 --- a/lib/megaco/test/megaco_codec_v2_test.erl +++ b/lib/megaco/test/megaco_codec_v2_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2003-2009. All Rights Reserved. +%% Copyright Ericsson AB 2003-2010. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -431,31 +431,7 @@ expand([Case|Cases], Acc) -> expand(Cases, [Case|Acc]) end. - -%% ---- - -tickets() -> - Flag = process_flag(trap_exit, true), - Cases = expand(tickets), - Fun = fun(Case) -> - C = init_per_testcase(Case, [{tc_timeout, - timer:minutes(10)}]), - io:format("Eval ~w~n", [Case]), - Result = - case (catch apply(?MODULE, Case, [C])) of - {'EXIT', Reason} -> - io:format("~n~p exited:~n ~p~n", - [Case, Reason]), - {error, {Case, Reason}}; - Res -> - Res - end, - fin_per_testcase(Case, C), - Result - end, - process_flag(trap_exit, Flag), - lists:map(Fun, Cases). - + %% ---- @@ -753,6 +729,31 @@ flex_pretty_tickets_cases() -> flex_pretty_otp7431_msg07 ]. +%% ---- + +tickets() -> + Flag = process_flag(trap_exit, true), + Cases = expand(tickets), + Fun = fun(Case) -> + C = init_per_testcase(Case, [{tc_timeout, + timer:minutes(10)}]), + io:format("Eval ~w~n", [Case]), + Result = + case (catch apply(?MODULE, Case, [C])) of + {'EXIT', Reason} -> + io:format("~n~p exited:~n ~p~n", + [Case, Reason]), + {error, {Case, Reason}}; + Res -> + Res + end, + fin_per_testcase(Case, C), + Result + end, + process_flag(trap_exit, Flag), + lists:map(Fun, Cases). + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -- cgit v1.2.3