diff options
author | Lukas Larsson <[email protected]> | 2010-10-04 19:03:41 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2011-02-17 17:16:53 +0100 |
commit | e993afa1fb9c7143e09c55dee58aee32e9876d78 (patch) | |
tree | 3a3260cff260f14f885847b393b1136bd0e311e8 /lib/megaco | |
parent | d161dc2b44f29f184e60efcd460ed27b1ee0a0e1 (diff) | |
download | otp-e993afa1fb9c7143e09c55dee58aee32e9876d78.tar.gz otp-e993afa1fb9c7143e09c55dee58aee32e9876d78.tar.bz2 otp-e993afa1fb9c7143e09c55dee58aee32e9876d78.zip |
Updated test cases to work with ts conversion algorithm
Diffstat (limited to 'lib/megaco')
-rw-r--r-- | lib/megaco/test/megaco_codec_mini_test.erl | 51 | ||||
-rw-r--r-- | lib/megaco/test/megaco_codec_prev3a_test.erl | 51 | ||||
-rw-r--r-- | lib/megaco/test/megaco_codec_prev3b_test.erl | 51 | ||||
-rw-r--r-- | lib/megaco/test/megaco_codec_prev3c_test.erl | 52 | ||||
-rw-r--r-- | lib/megaco/test/megaco_codec_v1_test.erl | 51 | ||||
-rw-r--r-- | lib/megaco/test/megaco_codec_v2_test.erl | 53 | ||||
-rw-r--r-- | lib/megaco/test/megaco_codec_v3_test.erl | 51 |
7 files changed, 178 insertions, 182 deletions
diff --git a/lib/megaco/test/megaco_codec_mini_test.erl b/lib/megaco/test/megaco_codec_mini_test.erl index e509739bb1..cb4cf09536 100644 --- a/lib/megaco/test/megaco_codec_mini_test.erl +++ b/lib/megaco/test/megaco_codec_mini_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2009. All Rights Reserved. +%% Copyright Ericsson AB 2008-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 @@ -49,31 +49,6 @@ -define(SET_DBG(S,D), begin put(severity, S), put(dbg, D) end). -define(RESET_DBG(), begin erase(severity), erase(dbg) 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). - expand(RootCase) -> expand([RootCase], []). @@ -125,6 +100,30 @@ tickets(suite) -> otp7672_msg02 ]. +%% ---- + +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). + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/lib/megaco/test/megaco_codec_prev3a_test.erl b/lib/megaco/test/megaco_codec_prev3a_test.erl index 696a72343c..f3a68b045b 100644 --- a/lib/megaco/test/megaco_codec_prev3a_test.erl +++ b/lib/megaco/test/megaco_codec_prev3a_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2009. All Rights Reserved. +%% Copyright Ericsson AB 2005-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 @@ -263,30 +263,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). + %% ---- @@ -569,6 +546,30 @@ 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). + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/lib/megaco/test/megaco_codec_prev3b_test.erl b/lib/megaco/test/megaco_codec_prev3b_test.erl index b5fe4d2038..5b47300891 100644 --- a/lib/megaco/test/megaco_codec_prev3b_test.erl +++ b/lib/megaco/test/megaco_codec_prev3b_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2009. All Rights Reserved. +%% Copyright Ericsson AB 2005-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 @@ -281,31 +281,6 @@ 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). - %% ---- @@ -595,6 +570,30 @@ 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). + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/lib/megaco/test/megaco_codec_prev3c_test.erl b/lib/megaco/test/megaco_codec_prev3c_test.erl index 813d0cf57d..db2d1404a7 100644 --- a/lib/megaco/test/megaco_codec_prev3c_test.erl +++ b/lib/megaco/test/megaco_codec_prev3c_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2006-2009. All Rights Reserved. +%% Copyright Ericsson AB 2006-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 @@ -286,32 +286,6 @@ 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). - - %% ---- t() -> megaco_test_lib:t(?MODULE). @@ -603,6 +577,30 @@ 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). + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/lib/megaco/test/megaco_codec_v1_test.erl b/lib/megaco/test/megaco_codec_v1_test.erl index 7f2af37282..e070dd65e0 100644 --- a/lib/megaco/test/megaco_codec_v1_test.erl +++ b/lib/megaco/test/megaco_codec_v1_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 @@ -451,31 +451,6 @@ 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). - %% ---- @@ -754,6 +729,30 @@ 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). + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 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). + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/lib/megaco/test/megaco_codec_v3_test.erl b/lib/megaco/test/megaco_codec_v3_test.erl index f49c3a677a..16dd0c7f5d 100644 --- a/lib/megaco/test/megaco_codec_v3_test.erl +++ b/lib/megaco/test/megaco_codec_v3_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2006-2009. All Rights Reserved. +%% Copyright Ericsson AB 2006-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 @@ -285,31 +285,6 @@ 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). - %% ---- @@ -602,6 +577,30 @@ 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). + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |