From 7c0a62d3d8083bf1aa8430aad35ad93c2a887de7 Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Fri, 20 May 2016 08:02:38 +0200 Subject: [ic] Update the test suites to follow the new style * Eliminate use of ?config(), ?t() and ?line() macros * Remove the doc and suite clauses --- lib/ic/test/c_client_erl_server_SUITE.erl | 76 +--- lib/ic/test/c_client_erl_server_proto_SUITE.erl | 76 +--- .../test/c_client_erl_server_proto_tmo_SUITE.erl | 78 +--- lib/ic/test/erl_client_c_server_SUITE.erl | 77 +--- lib/ic/test/erl_client_c_server_proto_SUITE.erl | 77 +--- lib/ic/test/ic_SUITE.erl | 469 +++++++++------------ lib/ic/test/ic_be_SUITE.erl | 23 +- lib/ic/test/ic_pp_SUITE.erl | 212 ++++------ lib/ic/test/ic_pragma_SUITE.erl | 48 +-- lib/ic/test/ic_register_SUITE.erl | 186 ++++---- lib/ic/test/java_client_erl_server_SUITE.erl | 137 +++--- 11 files changed, 457 insertions(+), 1002 deletions(-) (limited to 'lib') diff --git a/lib/ic/test/c_client_erl_server_SUITE.erl b/lib/ic/test/c_client_erl_server_SUITE.erl index 7668300b58..b6e100e102 100644 --- a/lib/ic/test/c_client_erl_server_SUITE.erl +++ b/lib/ic/test/c_client_erl_server_SUITE.erl @@ -49,7 +49,7 @@ %% Add/remove code path and watchdog before/after each test case. %% init_per_testcase(_Case, Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), code:add_patha(DataDir), %% Since other test suites use the module m_i, we have @@ -61,9 +61,9 @@ init_per_testcase(_Case, Config) -> [{watchdog, WatchDog}| Config]. end_per_testcase(_Case, Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), code:del_path(DataDir), - WatchDog = ?config(watchdog, Config), + WatchDog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(WatchDog). suite() -> [{ct_hooks,[ts_install_cth]}]. @@ -95,173 +95,105 @@ init_per_group(_GroupName, Config) -> end_per_group(_GroupName, Config) -> Config. -array1_test(doc) -> ""; -array1_test(suite) -> []; array1_test(Config) -> do_test(array1_test, Config). -array2_test(doc) -> ""; -array2_test(suite) -> []; array2_test(Config) -> do_test(array2_test, Config). -bool_test(doc) -> ""; -bool_test(suite) -> []; bool_test(Config) -> do_test(bool_test, Config). -char_test(doc) -> ""; -char_test(suite) -> []; char_test(Config) -> do_test(char_test, Config). -double_test(doc) -> ""; -double_test(suite) -> []; double_test(Config) -> do_test(double_test, Config). -enum_test(doc) -> ""; -enum_test(suite) -> []; enum_test(Config) -> do_test(enum_test, Config). -inline_sequence_test(doc) -> ""; -inline_sequence_test(suite) -> []; inline_sequence_test(Config) -> do_test(inline_sequence_test, Config). -long_long_test(doc) -> ""; -long_long_test(suite) -> []; long_long_test(Config) -> do_test(long_long_test, Config). -long_test(doc) -> ""; -long_test(suite) -> []; long_test(Config) -> do_test(long_test, Config). -octet_test(doc) -> ""; -octet_test(suite) -> []; octet_test(Config) -> do_test(octet_test, Config). -pid_test(doc) -> ""; -pid_test(suite) -> []; pid_test(Config) -> do_test(pid_test, Config). -port_test(doc) -> ""; -port_test(suite) -> []; port_test(Config) -> do_test(port_test, Config). -ref_test(doc) -> ""; -ref_test(suite) -> []; ref_test(Config) -> do_test(ref_test, Config). -seq1_test(doc) -> ""; -seq1_test(suite) -> []; seq1_test(Config) -> do_test(seq1_test, Config). -seq2_test(doc) -> ""; -seq2_test(suite) -> []; seq2_test(Config) -> do_test(seq2_test, Config). -seq3_test(doc) -> ""; -seq3_test(suite) -> []; seq3_test(Config) -> do_test(seq3_test, Config). -seq4_test(doc) -> ""; -seq4_test(suite) -> []; seq4_test(Config) -> do_test(seq4_test, Config). -seq5_test(doc) -> ""; -seq5_test(suite) -> []; seq5_test(Config) -> do_test(seq5_test, Config). -string1_test(doc) -> ""; -string1_test(suite) -> []; string1_test(Config) -> do_test(string1_test, Config). -string2_test(doc) -> ""; -string2_test(suite) -> []; string2_test(Config) -> do_test(string2_test, Config). -string3_test(doc) -> ""; -string3_test(suite) -> []; string3_test(Config) -> do_test(string3_test, Config). -string4_test(doc) -> ""; -string4_test(suite) -> []; string4_test(Config) -> do_test(string4_test, Config). -struct2_test(doc) -> ""; -struct2_test(suite) -> []; struct2_test(Config) -> do_test(struct2_test, Config). -struct_test(doc) -> ""; -struct_test(suite) -> []; struct_test(Config) -> do_test(struct_test, Config). -term_sequence_test(doc) -> ""; -term_sequence_test(suite) -> []; term_sequence_test(Config) -> do_test(term_sequence_test, Config). -term_struct_test(doc) -> ""; -term_struct_test(suite) -> []; term_struct_test(Config) -> do_test(term_struct_test, Config). -term_test(doc) -> ""; -term_test(suite) -> []; term_test(Config) -> do_test(term_test, Config). -typedef_test(doc) -> ""; -typedef_test(suite) -> []; typedef_test(Config) -> do_test(typedef_test, Config). -unsigned_long_long_test(doc) -> ""; -unsigned_long_long_test(suite) -> []; unsigned_long_long_test(Config) -> do_test(unsigned_long_long_test, Config). -unsigned_long_test(doc) -> ""; -unsigned_long_test(suite) -> []; unsigned_long_test(Config) -> do_test(unsigned_long_test, Config). -unsigned_short_test(doc) -> ""; -unsigned_short_test(suite) -> []; unsigned_short_test(Config) -> do_test(unsigned_short_test, Config). -void_test(doc) -> ""; -void_test(suite) -> []; void_test(Config) -> do_test(void_test, Config). -wchar_test(doc) -> ""; -wchar_test(suite) -> []; wchar_test(Config) -> do_test(wchar_test, Config). -wstring1_test(doc) -> ""; -wstring1_test(suite) -> []; wstring1_test(Config) -> do_test(wstring1_test, Config). @@ -275,7 +207,7 @@ do_test(Case, Config) -> %% Start the server {ok, _Pid} = m_i:oe_create_link([], {local, ?ERLANG_SERVER_NAME}), Node = atom_to_list(node()), - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), %% io:format("~p: data directory: ~p~n", [?MODULE, DataDir]), Cookie = atom_to_list(erlang:get_cookie()), %% Start C-client node as a port program. diff --git a/lib/ic/test/c_client_erl_server_proto_SUITE.erl b/lib/ic/test/c_client_erl_server_proto_SUITE.erl index 2336a8417c..c15617ea3f 100644 --- a/lib/ic/test/c_client_erl_server_proto_SUITE.erl +++ b/lib/ic/test/c_client_erl_server_proto_SUITE.erl @@ -48,7 +48,7 @@ %% Add/remove code path and watchdog before/after each test case. %% init_per_testcase(_Case, Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), code:add_patha(DataDir), %% Since other test suites use the module m_i, we have @@ -60,9 +60,9 @@ init_per_testcase(_Case, Config) -> [{watchdog, WatchDog}| Config]. end_per_testcase(_Case, Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), code:del_path(DataDir), - WatchDog = ?config(watchdog, Config), + WatchDog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(WatchDog). suite() -> [{ct_hooks,[ts_install_cth]}]. @@ -94,173 +94,105 @@ init_per_group(_GroupName, Config) -> end_per_group(_GroupName, Config) -> Config. -array1_test(doc) -> ""; -array1_test(suite) -> []; array1_test(Config) -> do_test(array1_test, Config). -array2_test(doc) -> ""; -array2_test(suite) -> []; array2_test(Config) -> do_test(array2_test, Config). -bool_test(doc) -> ""; -bool_test(suite) -> []; bool_test(Config) -> do_test(bool_test, Config). -char_test(doc) -> ""; -char_test(suite) -> []; char_test(Config) -> do_test(char_test, Config). -double_test(doc) -> ""; -double_test(suite) -> []; double_test(Config) -> do_test(double_test, Config). -enum_test(doc) -> ""; -enum_test(suite) -> []; enum_test(Config) -> do_test(enum_test, Config). -inline_sequence_test(doc) -> ""; -inline_sequence_test(suite) -> []; inline_sequence_test(Config) -> do_test(inline_sequence_test, Config). -long_long_test(doc) -> ""; -long_long_test(suite) -> []; long_long_test(Config) -> do_test(long_long_test, Config). -long_test(doc) -> ""; -long_test(suite) -> []; long_test(Config) -> do_test(long_test, Config). -octet_test(doc) -> ""; -octet_test(suite) -> []; octet_test(Config) -> do_test(octet_test, Config). -pid_test(doc) -> ""; -pid_test(suite) -> []; pid_test(Config) -> do_test(pid_test, Config). -port_test(doc) -> ""; -port_test(suite) -> []; port_test(Config) -> do_test(port_test, Config). -ref_test(doc) -> ""; -ref_test(suite) -> []; ref_test(Config) -> do_test(ref_test, Config). -seq1_test(doc) -> ""; -seq1_test(suite) -> []; seq1_test(Config) -> do_test(seq1_test, Config). -seq2_test(doc) -> ""; -seq2_test(suite) -> []; seq2_test(Config) -> do_test(seq2_test, Config). -seq3_test(doc) -> ""; -seq3_test(suite) -> []; seq3_test(Config) -> do_test(seq3_test, Config). -seq4_test(doc) -> ""; -seq4_test(suite) -> []; seq4_test(Config) -> do_test(seq4_test, Config). -seq5_test(doc) -> ""; -seq5_test(suite) -> []; seq5_test(Config) -> do_test(seq5_test, Config). -string1_test(doc) -> ""; -string1_test(suite) -> []; string1_test(Config) -> do_test(string1_test, Config). -string2_test(doc) -> ""; -string2_test(suite) -> []; string2_test(Config) -> do_test(string2_test, Config). -string3_test(doc) -> ""; -string3_test(suite) -> []; string3_test(Config) -> do_test(string3_test, Config). -string4_test(doc) -> ""; -string4_test(suite) -> []; string4_test(Config) -> do_test(string4_test, Config). -struct2_test(doc) -> ""; -struct2_test(suite) -> []; struct2_test(Config) -> do_test(struct2_test, Config). -struct_test(doc) -> ""; -struct_test(suite) -> []; struct_test(Config) -> do_test(struct_test, Config). -term_sequence_test(doc) -> ""; -term_sequence_test(suite) -> []; term_sequence_test(Config) -> do_test(term_sequence_test, Config). -term_struct_test(doc) -> ""; -term_struct_test(suite) -> []; term_struct_test(Config) -> do_test(term_struct_test, Config). -term_test(doc) -> ""; -term_test(suite) -> []; term_test(Config) -> do_test(term_test, Config). -typedef_test(doc) -> ""; -typedef_test(suite) -> []; typedef_test(Config) -> do_test(typedef_test, Config). -unsigned_long_long_test(doc) -> ""; -unsigned_long_long_test(suite) -> []; unsigned_long_long_test(Config) -> do_test(unsigned_long_long_test, Config). -unsigned_long_test(doc) -> ""; -unsigned_long_test(suite) -> []; unsigned_long_test(Config) -> do_test(unsigned_long_test, Config). -unsigned_short_test(doc) -> ""; -unsigned_short_test(suite) -> []; unsigned_short_test(Config) -> do_test(unsigned_short_test, Config). -void_test(doc) -> ""; -void_test(suite) -> []; void_test(Config) -> do_test(void_test, Config). -wchar_test(doc) -> ""; -wchar_test(suite) -> []; wchar_test(Config) -> do_test(wchar_test, Config). -wstring1_test(doc) -> ""; -wstring1_test(suite) -> []; wstring1_test(Config) -> do_test(wstring1_test, Config). @@ -275,7 +207,7 @@ do_test(Case, Config) -> {ok, _Pid} = m_i:oe_create_link([], {local, ?ERLANG_SERVER_NAME}), Node = atom_to_list(node()), %% [NodeName, HostName] = string:tokens(Node, "@"), - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), %% io:format("~p: data directory: ~p~n", [?MODULE, DataDir]), Cookie = atom_to_list(erlang:get_cookie()), %% Start C-client node as a port program. diff --git a/lib/ic/test/c_client_erl_server_proto_tmo_SUITE.erl b/lib/ic/test/c_client_erl_server_proto_tmo_SUITE.erl index ed45b7fd82..334db7c1da 100644 --- a/lib/ic/test/c_client_erl_server_proto_tmo_SUITE.erl +++ b/lib/ic/test/c_client_erl_server_proto_tmo_SUITE.erl @@ -48,7 +48,7 @@ %% Add/remove code path and watchdog before/after each test case. %% init_per_testcase(_Case, Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), code:add_patha(DataDir), %% Since other test suites use the module m_i, we have @@ -60,9 +60,9 @@ init_per_testcase(_Case, Config) -> [{watchdog, WatchDog}| Config]. end_per_testcase(_Case, Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), code:del_path(DataDir), - WatchDog = ?config(watchdog, Config), + WatchDog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(WatchDog). suite() -> [{ct_hooks,[ts_install_cth]}]. @@ -94,175 +94,105 @@ init_per_group(_GroupName, Config) -> end_per_group(_GroupName, Config) -> Config. - - -array1_test(doc) -> ""; -array1_test(suite) -> []; array1_test(Config) -> do_test(array1_test, Config). -array2_test(doc) -> ""; -array2_test(suite) -> []; array2_test(Config) -> do_test(array2_test, Config). -bool_test(doc) -> ""; -bool_test(suite) -> []; bool_test(Config) -> do_test(bool_test, Config). -char_test(doc) -> ""; -char_test(suite) -> []; char_test(Config) -> do_test(char_test, Config). -double_test(doc) -> ""; -double_test(suite) -> []; double_test(Config) -> do_test(double_test, Config). -enum_test(doc) -> ""; -enum_test(suite) -> []; enum_test(Config) -> do_test(enum_test, Config). -inline_sequence_test(doc) -> ""; -inline_sequence_test(suite) -> []; inline_sequence_test(Config) -> do_test(inline_sequence_test, Config). -long_long_test(doc) -> ""; -long_long_test(suite) -> []; long_long_test(Config) -> do_test(long_long_test, Config). -long_test(doc) -> ""; -long_test(suite) -> []; long_test(Config) -> do_test(long_test, Config). -octet_test(doc) -> ""; -octet_test(suite) -> []; octet_test(Config) -> do_test(octet_test, Config). -pid_test(doc) -> ""; -pid_test(suite) -> []; pid_test(Config) -> do_test(pid_test, Config). -port_test(doc) -> ""; -port_test(suite) -> []; port_test(Config) -> do_test(port_test, Config). -ref_test(doc) -> ""; -ref_test(suite) -> []; ref_test(Config) -> do_test(ref_test, Config). -seq1_test(doc) -> ""; -seq1_test(suite) -> []; seq1_test(Config) -> do_test(seq1_test, Config). -seq2_test(doc) -> ""; -seq2_test(suite) -> []; seq2_test(Config) -> do_test(seq2_test, Config). -seq3_test(doc) -> ""; -seq3_test(suite) -> []; seq3_test(Config) -> do_test(seq3_test, Config). -seq4_test(doc) -> ""; -seq4_test(suite) -> []; seq4_test(Config) -> do_test(seq4_test, Config). -seq5_test(doc) -> ""; -seq5_test(suite) -> []; seq5_test(Config) -> do_test(seq5_test, Config). -string1_test(doc) -> ""; -string1_test(suite) -> []; string1_test(Config) -> do_test(string1_test, Config). -string2_test(doc) -> ""; -string2_test(suite) -> []; string2_test(Config) -> do_test(string2_test, Config). -string3_test(doc) -> ""; -string3_test(suite) -> []; string3_test(Config) -> do_test(string3_test, Config). -string4_test(doc) -> ""; -string4_test(suite) -> []; string4_test(Config) -> do_test(string4_test, Config). -struct2_test(doc) -> ""; -struct2_test(suite) -> []; struct2_test(Config) -> do_test(struct2_test, Config). -struct_test(doc) -> ""; -struct_test(suite) -> []; struct_test(Config) -> do_test(struct_test, Config). -term_sequence_test(doc) -> ""; -term_sequence_test(suite) -> []; term_sequence_test(Config) -> do_test(term_sequence_test, Config). -term_struct_test(doc) -> ""; -term_struct_test(suite) -> []; term_struct_test(Config) -> do_test(term_struct_test, Config). -term_test(doc) -> ""; -term_test(suite) -> []; term_test(Config) -> do_test(term_test, Config). -typedef_test(doc) -> ""; -typedef_test(suite) -> []; typedef_test(Config) -> do_test(typedef_test, Config). -unsigned_long_long_test(doc) -> ""; -unsigned_long_long_test(suite) -> []; unsigned_long_long_test(Config) -> do_test(unsigned_long_long_test, Config). -unsigned_long_test(doc) -> ""; -unsigned_long_test(suite) -> []; unsigned_long_test(Config) -> do_test(unsigned_long_test, Config). -unsigned_short_test(doc) -> ""; -unsigned_short_test(suite) -> []; unsigned_short_test(Config) -> do_test(unsigned_short_test, Config). -void_test(doc) -> ""; -void_test(suite) -> []; void_test(Config) -> do_test(void_test, Config). -wchar_test(doc) -> ""; -wchar_test(suite) -> []; wchar_test(Config) -> do_test(wchar_test, Config). -wstring1_test(doc) -> ""; -wstring1_test(suite) -> []; wstring1_test(Config) -> do_test(wstring1_test, Config). @@ -277,7 +207,7 @@ do_test(Case, Config) -> {ok, _Pid} = m_i:oe_create_link([], {local, ?ERLANG_SERVER_NAME}), Node = atom_to_list(node()), %% [NodeName, HostName] = string:tokens(Node, "@"), - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), %% io:format("~p: data directory: ~p~n", [?MODULE, DataDir]), Cookie = atom_to_list(erlang:get_cookie()), %% Start C-client node as a port program. diff --git a/lib/ic/test/erl_client_c_server_SUITE.erl b/lib/ic/test/erl_client_c_server_SUITE.erl index cc0dbfda74..d592a611f7 100644 --- a/lib/ic/test/erl_client_c_server_SUITE.erl +++ b/lib/ic/test/erl_client_c_server_SUITE.erl @@ -47,7 +47,7 @@ %% Add/remove code path and watchdog before/after each test case. %% init_per_testcase(_Case, Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), code:add_patha(DataDir), %% Since other test suites use the module m_i, we have @@ -59,9 +59,9 @@ init_per_testcase(_Case, Config) -> [{watchdog, WatchDog}| Config]. end_per_testcase(_Case, Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), code:del_path(DataDir), - WatchDog = ?config(watchdog, Config), + WatchDog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(WatchDog). suite() -> [{ct_hooks,[ts_install_cth]}]. @@ -93,174 +93,105 @@ end_per_group(_GroupName, Config) -> Config. - -array1_test(doc) -> ""; -array1_test(suite) -> []; array1_test(Config) -> do_test(array1_test, Config). -array2_test(doc) -> ""; -array2_test(suite) -> []; array2_test(Config) -> do_test(array2_test, Config). -bool_test(doc) -> ""; -bool_test(suite) -> []; bool_test(Config) -> do_test(bool_test, Config). -char_test(doc) -> ""; -char_test(suite) -> []; char_test(Config) -> do_test(char_test, Config). -double_test(doc) -> ""; -double_test(suite) -> []; double_test(Config) -> do_test(double_test, Config). -enum_test(doc) -> ""; -enum_test(suite) -> []; enum_test(Config) -> do_test(enum_test, Config). -inline_sequence_test(doc) -> ""; -inline_sequence_test(suite) -> []; inline_sequence_test(Config) -> do_test(inline_sequence_test, Config). -longlong_test(doc) -> ""; -longlong_test(suite) -> []; longlong_test(Config) -> do_test(longlong_test, Config). -long_test(doc) -> ""; -long_test(suite) -> []; long_test(Config) -> do_test(long_test, Config). -octet_test(doc) -> ""; -octet_test(suite) -> []; octet_test(Config) -> do_test(octet_test, Config). -pid_test(doc) -> ""; -pid_test(suite) -> []; pid_test(Config) -> do_test(pid_test, Config). -port_test(doc) -> ""; -port_test(suite) -> []; port_test(Config) -> do_test(port_test, Config). -ref_test(doc) -> ""; -ref_test(suite) -> []; ref_test(Config) -> do_test(ref_test, Config). -seq1_test(doc) -> ""; -seq1_test(suite) -> []; seq1_test(Config) -> do_test(seq1_test, Config). -seq2_test(doc) -> ""; -seq2_test(suite) -> []; seq2_test(Config) -> do_test(seq2_test, Config). -seq3_test(doc) -> ""; -seq3_test(suite) -> []; seq3_test(Config) -> do_test(seq3_test, Config). -seq4_test(doc) -> ""; -seq4_test(suite) -> []; seq4_test(Config) -> do_test(seq4_test, Config). -seq5_test(doc) -> ""; -seq5_test(suite) -> []; seq5_test(Config) -> do_test(seq5_test, Config). -string1_test(doc) -> ""; -string1_test(suite) -> []; string1_test(Config) -> do_test(string1_test, Config). -string2_test(doc) -> ""; -string2_test(suite) -> []; string2_test(Config) -> do_test(string2_test, Config). -string3_test(doc) -> ""; -string3_test(suite) -> []; string3_test(Config) -> do_test(string3_test, Config). -string4_test(doc) -> ""; -string4_test(suite) -> []; string4_test(Config) -> do_test(string4_test, Config). -struct2_test(doc) -> ""; -struct2_test(suite) -> []; struct2_test(Config) -> do_test(struct2_test, Config). -struct_test(doc) -> ""; -struct_test(suite) -> []; struct_test(Config) -> do_test(struct_test, Config). -term_sequence_test(doc) -> ""; -term_sequence_test(suite) -> []; term_sequence_test(Config) -> do_test(term_sequence_test, Config). -term_struct_test(doc) -> ""; -term_struct_test(suite) -> []; term_struct_test(Config) -> do_test(term_struct_test, Config). -term_test(doc) -> ""; -term_test(suite) -> []; term_test(Config) -> do_test(term_test, Config). -typedef_test(doc) -> ""; -typedef_test(suite) -> []; typedef_test(Config) -> do_test(typedef_test, Config). -ulonglong_test(doc) -> ""; -ulonglong_test(suite) -> []; ulonglong_test(Config) -> do_test(ulonglong_test, Config). -ulong_test(doc) -> ""; -ulong_test(suite) -> []; ulong_test(Config) -> do_test(ulong_test, Config). -ushort_test(doc) -> ""; -ushort_test(suite) -> []; ushort_test(Config) -> do_test(ushort_test, Config). -void_test(doc) -> ""; -void_test(suite) -> []; void_test(Config) -> do_test(void_test, Config). -wchar_test(doc) -> ""; -wchar_test(suite) -> []; wchar_test(Config) -> do_test(wchar_test, Config). -wstring1_test(doc) -> ""; -wstring1_test(suite) -> []; wstring1_test(Config) -> do_test(wstring1_test, Config). @@ -270,7 +201,7 @@ do_test(Case, Config) -> process_flag(trap_exit, true), Node = atom_to_list(node()), [_NodeName, HostName] = string:tokens(Node, "@"), - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), %% io:format("~p: data directory: ~p~n", [?MODULE, DataDir]), Cookie = atom_to_list(erlang:get_cookie()), ServerNodeName = atom_to_list(?C_SERVER_NODE_NAME), diff --git a/lib/ic/test/erl_client_c_server_proto_SUITE.erl b/lib/ic/test/erl_client_c_server_proto_SUITE.erl index 48330b95a8..99eeed01ad 100644 --- a/lib/ic/test/erl_client_c_server_proto_SUITE.erl +++ b/lib/ic/test/erl_client_c_server_proto_SUITE.erl @@ -47,7 +47,7 @@ %% Add/remove code path and watchdog before/after each test case. %% init_per_testcase(_Case, Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), code:add_patha(DataDir), %% Since other test suites use the module m_i, we have @@ -59,9 +59,9 @@ init_per_testcase(_Case, Config) -> [{watchdog, WatchDog}| Config]. end_per_testcase(_Case, Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), code:del_path(DataDir), - WatchDog = ?config(watchdog, Config), + WatchDog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(WatchDog). suite() -> [{ct_hooks,[ts_install_cth]}]. @@ -93,174 +93,105 @@ end_per_group(_GroupName, Config) -> Config. - -array1_test(doc) -> ""; -array1_test(suite) -> []; array1_test(Config) -> do_test(array1_test, Config). -array2_test(doc) -> ""; -array2_test(suite) -> []; array2_test(Config) -> do_test(array2_test, Config). -bool_test(doc) -> ""; -bool_test(suite) -> []; bool_test(Config) -> do_test(bool_test, Config). -char_test(doc) -> ""; -char_test(suite) -> []; char_test(Config) -> do_test(char_test, Config). -double_test(doc) -> ""; -double_test(suite) -> []; double_test(Config) -> do_test(double_test, Config). -enum_test(doc) -> ""; -enum_test(suite) -> []; enum_test(Config) -> do_test(enum_test, Config). -inline_sequence_test(doc) -> ""; -inline_sequence_test(suite) -> []; inline_sequence_test(Config) -> do_test(inline_sequence_test, Config). -longlong_test(doc) -> ""; -longlong_test(suite) -> []; longlong_test(Config) -> do_test(longlong_test, Config). -long_test(doc) -> ""; -long_test(suite) -> []; long_test(Config) -> do_test(long_test, Config). -octet_test(doc) -> ""; -octet_test(suite) -> []; octet_test(Config) -> do_test(octet_test, Config). -pid_test(doc) -> ""; -pid_test(suite) -> []; pid_test(Config) -> do_test(pid_test, Config). -port_test(doc) -> ""; -port_test(suite) -> []; port_test(Config) -> do_test(port_test, Config). -ref_test(doc) -> ""; -ref_test(suite) -> []; ref_test(Config) -> do_test(ref_test, Config). -seq1_test(doc) -> ""; -seq1_test(suite) -> []; seq1_test(Config) -> do_test(seq1_test, Config). -seq2_test(doc) -> ""; -seq2_test(suite) -> []; seq2_test(Config) -> do_test(seq2_test, Config). -seq3_test(doc) -> ""; -seq3_test(suite) -> []; seq3_test(Config) -> do_test(seq3_test, Config). -seq4_test(doc) -> ""; -seq4_test(suite) -> []; seq4_test(Config) -> do_test(seq4_test, Config). -seq5_test(doc) -> ""; -seq5_test(suite) -> []; seq5_test(Config) -> do_test(seq5_test, Config). -string1_test(doc) -> ""; -string1_test(suite) -> []; string1_test(Config) -> do_test(string1_test, Config). -string2_test(doc) -> ""; -string2_test(suite) -> []; string2_test(Config) -> do_test(string2_test, Config). -string3_test(doc) -> ""; -string3_test(suite) -> []; string3_test(Config) -> do_test(string3_test, Config). -string4_test(doc) -> ""; -string4_test(suite) -> []; string4_test(Config) -> do_test(string4_test, Config). -struct2_test(doc) -> ""; -struct2_test(suite) -> []; struct2_test(Config) -> do_test(struct2_test, Config). -struct_test(doc) -> ""; -struct_test(suite) -> []; struct_test(Config) -> do_test(struct_test, Config). -term_sequence_test(doc) -> ""; -term_sequence_test(suite) -> []; term_sequence_test(Config) -> do_test(term_sequence_test, Config). -term_struct_test(doc) -> ""; -term_struct_test(suite) -> []; term_struct_test(Config) -> do_test(term_struct_test, Config). -term_test(doc) -> ""; -term_test(suite) -> []; term_test(Config) -> do_test(term_test, Config). -typedef_test(doc) -> ""; -typedef_test(suite) -> []; typedef_test(Config) -> do_test(typedef_test, Config). -ulonglong_test(doc) -> ""; -ulonglong_test(suite) -> []; ulonglong_test(Config) -> do_test(ulonglong_test, Config). -ulong_test(doc) -> ""; -ulong_test(suite) -> []; ulong_test(Config) -> do_test(ulong_test, Config). -ushort_test(doc) -> ""; -ushort_test(suite) -> []; ushort_test(Config) -> do_test(ushort_test, Config). -void_test(doc) -> ""; -void_test(suite) -> []; void_test(Config) -> do_test(void_test, Config). -wchar_test(doc) -> ""; -wchar_test(suite) -> []; wchar_test(Config) -> do_test(wchar_test, Config). -wstring1_test(doc) -> ""; -wstring1_test(suite) -> []; wstring1_test(Config) -> do_test(wstring1_test, Config). @@ -270,7 +201,7 @@ do_test(Case, Config) -> process_flag(trap_exit, true), Node = atom_to_list(node()), [_NodeName, HostName] = string:tokens(Node, "@"), - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), %% io:format("~p: data directory: ~p~n", [?MODULE, DataDir]), Cookie = atom_to_list(erlang:get_cookie()), ServerNodeName = atom_to_list(?C_SERVER_NODE_NAME), diff --git a/lib/ic/test/ic_SUITE.erl b/lib/ic/test/ic_SUITE.erl index 1d436eda2b..42c1dbb415 100644 --- a/lib/ic/test/ic_SUITE.erl +++ b/lib/ic/test/ic_SUITE.erl @@ -83,7 +83,7 @@ %% Standard options to the ic compiler, NOTE unholy use of OutDir --define(OUT(X), filename:join([?config(priv_dir, Config), gen, to_list(X)])). +-define(OUT(X), filename:join([proplists:get_value(priv_dir, Config), gen, to_list(X)])). %% Top of cases @@ -129,9 +129,6 @@ end_per_group(_GroupName, Config) -> Config. - -app_test(doc) -> []; -app_test(suite) -> []; app_test(_Config) -> ok=test_server:app_test(ic), ok. @@ -141,89 +138,72 @@ app_test(_Config) -> %% Test of constant expressions. %% - - -const_norm(doc) -> - ["Checks normal constant types and values"]; -const_norm(suite) -> []; +%% Checks normal constant types and values const_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(const_norm), File = filename:join(DataDir, c_norm), - ?line ok = ic:gen(File, stdopts(OutDir)), - ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), - ?line ok = compile(OutDir, const_norm_files()), + ok = ic:gen(File, stdopts(OutDir)), + {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), + ok = compile(OutDir, const_norm_files()), ok. -const_bad_tk(doc) -> - ["Checks when the constant value doesn't match the declared type"]; -const_bad_tk(suite) -> []; +%% Checks when the constant value doesn't match the declared type const_bad_tk(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(slask), File = filename:join(DataDir, c_err1), - ?line error = ic:gen(File, stdopts(OutDir)), - ?line {error, [], R} = + error = ic:gen(File, stdopts(OutDir)), + {error, [], R} = ic:gen(File, stdopts(OutDir)++[silent2]), check_errors(18, bad_tk_match, R), ok. -const_bad_type(doc) -> - ["Checks operands of ops are of correct type"]; -const_bad_type(suite) -> []; +%% Checks operands of ops are of correct type const_bad_type(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(slask), File = filename:join(DataDir, c_err2), - ?line error = ic:gen(File, stdopts(OutDir)), - ?line {error, [], R} = + error = ic:gen(File, stdopts(OutDir)), + {error, [], R} = ic:gen(File, stdopts(OutDir)++[silent2]), check_errors(4, bad_type, R), ok. -const_bad_comb(doc) -> - ["Checks operands of ops are of conflicting types"]; -const_bad_comb(suite) -> []; +%% Checks operands of ops are of conflicting types const_bad_comb(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(slask), File = filename:join(DataDir, c_err3), - ?line error = ic:gen(File, stdopts(OutDir)), - ?line {error, [], R} = + error = ic:gen(File, stdopts(OutDir)), + {error, [], R} = ic:gen(File, stdopts(OutDir)++[silent2]), check_errors(3, bad_type_combination, R), ok. - - - -union_norm(doc) -> - ["Checks that normal union declarations works."]; -union_norm(suite) -> []; +%% Checks that normal union declarations works. union_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(union_norm), File = filename:join(DataDir, u_norm), - ?line ok = ic:gen(File, stdopts(OutDir)), - ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), - ?line ok = compile(OutDir, union_norm_files()), + ok = ic:gen(File, stdopts(OutDir)), + {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), + ok = compile(OutDir, union_norm_files()), ok. %% Checks OTP-2007 -union_default(doc) -> - ["Checks that default cases are correct in type code."]; -union_default(suite) -> []; +%% Checks that default cases are correct in type code. union_default(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(union_default), File = filename:join(DataDir, u_default), - ?line ok = ic:gen(File, stdopts(OutDir)), - ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), - ?line ok = compile(OutDir, union_default_files(), [load]), + ok = ic:gen(File, stdopts(OutDir)), + {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), + ok = compile(OutDir, union_default_files(), [load]), TkList = i1:oe_get_interface(), check_label("op0", 0, TkList), check_label("op1", 1, TkList), @@ -256,50 +236,41 @@ check_label(Id, N, List) -> test_server:fail({'no_such_op!', Id, List}) end. -union_type(doc) -> - ["Checks that errors are detected. Check that mismatch between case ", - "value and declared discriminator type is detected."]; -union_type(suite) -> []; +%% Checks that errors are detected. Check that mismatch between case +%% value and declared discriminator type is detected. union_type(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(slask), File = filename:join(DataDir, u_type), - ?line error = ic:gen(File, stdopts(OutDir)), - ?line {error, [], R} = + error = ic:gen(File, stdopts(OutDir)), + {error, [], R} = ic:gen(File, stdopts(OutDir)++[silent2]), check_errors(28, bad_case_type, R), ok. -union_mult_err(doc) -> - ["Check that multiple declared declarators are caught.", - "Also check that if the discriminator is an enum, then the enum name", - "must not be used as a declarator in the union switch (declarator", - "as opposed to label)."]; -union_mult_err(suite) -> []; +%% Check that multiple declared declarators are caught. +%% Also check that if the discriminator is an enum, then the enum name +%% must not be used as a declarator in the union switch (declarator +%% as opposed to label). union_mult_err(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(slask), File = filename:join(DataDir, u_mult), - ?line error = ic:gen(File, stdopts(OutDir)), - ?line {error, [], R} = + error = ic:gen(File, stdopts(OutDir)), + {error, [], R} = ic:gen(File, stdopts(OutDir)++[silent2]), check_errors(8, multiply_defined, R), ok. -%% Checking mult cases. Now check that other errors are found in the -%% correct order XXXX - - -union_case_mult(doc) -> - ["Check that multiply defined case labels are found and reported."]; -union_case_mult(suite) -> []; +%% Check that multiply defined case labels are found in the +%% correct order union_case_mult(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(slask), File = filename:join(DataDir, u_case_mult), - ?line error = ic:gen(File, stdopts(OutDir)), - ?line {error, [], R} = + error = ic:gen(File, stdopts(OutDir)), + {error, [], R} = ic:gen(File, stdopts(OutDir)++[silent2]), check_errors(7, multiple_cases, R), ok. @@ -309,19 +280,15 @@ union_case_mult(Config) when is_list(Config) -> %% %% Enum cases %% - - -enum_norm(doc) -> - ["Checks that normal enum declarations works."]; -enum_norm(suite) -> []; +%%Checks that normal enum declarations works. enum_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(enum_norm), File = filename:join(DataDir, enum), - ?line ok = ic:gen(File, stdopts(OutDir)), - ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), - ?line ok = compile(OutDir, enum_norm_files()), + ok = ic:gen(File, stdopts(OutDir)), + {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), + ok = compile(OutDir, enum_norm_files()), ok. @@ -329,27 +296,23 @@ enum_norm(Config) when is_list(Config) -> %% %% Struct cases %% - - -struct_norm(doc) -> - ["Checks that normal struct declarations works."]; -struct_norm(suite) -> []; +%% Checks that normal struct declarations works. struct_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(struct_norm), File = filename:join(DataDir, struct), - ?line ok = ic:gen(File, stdopts(OutDir)), - ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), - ?line ok = compile(OutDir, struct_norm_files()), + ok = ic:gen(File, stdopts(OutDir)), + {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), + ok = compile(OutDir, struct_norm_files()), Mod = ridiculous_name_to_avoid_clash_svenne, TestFile = filename:join(OutDir, Mod), - ?line ok = gen_struct_file(TestFile, Mod), - ?line ok = compile(OutDir, [Mod], [load]), -%% ?line {ok, Mod, []} = compile:file(TestFile, + ok = gen_struct_file(TestFile, Mod), + ok = compile(OutDir, [Mod], [load]), +%% {ok, Mod, []} = compile:file(TestFile, %% [{i, OutDir}, {outdir, OutDir}, %% return, load]), - ?line ok = Mod:test(), + ok = Mod:test(), ok. @@ -359,36 +322,30 @@ struct_norm(Config) when is_list(Config) -> %% %% coss (add sometimes, takes 440 seconds!) - -typeid(doc) -> - ["Check that type id's are generated correctly"]; -typeid(suite) -> []; +%% Check that type id's are generated correctly typeid(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(typeid), File = filename:join(DataDir, typeid), - ?line ok = ic:gen(File, stdopts(OutDir)), - ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), - ?line ok = compile(OutDir, typeid_files(), [load]), - ?line "IDL:I1:1.0" = 'I1':'typeID'(), - ?line "IDL:M1/I1:1.0" = 'M1_I1':'typeID'(), - ?line "IDL:M2/M1/I1:1.0" = 'M2_M1_I1':'typeID'(), - ?line "IDL:M3/M2/M1/I1:1.0" = 'M3_M2_M1_I1':'typeID'(), + ok = ic:gen(File, stdopts(OutDir)), + {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), + ok = compile(OutDir, typeid_files(), [load]), + "IDL:I1:1.0" = 'I1':'typeID'(), + "IDL:M1/I1:1.0" = 'M1_I1':'typeID'(), + "IDL:M2/M1/I1:1.0" = 'M2_M1_I1':'typeID'(), + "IDL:M3/M2/M1/I1:1.0" = 'M3_M2_M1_I1':'typeID'(), ok. %%% This test case is removed because there's no way to test this from %%% an automated test suite. -dir(doc) -> - ["Check that relative directories work, absolute is used in", - "all other cases in the suite."]; -%%% xxxxxx -dir(suite) -> []; +%% Check that relative directories work, absolute is used in +%% all other cases in the suite. dir(Config) when is_list(Config) -> -ok; + ok; dir(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), %% Needs a unique directory (any better way?) OutDir = mk_unique("oe_the_dir"), @@ -402,94 +359,82 @@ dir(Config) -> %% Generate a unique IDL file with a single constant gen_file(File, Const), - ?line ok = ic:gen(File, stdopts(OutDir)), - ?line ok = compile(OutDir, [load]), - ?line 19955 = Mod:Func(), - ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), - ?line ok = compile(OutDir, [load]), - ?line 19955 = Mod:Func(), + ok = ic:gen(File, stdopts(OutDir)), + ok = compile(OutDir, [load]), + 19955 = Mod:Func(), + {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), + ok = compile(OutDir, [load]), + 19955 = Mod:Func(), - ?line ok = ic:gen(File), -%%% ?line ok = compile(".", [load]), + ok = ic:gen(File), +%%% ok = compile(".", [load]), ok. -undef_id(doc) -> - ["Check that various undefied id's are detected correctly"]; -undef_id(suite) -> []; +%% Check that various undefied id's are detected correctly undef_id(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(slask), File = filename:join(DataDir, undef_id), - ?line error = ic:gen(File, stdopts(OutDir)), - ?line {error, [], R} = + error = ic:gen(File, stdopts(OutDir)), + {error, [], R} = ic:gen(File, stdopts(OutDir)++[silent2]), check_errors(16, tk_not_found, R), ok. -mult_ids(doc) -> - ["Check that multiply defined ids are caught."]; -mult_ids(suite) -> []; +%% Check that multiply defined ids are caught. mult_ids(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(slask), File = filename:join(DataDir, mult_ids), - ?line error = ic:gen(File, stdopts(OutDir)), - ?line {error, [], R} = + error = ic:gen(File, stdopts(OutDir)), + {error, [], R} = ic:gen(File, stdopts(OutDir)++[silent2]), check_errors(22, multiply_defined, R), ok. -nasty_names(doc) -> - ["Check that various nasty names can be generated.", - "Try to provoke name clashes and name conflicts with", - "Erlang and IDL"]; -nasty_names(suite) -> []; +%% Check that various nasty names can be generated. +%% Try to provoke name clashes and name conflicts with +%% Erlang and IDL nasty_names(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(nasty_names), File = filename:join(DataDir, nasty), - ?line ok = ic:gen(File, stdopts(OutDir)), - ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), - ?line ok = compile(OutDir, nasty_names_files(), [load]), + ok = ic:gen(File, stdopts(OutDir)), + {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), + ok = compile(OutDir, nasty_names_files(), [load]), ok. -coss(doc) -> - ["Check that the Coss standard specification works."]; -coss(suite) -> []; +%% Check that the Coss standard specification works. coss(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(coss), File = filename:join(DataDir, 'Coss'), - ?line ok = ic:gen(File, stdopts(OutDir)), - ?line {ok, [_W1]} = ic:gen(File, stdopts(OutDir)++[silent2]), - ?line ok = compile(OutDir, []), + ok = ic:gen(File, stdopts(OutDir)), + {ok, [_W1]} = ic:gen(File, stdopts(OutDir)++[silent2]), + ok = compile(OutDir, []), ok. -forward(doc) -> - ["Check that forward declaratios work."]; -forward(suite) -> []; +%% Check that forward declaratios work. forward(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(forward), File = filename:join(DataDir, forward), - ?line ok = ic:gen(File, stdopts(OutDir)), - ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), - ?line ok = compile(OutDir, forward_files(), [load]), + ok = ic:gen(File, stdopts(OutDir)), + {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), + ok = compile(OutDir, forward_files(), [load]), ok. -include(doc) -> - ["Check that various undefied id's are detected correctly"]; -include(suite) -> []; +%% Check that various undefied id's are detected correctly include(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(slask), File = filename:join(DataDir, include), - ?line error = ic:gen(File, stdopts(OutDir)++[{preproc_flags,"-I" ++ DataDir}]), - ?line {error, [], R} = + error = ic:gen(File, stdopts(OutDir)++[{preproc_flags,"-I" ++ DataDir}]), + {error, [], R} = ic:gen(File, stdopts(OutDir)++[{preproc_flags,"-I" ++ DataDir},silent2]), case lists:map(fun(D) -> filename:rootname(filename:basename(element(3, D))) @@ -513,228 +458,198 @@ include(Config) when is_list(Config) -> %% Inhertit cases %% - -inherit_norm(doc) -> - ["Checks that normal inheritance works."]; -inherit_norm(suite) -> []; +%% Checks that normal inheritance works. inherit_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(inherit_norm), File = filename:join(DataDir, inherit), - ?line ok = ic:gen(File, stdopts(OutDir)), - ?line {ok, _Ws} = ic:gen(File, stdopts(OutDir)++[silent2]), - ?line ok = compile(OutDir, inherit_norm_files(), [load]), + ok = ic:gen(File, stdopts(OutDir)), + {ok, _Ws} = ic:gen(File, stdopts(OutDir)++[silent2]), + ok = compile(OutDir, inherit_norm_files(), [load]), %% Now check constant values: - ?line 9 = m1_I1:c1(), + 9 = m1_I1:c1(), - ?line 9 = m1_I2:c1(), - ?line 14 = m1_I2:c2(), - ?line 27 = m1_I2:c3(), + 9 = m1_I2:c1(), + 14 = m1_I2:c2(), + 27 = m1_I2:c3(), - ?line 50 = m1_I3:c1(), - ?line 14 = m1_I3:c2(), - ?line 27 = m1_I3:c3(), - ?line 91 = m1_I3:c4(), - ?line 100 = m1_I3:c5(), + 50 = m1_I3:c1(), + 14 = m1_I3:c2(), + 27 = m1_I3:c3(), + 91 = m1_I3:c4(), + 100 = m1_I3:c5(), ok. -inherit_warn(doc) -> - ["Check that various inheritance shadowing is detected"]; -inherit_warn(suite) -> []; +%% Check that various inheritance shadowing is detected inherit_warn(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(slask), File = filename:join(DataDir, inherit_warn), - ?line ok = ic:gen(File, stdopts(OutDir)), - ?line {ok, R} = + ok = ic:gen(File, stdopts(OutDir)), + {ok, R} = ic:gen(File, stdopts(OutDir)++[silent2]), check_errors(7, inherit_name_shadow, R), ok. -inherit_err(doc) -> - ["Check that various inheritance errors is detected"]; -inherit_err(suite) -> []; +%% Check that various inheritance errors is detected inherit_err(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(slask), File = filename:join(DataDir, inherit_err), - ?line error = ic:gen(File, stdopts(OutDir)), - ?line {error, _Ws, R} = + error = ic:gen(File, stdopts(OutDir)), + {error, _Ws, R} = ic:gen(File, stdopts(OutDir)++[silent2]), check_errors(21, inherit_name_collision, R), ok. - -oneway_norm(doc) -> - ["Checks that normal oneway operations works."]; -oneway_norm(suite) -> []; +%% Checks that normal oneway operations works. oneway_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(oneway_norm), File = filename:join(DataDir, one), - ?line ok = ic:gen(File, stdopts(OutDir)), - ?line ok = compile(OutDir, oneway_norm_files(), [load]), - ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), - ?line ok = compile(OutDir, oneway_norm_files(), [load]), + ok = ic:gen(File, stdopts(OutDir)), + ok = compile(OutDir, oneway_norm_files(), [load]), + {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), + ok = compile(OutDir, oneway_norm_files(), [load]), ok. -oneway_void(doc) -> - ["Check that non-void oneways are detected."]; -oneway_void(suite) -> []; +%% Check that non-void oneways are detected. oneway_void(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(slask), File = filename:join(DataDir, one_void), - ?line error = ic:gen(File, stdopts(OutDir)), - ?line {error, [], R} = + error = ic:gen(File, stdopts(OutDir)), + {error, [], R} = ic:gen(File, stdopts(OutDir)++[silent2]), check_errors(2, bad_oneway_type, R), ok. -oneway_raises(doc) -> - ["Check that oneways cannot raise exceptions."]; -oneway_raises(suite) -> []; +%% Check that oneways cannot raise exceptions. oneway_raises(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(slask), File = filename:join(DataDir, one_raises), - ?line error = ic:gen(File, stdopts(OutDir)), - ?line {error, [], R} = + error = ic:gen(File, stdopts(OutDir)), + {error, [], R} = ic:gen(File, stdopts(OutDir)++[silent2]), check_errors(3, oneway_raises, R), ok. -oneway_out(doc) -> - ["Check that illegal out parameters are detected"]; -oneway_out(suite) -> []; +%% Check that illegal out parameters are detected oneway_out(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(slask), File = filename:join(DataDir, one_out), - ?line error = ic:gen(File, stdopts(OutDir)), - ?line {error, [], R} = + error = ic:gen(File, stdopts(OutDir)), + {error, [], R} = ic:gen(File, stdopts(OutDir)++[silent2]), check_errors(2, oneway_outparams, R), ok. -oneway_followed(doc) -> - ["Checks that normal oneways, followed by other operations."]; -oneway_followed(suite) -> []; +%% Checks that normal oneways, followed by other operations. oneway_followed(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(oneway_followed), File = filename:join(DataDir, one_followed), - ?line ok = ic:gen(File, stdopts(OutDir)), - ?line ok = compile(OutDir, oneway_followed_files(), [load]), - ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), - ?line ok = compile(OutDir, oneway_followed_files(), [load]), + ok = ic:gen(File, stdopts(OutDir)), + ok = compile(OutDir, oneway_followed_files(), [load]), + {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), + ok = compile(OutDir, oneway_followed_files(), [load]), ok. -attr_norm(doc) -> - ["Checks that normal attr operations works."]; -attr_norm(suite) -> []; +%% Checks that normal attr operations works. attr_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(attr_norm), File = filename:join(DataDir, attr), - ?line ok = ic:gen(File, stdopts(OutDir)), - ?line ok = compile(OutDir, attr_norm_files(), [load]), - ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), - ?line ok = compile(OutDir, attr_norm_files(), [load]), + ok = ic:gen(File, stdopts(OutDir)), + ok = compile(OutDir, attr_norm_files(), [load]), + {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), + ok = compile(OutDir, attr_norm_files(), [load]), ok. -type_norm(doc) -> - ["Checks all types are handled."]; -type_norm(suite) -> []; +%% Checks all types are handled. type_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(type_norm), File = filename:join(DataDir, type), - ?line ok = ic:gen(File, stdopts(OutDir)), - ?line ok = compile(OutDir, type_norm_files(), [load]), - ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), - ?line ok = compile(OutDir, type_norm_files(), [load]), + ok = ic:gen(File, stdopts(OutDir)), + ok = compile(OutDir, type_norm_files(), [load]), + {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), + ok = compile(OutDir, type_norm_files(), [load]), ok. - - -syntax1(suite) -> []; syntax1(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(slask), File = filename:join(DataDir, syntax1), - ?line error = ic:gen(File, stdopts(OutDir)), - ?line {error, [], R} = + error = ic:gen(File, stdopts(OutDir)), + {error, [], R} = ic:gen(File, stdopts(OutDir)++[silent2]), check_errors(1, parse_error, R), ok. -syntax2(suite) -> []; syntax2(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(slask), File = filename:join(DataDir, syntax2), - ?line error = ic:gen(File, stdopts(OutDir)), - ?line {error, [], R} = + error = ic:gen(File, stdopts(OutDir)), + {error, [], R} = ic:gen(File, stdopts(OutDir)++[silent2]), check_errors(1, parse_error, R), ok. -syntax3(suite) -> []; syntax3(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(slask), File = filename:join(DataDir, syntax3), - ?line error = ic:gen(File, stdopts(OutDir)), - ?line {error, [], R} = + error = ic:gen(File, stdopts(OutDir)), + {error, [], R} = ic:gen(File, stdopts(OutDir)++[silent2]), check_errors(1, parse_error, R), ok. -syntax4(suite) -> []; syntax4(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(slask), File = filename:join(DataDir, syntax4), - ?line error = ic:gen(File, stdopts(OutDir)), - ?line {error, [], R} = + error = ic:gen(File, stdopts(OutDir)), + {error, [], R} = ic:gen(File, stdopts(OutDir)++[silent2]), check_errors(1, parse_error, R), ok. -syntax5(suite) -> []; syntax5(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(slask), File = filename:join(DataDir, syntax5), - ?line error = ic:gen(File, stdopts(OutDir)), - ?line {error, [], R} = + error = ic:gen(File, stdopts(OutDir)), + {error, [], R} = ic:gen(File, stdopts(OutDir)++[silent2]), check_errors(1, parse_error, R), ok. -syntax6(suite) -> []; syntax6(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(slask), File = filename:join(DataDir, syntax6), - ?line error = ic:gen(File, stdopts(OutDir)), - ?line {error, [], R} = + error = ic:gen(File, stdopts(OutDir)), + {error, [], R} = ic:gen(File, stdopts(OutDir)++[silent2]), check_errors(1, parse_error, R), ok. @@ -747,17 +662,15 @@ syntax6(Config) when is_list(Config) -> %% ( OTP-2102 ) %% -raises_reg(doc) -> - ["Check that exceptions are really registered to operations."]; -raises_reg(suite) -> []; +%% Check that exceptions are really registered to operations. raises_reg(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(raises_reg_check), File = filename:join(DataDir, raises_reg), - ?line ok = ic:gen(File, stdopts(OutDir)), - ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), - ?line ok = compile(OutDir, raises_reg_files(), [load]), + ok = ic:gen(File, stdopts(OutDir)), + {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]), + ok = compile(OutDir, raises_reg_files(), [load]), set_up('oe_raises_reg'), @@ -924,7 +837,7 @@ to_list(X) -> X. %% File must be an atom gen_struct_file(File, Mod) -> - ?line {ok, Fd} = file:open(to_list(File)++".erl", [write]), + {ok, Fd} = file:open(to_list(File)++".erl", [write]), io:format(Fd, "~n", []), io:format(Fd, "-module(~p).~n", [Mod]), io:format(Fd, "-export([test/0]).~n", []), diff --git a/lib/ic/test/ic_be_SUITE.erl b/lib/ic/test/ic_be_SUITE.erl index 2fa28fc103..d5d3038a6e 100644 --- a/lib/ic/test/ic_be_SUITE.erl +++ b/lib/ic/test/ic_be_SUITE.erl @@ -30,7 +30,7 @@ init_per_group/2,end_per_group/2,plain/1]). --define(OUT(X), filename:join([?config(priv_dir, Config), gen, to_list(X)])). +-define(OUT(X), filename:join([proplists:get_value(priv_dir, Config), gen, to_list(X)])). %% Top of cases @@ -56,35 +56,20 @@ end_per_group(_GroupName, Config) -> Config. - - -plain(doc) -> - ["Checking code for the plain backend."]; -plain(suite) -> []; +%% Checking code for the plain backend. plain(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(slask), File = filename:join(DataDir, plain), - - ?line ok = ic:gen(File,stdopts(OutDir)++[{be,erl_plain}]), - + ok = ic:gen(File,stdopts(OutDir)++[{be,erl_plain}]), ok. - - - %%-------------------------------------------------------------------- %% %% Utilities - - stdopts(OutDir) -> [{outdir, OutDir}, {maxerrs, infinity}]. - - - - to_list(X) when is_atom(X) -> atom_to_list(X); to_list(X) -> X. diff --git a/lib/ic/test/ic_pp_SUITE.erl b/lib/ic/test/ic_pp_SUITE.erl index 38e936f9bc..be37953126 100644 --- a/lib/ic/test/ic_pp_SUITE.erl +++ b/lib/ic/test/ic_pp_SUITE.erl @@ -29,7 +29,7 @@ %% Standard options to the ic compiler, NOTE unholy use of OutDir --define(OUT(X), filename:join([?config(priv_dir, Config), gen, to_list(X)])). +-define(OUT(X), filename:join([proplists:get_value(priv_dir, Config), gen, to_list(X)])). -define(GCC, "g++"). -define(GCC_VER, "2.95.3"). @@ -146,121 +146,100 @@ cases() -> %%-------------------------------------------------------------------- %% arg %%-------------------------------------------------------------------- - - -arg_norm(doc) -> ["Checks arguments for #define."]; -arg_norm(suite) -> []; +%% Checks arguments for #define. arg_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), _OutDir = ?OUT(arg_norm), File = filename:join(DataDir, arg), - ?line ok = test_file(File, DataDir), + ok = test_file(File, DataDir), ok. %%-------------------------------------------------------------------- %% cascade %%-------------------------------------------------------------------- - - -cascade_norm(doc) -> ["Check cascade #define."]; -cascade_norm(suite) -> []; +%% Check cascade #define. cascade_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), _OutDir = ?OUT(cascade_norm), File = filename:join(DataDir, cascade), - ?line ok = test_file(File, DataDir), + ok = test_file(File, DataDir), ok. %%-------------------------------------------------------------------- %% comment %%-------------------------------------------------------------------- - - -comment_norm(doc) -> ["Check comments."]; -comment_norm(suite) -> []; +%% Check comments. comment_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), _OutDir = ?OUT(comment_norm), File = filename:join(DataDir, comment), - ?line ok = test_file(File, DataDir), + ok = test_file(File, DataDir), ok. %%-------------------------------------------------------------------- %% concat %%-------------------------------------------------------------------- - - -concat_norm(doc) -> ["Check concatinations, i.e ## ."]; -concat_norm(suite) -> []; +%% Check concatinations, i.e ## . concat_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), _OutDir = ?OUT(concat_norm), File = filename:join(DataDir, concat), - ?line ok = test_file(File, DataDir), + ok = test_file(File, DataDir), ok. %%-------------------------------------------------------------------- %% define %%-------------------------------------------------------------------- - - -define_norm(doc) -> ["Check misceleaneous #define."]; -define_norm(suite) -> []; +%% Check misceleaneous #define. define_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), _OutDir = ?OUT(define_norm), File = filename:join(DataDir, define), - ?line ok = test_file(File, DataDir), + ok = test_file(File, DataDir), ok. %%-------------------------------------------------------------------- %% if %%-------------------------------------------------------------------- - -if_norm(doc) -> ["Check #if, #elif, and #endif. ."]; -if_norm(suite) -> []; +%% Check #if, #elif, and #endif. if_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), _OutDir = ?OUT(if_norm), File = filename:join(DataDir, 'if'), - ?line ok = test_file(File, DataDir), + ok = test_file(File, DataDir), ok. -if_zero(doc) -> ["Check #if 0"]; -if_zero(suite) -> []; +%% Check #if 0 if_zero(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), _OutDir = ?OUT(if_zero), File = filename:join(DataDir, if_zero), - ?line ok = test_file(File, DataDir), + ok = test_file(File, DataDir), ok. %%-------------------------------------------------------------------- %% inc %%-------------------------------------------------------------------- - - -inc_norm(doc) -> ["Check #include."]; -inc_norm(suite) -> []; +%% Check #include. inc_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), _OutDir = ?OUT(inc_norm), File = filename:join(DataDir, inc), - ?line ok = test_file(File, DataDir), + ok = test_file(File, DataDir), ok. @@ -268,166 +247,133 @@ inc_norm(Config) when is_list(Config) -> %%-------------------------------------------------------------------- %% improp_nest_constr %%-------------------------------------------------------------------- - - -improp_nest_constr_norm(doc) -> ["Check improperly nested constructs."]; -improp_nest_constr_norm(suite) -> []; +%% Check improperly nested constructs. improp_nest_constr_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), _OutDir = ?OUT(improp_nest_constr_norm), File = filename:join(DataDir, improp_nest_constr), - ?line ok = test_file(File, DataDir), + ok = test_file(File, DataDir), ok. %%-------------------------------------------------------------------- %% misc %%-------------------------------------------------------------------- - - -misc_norm(doc) -> ["Misceleaneous checks."]; -misc_norm(suite) -> []; +%% Misceleaneous checks. misc_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), _OutDir = ?OUT(misc_norm), File = filename:join(DataDir, misc), - ?line ok = test_file(File, DataDir), + ok = test_file(File, DataDir), ok. %%-------------------------------------------------------------------- %% line %%-------------------------------------------------------------------- - - -line_norm(doc) -> ["Checks #line."]; -line_norm(suite) -> []; +%% Checks #line. line_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), _OutDir = ?OUT(line_norm), File = filename:join(DataDir, line), - ?line ok = test_file(File, DataDir), + ok = test_file(File, DataDir), ok. %%-------------------------------------------------------------------- %% nopara %%-------------------------------------------------------------------- - - -nopara_norm(doc) -> ["Checks #define with no parameters."]; -nopara_norm(suite) -> []; +%% Checks #define with no parameters. nopara_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), _OutDir = ?OUT(nopara_norm), File = filename:join(DataDir, nopara), - ?line ok = test_file(File, DataDir), + ok = test_file(File, DataDir), ok. %%-------------------------------------------------------------------- %% predef %%-------------------------------------------------------------------- - - -predef_norm(doc) -> ["Checks predefined macros. Note: not __TIME__ and __DATE__."]; -predef_norm(suite) -> []; +%% Checks predefined macros. Note: not __TIME__ and __DATE__. predef_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), _OutDir = ?OUT(predef_norm), File = filename:join(DataDir, predef), - ?line ok = test_file(File, DataDir), + ok = test_file(File, DataDir), ok. %%-------------------------------------------------------------------- %% predef_time %%-------------------------------------------------------------------- - - -predef_time_norm(doc) -> ["Checks the predefined macros __TIME__ and __DATE__."]; -predef_time_norm(suite) -> []; +%% Checks the predefined macros __TIME__ and __DATE__. predef_time_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), _OutDir = ?OUT(predef_time_norm), File = filename:join(DataDir, predef_time), - ?line ok = test_file(File, DataDir), + ok = test_file(File, DataDir), ok. %%-------------------------------------------------------------------- %% self_ref %%-------------------------------------------------------------------- - - -self_ref_norm(doc) -> ["Checks self referring macros."]; -self_ref_norm(suite) -> []; +%% Checks self referring macros. self_ref_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), _OutDir = ?OUT(self_ref_norm), File = filename:join(DataDir, self_ref), - ?line ok = test_file(File, DataDir), + ok = test_file(File, DataDir), ok. %%-------------------------------------------------------------------- %% separate %%-------------------------------------------------------------------- - - -separate_norm(doc) -> ["Checks separete expansion of macro arguments."]; -separate_norm(suite) -> []; +%% Checks separete expansion of macro arguments. separate_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), _OutDir = ?OUT(separate_norm), File = filename:join(DataDir, separate), - ?line ok = test_file(File, DataDir), + ok = test_file(File, DataDir), ok. %%-------------------------------------------------------------------- %% swallow_sc %%-------------------------------------------------------------------- - - -swallow_sc_norm(doc) -> ["Checks swallowing an undesirable semicolon."]; -swallow_sc_norm(suite) -> []; +%% Checks swallowing an undesirable semicolon. swallow_sc_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), _OutDir = ?OUT(swallow_sc_norm), File = filename:join(DataDir, swallow_sc), - ?line ok = test_file(File, DataDir), + ok = test_file(File, DataDir), ok. %%-------------------------------------------------------------------- %% unintended_grp %%-------------------------------------------------------------------- - - -unintended_grp_norm(doc) -> ["Checks unintended grouping of arithmetic."]; -unintended_grp_norm(suite) -> []; +%% Checks unintended grouping of arithmetic. unintended_grp_norm(Config) when is_list(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), _OutDir = ?OUT(unintended_grp_norm), File = filename:join(DataDir, unintended_grp), - ?line ok = test_file(File, DataDir), + ok = test_file(File, DataDir), ok. - - - test_file(FileT, DataDir) -> case test_file_1(FileT, DataDir) of ok -> ok; @@ -441,39 +387,39 @@ test_file_1(FileT, DataDir) -> FileName = lists:last(Tok), File = FileT++".idl", - ?line test_server:format("File ~p~n",[File]), - ?line test_server:format("FileName ~p~n",[FileName]), + test_server:format("File ~p~n",[File]), + test_server:format("FileName ~p~n",[FileName]), Flags = "-I"++DataDir, - ?line test_server:format("Flags ~p~n",[Flags]), + test_server:format("Flags ~p~n",[Flags]), - ?line Erl = pp_erl(File, Flags), - ?line Gcc = pp_gcc(File, Flags), + Erl = pp_erl(File, Flags), + Gcc = pp_gcc(File, Flags), - ?line case Erl of + case Erl of {error,_ErlError} -> - ?line test_server:format("Internal_pp Result ~n==================~n~p~n~n",[Erl]); + test_server:format("Internal_pp Result ~n==================~n~p~n~n",[Erl]); {warning, _ErlWar} -> - ?line test_server:format("Internal_pp Result ~n==================~n~p~n~n",[Erl]); + test_server:format("Internal_pp Result ~n==================~n~p~n~n",[Erl]); _ -> - ?line test_server:format("Internal_pp Result ~n==================~n~s~n~n",[Erl]) + test_server:format("Internal_pp Result ~n==================~n~s~n~n",[Erl]) end, - ?line case Gcc of + case Gcc of {error,GccError} -> Error = string:tokens(GccError, "\n"), - ?line test_server:format(?GCC" Result ~n==========~n~p~n~n", + test_server:format(?GCC" Result ~n==========~n~p~n~n", [Error]); _ -> - ?line test_server:format(?GCC" Result ~n==========~n~s~n~n",[Gcc]) + test_server:format(?GCC" Result ~n==========~n~s~n~n",[Gcc]) end, - ?line case {Erl,Gcc} of + case {Erl,Gcc} of {{warning,W}, {error,X}} -> - ?line case is_ok(W,X) of + case is_ok(W,X) of yes -> ok; no -> @@ -487,7 +433,7 @@ test_file_1(FileT, DataDir) -> "Internal_pp found the following Warning = ~p~n",[W]); {{error,E}, {error,X}} -> - ?line case is_ok(E,X) of + case is_ok(E,X) of yes -> ok; no -> @@ -496,9 +442,9 @@ test_file_1(FileT, DataDir) -> end; {{error,E}, _} -> - ?line case FileName of + case FileName of "if" -> - ?line case if_res(E) of + case if_res(E) of ok -> ok; _ -> @@ -516,18 +462,18 @@ test_file_1(FileT, DataDir) -> _ -> - ?line file:write_file("/tmp/Erl.pp",list_to_binary(Erl)), - ?line file:write_file("/tmp/Gcc.pp",list_to_binary(Gcc)), + file:write_file("/tmp/Erl.pp",list_to_binary(Erl)), + file:write_file("/tmp/Gcc.pp",list_to_binary(Gcc)), - ?line Res = os:cmd("diff -b -w /tmp/Erl.pp /tmp/Gcc.pp"), - ?line test_server:format("///////////{error,E} E ~p FileName~p~n",[Res,FileName]), - ?line case {Res, FileName} of + Res = os:cmd("diff -b -w /tmp/Erl.pp /tmp/Gcc.pp"), + test_server:format("///////////{error,E} E ~p FileName~p~n",[Res,FileName]), + case {Res, FileName} of {[], _} -> - ?line test_server:format("Diff = [] OK!!!!!!~n"), + test_server:format("Diff = [] OK!!!!!!~n"), ok; {_, "predef_time"} -> Tokens = string:tokens(Res,"\n"), - ?line test_server:format("///////////{error,E} Tokens~p~n",[Tokens]), + test_server:format("///////////{error,E} Tokens~p~n",[Tokens]), case Tokens of ["3c3",_,"---",_,"5c5",_,"---",_,"9c9",_,"---",_] -> ok; diff --git a/lib/ic/test/ic_pragma_SUITE.erl b/lib/ic/test/ic_pragma_SUITE.erl index 61becf74bf..bb95e59109 100644 --- a/lib/ic/test/ic_pragma_SUITE.erl +++ b/lib/ic/test/ic_pragma_SUITE.erl @@ -47,7 +47,7 @@ end). %% Standard options to the ic compiler, NOTE unholy use of OutDir --define(OUT(X), filename:join([?config(priv_dir, Config), gen, to_list(X)])). +-define(OUT(X), filename:join([proplists:get_value(priv_dir, Config), gen, to_list(X)])). %%----------------------------------------------------------------- @@ -105,23 +105,21 @@ end_per_suite(Config) -> %%----------------------------------------------------------------- %% Test Case: IFR registration with pragmas %%----------------------------------------------------------------- -ifr_pragma_reg(doc) -> - ["Checks that IFR object is correctly registered under pragma engagement."]; -ifr_pragma_reg(suite) -> []; +%% Checks that IFR object is correctly registered under pragma engagement. ifr_pragma_reg(Config) when is_list(Config) -> ?REMAP_EXCEPT(ifr_pragma_reg_run(Config)). ifr_pragma_reg_run(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(ifr_pragma_reg), File0 = filename:join(DataDir, reg_m0), - ?line ok = ic:gen(File0, stdopts(OutDir)++[{preproc_flags, + ok = ic:gen(File0, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}]), - ?line ok = compile(OutDir, ifr_pragma_files()), + ok = compile(OutDir, ifr_pragma_files()), code:add_pathz(OutDir), %% OE_register for all files - ?line ok = 'oe_reg_m0':'oe_register'(), + ok = 'oe_reg_m0':'oe_register'(), %% Pragma registration test OE_IFR = orber_ifr:find_repository(), @@ -132,7 +130,7 @@ ifr_pragma_reg_run(Config) -> check_pragma_effect(OE_IFR,"IDL:P1/M2/T4:2.4"), %% OE_unregister for all files - ?line ok = 'oe_reg_m0':'oe_unregister'(), + ok = 'oe_reg_m0':'oe_unregister'(), code:del_path(OutDir), ok. @@ -157,14 +155,12 @@ check_pragma_effect(OE_IFR,ID) -> %%----------------------------------------------------------------- %% Test Case: Syntactical / Semantical error pragma definitions %%----------------------------------------------------------------- -pragma_error(doc) -> - ["Finds errornous pragma definitions under compilation."]; -pragma_error(suite) -> []; +%% Finds errornous pragma definitions under compilation. pragma_error(Config) when is_list(Config) -> ?REMAP_EXCEPT(pragma_error_run(Config)). pragma_error_run(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(pragma_error), File1 = filename:join(DataDir, reg_m1), File2 = filename:join(DataDir, reg_m2), @@ -173,22 +169,22 @@ pragma_error_run(Config) -> File5 = filename:join(DataDir, reg_m5), File6 = filename:join(DataDir, reg_m6), - ?line error = ic:gen(File1, stdopts(OutDir)++[{preproc_flags, + error = ic:gen(File1, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), - ?line error = ic:gen(File2, stdopts(OutDir)++[{preproc_flags, + error = ic:gen(File2, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), - ?line error = ic:gen(File3, stdopts(OutDir)++[{preproc_flags, + error = ic:gen(File3, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), - ?line ok = ic:gen(File4, stdopts(OutDir)++[{preproc_flags, + ok = ic:gen(File4, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), - ?line error = ic:gen(File5, stdopts(OutDir)++[{preproc_flags, + error = ic:gen(File5, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), - ?line error = ic:gen(File6, stdopts(OutDir)++[{preproc_flags, + error = ic:gen(File6, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), ok. @@ -198,25 +194,23 @@ pragma_error_run(Config) -> %%----------------------------------------------------------------- %% Test Case: IFR registration with realy uggly placed pragmas %%----------------------------------------------------------------- -uggly_pragmas(doc) -> - ["Checks that IFR object is correctly registered under really uggly pragma engagement."]; -uggly_pragmas(suite) -> []; +%% Checks that IFR object is correctly registered under really uggly pragma engagement. uggly_pragmas(Config) when is_list(Config) -> ?REMAP_EXCEPT(uggly_pragmas_run(Config)). uggly_pragmas_run(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(ifr_pragma_reg), File0 = filename:join(DataDir, uggly), - ?line ok = ic:gen(File0, stdopts(OutDir)++[{preproc_flags, + ok = ic:gen(File0, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}]), - ?line ok = compile(OutDir, uggly_pragma_files()), + ok = compile(OutDir, uggly_pragma_files()), code:add_pathz(OutDir), %% OE_register for all files - ?line ok = 'oe_uggly':'oe_register'(), + ok = 'oe_uggly':'oe_register'(), %% Pragma registration test OE_IFR = orber_ifr:find_repository(), @@ -234,7 +228,7 @@ uggly_pragmas_run(Config) -> check_pragma_effect(OE_IFR, "LOCAL:SomeLocalId:23"), %% OE_unregister for all files - ?line ok = 'oe_uggly':'oe_unregister'(), + ok = 'oe_uggly':'oe_unregister'(), code:del_path(OutDir), ok. diff --git a/lib/ic/test/ic_register_SUITE.erl b/lib/ic/test/ic_register_SUITE.erl index 5eb50202d7..69eb923f85 100644 --- a/lib/ic/test/ic_register_SUITE.erl +++ b/lib/ic/test/ic_register_SUITE.erl @@ -51,7 +51,7 @@ end). %% Standard options to the ic compiler, NOTE unholy use of OutDir --define(OUT(X), filename:join([?config(priv_dir, Config), gen, to_list(X)])). +-define(OUT(X), filename:join([proplists:get_value(priv_dir, Config), gen, to_list(X)])). %%----------------------------------------------------------------- @@ -111,39 +111,37 @@ end_per_suite(Config) -> %%----------------------------------------------------------------- %% Test Case: IFR type registration %%----------------------------------------------------------------- -ifr_reg_unreg(doc) -> - ["Checks that the generated register/unregister " - "code for the IFR is correct."]; -ifr_reg_unreg(suite) -> []; +%% Checks that the generated register/unregister +%% code for the IFR is correct. ifr_reg_unreg(Config) when is_list(Config) -> ?REMAP_EXCEPT(ifr_reg_unregt_run(Config)). ifr_reg_unregt_run(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(ifr_reg_unreg), File0 = filename:join(DataDir, reg_m8), File1 = filename:join(DataDir, reg_m9), File2 = filename:join(DataDir, reg_m10), - ?line ok = ic:gen(File0, stdopts(OutDir)++[{preproc_flags, + ok = ic:gen(File0, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), - ?line {ok, []} = ic:gen(File0, stdopts(OutDir)++[silent2, {preproc_flags, + {ok, []} = ic:gen(File0, stdopts(OutDir)++[silent2, {preproc_flags, "-I" ++ DataDir}]), - ?line ok = ic:gen(File1, stdopts(OutDir)++[{preproc_flags, + ok = ic:gen(File1, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), - ?line {ok, []} = ic:gen(File1, stdopts(OutDir)++[silent2, {preproc_flags, + {ok, []} = ic:gen(File1, stdopts(OutDir)++[silent2, {preproc_flags, "-I" ++ DataDir}]), - ?line ok = ic:gen(File2, stdopts(OutDir)++[{preproc_flags, + ok = ic:gen(File2, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), - ?line {ok, []} = ic:gen(File2, stdopts(OutDir)++[silent2, {preproc_flags, + {ok, []} = ic:gen(File2, stdopts(OutDir)++[silent2, {preproc_flags, "-I" ++ DataDir}]), - ?line ok = compile(OutDir, ifr_reg_unreg_files()), + ok = compile(OutDir, ifr_reg_unreg_files()), code:add_pathz(OutDir), - ?line ok = 'oe_reg_m8':'oe_register'(), - ?line ok = 'oe_reg_m9':'oe_register'(), - ?line ok = 'oe_reg_m10':'oe_register'(), - ?line ok = 'oe_reg_m10':'oe_unregister'(), - ?line ok = 'oe_reg_m9':'oe_unregister'(), - ?line ok = 'oe_reg_m8':'oe_unregister'(), + ok = 'oe_reg_m8':'oe_register'(), + ok = 'oe_reg_m9':'oe_register'(), + ok = 'oe_reg_m10':'oe_register'(), + ok = 'oe_reg_m10':'oe_unregister'(), + ok = 'oe_reg_m9':'oe_unregister'(), + ok = 'oe_reg_m8':'oe_unregister'(), code:del_path(OutDir), ok. @@ -155,58 +153,56 @@ ifr_reg_unreg_files() -> ['oe_reg_m8', 'oe_reg_m9', 'oe_reg_m10']. %% Test Case: IFR registration when object inheritence %% is applied and registered. %%----------------------------------------------------------------- -ifr_reg_unreg_with_inheritence(doc) -> - ["Checks that the generated register/unregister " - "code for the IFR is correct, and works even when" - "the object inheritence is registered. This fixes" - "two bugs in ifr that caused crash when trying to" - "use OE_register/OE_unregister in a sequence of" - "compiled files that contained interfaces who" - "inherited others in sequence."]; -ifr_reg_unreg_with_inheritence(suite) -> []; +%% Checks that the generated register/unregister +%% code for the IFR is correct, and works even when +%% the object inheritence is registered. This fixes +%% two bugs in ifr that caused crash when trying to +%% use OE_register/OE_unregister in a sequence of +%% compiled files that contained interfaces who +%% inherited others in sequence. ifr_reg_unreg_with_inheritence(Config) when is_list(Config) -> ?REMAP_EXCEPT(ifr_reg_unreg_with_inheritence_run(Config)). ifr_reg_unreg_with_inheritence_run(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(ifr_reg_unreg), File0 = filename:join(DataDir, reg_m8), File1 = filename:join(DataDir, reg_m9), File2 = filename:join(DataDir, reg_m10), File3 = filename:join(DataDir, reg_m11), File4 = filename:join(DataDir, reg_m12), - ?line ok = ic:gen(File0, stdopts(OutDir)++[{preproc_flags, + ok = ic:gen(File0, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), - ?line {ok, []} = ic:gen(File0, stdopts(OutDir)++[silent2, {preproc_flags, + {ok, []} = ic:gen(File0, stdopts(OutDir)++[silent2, {preproc_flags, "-I" ++ DataDir}]), - ?line ok = ic:gen(File1, stdopts(OutDir)++[{preproc_flags, + ok = ic:gen(File1, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), - ?line {ok, []} = ic:gen(File1, stdopts(OutDir)++[silent2, {preproc_flags, + {ok, []} = ic:gen(File1, stdopts(OutDir)++[silent2, {preproc_flags, "-I" ++ DataDir}]), - ?line ok = ic:gen(File2, stdopts(OutDir)++[{preproc_flags, + ok = ic:gen(File2, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), - ?line {ok, []} = ic:gen(File2, stdopts(OutDir)++[silent2, {preproc_flags, + {ok, []} = ic:gen(File2, stdopts(OutDir)++[silent2, {preproc_flags, "-I" ++ DataDir}]), - ?line ok = ic:gen(File3, stdopts(OutDir)++[{preproc_flags, + ok = ic:gen(File3, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), - ?line {ok, []} = ic:gen(File3, stdopts(OutDir)++[silent2, {preproc_flags, + {ok, []} = ic:gen(File3, stdopts(OutDir)++[silent2, {preproc_flags, "-I" ++ DataDir}]), - ?line ok = ic:gen(File4, stdopts(OutDir)++[{preproc_flags, + ok = ic:gen(File4, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), - ?line {ok, []} = ic:gen(File4, stdopts(OutDir)++[silent2, {preproc_flags, + {ok, []} = ic:gen(File4, stdopts(OutDir)++[silent2, {preproc_flags, "-I" ++ DataDir}]), - ?line ok = compile(OutDir, ifr_reg_unreg_with_inheritence_files()), + ok = compile(OutDir, ifr_reg_unreg_with_inheritence_files()), code:add_pathz(OutDir), - ?line ok = 'oe_reg_m8':'oe_register'(), - ?line ok = 'oe_reg_m9':'oe_register'(), - ?line ok = 'oe_reg_m10':'oe_register'(), - ?line ok = 'oe_reg_m11':'oe_register'(), - ?line ok = 'oe_reg_m12':'oe_register'(), - ?line ok = 'oe_reg_m8':'oe_unregister'(), - ?line ok = 'oe_reg_m9':'oe_unregister'(), - ?line ok = 'oe_reg_m10':'oe_unregister'(), - ?line ok = 'oe_reg_m11':'oe_unregister'(), - ?line ok = 'oe_reg_m12':'oe_unregister'(), + ok = 'oe_reg_m8':'oe_register'(), + ok = 'oe_reg_m9':'oe_register'(), + ok = 'oe_reg_m10':'oe_register'(), + ok = 'oe_reg_m11':'oe_register'(), + ok = 'oe_reg_m12':'oe_register'(), + ok = 'oe_reg_m8':'oe_unregister'(), + ok = 'oe_reg_m9':'oe_unregister'(), + ok = 'oe_reg_m10':'oe_unregister'(), + ok = 'oe_reg_m11':'oe_unregister'(), + ok = 'oe_reg_m12':'oe_unregister'(), code:del_path(OutDir), ok. @@ -224,35 +220,28 @@ ifr_reg_unreg_with_inheritence_files() -> %% are not allready registered when the current %% object is getting registered. %%----------------------------------------------------------------- -ifr_reg_unreg_with_inheritence_bad_order(doc) -> - ["This tests that ifr registration is done with - the right write order." - "Modules included and used from an ifr object" - "are tested if allready registered when the " - "current object is getting registered."]; -ifr_reg_unreg_with_inheritence_bad_order(suite) -> []; ifr_reg_unreg_with_inheritence_bad_order(Config) when is_list(Config) -> ?REMAP_EXCEPT(ifr_reg_unreg_with_inheritence_bad_order_run(Config)). ifr_reg_unreg_with_inheritence_bad_order_run(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(ifr_reg_unreg), File1 = filename:join(DataDir, reg_m9), File2 = filename:join(DataDir, reg_m10), File4 = filename:join(DataDir, reg_m12), - ?line ok = ic:gen(File1, stdopts(OutDir)++[{preproc_flags, + ok = ic:gen(File1, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), - ?line {ok, []} = ic:gen(File1, stdopts(OutDir)++[silent2, {preproc_flags, + {ok, []} = ic:gen(File1, stdopts(OutDir)++[silent2, {preproc_flags, "-I" ++ DataDir}]), - ?line ok = ic:gen(File2, stdopts(OutDir)++[{preproc_flags, + ok = ic:gen(File2, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), - ?line {ok, []} = ic:gen(File2, stdopts(OutDir)++[silent2, {preproc_flags, + {ok, []} = ic:gen(File2, stdopts(OutDir)++[silent2, {preproc_flags, "-I" ++ DataDir}]), - ?line ok = ic:gen(File4, stdopts(OutDir)++[{preproc_flags, + ok = ic:gen(File4, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), - ?line {ok, []} = ic:gen(File4, stdopts(OutDir)++[silent2, {preproc_flags, + {ok, []} = ic:gen(File4, stdopts(OutDir)++[silent2, {preproc_flags, "-I" ++ DataDir}]), - ?line ok = compile(OutDir, ifr_reg_unreg_with_inheritence_files()), + ok = compile(OutDir, ifr_reg_unreg_with_inheritence_files()), code:add_pathz(OutDir), case catch 'oe_reg_m12':'oe_register'() of {'EXIT',Reason1} -> @@ -261,7 +250,7 @@ ifr_reg_unreg_with_inheritence_bad_order_run(Config) -> _ -> test_server:fail("Failed to detect object missing : IDL:M1:1.0~n") end, - ?line ok = 'oe_reg_m9':'oe_register'(), + ok = 'oe_reg_m9':'oe_register'(), case catch 'oe_reg_m10':'oe_register'() of {'EXIT',Reason2} -> io:format("IFR object missing detected : ~p~n",[Reason2]), @@ -269,75 +258,70 @@ ifr_reg_unreg_with_inheritence_bad_order_run(Config) -> _ -> test_server:fail("Failed to detect object missing : IDL:M0:1.0~n") end, - ?line ok = 'oe_reg_m9':'oe_unregister'(), + ok = 'oe_reg_m9':'oe_unregister'(), code:del_path(OutDir), ok. - - %%----------------------------------------------------------------- -%% Test Case: IFR registration with inheritence +%% Test Case: IFR registration with inheritence is correctly registered %%----------------------------------------------------------------- -ifr_inheritence_reg(doc) -> - ["Checks that IFR object inheritence is correctly registered."]; -ifr_inheritence_reg(suite) -> []; ifr_inheritence_reg(Config) when is_list(Config) -> ?REMAP_EXCEPT(ifr_inh_reg_run(Config)). ifr_inh_reg_run(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), OutDir = ?OUT(ifr_reg_unreg), File0 = filename:join(DataDir, reg_m8), File1 = filename:join(DataDir, reg_m9), File2 = filename:join(DataDir, reg_m10), File3 = filename:join(DataDir, reg_m11), File4 = filename:join(DataDir, reg_m12), - ?line ok = ic:gen(File0, stdopts(OutDir)++[{preproc_flags, + ok = ic:gen(File0, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), - ?line {ok, []} = ic:gen(File0, stdopts(OutDir)++[silent2, {preproc_flags, + {ok, []} = ic:gen(File0, stdopts(OutDir)++[silent2, {preproc_flags, "-I" ++ DataDir}]), - ?line ok = ic:gen(File1, stdopts(OutDir)++[{preproc_flags, + ok = ic:gen(File1, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), - ?line {ok, []} = ic:gen(File1, stdopts(OutDir)++[silent2, {preproc_flags, + {ok, []} = ic:gen(File1, stdopts(OutDir)++[silent2, {preproc_flags, "-I" ++ DataDir}]), - ?line ok = ic:gen(File2, stdopts(OutDir)++[{preproc_flags, + ok = ic:gen(File2, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), - ?line {ok, []} = ic:gen(File2, stdopts(OutDir)++[silent2, {preproc_flags, + {ok, []} = ic:gen(File2, stdopts(OutDir)++[silent2, {preproc_flags, "-I" ++ DataDir}]), - ?line ok = ic:gen(File3, stdopts(OutDir)++[{preproc_flags, + ok = ic:gen(File3, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), - ?line {ok, []} = ic:gen(File3, stdopts(OutDir)++[silent2, {preproc_flags, + {ok, []} = ic:gen(File3, stdopts(OutDir)++[silent2, {preproc_flags, "-I" ++ DataDir}]), - ?line ok = ic:gen(File4, stdopts(OutDir)++[{preproc_flags, + ok = ic:gen(File4, stdopts(OutDir)++[{preproc_flags, "-I" ++ DataDir}] ), - ?line {ok, []} = ic:gen(File4, stdopts(OutDir)++[silent2, {preproc_flags, + {ok, []} = ic:gen(File4, stdopts(OutDir)++[silent2, {preproc_flags, "-I" ++ DataDir}]), - ?line ok = compile(OutDir, ifr_reg_unreg_with_inheritence_files()), + ok = compile(OutDir, ifr_reg_unreg_with_inheritence_files()), code:add_pathz(OutDir), %% OE_register for all files - ?line ok = 'oe_reg_m8':'oe_register'(), - ?line ok = 'oe_reg_m9':'oe_register'(), - ?line ok = 'oe_reg_m10':'oe_register'(), - ?line ok = 'oe_reg_m11':'oe_register'(), - ?line ok = 'oe_reg_m12':'oe_register'(), + ok = 'oe_reg_m8':'oe_register'(), + ok = 'oe_reg_m9':'oe_register'(), + ok = 'oe_reg_m10':'oe_register'(), + ok = 'oe_reg_m11':'oe_register'(), + ok = 'oe_reg_m12':'oe_register'(), %% Inheritence registration test OE_IFR = orber_ifr:find_repository(), %% Interfaces that not inherit from other interfaces - ?line [] = get_inh(OE_IFR, "IDL:m0/i0:1.0"), - ?line [] = get_inh(OE_IFR, "IDL:m1/i1:1.0"), - ?line [] = get_inh(OE_IFR, "IDL:m3/i3:1.0"), + [] = get_inh(OE_IFR, "IDL:m0/i0:1.0"), + [] = get_inh(OE_IFR, "IDL:m1/i1:1.0"), + [] = get_inh(OE_IFR, "IDL:m3/i3:1.0"), %% Interfaces that inherit from other interfaces - ?line ["IDL:m1/i1:1.0"] = get_inh(OE_IFR, "IDL:m2/i2:1.0"), - ?line ["IDL:m1/i1:1.0","IDL:m2/i2:1.0"] = get_inh(OE_IFR, "IDL:m4/i4:1.0"), - ?line ["IDL:m3/i3:1.0"] = get_inh(OE_IFR, "IDL:m4/i5:1.0"), + ["IDL:m1/i1:1.0"] = get_inh(OE_IFR, "IDL:m2/i2:1.0"), + ["IDL:m1/i1:1.0","IDL:m2/i2:1.0"] = get_inh(OE_IFR, "IDL:m4/i4:1.0"), + ["IDL:m3/i3:1.0"] = get_inh(OE_IFR, "IDL:m4/i5:1.0"), %% OE_unregister for all files - ?line ok = 'oe_reg_m8':'oe_unregister'(), - ?line ok = 'oe_reg_m9':'oe_unregister'(), - ?line ok = 'oe_reg_m10':'oe_unregister'(), - ?line ok = 'oe_reg_m11':'oe_unregister'(), - ?line ok = 'oe_reg_m12':'oe_unregister'(), + ok = 'oe_reg_m8':'oe_unregister'(), + ok = 'oe_reg_m9':'oe_unregister'(), + ok = 'oe_reg_m10':'oe_unregister'(), + ok = 'oe_reg_m11':'oe_unregister'(), + ok = 'oe_reg_m12':'oe_unregister'(), code:del_path(OutDir), ok. diff --git a/lib/ic/test/java_client_erl_server_SUITE.erl b/lib/ic/test/java_client_erl_server_SUITE.erl index 50ea3f43ca..9fe52249ba 100644 --- a/lib/ic/test/java_client_erl_server_SUITE.erl +++ b/lib/ic/test/java_client_erl_server_SUITE.erl @@ -99,7 +99,7 @@ end_per_suite(Config) -> Config. %% Add/remove code path and watchdog before/after each test case. %% init_per_testcase(_Case, Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), code:add_patha(DataDir), %% Since other test suites use the module m_i et,al, we have @@ -115,9 +115,9 @@ init_per_testcase(_Case, Config) -> [{watchdog, WatchDog}| Config]. end_per_testcase(_Case, Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), code:del_path(DataDir), - WatchDog = ?config(watchdog, Config), + WatchDog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(WatchDog). @@ -126,127 +126,104 @@ end_per_testcase(_Case, Config) -> %% %% Test cases -marshal_ll(doc) -> - ["Testing marshalling of IDL long long"]; -marshal_ll(suite) -> []; +%% Testing marshalling of IDL long long marshal_ll(Config) when is_list(Config) -> - ?line DataDir = ?config(data_dir, Config), - ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_ll}), - ?line ok = java(?config(java, Config), DataDir, "JavaClient", + DataDir = proplists:get_value(data_dir, Config), + {ok,Server} = m_i:oe_create_link([], {local,marshal_ll}), + ok = java(proplists:get_value(java, Config), DataDir, "JavaClient", ["JavaClient",node(),erlang:get_cookie(),marshal_ll]), - ?line ok = m_i:stop(Server), + ok = m_i:stop(Server), ok. -marshal_ull(doc) -> - ["Testing marshalling of IDL unsigned long long"]; -marshal_ull(suite) -> []; +%% Testing marshalling of IDL unsigned long long marshal_ull(Config) when is_list(Config) -> - ?line DataDir = ?config(data_dir, Config), - ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_ull}), - ?line ok = java(?config(java, Config), DataDir, "JavaClient", + DataDir = proplists:get_value(data_dir, Config), + {ok,Server} = m_i:oe_create_link([], {local,marshal_ull}), + ok = java(proplists:get_value(java, Config), DataDir, "JavaClient", ["JavaClient",node(),erlang:get_cookie(),marshal_ull]), - ?line ok = m_i:stop(Server), + ok = m_i:stop(Server), ok. -marshal_l(doc) -> - ["Testing marshalling of IDL long"]; -marshal_l(suite) -> []; +%% Testing marshalling of IDL long marshal_l(Config) when is_list(Config) -> - ?line DataDir = ?config(data_dir, Config), - ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_l}), - ?line ok = java(?config(java, Config), DataDir, "JavaClient", + DataDir = proplists:get_value(data_dir, Config), + {ok,Server} = m_i:oe_create_link([], {local,marshal_l}), + ok = java(proplists:get_value(java, Config), DataDir, "JavaClient", ["JavaClient",node(),erlang:get_cookie(),marshal_l]), - ?line ok = m_i:stop(Server), + ok = m_i:stop(Server), ok. -marshal_ul(doc) -> - ["Testing marshalling of IDL unsigned long"]; -marshal_ul(suite) -> []; +%% Testing marshalling of IDL unsigned long marshal_ul(Config) when is_list(Config) -> - ?line DataDir = ?config(data_dir, Config), - ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_ul}), - ?line ok = java(?config(java, Config), DataDir, "JavaClient", + DataDir = proplists:get_value(data_dir, Config), + {ok,Server} = m_i:oe_create_link([], {local,marshal_ul}), + ok = java(proplists:get_value(java, Config), DataDir, "JavaClient", ["JavaClient",node(),erlang:get_cookie(),marshal_ul]), - ?line ok = m_i:stop(Server), + ok = m_i:stop(Server), ok. -marshal_s(doc) -> - ["Testing marshalling of IDL short"]; -marshal_s(suite) -> []; +%% Testing marshalling of IDL short marshal_s(Config) when is_list(Config) -> - ?line DataDir = ?config(data_dir, Config), - ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_s}), - ?line ok = java(?config(java, Config), DataDir, "JavaClient", + DataDir = proplists:get_value(data_dir, Config), + {ok,Server} = m_i:oe_create_link([], {local,marshal_s}), + ok = java(proplists:get_value(java, Config), DataDir, "JavaClient", ["JavaClient",node(),erlang:get_cookie(),marshal_s]), - ?line ok = m_i:stop(Server), + ok = m_i:stop(Server), ok. -marshal_us(doc) -> - ["Testing marshalling of IDL unsigned short"]; -marshal_us(suite) -> []; +%% Testing marshalling of IDL unsigned short marshal_us(Config) when is_list(Config) -> - ?line DataDir = ?config(data_dir, Config), - ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_us}), - ?line ok = java(?config(java, Config), DataDir, "JavaClient", + DataDir = proplists:get_value(data_dir, Config), + {ok,Server} = m_i:oe_create_link([], {local,marshal_us}), + ok = java(proplists:get_value(java, Config), DataDir, "JavaClient", ["JavaClient",node(),erlang:get_cookie(),marshal_us]), - ?line ok = m_i:stop(Server), + ok = m_i:stop(Server), ok. -marshal_c(doc) -> - ["Testing marshalling of IDL char"]; -marshal_c(suite) -> []; +%% Testing marshalling of IDL char marshal_c(Config) when is_list(Config) -> - ?line DataDir = ?config(data_dir, Config), - ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_c}), - ?line ok = java(?config(java, Config), DataDir, "JavaClient", + DataDir = proplists:get_value(data_dir, Config), + {ok,Server} = m_i:oe_create_link([], {local,marshal_c}), + ok = java(proplists:get_value(java, Config), DataDir, "JavaClient", ["JavaClient",node(),erlang:get_cookie(),marshal_c]), - ?line ok = m_i:stop(Server), + ok = m_i:stop(Server), ok. -marshal_wc(doc) -> - ["Testing marshalling of IDL char"]; -marshal_wc(suite) -> []; +%% Testing marshalling of IDL char marshal_wc(Config) when is_list(Config) -> - ?line DataDir = ?config(data_dir, Config), - ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_wc}), - ?line ok = java(?config(java, Config), DataDir, "JavaClient", + DataDir = proplists:get_value(data_dir, Config), + {ok,Server} = m_i:oe_create_link([], {local,marshal_wc}), + ok = java(proplists:get_value(java, Config), DataDir, "JavaClient", ["JavaClient",node(),erlang:get_cookie(),marshal_wc]), - ?line ok = m_i:stop(Server), + ok = m_i:stop(Server), ok. -marshal_str(doc) -> - ["Testing marshalling of IDL string"]; -marshal_str(suite) -> []; +%% Testing marshalling of IDL string marshal_str(Config) when is_list(Config) -> - ?line DataDir = ?config(data_dir, Config), - ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_str}), - ?line ok = java(?config(java, Config), DataDir, + DataDir = proplists:get_value(data_dir, Config), + {ok,Server} = m_i:oe_create_link([], {local,marshal_str}), + ok = java(proplists:get_value(java, Config), DataDir, %%% "-DOtpConnection.trace=4 " "JavaClient", ["JavaClient",node(),erlang:get_cookie(),marshal_str]), - ?line ok = m_i:stop(Server), + ok = m_i:stop(Server), ok. -marshal_any_3(doc) -> - ["Testing marshalling of IDL any"]; -marshal_any_3(suite) -> []; +%% Testing marshalling of IDL any marshal_any_3(Config) when is_list(Config) -> - ?line DataDir = ?config(data_dir, Config), - ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_any_3}), - ?line ok = java(?config(java, Config), DataDir, "JavaClient", + DataDir = proplists:get_value(data_dir, Config), + {ok,Server} = m_i:oe_create_link([], {local,marshal_any_3}), + ok = java(proplists:get_value(java, Config), DataDir, "JavaClient", ["JavaClient",node(),erlang:get_cookie(),marshal_any_3]), - ?line ok = m_i:stop(Server), + ok = m_i:stop(Server), ok. -marshal_any_2(doc) -> - ["Testing marshalling of IDL any"]; -marshal_any_2(suite) -> []; marshal_any_2(Config) when is_list(Config) -> - ?line DataDir = ?config(data_dir, Config), - ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_any_2}), - ?line ok = java(?config(java, Config), DataDir, "JavaClient", + DataDir = proplists:get_value(data_dir, Config), + {ok,Server} = m_i:oe_create_link([], {local,marshal_any_2}), + ok = java(proplists:get_value(java, Config), DataDir, "JavaClient", ["JavaClient",node(),erlang:get_cookie(),marshal_any_2]), - ?line ok = m_i:stop(Server), + ok = m_i:stop(Server), ok. %%-------------------------------------------------------------------- -- cgit v1.2.3 From f579196545e57fe99f42b14bf77e153cf41a9263 Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Fri, 20 May 2016 12:05:03 +0200 Subject: [ic] Correct memory deallocation error --- lib/ic/test/c_client_erl_server_SUITE_data/c_client.c | 1 - 1 file changed, 1 deletion(-) (limited to 'lib') diff --git a/lib/ic/test/c_client_erl_server_SUITE_data/c_client.c b/lib/ic/test/c_client_erl_server_SUITE_data/c_client.c index 6953227824..af189a74f7 100644 --- a/lib/ic/test/c_client_erl_server_SUITE_data/c_client.c +++ b/lib/ic/test/c_client_erl_server_SUITE_data/c_client.c @@ -854,7 +854,6 @@ static int array1_test(IC_Env *env) print_arr1(alr); fprintf(stdout, "\n"); } - free(alo); free(alr); return -1; } -- cgit v1.2.3 From d29526af250bb33a702556bb91cda136324b5b8c Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Fri, 20 May 2016 12:23:56 +0200 Subject: [erl_docgen] Update the test suites to follow the new style * Eliminate use of ?t macro * Remove the doc clauses --- lib/erl_docgen/test/erl_docgen_SUITE.erl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/erl_docgen/test/erl_docgen_SUITE.erl b/lib/erl_docgen/test/erl_docgen_SUITE.erl index a202fefa9d..972fda5762 100644 --- a/lib/erl_docgen/test/erl_docgen_SUITE.erl +++ b/lib/erl_docgen/test/erl_docgen_SUITE.erl @@ -40,12 +40,10 @@ init_per_group(_GroupName, Config) -> end_per_group(_GroupName, Config) -> Config. -app() -> - [{doc, "Test that the erl_docgen app file is ok"}]. +%% Test that the erl_docgen app file is ok app(Config) when is_list(Config) -> - ok = ?t:app_test(erl_docgen). + ok = test_server:app_test(erl_docgen). -appup() -> - [{doc, "Test that the erl_docgen appup file is ok"}]. +%% Test that the erl_docgen appup file is ok appup(Config) when is_list(Config) -> - ok = ?t:appup_test(erl_docgen). + ok = test_server:appup_test(erl_docgen). -- cgit v1.2.3 From aee581679e2a61e819950e793d3977b340dec70b Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Wed, 15 Jun 2016 13:18:21 +0200 Subject: [orber] Update the test suites to follow the new style --- lib/orber/test/cdrcoding_10_SUITE.erl | 237 +++++------- lib/orber/test/cdrcoding_11_SUITE.erl | 236 +++++------- lib/orber/test/cdrcoding_12_SUITE.erl | 236 +++++------- lib/orber/test/cdrlib_SUITE.erl | 182 ++++----- lib/orber/test/corba_SUITE.erl | 454 +++++++++++------------ lib/orber/test/csiv2_SUITE.erl | 103 ++--- lib/orber/test/data_types_SUITE.erl | 16 +- lib/orber/test/generated_SUITE.erl | 48 +-- lib/orber/test/interceptors_SUITE.erl | 18 +- lib/orber/test/iop_ior_10_SUITE.erl | 70 ++-- lib/orber/test/iop_ior_11_SUITE.erl | 70 ++-- lib/orber/test/iop_ior_12_SUITE.erl | 80 ++-- lib/orber/test/ip_v4v6_interop_SUITE.erl | 9 +- lib/orber/test/lname_SUITE.erl | 76 ++-- lib/orber/test/multi_ORB_SUITE.erl | 294 +++++---------- lib/orber/test/naming_context_SUITE.erl | 111 +++--- lib/orber/test/orber_SUITE.erl | 22 +- lib/orber/test/orber_acl_SUITE.erl | 42 +-- lib/orber/test/orber_firewall_ipv4_in_SUITE.erl | 47 +-- lib/orber/test/orber_firewall_ipv4_out_SUITE.erl | 43 +-- lib/orber/test/orber_firewall_ipv6_in_SUITE.erl | 47 +-- lib/orber/test/orber_firewall_ipv6_out_SUITE.erl | 43 +-- lib/orber/test/orber_nat_SUITE.erl | 42 +-- lib/orber/test/orber_web_SUITE.erl | 32 +- lib/orber/test/tc_SUITE.erl | 346 +++++++---------- 25 files changed, 1171 insertions(+), 1733 deletions(-) (limited to 'lib') diff --git a/lib/orber/test/cdrcoding_10_SUITE.erl b/lib/orber/test/cdrcoding_10_SUITE.erl index 3eb35572c1..24de589615 100644 --- a/lib/orber/test/cdrcoding_10_SUITE.erl +++ b/lib/orber/test/cdrcoding_10_SUITE.erl @@ -26,13 +26,12 @@ %%----------------------------------------------------------------- -module(cdrcoding_10_SUITE). - -include("idl_output/Module.hrl"). -include_lib("common_test/include/ct.hrl"). -include_lib("orber/include/corba.hrl"). -include_lib("orber/src/orber_iiop.hrl"). --define(default_timeout, ?t:minutes(20)). +-define(default_timeout, test_server:minutes(20)). %%----------------------------------------------------------------- %% External exports @@ -80,14 +79,14 @@ cases() -> init_per_testcase(_Case, Config) -> Path = code:which(?MODULE), code:add_pathz(filename:join(filename:dirname(Path), "idl_output")), - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> Path = code:which(?MODULE), code:del_path(filename:join(filename:dirname(Path), "idl_output")), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -126,49 +125,40 @@ end_per_suite(Config) when is_list(Config) -> % 'oe_orber_test':'oe_unregister'(), % ok. -do_register(doc) -> []; -do_register(suite) -> []; do_register(Config) when is_list(Config) -> io:format("Pwd: ~p, mod: ~p~n",[c:pwd(), c:m('oe_orber_test')]), 'oe_orber_test':'oe_register'(), ok. -do_unregister(doc) -> []; -do_unregister(suite) -> []; + do_unregister(Config) when is_list(Config) -> 'oe_orber_test':'oe_unregister'(), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: null %%----------------------------------------------------------------- -null_type(doc) -> []; -null_type(suite) -> []; null_type(Config) when is_list(Config) -> - ?line B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, 'tk_null', 'null'), - ?line {'null', <<>>, _} = cdr_decode:dec_type('tk_null', {1, 0}, B, 0, big), + B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, 'tk_null', 'null'), + {'null', <<>>, _} = cdr_decode:dec_type('tk_null', {1, 0}, B, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: void %%----------------------------------------------------------------- -void_type(doc) -> []; -void_type(suite) -> []; void_type(Config) when is_list(Config) -> - ?line B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, 'tk_void', 'ok'), - ?line {'ok', <<>>, _} = cdr_decode:dec_type('tk_void', {1, 0}, B, 0, big), + B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, 'tk_void', 'ok'), + {'ok', <<>>, _} = cdr_decode:dec_type('tk_void', {1, 0}, B, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: principal %%----------------------------------------------------------------- -principal_type(doc) -> []; -principal_type(suite) -> []; principal_type(Config) when is_list(Config) -> - ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, 'tk_Principal', "principal"), - ?line {"principal", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 0}, B0, 0, big), - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, 'tk_Principal', ""), - ?line {"", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 0}, B1, 0, big), - ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, 'tk_Principal', "principal"), - ?line {"principal", <<>>, _} = + B0 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, 'tk_Principal', "principal"), + {"principal", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 0}, B0, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, 'tk_Principal', ""), + {"", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 0}, B1, 0, big), + B2 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, 'tk_Principal', "principal"), + {"principal", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 0}, B2, 0, big), ok. @@ -203,19 +193,17 @@ objref(2) -> TP = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB}, #'IOP_IOR'{type_id="IDL:Module/Interface:1.0", profiles=[TP]}. -objref_type(doc) -> []; -objref_type(suite) -> []; objref_type(Config) when is_list(Config) -> T = {'tk_objref', "IDL:Module/Interface:1.0", "Interface"}, Objref0 = objref(0), - ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T, Objref0), - ?line {Objref0, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B0, 0, big), + B0 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T, Objref0), + {Objref0, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B0, 0, big), Objref1 = objref(1), - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T, Objref1), - ?line {Objref1, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T, Objref1), + {Objref1, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B1, 0, big), Objref2 = objref(2), - ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T, Objref2), - ?line {Objref2, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B2, 0, big), + B2 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T, Objref2), + {Objref2, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B2, 0, big), ok. @@ -223,49 +211,45 @@ objref_type(Config) when is_list(Config) -> %%----------------------------------------------------------------- %% Encode/decode test of type: struct %%----------------------------------------------------------------- -struct_type(doc) -> []; -struct_type(suite) -> []; struct_type(Config) when is_list(Config) -> T0 = {'tk_struct',"IDL:Module/Struct0:1.0", "Module_Struct0", [{"long", 'tk_long'}, {"short", 'tk_short'}, {"character", 'tk_char'}]}, S0 = #'Module_Struct0'{l=-4711, s=17, c=$a}, - ?line B0 = cdr_encode:enc_type({1, 0}, T0, S0), - ?line {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 0}, B0, 0, big), + B0 = cdr_encode:enc_type({1, 0}, T0, S0), + {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 0}, B0, 0, big), T1 = {'tk_struct', "IDL:Module/Struct1:1.0", "Module_Struct1", [{"string", {'tk_string', 0}}, {"ushort", 'tk_ushort'}, {"ulong", 'tk_ulong'}]}, S1 = #'Module_Struct1'{s="Hi !!!!", us=17, ul=4711}, - ?line B1 = cdr_encode:enc_type({1, 0}, T1, S1), - ?line {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B1, 0, big), + B1 = cdr_encode:enc_type({1, 0}, T1, S1), + {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B1, 0, big), T2 = {'tk_struct', "IDL:Module/Struct2:1.0", "Module_Struct2", [{"long_sequence", {'tk_sequence', 'tk_long', 0}}, {"enum", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}}, {"octet", 'tk_octet'}]}, S2 = #'Module_Struct2'{long_sequence=[4711, 350000, 0, -3030, -600000], e=cow, o=$X}, - ?line B2 = cdr_encode:enc_type({1, 0}, T2, S2), - ?line {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 0}, B2, 0, big), + B2 = cdr_encode:enc_type({1, 0}, T2, S2), + {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 0}, B2, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: union %%----------------------------------------------------------------- -union_type(doc) -> []; -union_type(suite) -> []; union_type(Config) when is_list(Config) -> T0 = {'tk_union', "IDL:Module/Union:1.0", "Union", 'tk_short', 2, [{0, "First", 'tk_short'}, {1, "Second", {'tk_string', 0}}, {2, "Third", 'tk_char'}]}, S0 = #'Module_Union'{label=1, value="Foo Bar !"}, - ?line B0 = cdr_encode:enc_type({1, 0}, T0, S0), - ?line {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 0}, B0, 0, big), + B0 = cdr_encode:enc_type({1, 0}, T0, S0), + {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 0}, B0, 0, big), S1 = #'Module_Union'{label=0, value=-17}, - ?line B1 = cdr_encode:enc_type({1, 0}, T0, S1), - ?line {S1, <<>>, _} = cdr_decode:dec_type(T0, {1, 0}, B1, 0, big), + B1 = cdr_encode:enc_type({1, 0}, T0, S1), + {S1, <<>>, _} = cdr_decode:dec_type(T0, {1, 0}, B1, 0, big), S2 = #'Module_Union'{label=2, value=$X}, - ?line B2 = cdr_encode:enc_type({1, 0}, T0, S2), - ?line {S2, <<>>, _} = cdr_decode:dec_type(T0, {1, 0}, B2, 0, big), + B2 = cdr_encode:enc_type({1, 0}, T0, S2), + {S2, <<>>, _} = cdr_decode:dec_type(T0, {1, 0}, B2, 0, big), T1 = {'tk_union', "IDL:Module/Union1:1.0", "Union1", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, "pig", @@ -274,14 +258,14 @@ union_type(Config) when is_list(Config) -> {"cow", "Third", {'tk_enum', "IDL:Module/Enum1:1.0", "Module_Enum1", ["orange", "banana", "apple"]}}]}, S3 = #'Module_Union1'{label=pig, value=["Foo", "Bar", "!"]}, - ?line B3 = cdr_encode:enc_type({1, 0}, T1, S3), - ?line {S3, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B3, 0, big), + B3 = cdr_encode:enc_type({1, 0}, T1, S3), + {S3, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B3, 0, big), S4 = #'Module_Union1'{label=cow, value=apple}, - ?line B4 = cdr_encode:enc_type({1, 0}, T1, S4), - ?line {S4, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B4, 0, big), + B4 = cdr_encode:enc_type({1, 0}, T1, S4), + {S4, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B4, 0, big), S5 = #'Module_Union1'{label=horse, value=17}, - ?line B5 = cdr_encode:enc_type({1, 0}, T1, S5), - ?line {S5, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B5, 0, big), + B5 = cdr_encode:enc_type({1, 0}, T1, S5), + {S5, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B5, 0, big), T2 = {'tk_union', "IDL:Module/Union2:1.0", "Union2", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, "pig", @@ -303,54 +287,50 @@ union_type(Config) when is_list(Config) -> ["orange", "banana", "apple"]}}]}}]}, S6 = #'Module_Union2'{label=pig, value=#'Module_Union'{label=0, value=-17}}, - ?line B6 = cdr_encode:enc_type({1, 0}, T2, S6), - ?line {S6, <<>>, _} = cdr_decode:dec_type(T2, {1, 0}, B6, 0, big), + B6 = cdr_encode:enc_type({1, 0}, T2, S6), + {S6, <<>>, _} = cdr_decode:dec_type(T2, {1, 0}, B6, 0, big), S7 = #'Module_Union2'{label=cow, value=#'Module_Union1'{label=pig, value=["Foo", "Bar", "!"]}}, - ?line B7 = cdr_encode:enc_type({1, 0}, T2, S7), - ?line {S7, <<>>, _} = cdr_decode:dec_type(T2, {1, 0}, B7, 0, big), + B7 = cdr_encode:enc_type({1, 0}, T2, S7), + {S7, <<>>, _} = cdr_decode:dec_type(T2, {1, 0}, B7, 0, big), S8 = #'Module_Union2'{label=horse, value={-17, 1234567890, -987654321}}, - ?line B8 = cdr_encode:enc_type({1, 0}, T2, S8), - ?line {S8, <<>>, _} = cdr_decode:dec_type(T2, {1, 0}, B8, 0, big), + B8 = cdr_encode:enc_type({1, 0}, T2, S8), + {S8, <<>>, _} = cdr_decode:dec_type(T2, {1, 0}, B8, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: string %%----------------------------------------------------------------- -string_type(doc) -> []; -string_type(suite) -> []; string_type(Config) when is_list(Config) -> S0 = "Foo Bar ???", - ?line B0 = cdr_encode:enc_type({1, 0}, {'tk_string', 0}, S0), - ?line {S0, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 0}, B0, 0, big), + B0 = cdr_encode:enc_type({1, 0}, {'tk_string', 0}, S0), + {S0, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 0}, B0, 0, big), S1 = "Yes, Foo Bar !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! more than 5000 characters", - ?line B1 = cdr_encode:enc_type({1, 0}, {'tk_string', 0}, S1), - ?line {S1, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 0}, B1, 0, big), + B1 = cdr_encode:enc_type({1, 0}, {'tk_string', 0}, S1), + {S1, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 0}, B1, 0, big), S2 = "", - ?line B2 = cdr_encode:enc_type({1, 0}, {'tk_string', 0}, S2), - ?line {S2, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 0}, B2, 0, big), + B2 = cdr_encode:enc_type({1, 0}, {'tk_string', 0}, S2), + {S2, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 0}, B2, 0, big), S3 = "\0", - ?line B3 = cdr_encode:enc_type({1, 0}, {'tk_string', 0}, S3), - ?line {S3, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 0}, B3, 0, big), + B3 = cdr_encode:enc_type({1, 0}, {'tk_string', 0}, S3), + {S3, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 0}, B3, 0, big), S4 = "~n", - ?line B4 = cdr_encode:enc_type({1, 0}, {'tk_string', 0}, S4), - ?line {S4, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 0}, B4, 0, big), + B4 = cdr_encode:enc_type({1, 0}, {'tk_string', 0}, S4), + {S4, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 0}, B4, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: array %%----------------------------------------------------------------- -array_type(doc) -> []; -array_type(suite) -> []; array_type(Config) when is_list(Config) -> T0 = {'tk_array', 'tk_long', 5}, S0 = {-100, 0, 30000, -900100900, 123456789}, - ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T0, S0), - ?line {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 0}, B0, 0, big), + B0 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T0, S0), + {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 0}, B0, 0, big), T1 = {'tk_array', {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, 2}, S1 = {pig, cow}, - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T1, S1), - ?line {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T1, S1), + {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B1, 0, big), T2 = {'tk_array', {'tk_union', "IDL:Module/Union:1.0", "Union", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, "pig", [{"horse", "First", 'tk_ushort'}, @@ -358,18 +338,16 @@ array_type(Config) when is_list(Config) -> {"cow", "Third", {'tk_enum', "IDL:Module/Enum1:1.0", "Module_Enum1", ["orange", "banana", "apple"]}}]}, 2}, S2 = {#'Module_Union'{label=cow, value=banana}, #'Module_Union'{label=pig, value=["This", "is", "a", "test", ""]}}, - ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T2, S2), - ?line {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 0}, B2, 0, big), + B2 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T2, S2), + {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 0}, B2, 0, big), T3 = {'tk_array', {'tk_objref', "IDL:Module/Interface:1.0", "Interface"}, 3}, S3 = {objref(0), objref(1), objref(2)}, - ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T3, S3), - ?line {S3, <<>>, _} = cdr_decode:dec_type(T3, {1, 0}, B3, 0, big), + B3 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T3, S3), + {S3, <<>>, _} = cdr_decode:dec_type(T3, {1, 0}, B3, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: TypeCode %%----------------------------------------------------------------- -any_type(doc) -> []; -any_type(suite) -> []; any_type(Config) when is_list(Config) -> T = 'tk_any', TC = {'tk_struct', "IDL:Module/Struct2:1.0", "Module_Struct2", @@ -380,8 +358,8 @@ any_type(Config) when is_list(Config) -> S = #'Module_Struct2'{long_sequence=[4711, 350000, 0, -3030, -600000], e=cow, o=$X}, Any = #any{typecode=TC,value=S}, - ?line B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T,Any), - ?line {Any, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B, 0, big), + B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T,Any), + {Any, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B, 0, big), TC1 = {'tk_array', {'tk_union', "IDL:Module/Union:1.0", "Union", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, 1, @@ -392,16 +370,14 @@ any_type(Config) when is_list(Config) -> "apple"]}}]},2}, S1 = {#'Module_Union'{label=cow, value=banana}, #'Module_Union'{label=pig, value=["This", "is", "a", "test", ""]}}, Any1 = #any{typecode=TC1,value=S1}, - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T,Any1), - ?line {Any1, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T,Any1), + {Any1, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B1, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: TypeCode %%----------------------------------------------------------------- -typecode_type(doc) -> []; -typecode_type(suite) -> []; typecode_type(Config) when is_list(Config) -> T = 'tk_TypeCode', TC = {'tk_array', {'tk_union', "IDL:Module/Union:1.0", "Union", @@ -412,8 +388,8 @@ typecode_type(Config) when is_list(Config) -> {"cow", "Third", {'tk_enum', "IDL:Module/Enum1:1.0", "Module_Enum1", ["orange", "banana", "apple"]}}]}, 10}, - ?line B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T,TC), - ?line {TC, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B, 0, big), + B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T,TC), + {TC, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B, 0, big), TC1 = {'tk_union', "IDL:Module/Union2:1.0", "Union2", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, 2, @@ -434,15 +410,13 @@ typecode_type(Config) when is_list(Config) -> "Module_Enum1", ["orange", "banana", "apple"]}}]}}]}, - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T, TC1), - ?line {TC1, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T, TC1), + {TC1, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B1, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: TypeCode %%----------------------------------------------------------------- -alias_type(doc) -> []; -alias_type(suite) -> []; alias_type(Config) when is_list(Config) -> T = {'tk_alias', "IDL:Module/Alias:1.0", "Alias", {'tk_struct', "IDL:Module/Struct2:1.0", "Module_Struct2", @@ -452,8 +426,8 @@ alias_type(Config) when is_list(Config) -> {"octet", 'tk_octet'}]}}, S = #'Module_Struct2'{long_sequence=[4711, 350000, 0, -3030, -600000], e=cow, o=$X}, - ?line B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T,S), - ?line {S, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B, 0, big), + B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T,S), + {S, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B, 0, big), T1 = {'tk_alias', "IDL:Module/Alias1:1.0", "Alias1", {'tk_sequence', {'tk_union', "IDL:Module/Union:1.0", "Union", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", @@ -464,15 +438,13 @@ alias_type(Config) when is_list(Config) -> "Module_Enum1", ["orange", "banana", "apple"]}}]},0}}, S1 = [#'Module_Union'{label=cow, value=banana}, #'Module_Union'{label=pig, value=["This", "is", "a", "test", ""]}], - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T1, S1), - ?line {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T1, S1), + {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B1, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: exception %%----------------------------------------------------------------- -exception_type(doc) -> []; -exception_type(suite) -> []; exception_type(Config) when is_list(Config) -> system_exceptions(), user_exceptions(), @@ -481,43 +453,43 @@ exception_type(Config) when is_list(Config) -> system_exceptions() -> E = #'UNKNOWN'{completion_status=?COMPLETED_YES}, {system_exception, T, E} = orber_exceptions:get_def(E), - ?line B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T,E), - ?line {E, _} = cdr_decode:dec_system_exception({1, 0}, B, 0, big), + B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T,E), + {E, _} = cdr_decode:dec_system_exception({1, 0}, B, 0, big), E1 = #'INV_OBJREF'{completion_status=?COMPLETED_NO}, {system_exception, T1, E1} = orber_exceptions:get_def(E1), - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T1,E1), - ?line {E1, _} = cdr_decode:dec_system_exception({1, 0}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T1,E1), + {E1, _} = cdr_decode:dec_system_exception({1, 0}, B1, 0, big), E2 = #'BAD_OPERATION'{completion_status=?COMPLETED_NO}, {system_exception, T2, E2} = orber_exceptions:get_def(E2), - ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T2,E2), - ?line {E2, _} = cdr_decode:dec_system_exception({1, 0}, B2, 0, big), + B2 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T2,E2), + {E2, _} = cdr_decode:dec_system_exception({1, 0}, B2, 0, big), E3 = #'INTF_REPOS'{completion_status=?COMPLETED_MAYBE}, {system_exception, T3, E3} = orber_exceptions:get_def(E3), - ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T3,E3), - ?line {E3, _} = cdr_decode:dec_system_exception({1, 0}, B3, 0, big), + B3 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T3,E3), + {E3, _} = cdr_decode:dec_system_exception({1, 0}, B3, 0, big), ok. user_exceptions() -> E = #'Module_Except1'{rest_of_name=["I","am","testing","exceptions"], why="Error"}, {user_exception, T, E} = orber_exceptions:get_def(E), - ?line B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T, E), - ?line {E, _} = cdr_decode:dec_user_exception({1, 0}, B, 0, big), + B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T, E), + {E, _} = cdr_decode:dec_user_exception({1, 0}, B, 0, big), E1 = #'Module_Except2'{e=banana, s=#'Module_Struct2'{long_sequence=[12,-4040, 1234567898], e=horse, o=$a}}, {user_exception, T1, E1} = orber_exceptions:get_def(E1), - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T1, E1), - ?line {E1, _} = cdr_decode:dec_user_exception({1, 0}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T1, E1), + {E1, _} = cdr_decode:dec_user_exception({1, 0}, B1, 0, big), E2 = #'Module_Except3'{u=#'Module_Union1'{label=pig,value=["high","and","low"]},s=1313, o=objref(0)}, {user_exception, T2, E2} = orber_exceptions:get_def(E2), - ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T2, E2), - ?line {E2, _} = cdr_decode:dec_user_exception({1, 0}, B2, 0, big), + B2 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T2, E2), + {E2, _} = cdr_decode:dec_user_exception({1, 0}, B2, 0, big), E3 = #'Module_Except4'{}, {user_exception, T3, E3} = orber_exceptions:get_def(E3), - ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T3, E3), - ?line {E3, _} = cdr_decode:dec_user_exception({1, 0}, B3, 0, big), + B3 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T3, E3), + {E3, _} = cdr_decode:dec_user_exception({1, 0}, B3, 0, big), ok. %%----------------------------------------------------------------- @@ -525,7 +497,6 @@ user_exceptions() -> %% Description: Precondition the stack must be started so the %% objectkey is valid. %%----------------------------------------------------------------- -%request(suite) -> []; %request(_) -> % exit(not_implemented). @@ -533,19 +504,17 @@ user_exceptions() -> %% Test Case: reply encoding test %% Description: %%----------------------------------------------------------------- -reply(doc) -> ["Description", "more description"]; -reply(suite) -> []; reply(Config) when is_list(Config) -> R = #reply_header{service_context=[], request_id=1, reply_status='no_exception'}, - ?line B = cdr_encode:enc_reply( + B = cdr_encode:enc_reply( #giop_env{version = {1, 0}, request_id = 1, reply_status = 'no_exception', tc = {'tk_long', [], [{'tk_sequence', {'tk_string', 0}, 0}]}, result = 1200, parameters = [["foo","Bar"]], ctx = []}), - ?line {R, 1200, [["foo","Bar"]]} = + {R, 1200, [["foo","Bar"]]} = cdr_decode:dec_message({'tk_long', [], [{'tk_sequence', {'tk_string', 0},0}]}, B), ok. @@ -554,21 +523,17 @@ reply(Config) when is_list(Config) -> %% Test Case: cancel_request encoding test %% Description: %%----------------------------------------------------------------- -cancel_request(doc) -> ["Description", "more description"]; -cancel_request(suite) -> []; cancel_request(Config) when is_list(Config) -> R = #cancel_request_header{request_id=1}, - ?line B = cdr_encode:enc_cancel_request(#giop_env{version = {1, 0}, + B = cdr_encode:enc_cancel_request(#giop_env{version = {1, 0}, request_id = 1}), - ?line R = cdr_decode:dec_message([], B), + R = cdr_decode:dec_message([], B), ok. %%----------------------------------------------------------------- %% Test Case: locate_request encoding test %% Description: %%----------------------------------------------------------------- -locate_request(doc) -> ["Description", "more description"]; -locate_request(suite) -> []; locate_request(Config) when is_list(Config) -> io:format("Function not imlpemented yet"), exit(not_implemented). @@ -577,8 +542,6 @@ locate_request(Config) when is_list(Config) -> %% Test Case: locate_reply encoding test %% Description: %%----------------------------------------------------------------- -locate_reply(doc) -> ["Description", "more description"]; -locate_reply(suite) -> []; locate_reply(Config) when is_list(Config) -> io:format("Function not imlpemented yet"), exit(not_implemented). @@ -587,22 +550,18 @@ locate_reply(Config) when is_list(Config) -> %% Test Case: close_connection encoding test %% Description: %%----------------------------------------------------------------- -close_connection(doc) -> ["Description", "more description"]; -close_connection(suite) -> []; close_connection(Config) when is_list(Config) -> - ?line B = cdr_encode:enc_close_connection(#giop_env{version = {1, 0}}), - ?line 'close_connection' = cdr_decode:dec_message([], B), + B = cdr_encode:enc_close_connection(#giop_env{version = {1, 0}}), + 'close_connection' = cdr_decode:dec_message([], B), ok. %%----------------------------------------------------------------- %% Test Case: message_error encoding test %% Description: %%----------------------------------------------------------------- -message_error(doc) -> ["Description", "more description"]; -message_error(suite) -> []; message_error(Config) when is_list(Config) -> - ?line B = cdr_encode:enc_message_error(#giop_env{version = {1, 0}}), - ?line 'message_error' = cdr_decode:dec_message([], B), + B = cdr_encode:enc_message_error(#giop_env{version = {1, 0}}), + 'message_error' = cdr_decode:dec_message([], B), ok. diff --git a/lib/orber/test/cdrcoding_11_SUITE.erl b/lib/orber/test/cdrcoding_11_SUITE.erl index 7513888449..ff5d2852d6 100644 --- a/lib/orber/test/cdrcoding_11_SUITE.erl +++ b/lib/orber/test/cdrcoding_11_SUITE.erl @@ -32,7 +32,7 @@ -include_lib("orber/include/corba.hrl"). -include_lib("orber/src/orber_iiop.hrl"). --define(default_timeout, ?t:minutes(5)). +-define(default_timeout, test_server:minutes(5)). %%----------------------------------------------------------------- %% External exports @@ -80,14 +80,14 @@ cases() -> init_per_testcase(_Case, Config) -> Path = code:which(?MODULE), code:add_pathz(filename:join(filename:dirname(Path), "idl_output")), - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> Path = code:which(?MODULE), code:del_path(filename:join(filename:dirname(Path), "idl_output")), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -126,48 +126,39 @@ end_per_suite(Config) when is_list(Config) -> % 'oe_orber_test':'oe_unregister'(), % ok. -do_register(doc) -> []; -do_register(suite) -> []; do_register(Config) when is_list(Config) -> 'oe_orber_test':'oe_register'(), ok. -do_unregister(doc) -> []; -do_unregister(suite) -> []; + do_unregister(Config) when is_list(Config) -> 'oe_orber_test':'oe_unregister'(), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: null %%----------------------------------------------------------------- -null_type(doc) -> []; -null_type(suite) -> []; null_type(Config) when is_list(Config) -> - ?line B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, 'tk_null', 'null'), - ?line {'null', <<>>, _} = cdr_decode:dec_type('tk_null', {1, 1}, B, 0, big), + B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, 'tk_null', 'null'), + {'null', <<>>, _} = cdr_decode:dec_type('tk_null', {1, 1}, B, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: void %%----------------------------------------------------------------- -void_type(doc) -> []; -void_type(suite) -> []; void_type(Config) when is_list(Config) -> - ?line B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, 'tk_void', 'ok'), - ?line {'ok', <<>>, _} = cdr_decode:dec_type('tk_void', {1, 1}, B, 0, big), + B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, 'tk_void', 'ok'), + {'ok', <<>>, _} = cdr_decode:dec_type('tk_void', {1, 1}, B, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: principal %%----------------------------------------------------------------- -principal_type(doc) -> []; -principal_type(suite) -> []; principal_type(Config) when is_list(Config) -> - ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, 'tk_Principal', "principal"), - ?line {"principal", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 1}, B0, 0, big), - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, 'tk_Principal', ""), - ?line {"", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 1}, B1, 0, big), - ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, 'tk_Principal', "principal"), - ?line {"principal", <<>>, _} = + B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, 'tk_Principal', "principal"), + {"principal", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 1}, B0, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, 'tk_Principal', ""), + {"", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 1}, B1, 0, big), + B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, 'tk_Principal', "principal"), + {"principal", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 1}, B2, 0, big), ok. @@ -203,19 +194,17 @@ objref(2) -> TP = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB}, #'IOP_IOR'{type_id="IDL:Module/Interface:1.0", profiles=[TP]}. -objref_type(doc) -> []; -objref_type(suite) -> []; objref_type(Config) when is_list(Config) -> T = {'tk_objref', "IDL:Module/Interface:1.0", "Interface"}, Objref0 = objref(0), - ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T, Objref0), - ?line {Objref0, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B0, 0, big), + B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T, Objref0), + {Objref0, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B0, 0, big), Objref1 = objref(1), - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T, Objref1), - ?line {Objref1, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T, Objref1), + {Objref1, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B1, 0, big), Objref2 = objref(2), - ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T, Objref2), - ?line {Objref2, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B2, 0, big), + B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T, Objref2), + {Objref2, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B2, 0, big), ok. @@ -223,49 +212,45 @@ objref_type(Config) when is_list(Config) -> %%----------------------------------------------------------------- %% Encode/decode test of type: struct %%----------------------------------------------------------------- -struct_type(doc) -> []; -struct_type(suite) -> []; struct_type(Config) when is_list(Config) -> T0 = {'tk_struct',"IDL:Module/Struct0:1.0", "Module_Struct0", [{"long", 'tk_long'}, {"short", 'tk_short'}, {"character", 'tk_char'}]}, S0 = #'Module_Struct0'{l=-4711, s=17, c=$a}, - ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T0, S0), - ?line {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 1}, B0, 0, big), + B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T0, S0), + {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 1}, B0, 0, big), T1 = {'tk_struct', "IDL:Module/Struct1:1.0", "Module_Struct1", [{"string", {'tk_string', 0}}, {"ushort", 'tk_ushort'}, {"ulong", 'tk_ulong'}]}, S1 = #'Module_Struct1'{s="Hi !!!!", us=17, ul=4711}, - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S1), - ?line {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S1), + {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B1, 0, big), T2 = {'tk_struct', "IDL:Module/Struct2:1.0", "Module_Struct2", [{"long_sequence", {'tk_sequence', 'tk_long', 0}}, {"enum", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}}, {"octet", 'tk_octet'}]}, S2 = #'Module_Struct2'{long_sequence=[4711, 350000, 0, -3030, -600000], e=cow, o=$X}, - ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, S2), - ?line {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 1}, B2, 0, big), + B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, S2), + {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 1}, B2, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: union %%----------------------------------------------------------------- -union_type(doc) -> []; -union_type(suite) -> []; union_type(Config) when is_list(Config) -> T0 = {'tk_union', "IDL:Module/Union:1.0", "Union", 'tk_short', 2, [{0, "First", 'tk_short'}, {1, "Second", {'tk_string', 0}}, {2, "Third", 'tk_char'}]}, S0 = #'Module_Union'{label=1, value="Foo Bar !"}, - ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T0, S0), - ?line {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 1}, B0, 0, big), + B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T0, S0), + {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 1}, B0, 0, big), S1 = #'Module_Union'{label=0, value=-17}, - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T0, S1), - ?line {S1, <<>>, _} = cdr_decode:dec_type(T0, {1, 1}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T0, S1), + {S1, <<>>, _} = cdr_decode:dec_type(T0, {1, 1}, B1, 0, big), S2 = #'Module_Union'{label=2, value=$X}, - ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T0, S2), - ?line {S2, <<>>, _} = cdr_decode:dec_type(T0, {1, 1}, B2, 0, big), + B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T0, S2), + {S2, <<>>, _} = cdr_decode:dec_type(T0, {1, 1}, B2, 0, big), T1 = {'tk_union', "IDL:Module/Union1:1.0", "Union1", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, "pig", @@ -274,14 +259,14 @@ union_type(Config) when is_list(Config) -> {"cow", "Third", {'tk_enum', "IDL:Module/Enum1:1.0", "Module_Enum1", ["orange", "banana", "apple"]}}]}, S3 = #'Module_Union1'{label=pig, value=["Foo", "Bar", "!"]}, - ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S3), - ?line {S3, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B3, 0, big), + B3 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S3), + {S3, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B3, 0, big), S4 = #'Module_Union1'{label=cow, value=apple}, - ?line B4 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S4), - ?line {S4, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B4, 0, big), + B4 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S4), + {S4, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B4, 0, big), S5 = #'Module_Union1'{label=horse, value=17}, - ?line B5 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S5), - ?line {S5, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B5, 0, big), + B5 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S5), + {S5, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B5, 0, big), T2 = {'tk_union', "IDL:Module/Union2:1.0", "Union2", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, "pig", @@ -303,54 +288,50 @@ union_type(Config) when is_list(Config) -> ["orange", "banana", "apple"]}}]}}]}, S6 = #'Module_Union2'{label=pig, value=#'Module_Union'{label=0, value=-17}}, - ?line B6 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, S6), - ?line {S6, <<>>, _} = cdr_decode:dec_type(T2, {1, 1}, B6, 0, big), + B6 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, S6), + {S6, <<>>, _} = cdr_decode:dec_type(T2, {1, 1}, B6, 0, big), S7 = #'Module_Union2'{label=cow, value=#'Module_Union1'{label=pig, value=["Foo", "Bar", "!"]}}, - ?line B7 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, S7), - ?line {S7, <<>>, _} = cdr_decode:dec_type(T2, {1, 1}, B7, 0, big), + B7 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, S7), + {S7, <<>>, _} = cdr_decode:dec_type(T2, {1, 1}, B7, 0, big), S8 = #'Module_Union2'{label=horse, value={-17, 1234567890, -987654321}}, - ?line B8 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, S8), - ?line {S8, <<>>, _} = cdr_decode:dec_type(T2, {1, 1}, B8, 0, big), + B8 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, S8), + {S8, <<>>, _} = cdr_decode:dec_type(T2, {1, 1}, B8, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: string %%----------------------------------------------------------------- -string_type(doc) -> []; -string_type(suite) -> []; string_type(Config) when is_list(Config) -> S0 = "Foo Bar ???", - ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, {'tk_string', 0}, S0), - ?line {S0, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 1}, B0, 0, big), + B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, {'tk_string', 0}, S0), + {S0, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 1}, B0, 0, big), S1 = "Yes, Foo Bar !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! more than 5000 characters", - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, {'tk_string', 0}, S1), - ?line {S1, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 1}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, {'tk_string', 0}, S1), + {S1, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 1}, B1, 0, big), S2 = "", - ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, {'tk_string', 0}, S2), - ?line {S2, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 1}, B2, 0, big), + B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, {'tk_string', 0}, S2), + {S2, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 1}, B2, 0, big), S3 = "\0", - ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, {'tk_string', 0}, S3), - ?line {S3, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 1}, B3, 0, big), + B3 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, {'tk_string', 0}, S3), + {S3, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 1}, B3, 0, big), S4 = "~n", - ?line B4 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, {'tk_string', 0}, S4), - ?line {S4, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 1}, B4, 0, big), + B4 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, {'tk_string', 0}, S4), + {S4, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 1}, B4, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: array %%----------------------------------------------------------------- -array_type(doc) -> []; -array_type(suite) -> []; array_type(Config) when is_list(Config) -> T0 = {'tk_array', 'tk_long', 5}, S0 = {-100, 0, 30000, -900100900, 123456789}, - ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T0, S0), - ?line {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 1}, B0, 0, big), + B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T0, S0), + {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 1}, B0, 0, big), T1 = {'tk_array', {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, 2}, S1 = {pig, cow}, - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S1), - ?line {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S1), + {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B1, 0, big), T2 = {'tk_array', {'tk_union', "IDL:Module/Union:1.0", "Union", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, "pig", [{"horse", "First", 'tk_ushort'}, @@ -358,18 +339,16 @@ array_type(Config) when is_list(Config) -> {"cow", "Third", {'tk_enum', "IDL:Module/Enum1:1.0", "Module_Enum1", ["orange", "banana", "apple"]}}]}, 2}, S2 = {#'Module_Union'{label=cow, value=banana}, #'Module_Union'{label=pig, value=["This", "is", "a", "test", ""]}}, - ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, S2), - ?line {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 1}, B2, 0, big), + B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, S2), + {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 1}, B2, 0, big), T3 = {'tk_array', {'tk_objref', "IDL:Module/Interface:1.0", "Interface"}, 3}, S3 = {objref(0), objref(1), objref(2)}, - ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T3, S3), - ?line {S3, <<>>, _} = cdr_decode:dec_type(T3, {1, 1}, B3, 0, big), + B3 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T3, S3), + {S3, <<>>, _} = cdr_decode:dec_type(T3, {1, 1}, B3, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: TypeCode %%----------------------------------------------------------------- -any_type(doc) -> []; -any_type(suite) -> []; any_type(Config) when is_list(Config) -> T = 'tk_any', TC = {'tk_struct', "IDL:Module/Struct2:1.0", "Module_Struct2", @@ -380,8 +359,8 @@ any_type(Config) when is_list(Config) -> S = #'Module_Struct2'{long_sequence=[4711, 350000, 0, -3030, -600000], e=cow, o=$X}, Any = #any{typecode=TC,value=S}, - ?line B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T,Any), - ?line {Any, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B, 0, big), + B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T,Any), + {Any, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B, 0, big), TC1 = {'tk_array', {'tk_union', "IDL:Module/Union:1.0", "Union", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, 1, @@ -392,16 +371,14 @@ any_type(Config) when is_list(Config) -> "apple"]}}]},2}, S1 = {#'Module_Union'{label=cow, value=banana}, #'Module_Union'{label=pig, value=["This", "is", "a", "test", ""]}}, Any1 = #any{typecode=TC1,value=S1}, - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T,Any1), - ?line {Any1, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T,Any1), + {Any1, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B1, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: TypeCode %%----------------------------------------------------------------- -typecode_type(doc) -> []; -typecode_type(suite) -> []; typecode_type(Config) when is_list(Config) -> T = 'tk_TypeCode', TC = {'tk_array', {'tk_union', "IDL:Module/Union:1.0", "Union", @@ -412,8 +389,8 @@ typecode_type(Config) when is_list(Config) -> {"cow", "Third", {'tk_enum', "IDL:Module/Enum1:1.0", "Module_Enum1", ["orange", "banana", "apple"]}}]}, 10}, - ?line B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T,TC), - ?line {TC, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B, 0, big), + B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T,TC), + {TC, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B, 0, big), TC1 = {'tk_union', "IDL:Module/Union2:1.0", "Union2", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, 2, @@ -434,15 +411,13 @@ typecode_type(Config) when is_list(Config) -> "Module_Enum1", ["orange", "banana", "apple"]}}]}}]}, - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T, TC1), - ?line {TC1, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T, TC1), + {TC1, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B1, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: TypeCode %%----------------------------------------------------------------- -alias_type(doc) -> []; -alias_type(suite) -> []; alias_type(Config) when is_list(Config) -> T = {'tk_alias', "IDL:Module/Alias:1.0", "Alias", {'tk_struct', "IDL:Module/Struct2:1.0", "Module_Struct2", @@ -452,8 +427,8 @@ alias_type(Config) when is_list(Config) -> {"octet", 'tk_octet'}]}}, S = #'Module_Struct2'{long_sequence=[4711, 350000, 0, -3030, -600000], e=cow, o=$X}, - ?line B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T,S), - ?line {S, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B, 0, big), + B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T,S), + {S, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B, 0, big), T1 = {'tk_alias', "IDL:Module/Alias1:1.0", "Alias1", {'tk_sequence', {'tk_union', "IDL:Module/Union:1.0", "Union", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", @@ -464,15 +439,13 @@ alias_type(Config) when is_list(Config) -> "Module_Enum1", ["orange", "banana", "apple"]}}]},0}}, S1 = [#'Module_Union'{label=cow, value=banana}, #'Module_Union'{label=pig, value=["This", "is", "a", "test", ""]}], - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S1), - ?line {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S1), + {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B1, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: exception %%----------------------------------------------------------------- -exception_type(doc) -> []; -exception_type(suite) -> []; exception_type(Config) when is_list(Config) -> system_exceptions(), user_exceptions(), @@ -481,43 +454,43 @@ exception_type(Config) when is_list(Config) -> system_exceptions() -> E = #'UNKNOWN'{completion_status=?COMPLETED_YES}, {system_exception, T, E} = orber_exceptions:get_def(E), - ?line B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T,E), - ?line {E, _} = cdr_decode:dec_system_exception({1, 1}, B, 0, big), + B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T,E), + {E, _} = cdr_decode:dec_system_exception({1, 1}, B, 0, big), E1 = #'INV_OBJREF'{completion_status=?COMPLETED_NO}, {system_exception, T1, E1} = orber_exceptions:get_def(E1), - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1,E1), - ?line {E1, _} = cdr_decode:dec_system_exception({1, 1}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1,E1), + {E1, _} = cdr_decode:dec_system_exception({1, 1}, B1, 0, big), E2 = #'BAD_OPERATION'{completion_status=?COMPLETED_NO}, {system_exception, T2, E2} = orber_exceptions:get_def(E2), - ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2,E2), - ?line {E2, _} = cdr_decode:dec_system_exception({1, 1}, B2, 0, big), + B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2,E2), + {E2, _} = cdr_decode:dec_system_exception({1, 1}, B2, 0, big), E3 = #'INTF_REPOS'{completion_status=?COMPLETED_MAYBE}, {system_exception, T3, E3} = orber_exceptions:get_def(E3), - ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T3,E3), - ?line {E3, _} = cdr_decode:dec_system_exception({1, 1}, B3, 0, big), + B3 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T3,E3), + {E3, _} = cdr_decode:dec_system_exception({1, 1}, B3, 0, big), ok. user_exceptions() -> E = #'Module_Except1'{rest_of_name=["I","am","testing","exceptions"], why="Error"}, {user_exception, T, E} = orber_exceptions:get_def(E), - ?line B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T, E), - ?line {E, _} = cdr_decode:dec_user_exception({1, 1}, B, 0, big), + B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T, E), + {E, _} = cdr_decode:dec_user_exception({1, 1}, B, 0, big), E1 = #'Module_Except2'{e=banana, s=#'Module_Struct2'{long_sequence=[12,-4040, 1234567898], e=horse, o=$a}}, {user_exception, T1, E1} = orber_exceptions:get_def(E1), - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, E1), - ?line {E1, _} = cdr_decode:dec_user_exception({1, 1}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, E1), + {E1, _} = cdr_decode:dec_user_exception({1, 1}, B1, 0, big), E2 = #'Module_Except3'{u=#'Module_Union1'{label=pig,value=["high","and","low"]},s=1313, o=objref(0)}, {user_exception, T2, E2} = orber_exceptions:get_def(E2), - ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, E2), - ?line {E2, _} = cdr_decode:dec_user_exception({1, 1}, B2, 0, big), + B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, E2), + {E2, _} = cdr_decode:dec_user_exception({1, 1}, B2, 0, big), E3 = #'Module_Except4'{}, {user_exception, T3, E3} = orber_exceptions:get_def(E3), - ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T3, E3), - ?line {E3, _} = cdr_decode:dec_user_exception({1, 1}, B3, 0, big), + B3 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T3, E3), + {E3, _} = cdr_decode:dec_user_exception({1, 1}, B3, 0, big), ok. %%----------------------------------------------------------------- @@ -525,7 +498,6 @@ user_exceptions() -> %% Description: Precondition the stack must be started so the %% objectkey is valid. %%----------------------------------------------------------------- -%request(suite) -> []; %request(_) -> % exit(not_implemented). @@ -533,18 +505,16 @@ user_exceptions() -> %% Test Case: reply encoding test %% Description: %%----------------------------------------------------------------- -reply(doc) -> ["Description", "more description"]; -reply(suite) -> []; reply(Config) when is_list(Config) -> R = #reply_header{service_context=[], request_id=1, reply_status='no_exception'}, - ?line B = cdr_encode:enc_reply(#giop_env{version = {1, 1}, request_id = 1, + B = cdr_encode:enc_reply(#giop_env{version = {1, 1}, request_id = 1, reply_status = 'no_exception', tc = {'tk_long', [], [{'tk_sequence', {'tk_string', 0}, 0}]}, result = 1200, parameters = [["foo","Bar"]], ctx = []}), - ?line {R, 1200, [["foo","Bar"]]} = + {R, 1200, [["foo","Bar"]]} = cdr_decode:dec_message({'tk_long', [], [{'tk_sequence', {'tk_string', 0},0}]}, B), ok. @@ -553,21 +523,17 @@ reply(Config) when is_list(Config) -> %% Test Case: cancel_request encoding test %% Description: %%----------------------------------------------------------------- -cancel_request(doc) -> ["Description", "more description"]; -cancel_request(suite) -> []; cancel_request(Config) when is_list(Config) -> R = #cancel_request_header{request_id=1}, - ?line B = cdr_encode:enc_cancel_request(#giop_env{version = {1, 1}, + B = cdr_encode:enc_cancel_request(#giop_env{version = {1, 1}, request_id = 1}), - ?line R = cdr_decode:dec_message([], B), + R = cdr_decode:dec_message([], B), ok. %%----------------------------------------------------------------- %% Test Case: locate_request encoding test %% Description: %%----------------------------------------------------------------- -locate_request(doc) -> ["Description", "more description"]; -locate_request(suite) -> []; locate_request(Config) when is_list(Config) -> io:format("Function not imlpemented yet"), exit(not_implemented). @@ -576,8 +542,6 @@ locate_request(Config) when is_list(Config) -> %% Test Case: locate_reply encoding test %% Description: %%----------------------------------------------------------------- -locate_reply(doc) -> ["Description", "more description"]; -locate_reply(suite) -> []; locate_reply(Config) when is_list(Config) -> io:format("Function not imlpemented yet"), exit(not_implemented). @@ -586,22 +550,18 @@ locate_reply(Config) when is_list(Config) -> %% Test Case: close_connection encoding test %% Description: %%----------------------------------------------------------------- -close_connection(doc) -> ["Description", "more description"]; -close_connection(suite) -> []; close_connection(Config) when is_list(Config) -> - ?line B = cdr_encode:enc_close_connection(#giop_env{version = {1, 1}}), - ?line 'close_connection' = cdr_decode:dec_message([], B), + B = cdr_encode:enc_close_connection(#giop_env{version = {1, 1}}), + 'close_connection' = cdr_decode:dec_message([], B), ok. %%----------------------------------------------------------------- %% Test Case: message_error encoding test %% Description: %%----------------------------------------------------------------- -message_error(doc) -> ["Description", "more description"]; -message_error(suite) -> []; message_error(Config) when is_list(Config) -> - ?line B = cdr_encode:enc_message_error(#giop_env{version = {1, 1}}), - ?line 'message_error' = cdr_decode:dec_message([], B), + B = cdr_encode:enc_message_error(#giop_env{version = {1, 1}}), + 'message_error' = cdr_decode:dec_message([], B), ok. diff --git a/lib/orber/test/cdrcoding_12_SUITE.erl b/lib/orber/test/cdrcoding_12_SUITE.erl index 1c04dc0711..13178b7774 100644 --- a/lib/orber/test/cdrcoding_12_SUITE.erl +++ b/lib/orber/test/cdrcoding_12_SUITE.erl @@ -33,7 +33,7 @@ -include_lib("orber/include/corba.hrl"). -include_lib("orber/src/orber_iiop.hrl"). --define(default_timeout, ?t:minutes(5)). +-define(default_timeout, test_server:minutes(5)). %%----------------------------------------------------------------- %% External exports @@ -81,14 +81,14 @@ cases() -> init_per_testcase(_Case, Config) -> Path = code:which(?MODULE), code:add_pathz(filename:join(filename:dirname(Path), "idl_output")), - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> Path = code:which(?MODULE), code:del_path(filename:join(filename:dirname(Path), "idl_output")), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -111,48 +111,39 @@ end_per_suite(Config) when is_list(Config) -> %% tested in the cdrlib SUITE. %%----------------------------------------------------------------- -do_register(doc) -> []; -do_register(suite) -> []; do_register(Config) when is_list(Config) -> 'oe_orber_test':'oe_register'(), ok. -do_unregister(doc) -> []; -do_unregister(suite) -> []; + do_unregister(Config) when is_list(Config) -> 'oe_orber_test':'oe_unregister'(), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: null %%----------------------------------------------------------------- -null_type(doc) -> []; -null_type(suite) -> []; null_type(Config) when is_list(Config) -> - ?line B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, 'tk_null', 'null'), - ?line {'null', <<>>, _} = cdr_decode:dec_type('tk_null', {1, 2}, B, 0, big), + B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, 'tk_null', 'null'), + {'null', <<>>, _} = cdr_decode:dec_type('tk_null', {1, 2}, B, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: void %%----------------------------------------------------------------- -void_type(doc) -> []; -void_type(suite) -> []; void_type(Config) when is_list(Config) -> - ?line B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, 'tk_void', 'ok'), - ?line {'ok', <<>>, _} = cdr_decode:dec_type('tk_void', {1, 2}, B, 0, big), + B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, 'tk_void', 'ok'), + {'ok', <<>>, _} = cdr_decode:dec_type('tk_void', {1, 2}, B, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: principal %%----------------------------------------------------------------- -principal_type(doc) -> []; -principal_type(suite) -> []; principal_type(Config) when is_list(Config) -> - ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, 'tk_Principal', "principal"), - ?line {"principal", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 2}, B0, 0, big), - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, 'tk_Principal', ""), - ?line {"", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 2}, B1, 0, big), - ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, 'tk_Principal', "principal"), - ?line {"principal", <<>>, _} = + B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, 'tk_Principal', "principal"), + {"principal", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 2}, B0, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, 'tk_Principal', ""), + {"", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 2}, B1, 0, big), + B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, 'tk_Principal', "principal"), + {"principal", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 2}, B2, 0, big), ok. @@ -188,19 +179,17 @@ objref(2) -> TP = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB}, #'IOP_IOR'{type_id="IDL:Module/Interface:1.0", profiles=[TP]}. -objref_type(doc) -> []; -objref_type(suite) -> []; objref_type(Config) when is_list(Config) -> T = {'tk_objref', "IDL:Module/Interface:1.0", "Interface"}, Objref0 = objref(0), - ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T, Objref0), - ?line {Objref0, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B0, 0, big), + B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T, Objref0), + {Objref0, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B0, 0, big), Objref1 = objref(1), - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T, Objref1), - ?line {Objref1, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T, Objref1), + {Objref1, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B1, 0, big), Objref2 = objref(2), - ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T, Objref2), - ?line {Objref2, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B2, 0, big), + B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T, Objref2), + {Objref2, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B2, 0, big), ok. @@ -208,49 +197,45 @@ objref_type(Config) when is_list(Config) -> %%----------------------------------------------------------------- %% Encode/decode test of type: struct %%----------------------------------------------------------------- -struct_type(doc) -> []; -struct_type(suite) -> []; struct_type(Config) when is_list(Config) -> T0 = {'tk_struct',"IDL:Module/Struct0:1.0", "Module_Struct0", [{"long", 'tk_long'}, {"short", 'tk_short'}, {"character", 'tk_char'}]}, S0 = #'Module_Struct0'{l=-4711, s=17, c=$a}, - ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T0, S0), - ?line {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 2}, B0, 0, big), + B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T0, S0), + {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 2}, B0, 0, big), T1 = {'tk_struct', "IDL:Module/Struct1:1.0", "Module_Struct1", [{"string", {'tk_string', 0}}, {"ushort", 'tk_ushort'}, {"ulong", 'tk_ulong'}]}, S1 = #'Module_Struct1'{s="Hi !!!!", us=17, ul=4711}, - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S1), - ?line {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S1), + {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B1, 0, big), T2 = {'tk_struct', "IDL:Module/Struct2:1.0", "Module_Struct2", [{"long_sequence", {'tk_sequence', 'tk_long', 0}}, {"enum", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}}, {"octet", 'tk_octet'}]}, S2 = #'Module_Struct2'{long_sequence=[4711, 350000, 0, -3030, -600000], e=cow, o=$X}, - ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, S2), - ?line {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 2}, B2, 0, big), + B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, S2), + {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 2}, B2, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: union %%----------------------------------------------------------------- -union_type(doc) -> []; -union_type(suite) -> []; union_type(Config) when is_list(Config) -> T0 = {'tk_union', "IDL:Module/Union:1.0", "Union", 'tk_short', 2, [{0, "First", 'tk_short'}, {1, "Second", {'tk_string', 0}}, {2, "Third", 'tk_char'}]}, S0 = #'Module_Union'{label=1, value="Foo Bar !"}, - ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T0, S0), - ?line {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 2}, B0, 0, big), + B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T0, S0), + {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 2}, B0, 0, big), S1 = #'Module_Union'{label=0, value=-17}, - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T0, S1), - ?line {S1, <<>>, _} = cdr_decode:dec_type(T0, {1, 2}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T0, S1), + {S1, <<>>, _} = cdr_decode:dec_type(T0, {1, 2}, B1, 0, big), S2 = #'Module_Union'{label=2, value=$X}, - ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T0, S2), - ?line {S2, <<>>, _} = cdr_decode:dec_type(T0, {1, 2}, B2, 0, big), + B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T0, S2), + {S2, <<>>, _} = cdr_decode:dec_type(T0, {1, 2}, B2, 0, big), T1 = {'tk_union', "IDL:Module/Union1:1.0", "Union1", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, "pig", @@ -259,14 +244,14 @@ union_type(Config) when is_list(Config) -> {"cow", "Third", {'tk_enum', "IDL:Module/Enum1:1.0", "Module_Enum1", ["orange", "banana", "apple"]}}]}, S3 = #'Module_Union1'{label=pig, value=["Foo", "Bar", "!"]}, - ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S3), - ?line {S3, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B3, 0, big), + B3 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S3), + {S3, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B3, 0, big), S4 = #'Module_Union1'{label=cow, value=apple}, - ?line B4 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S4), - ?line {S4, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B4, 0, big), + B4 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S4), + {S4, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B4, 0, big), S5 = #'Module_Union1'{label=horse, value=17}, - ?line B5 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S5), - ?line {S5, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B5, 0, big), + B5 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S5), + {S5, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B5, 0, big), T2 = {'tk_union', "IDL:Module/Union2:1.0", "Union2", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, "pig", @@ -288,54 +273,50 @@ union_type(Config) when is_list(Config) -> ["orange", "banana", "apple"]}}]}}]}, S6 = #'Module_Union2'{label=pig, value=#'Module_Union'{label=0, value=-17}}, - ?line B6 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, S6), - ?line {S6, <<>>, _} = cdr_decode:dec_type(T2, {1, 2}, B6, 0, big), + B6 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, S6), + {S6, <<>>, _} = cdr_decode:dec_type(T2, {1, 2}, B6, 0, big), S7 = #'Module_Union2'{label=cow, value=#'Module_Union1'{label=pig, value=["Foo", "Bar", "!"]}}, - ?line B7 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, S7), - ?line {S7, <<>>, _} = cdr_decode:dec_type(T2, {1, 2}, B7, 0, big), + B7 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, S7), + {S7, <<>>, _} = cdr_decode:dec_type(T2, {1, 2}, B7, 0, big), S8 = #'Module_Union2'{label=horse, value={-17, 1234567890, -987654321}}, - ?line B8 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, S8), - ?line {S8, <<>>, _} = cdr_decode:dec_type(T2, {1, 2}, B8, 0, big), + B8 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, S8), + {S8, <<>>, _} = cdr_decode:dec_type(T2, {1, 2}, B8, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: string %%----------------------------------------------------------------- -string_type(doc) -> []; -string_type(suite) -> []; string_type(Config) when is_list(Config) -> S0 = "Foo Bar ???", - ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, {'tk_string', 0}, S0), - ?line {S0, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 2}, B0, 0, big), + B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, {'tk_string', 0}, S0), + {S0, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 2}, B0, 0, big), S1 = "Yes, Foo Bar !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! more than 5000 characters", - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, {'tk_string', 0}, S1), - ?line {S1, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 2}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, {'tk_string', 0}, S1), + {S1, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 2}, B1, 0, big), S2 = "", - ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, {'tk_string', 0}, S2), - ?line {S2, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 2}, B2, 0, big), + B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, {'tk_string', 0}, S2), + {S2, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 2}, B2, 0, big), S3 = "\0", - ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, {'tk_string', 0}, S3), - ?line {S3, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 2}, B3, 0, big), + B3 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, {'tk_string', 0}, S3), + {S3, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 2}, B3, 0, big), S4 = "~n", - ?line B4 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, {'tk_string', 0}, S4), - ?line {S4, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 2}, B4, 0, big), + B4 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, {'tk_string', 0}, S4), + {S4, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 2}, B4, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: array %%----------------------------------------------------------------- -array_type(doc) -> []; -array_type(suite) -> []; array_type(Config) when is_list(Config) -> T0 = {'tk_array', 'tk_long', 5}, S0 = {-100, 0, 30000, -900100900, 123456789}, - ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T0, S0), - ?line {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 2}, B0, 0, big), + B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T0, S0), + {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 2}, B0, 0, big), T1 = {'tk_array', {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, 2}, S1 = {pig, cow}, - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S1), - ?line {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S1), + {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B1, 0, big), T2 = {'tk_array', {'tk_union', "IDL:Module/Union:1.0", "Union", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, "pig", [{"horse", "First", 'tk_ushort'}, @@ -343,18 +324,16 @@ array_type(Config) when is_list(Config) -> {"cow", "Third", {'tk_enum', "IDL:Module/Enum1:1.0", "Module_Enum1", ["orange", "banana", "apple"]}}]}, 2}, S2 = {#'Module_Union'{label=cow, value=banana}, #'Module_Union'{label=pig, value=["This", "is", "a", "test", ""]}}, - ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, S2), - ?line {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 2}, B2, 0, big), + B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, S2), + {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 2}, B2, 0, big), T3 = {'tk_array', {'tk_objref', "IDL:Module/Interface:1.0", "Interface"}, 3}, S3 = {objref(0), objref(1), objref(2)}, - ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T3, S3), - ?line {S3, <<>>, _} = cdr_decode:dec_type(T3, {1, 2}, B3, 0, big), + B3 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T3, S3), + {S3, <<>>, _} = cdr_decode:dec_type(T3, {1, 2}, B3, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: TypeCode %%----------------------------------------------------------------- -any_type(doc) -> []; -any_type(suite) -> []; any_type(Config) when is_list(Config) -> T = 'tk_any', TC = {'tk_struct', "IDL:Module/Struct2:1.0", "Module_Struct2", @@ -365,8 +344,8 @@ any_type(Config) when is_list(Config) -> S = #'Module_Struct2'{long_sequence=[4711, 350000, 0, -3030, -600000], e=cow, o=$X}, Any = #any{typecode=TC,value=S}, - ?line B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T,Any), - ?line {Any, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B, 0, big), + B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T,Any), + {Any, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B, 0, big), TC1 = {'tk_array', {'tk_union', "IDL:Module/Union:1.0", "Union", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, 1, @@ -377,16 +356,14 @@ any_type(Config) when is_list(Config) -> "apple"]}}]},2}, S1 = {#'Module_Union'{label=cow, value=banana}, #'Module_Union'{label=pig, value=["This", "is", "a", "test", ""]}}, Any1 = #any{typecode=TC1,value=S1}, - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T,Any1), - ?line {Any1, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T,Any1), + {Any1, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B1, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: TypeCode %%----------------------------------------------------------------- -typecode_type(doc) -> []; -typecode_type(suite) -> []; typecode_type(Config) when is_list(Config) -> T = 'tk_TypeCode', TC = {'tk_array', {'tk_union', "IDL:Module/Union:1.0", "Union", @@ -397,8 +374,8 @@ typecode_type(Config) when is_list(Config) -> {"cow", "Third", {'tk_enum', "IDL:Module/Enum1:1.0", "Module_Enum1", ["orange", "banana", "apple"]}}]}, 10}, - ?line B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T,TC), - ?line {TC, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B, 0, big), + B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T,TC), + {TC, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B, 0, big), TC1 = {'tk_union', "IDL:Module/Union2:1.0", "Union2", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, 2, @@ -419,15 +396,13 @@ typecode_type(Config) when is_list(Config) -> "Module_Enum1", ["orange", "banana", "apple"]}}]}}]}, - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T, TC1), - ?line {TC1, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T, TC1), + {TC1, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B1, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: TypeCode %%----------------------------------------------------------------- -alias_type(doc) -> []; -alias_type(suite) -> []; alias_type(Config) when is_list(Config) -> T = {'tk_alias', "IDL:Module/Alias:1.0", "Alias", {'tk_struct', "IDL:Module/Struct2:1.0", "Module_Struct2", @@ -437,8 +412,8 @@ alias_type(Config) when is_list(Config) -> {"octet", 'tk_octet'}]}}, S = #'Module_Struct2'{long_sequence=[4711, 350000, 0, -3030, -600000], e=cow, o=$X}, - ?line B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T,S), - ?line {S, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B, 0, big), + B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T,S), + {S, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B, 0, big), T1 = {'tk_alias', "IDL:Module/Alias1:1.0", "Alias1", {'tk_sequence', {'tk_union', "IDL:Module/Union:1.0", "Union", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", @@ -449,15 +424,13 @@ alias_type(Config) when is_list(Config) -> "Module_Enum1", ["orange", "banana", "apple"]}}]},0}}, S1 = [#'Module_Union'{label=cow, value=banana}, #'Module_Union'{label=pig, value=["This", "is", "a", "test", ""]}], - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S1), - ?line {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S1), + {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B1, 0, big), ok. %%----------------------------------------------------------------- %% Encode/decode test of type: exception %%----------------------------------------------------------------- -exception_type(doc) -> []; -exception_type(suite) -> []; exception_type(Config) when is_list(Config) -> system_exceptions(), user_exceptions(), @@ -466,43 +439,43 @@ exception_type(Config) when is_list(Config) -> system_exceptions() -> E = #'UNKNOWN'{completion_status=?COMPLETED_YES}, {system_exception, T, E} = orber_exceptions:get_def(E), - ?line B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T,E), - ?line {E, _} = cdr_decode:dec_system_exception({1, 2}, B, 0, big), + B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T,E), + {E, _} = cdr_decode:dec_system_exception({1, 2}, B, 0, big), E1 = #'INV_OBJREF'{completion_status=?COMPLETED_NO}, {system_exception, T1, E1} = orber_exceptions:get_def(E1), - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1,E1), - ?line {E1, _} = cdr_decode:dec_system_exception({1, 2}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1,E1), + {E1, _} = cdr_decode:dec_system_exception({1, 2}, B1, 0, big), E2 = #'BAD_OPERATION'{completion_status=?COMPLETED_NO}, {system_exception, T2, E2} = orber_exceptions:get_def(E2), - ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2,E2), - ?line {E2, _} = cdr_decode:dec_system_exception({1, 2}, B2, 0, big), + B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2,E2), + {E2, _} = cdr_decode:dec_system_exception({1, 2}, B2, 0, big), E3 = #'INTF_REPOS'{completion_status=?COMPLETED_MAYBE}, {system_exception, T3, E3} = orber_exceptions:get_def(E3), - ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T3,E3), - ?line {E3, _} = cdr_decode:dec_system_exception({1, 2}, B3, 0, big), + B3 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T3,E3), + {E3, _} = cdr_decode:dec_system_exception({1, 2}, B3, 0, big), ok. user_exceptions() -> E = #'Module_Except1'{rest_of_name=["I","am","testing","exceptions"], why="Error"}, {user_exception, T, E} = orber_exceptions:get_def(E), - ?line B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T, E), - ?line {E, _} = cdr_decode:dec_user_exception({1, 2}, B, 0, big), + B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T, E), + {E, _} = cdr_decode:dec_user_exception({1, 2}, B, 0, big), E1 = #'Module_Except2'{e=banana, s=#'Module_Struct2'{long_sequence=[12,-4040, 1234567898], e=horse, o=$a}}, {user_exception, T1, E1} = orber_exceptions:get_def(E1), - ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, E1), - ?line {E1, _} = cdr_decode:dec_user_exception({1, 2}, B1, 0, big), + B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, E1), + {E1, _} = cdr_decode:dec_user_exception({1, 2}, B1, 0, big), E2 = #'Module_Except3'{u=#'Module_Union1'{label=pig,value=["high","and","low"]},s=1313, o=objref(0)}, {user_exception, T2, E2} = orber_exceptions:get_def(E2), - ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, E2), - ?line {E2, _} = cdr_decode:dec_user_exception({1, 2}, B2, 0, big), + B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, E2), + {E2, _} = cdr_decode:dec_user_exception({1, 2}, B2, 0, big), E3 = #'Module_Except4'{}, {user_exception, T3, E3} = orber_exceptions:get_def(E3), - ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T3, E3), - ?line {E3, _} = cdr_decode:dec_user_exception({1, 2}, B3, 0, big), + B3 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T3, E3), + {E3, _} = cdr_decode:dec_user_exception({1, 2}, B3, 0, big), ok. %%----------------------------------------------------------------- @@ -510,7 +483,6 @@ user_exceptions() -> %% Description: Precondition the stack must be started so the %% objectkey is valid. %%----------------------------------------------------------------- -%request(suite) -> []; %request(_) -> % exit(not_implemented). @@ -518,12 +490,10 @@ user_exceptions() -> %% Test Case: reply encoding test %% Description: %%----------------------------------------------------------------- -reply(doc) -> ["Description", "more description"]; -reply(suite) -> []; reply(Config) when is_list(Config) -> R = #reply_header{service_context=[], request_id=1, reply_status='no_exception'}, - ?line B = cdr_encode:enc_reply(#giop_env{version = {1, 2}, request_id = 1, + B = cdr_encode:enc_reply(#giop_env{version = {1, 2}, request_id = 1, reply_status = 'no_exception', tc = {'tk_long', [], [{'tk_sequence', {'tk_string', 0}, 0}]}, @@ -531,7 +501,7 @@ reply(Config) when is_list(Config) -> parameters = [["foo","Bar"]], ctx = []}), - ?line {R, 1200, [["foo","Bar"]]} = + {R, 1200, [["foo","Bar"]]} = cdr_decode:dec_message({'tk_long', [], [{'tk_sequence', {'tk_string', 0},0}]}, B), @@ -541,21 +511,17 @@ reply(Config) when is_list(Config) -> %% Test Case: cancel_request encoding test %% Description: %%----------------------------------------------------------------- -cancel_request(doc) -> ["Description", "more description"]; -cancel_request(suite) -> []; cancel_request(Config) when is_list(Config) -> R = #cancel_request_header{request_id=1}, - ?line B = cdr_encode:enc_cancel_request(#giop_env{version = {1, 2}, + B = cdr_encode:enc_cancel_request(#giop_env{version = {1, 2}, request_id = 1}), - ?line R = cdr_decode:dec_message([], B), + R = cdr_decode:dec_message([], B), ok. %%----------------------------------------------------------------- %% Test Case: locate_request encoding test %% Description: %%----------------------------------------------------------------- -locate_request(doc) -> ["Description", "more description"]; -locate_request(suite) -> []; locate_request(Config) when is_list(Config) -> io:format("Function not imlpemented yet"), exit(not_implemented). @@ -564,8 +530,6 @@ locate_request(Config) when is_list(Config) -> %% Test Case: locate_reply encoding test %% Description: %%----------------------------------------------------------------- -locate_reply(doc) -> ["Description", "more description"]; -locate_reply(suite) -> []; locate_reply(Config) when is_list(Config) -> io:format("Function not imlpemented yet"), exit(not_implemented). @@ -574,22 +538,18 @@ locate_reply(Config) when is_list(Config) -> %% Test Case: close_connection encoding test %% Description: %%----------------------------------------------------------------- -close_connection(doc) -> ["Description", "more description"]; -close_connection(suite) -> []; close_connection(Config) when is_list(Config) -> - ?line B = cdr_encode:enc_close_connection(#giop_env{version = {1, 2}}), - ?line 'close_connection' = cdr_decode:dec_message([], B), + B = cdr_encode:enc_close_connection(#giop_env{version = {1, 2}}), + 'close_connection' = cdr_decode:dec_message([], B), ok. %%----------------------------------------------------------------- %% Test Case: message_error encoding test %% Description: %%----------------------------------------------------------------- -message_error(doc) -> ["Description", "more description"]; -message_error(suite) -> []; message_error(Config) when is_list(Config) -> - ?line B = cdr_encode:enc_message_error(#giop_env{version = {1, 2}}), - ?line 'message_error' = cdr_decode:dec_message([], B), + B = cdr_encode:enc_message_error(#giop_env{version = {1, 2}}), + 'message_error' = cdr_decode:dec_message([], B), ok. diff --git a/lib/orber/test/cdrlib_SUITE.erl b/lib/orber/test/cdrlib_SUITE.erl index e3482d11bd..93adc861c5 100644 --- a/lib/orber/test/cdrlib_SUITE.erl +++ b/lib/orber/test/cdrlib_SUITE.erl @@ -28,7 +28,7 @@ -include_lib("common_test/include/ct.hrl"). --define(default_timeout, ?t:minutes(3)). +-define(default_timeout, test_server:minutes(3)). %%----------------------------------------------------------------- %% External exports @@ -73,12 +73,12 @@ end_per_group(_GroupName, Config) -> %%----------------------------------------------------------------- init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -86,8 +86,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: short integer test %% Description: %%----------------------------------------------------------------- -short(doc) -> ["Description", "more description"]; -short(suite) -> []; short(_) -> short_big_loop([-32768, -4040, -1, 0, 4040, 32767]), short_little_loop([-32768, -4040, -1, 0, 4040, 32767]), @@ -96,16 +94,16 @@ short(_) -> short_big_loop([]) -> ok; short_big_loop([X |List]) -> - ?line [CodedType] = cdrlib:enc_short(X, []), - ?line {X, <<>>} = cdrlib:dec_short(big, CodedType), + [CodedType] = cdrlib:enc_short(X, []), + {X, <<>>} = cdrlib:dec_short(big, CodedType), short_big_loop(List), ok. short_little_loop([]) -> ok; short_little_loop([X |List]) -> - ?line CodedType = enc_short_little(X, []), - ?line {X, <<>>} = cdrlib:dec_short(little, CodedType), + CodedType = enc_short_little(X, []), + {X, <<>>} = cdrlib:dec_short(little, CodedType), short_little_loop(List), ok. @@ -113,16 +111,14 @@ enc_short_little(X, Message) -> list_to_binary([(X) band 16#ff, ((X) bsr 8) band 16#ff | Message]). bad_short() -> - ?line {'EXCEPTION', _} = (catch cdrlib:enc_short('atom', [])), - ?line [CodedType] = cdrlib:enc_char($a, []), - ?line {'EXIT', _} = (catch cdrlib:dec_short(big, CodedType)), + {'EXCEPTION', _} = (catch cdrlib:enc_short('atom', [])), + [CodedType] = cdrlib:enc_char($a, []), + {'EXIT', _} = (catch cdrlib:dec_short(big, CodedType)), ok. %%----------------------------------------------------------------- %% Test Case: unsigned short integer test %% Description: %%----------------------------------------------------------------- -ushort(doc) -> ["Description", "more description"]; -ushort(suite) -> []; ushort(_) -> ushort_big_loop([0, 4040, 65535]), ushort_little_loop([0, 4040, 65535]), @@ -131,16 +127,16 @@ ushort(_) -> ushort_big_loop([]) -> ok; ushort_big_loop([X |List]) -> - ?line [CodedType] = cdrlib:enc_unsigned_short(X, []), - ?line {X, <<>>} = cdrlib:dec_unsigned_short(big, CodedType), + [CodedType] = cdrlib:enc_unsigned_short(X, []), + {X, <<>>} = cdrlib:dec_unsigned_short(big, CodedType), ushort_big_loop(List), ok. ushort_little_loop([]) -> ok; ushort_little_loop([X |List]) -> - ?line CodedType = enc_ushort_little(X, []), - ?line {X, <<>>} = cdrlib:dec_unsigned_short(little, CodedType), + CodedType = enc_ushort_little(X, []), + {X, <<>>} = cdrlib:dec_unsigned_short(little, CodedType), ushort_little_loop(List), ok. @@ -153,8 +149,6 @@ bad_ushort() -> %% Test Case: long integer test %% Description: %%----------------------------------------------------------------- -long(doc) -> ["Description", "more description"]; -long(suite) -> []; long(_) -> long_big_loop([-2147483648, -40404040, -32768, -4040, -1, 0, 4040, 32767, 40404040, 2147483647]), @@ -166,16 +160,16 @@ long(_) -> long_big_loop([]) -> ok; long_big_loop([X |List]) -> - ?line [CodedType] = cdrlib:enc_long(X, []), - ?line {X, <<>>} = cdrlib:dec_long(big, CodedType), + [CodedType] = cdrlib:enc_long(X, []), + {X, <<>>} = cdrlib:dec_long(big, CodedType), long_big_loop(List), ok. long_little_loop([]) -> ok; long_little_loop([X |List]) -> - ?line CodedType = enc_long_little(X, []), - ?line {X, <<>>} = cdrlib:dec_long(little, CodedType), + CodedType = enc_long_little(X, []), + {X, <<>>} = cdrlib:dec_long(little, CodedType), long_little_loop(List), ok. @@ -190,8 +184,6 @@ bad_long() -> %% Test Case: unsigned long integer test %% Description: %%----------------------------------------------------------------- -ulong(doc) -> ["Description", "more description"]; -ulong(suite) -> []; ulong(_) -> ulong_big_loop([0, 4040, 65535, 40404040, 2147483647, 4294967295]), ulong_little_loop([0, 4040, 65535, 40404040, 2147483647, 4294967295]), @@ -201,16 +193,16 @@ ulong(_) -> ulong_big_loop([]) -> ok; ulong_big_loop([X |List]) -> - ?line [CodedType] = cdrlib:enc_unsigned_long(X, []), - ?line {X, <<>>} = cdrlib:dec_unsigned_long(big, CodedType), + [CodedType] = cdrlib:enc_unsigned_long(X, []), + {X, <<>>} = cdrlib:dec_unsigned_long(big, CodedType), ulong_big_loop(List), ok. ulong_little_loop([]) -> ok; ulong_little_loop([X |List]) -> - ?line CodedType = enc_ulong_little(X, []), - ?line {X, <<>>} = cdrlib:dec_unsigned_long(little, CodedType), + CodedType = enc_ulong_little(X, []), + {X, <<>>} = cdrlib:dec_unsigned_long(little, CodedType), ulong_little_loop(List), ok. @@ -226,8 +218,6 @@ bad_ulong() -> %% Test Case: long integer test %% Description: %%----------------------------------------------------------------- -longlong(doc) -> ["Description", "more description"]; -longlong(suite) -> []; longlong(_) -> longlong_big_loop([-2147483648, -40404040, -32768, -4040, -1, 0, 4040, 32767, 40404040, 2147483647]), @@ -239,16 +229,16 @@ longlong(_) -> longlong_big_loop([]) -> ok; longlong_big_loop([X |List]) -> - ?line [CodedType] = cdrlib:enc_longlong(X, []), - ?line {X, <<>>} = cdrlib:dec_longlong(big, CodedType), + [CodedType] = cdrlib:enc_longlong(X, []), + {X, <<>>} = cdrlib:dec_longlong(big, CodedType), longlong_big_loop(List), ok. longlong_little_loop([]) -> ok; longlong_little_loop([X |List]) -> - ?line CodedType = enc_longlong_little(X, []), - ?line {X, <<>>} = cdrlib:dec_longlong(little, CodedType), + CodedType = enc_longlong_little(X, []), + {X, <<>>} = cdrlib:dec_longlong(little, CodedType), longlong_little_loop(List), ok. @@ -264,8 +254,6 @@ bad_longlong() -> %% Test Case: unsigned long integer test %% Description: %%----------------------------------------------------------------- -ulonglong(doc) -> ["Description", "more description"]; -ulonglong(suite) -> []; ulonglong(_) -> ulonglong_big_loop([0, 4040, 65535, 40404040, 2147483647, 4294967295]), ulonglong_little_loop([0, 4040, 65535, 40404040, 2147483647, 4294967295]), @@ -275,16 +263,16 @@ ulonglong(_) -> ulonglong_big_loop([]) -> ok; ulonglong_big_loop([X |List]) -> - ?line [CodedType] = cdrlib:enc_unsigned_longlong(X, []), - ?line {X, <<>>} = cdrlib:dec_unsigned_longlong(big, CodedType), + [CodedType] = cdrlib:enc_unsigned_longlong(X, []), + {X, <<>>} = cdrlib:dec_unsigned_longlong(big, CodedType), ulonglong_big_loop(List), ok. ulonglong_little_loop([]) -> ok; ulonglong_little_loop([X |List]) -> - ?line CodedType = enc_ulonglong_little(X, []), - ?line {X, <<>>} = cdrlib:dec_unsigned_longlong(little, CodedType), + CodedType = enc_ulonglong_little(X, []), + {X, <<>>} = cdrlib:dec_unsigned_longlong(little, CodedType), ulonglong_little_loop(List), ok. @@ -302,47 +290,41 @@ bad_ulonglong() -> %% Test Case: boolean test %% Description: %%----------------------------------------------------------------- -boolean(doc) -> ["Description", "more description"]; -boolean(suite) -> []; boolean(_) -> - ?line [CodedTrue] = cdrlib:enc_bool('true', []), - ?line {'true', <<>>} = cdrlib:dec_bool(CodedTrue), - ?line [CodedFalse] = cdrlib:enc_bool('false', []), - ?line {'false', <<>>} = cdrlib:dec_bool(CodedFalse), + [CodedTrue] = cdrlib:enc_bool('true', []), + {'true', <<>>} = cdrlib:dec_bool(CodedTrue), + [CodedFalse] = cdrlib:enc_bool('false', []), + {'false', <<>>} = cdrlib:dec_bool(CodedFalse), ok. %%----------------------------------------------------------------- %% Test Case: character test %% Description: %%----------------------------------------------------------------- -character(doc) -> ["Description", "more description"]; -character(suite) -> []; character(_) -> - ?line [Coded_0] = cdrlib:enc_char($0, []), - ?line {$0, <<>>} = cdrlib:dec_char(Coded_0), - ?line [Coded_a] = cdrlib:enc_char($a, []), - ?line {$a, <<>>} = cdrlib:dec_char(Coded_a), - ?line [Coded_Z] = cdrlib:enc_char($Z, []), - ?line {$Z, <<>>} = cdrlib:dec_char(Coded_Z), - ?line [Coded_dollar] = cdrlib:enc_char($$, []), - ?line {$$, <<>>} = cdrlib:dec_char(Coded_dollar), + [Coded_0] = cdrlib:enc_char($0, []), + {$0, <<>>} = cdrlib:dec_char(Coded_0), + [Coded_a] = cdrlib:enc_char($a, []), + {$a, <<>>} = cdrlib:dec_char(Coded_a), + [Coded_Z] = cdrlib:enc_char($Z, []), + {$Z, <<>>} = cdrlib:dec_char(Coded_Z), + [Coded_dollar] = cdrlib:enc_char($$, []), + {$$, <<>>} = cdrlib:dec_char(Coded_dollar), ok. %%----------------------------------------------------------------- %% Test Case: octet test %% Description: %%----------------------------------------------------------------- -octet(doc) -> ["Description", "more description"]; -octet(suite) -> []; octet(_) -> - ?line [Coded_ff] = cdrlib:enc_octet(16#ff, []), - ?line {16#ff, <<>>} = cdrlib:dec_octet(Coded_ff), - ?line [Coded_00] = cdrlib:enc_octet(16#00, []), - ?line {16#00, <<>>} = cdrlib:dec_octet(Coded_00), - ?line [Coded_5a] = cdrlib:enc_octet(16#5a, []), - ?line {16#5a, <<>>} = cdrlib:dec_octet(Coded_5a), - ?line [Coded_48] = cdrlib:enc_octet(16#48, []), - ?line {16#48, <<>>} = cdrlib:dec_octet(Coded_48), + [Coded_ff] = cdrlib:enc_octet(16#ff, []), + {16#ff, <<>>} = cdrlib:dec_octet(Coded_ff), + [Coded_00] = cdrlib:enc_octet(16#00, []), + {16#00, <<>>} = cdrlib:dec_octet(Coded_00), + [Coded_5a] = cdrlib:enc_octet(16#5a, []), + {16#5a, <<>>} = cdrlib:dec_octet(Coded_5a), + [Coded_48] = cdrlib:enc_octet(16#48, []), + {16#48, <<>>} = cdrlib:dec_octet(Coded_48), ok. @@ -351,8 +333,6 @@ octet(_) -> %% Test Case: float test %% Description: %%----------------------------------------------------------------- -float(doc) -> ["Description", "more description"]; -float(suite) -> []; float(_) -> G = 16#7fffff / 16#800000 + 1.0, H1 = math:pow(2, 127), @@ -368,18 +348,18 @@ float(_) -> float_big_loop([]) -> ok; float_big_loop([X |List]) -> - ?line [CodedType] = cdrlib:enc_float(X, []), - ?line {Y, <<>>} = cdrlib:dec_float(big, CodedType), - ?line float_comp(X,Y), + [CodedType] = cdrlib:enc_float(X, []), + {Y, <<>>} = cdrlib:dec_float(big, CodedType), + float_comp(X,Y), float_big_loop(List), ok. float_little_loop([]) -> ok; float_little_loop([X |List]) -> - ?line [CodedType] = enc_float_little(X, []), - ?line {Y, <<>>} = cdrlib:dec_float(little, CodedType), - ?line float_comp(X,Y), + [CodedType] = enc_float_little(X, []), + {Y, <<>>} = cdrlib:dec_float(little, CodedType), + float_comp(X,Y), float_little_loop(List), ok. @@ -388,8 +368,8 @@ float_comp(X,Y) when X == 0.0, Y == 0.0 -> float_comp(X,Y) -> Div = abs(Y) / abs(X), %% io:format("~p~n", [float_to_list(Div)]), - ?line true = (Div < 1.0000001), - ?line true = (Div > 0.9999999), + true = (Div < 1.0000001), + true = (Div > 0.9999999), ok. enc_float_little(X, Message) -> @@ -399,8 +379,6 @@ enc_float_little(X, Message) -> %% Test Case: double test %% Description: %%----------------------------------------------------------------- -double(doc) -> ["Description", "more description"]; -double(suite) -> []; double(_) -> F = 16#0fffffffffffff / 16#10000000000000 + 1.0, E1 = math:pow(2, 1023), @@ -423,18 +401,18 @@ double(_) -> double_big_loop([]) -> ok; double_big_loop([X |List]) -> - ?line [CodedType] = cdrlib:enc_double(X, []), - ?line {Y, <<>>} = cdrlib:dec_double(big, CodedType), - ?line double_comp(X,Y), + [CodedType] = cdrlib:enc_double(X, []), + {Y, <<>>} = cdrlib:dec_double(big, CodedType), + double_comp(X,Y), double_big_loop(List), ok. double_little_loop([]) -> ok; double_little_loop([X |List]) -> - ?line [CodedType] = enc_double_little(X, []), - ?line {Y, <<>>} = cdrlib:dec_double(little, CodedType), - ?line double_comp(X,Y), + [CodedType] = enc_double_little(X, []), + {Y, <<>>} = cdrlib:dec_double(little, CodedType), + double_comp(X,Y), double_little_loop(List), ok. @@ -446,12 +424,10 @@ double_comp(X,Y) when X == 0.0, Y == 0.0 -> double_comp(X,Y) -> Div = abs(Y) / abs(X), %% io:format("~p~n", [float_to_list(Div)]), - ?line true = (Div < 1.00000000000001), - ?line true = (Div > 0.99999999999999), + true = (Div < 1.00000000000001), + true = (Div > 0.99999999999999), ok. -double_should_be_ok(doc) -> ["Description", "more description"]; -double_should_be_ok(suite) -> []; double_should_be_ok(_) -> F = 16#0fffffffffffff / 16#10000000000000 + 1.0, E1 = math:pow(2, 1024), % erlang can't handle this. @@ -466,29 +442,27 @@ double_should_be_ok(_) -> %% Test Case: enum test %% Description: %%----------------------------------------------------------------- -enum(doc) -> ["Description", "more description"]; -enum(suite) -> []; enum(_) -> enum_big(), enum_little(), ok. enum_big() -> - ?line [Coded_a] = cdrlib:enc_enum(a,[a,b,c],[]), - ?line {a, <<>>} = cdrlib:dec_enum(big, ["a","b","c"], Coded_a), - ?line [Coded_b] = cdrlib:enc_enum(b,[a,b,c],[]), - ?line {b, <<>>} = cdrlib:dec_enum(big, ["a","b","c"], Coded_b), - ?line [Coded_c] = cdrlib:enc_enum(c,[a,b,c],[]), - ?line {c, <<>>} = cdrlib:dec_enum(big, ["a","b","c"], Coded_c), + [Coded_a] = cdrlib:enc_enum(a,[a,b,c],[]), + {a, <<>>} = cdrlib:dec_enum(big, ["a","b","c"], Coded_a), + [Coded_b] = cdrlib:enc_enum(b,[a,b,c],[]), + {b, <<>>} = cdrlib:dec_enum(big, ["a","b","c"], Coded_b), + [Coded_c] = cdrlib:enc_enum(c,[a,b,c],[]), + {c, <<>>} = cdrlib:dec_enum(big, ["a","b","c"], Coded_c), ok. enum_little() -> - ?line Coded_a = enc_r_enum(a,[a,b,c],[]), - ?line {a, <<>>} = cdrlib:dec_enum(little, ["a","b","c"], Coded_a), - ?line Coded_b = enc_r_enum(b,[a,b,c],[]), - ?line {b, <<>>} = cdrlib:dec_enum(little, ["a","b","c"], Coded_b), - ?line Coded_c = enc_r_enum(c,[a,b,c],[]), - ?line {c, <<>>} = cdrlib:dec_enum(little, ["a","b","c"], Coded_c), + Coded_a = enc_r_enum(a,[a,b,c],[]), + {a, <<>>} = cdrlib:dec_enum(little, ["a","b","c"], Coded_a), + Coded_b = enc_r_enum(b,[a,b,c],[]), + {b, <<>>} = cdrlib:dec_enum(little, ["a","b","c"], Coded_b), + Coded_c = enc_r_enum(c,[a,b,c],[]), + {c, <<>>} = cdrlib:dec_enum(little, ["a","b","c"], Coded_c), ok. enc_r_enum(Enum, ElemList, Message) -> diff --git a/lib/orber/test/corba_SUITE.erl b/lib/orber/test/corba_SUITE.erl index 559e405226..22bb8dd2f9 100644 --- a/lib/orber/test/corba_SUITE.erl +++ b/lib/orber/test/corba_SUITE.erl @@ -32,7 +32,7 @@ -include_lib("orber/src/orber_iiop.hrl"). --define(default_timeout, ?t:minutes(5)). +-define(default_timeout, test_server:minutes(5)). -define(match(ExpectedRes,Expr), fun() -> @@ -98,14 +98,14 @@ cases() -> init_per_testcase(_Case, Config) -> Path = code:which(?MODULE), code:add_pathz(filename:join(filename:dirname(Path), "idl_output")), - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> Path = code:which(?MODULE), code:del_path(filename:join(filename:dirname(Path), "idl_output")), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -133,50 +133,48 @@ end_per_suite(Config) -> %%----------------------------------------------------------------- %% API tests for pseudo interface CORBA %%----------------------------------------------------------------- -corba_api(doc) -> ["CORBA API tests", ""]; -corba_api(suite) -> []; corba_api(_) -> NIL = corba:create_nil_objref(), - ?line ok = corba:dispose(NIL), - ?line NS = corba:resolve_initial_references("NameService"), - ?line List = corba:list_initial_services(), - ?line ["NameService"] = List, - ?line NSstring = corba:object_to_string(NS), - ?line NS1 = corba:string_to_object(NSstring), - ?line NSstring = corba:object_to_string(NS1), - ?line true = corba:add_initial_service("MyData", NS), - ?line NS = corba:resolve_initial_references("MyData"), - ?line [_,_] = corba:list_initial_services(), - ?line false = corba:remove_initial_service("Wrong"), - ?line NIL = corba:resolve_initial_references("Wrong"), - ?line NS = corba:string_to_object("corbaloc:rir:/MyData"), - ?line true = corba:remove_initial_service("MyData"), - ?line ["NameService"] = corba:list_initial_services(), + ok = corba:dispose(NIL), + NS = corba:resolve_initial_references("NameService"), + List = corba:list_initial_services(), + ["NameService"] = List, + NSstring = corba:object_to_string(NS), + NS1 = corba:string_to_object(NSstring), + NSstring = corba:object_to_string(NS1), + true = corba:add_initial_service("MyData", NS), + NS = corba:resolve_initial_references("MyData"), + [_,_] = corba:list_initial_services(), + false = corba:remove_initial_service("Wrong"), + NIL = corba:resolve_initial_references("Wrong"), + NS = corba:string_to_object("corbaloc:rir:/MyData"), + true = corba:remove_initial_service("MyData"), + ["NameService"] = corba:list_initial_services(), %% This is a collection of different stringified IOR:s (correct & incorrect) %% which we use to test IOR encode/decode. - ?line IOR1 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e3000030303000000040000000000000100000102010000000a3132372e302e302e31009d610000002dabacab3131303432343836383731005f526f6f74504f4100414c4c5f504f410000cafebabe3e2316570000000003030300000002000000210000007800010202000000010040020200000022000000080003030300000000004000400000000806066781020101010000001b0401000806066781020101010000000b40616469726f6e2e636f6d010400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c00030303000100010000000400010020000101090001010005010001000101090000000200010100050100010000000000000184000102010000000a3132372e302e302e310000000000002dabacab3131303432343836383731005f526f6f74504f4100414c4c5f504f410000cafebabe3e231657000000000303030000000300000021000000ec000102020000000200060202000000240000001c0001006600060202000000010000000a3132372e302e302e31009d600000000000000000000000000400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f00460202000000240000001c0001006600060202000000010000000a3132372e302e302e31009d62004000400000000806066781020101010000001b0401000806066781020101010000000b40616469726f6e2e636f6d010400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f00000014000000080001006600069d5e000000010000002c000303030001000100000004000100200001010900010100050100010001010900000002000101000501000100000000000000dc000102010000000a3132372e302e302e31009d5f0000002dabacab3131303432343836383731005f526f6f74504f4100414c4c5f504f410000cafebabe3e23165700000000030303000000020000002100000054000102020000000100000202000000220000000800030303000000000000000000000000000000000400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c00030303000100010000000400010020000101090001010005010001000101090000000200010100050100010000000000000080000102010000000a3132372e302e302e31009d5d0000002dabacab3131303432343836383731005f526f6f74504f4100414c4c5f504f410000cafebabe3e2316570000000003030300000001000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")), - ?line IOR2 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e30000303030000000100000000000000e0000102010000000a3132372e302e302e31009d5f00000034abacab3131303432343836383731005f526f6f74504f410049494f505f43534976325f504f410000cafebabe3e23165700000000000000020000002100000054000102020000000100000202000000220000000800030303000000000000000000000000000000000400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")), - ?line IOR3 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e3000030303000000010000000000000108000102010000000a3132372e302e302e31009d6100000037abacab3131303432343836383731005f526f6f74504f410049494f505f43534976325f55505f504f410000cafebabe3e231657000000000100000002000000210000007800010202000000010040020200000022000000080003030300000000004000400000000806066781020101010000001b0401000806066781020101010000000b40616469726f6e2e636f6d010400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")), - ?line IOR4 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e3000030303000000010000000000000080000102010000000a3132372e302e302e31009d5d0000002eabacab3131303432343836383731005f526f6f74504f410049494f505f504f410000cafebabe3e23165700000000020200000001000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")), - ?line IOR5 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e30000303030000000100000000000000fc000102010000000a3132372e302e302e3100000000000033abacab3131303432343836383731005f526f6f74504f4100544c535f43534976325f504f410000cafebabe3e231657000000000100000002000000210000007000010202000000010006020200000024000000220001006600060202000000010000000f3132382e3233302e3230382e353500019d6000000000020200000000000000000400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")), - ?line IOR6 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e3000030303000000010000000000000124000102010000000a3132372e302e302e3100000000000036abacab3131303432343836383731005f526f6f74504f4100544c535f43534976325f55505f504f410000cafebabe3e23165700000000020200000002000000210000009400010202000000010046020200000024000000220001006600060202000000010000000f3132382e3233302e3230382e353500019d620040004002020000000806066781020101010000001b0401000806066781020101010000000b40616469726f6e2e636f6d010400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")), - ?line IOR7 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e3000030303000000010000000000000090000102010000000a3132372e302e302e310000000000002dabacab3131303432343836383731005f526f6f74504f4100544c535f504f410000cafebabe3e231657000000000303030000000200000014000000080001006600069d5e000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")), - ?line IOR1 = corba:string_to_object(corba:object_to_string(IOR1)), - ?line IOR2 = corba:string_to_object(corba:object_to_string(IOR2)), - ?line IOR3 = corba:string_to_object(corba:object_to_string(IOR3)), - ?line IOR4 = corba:string_to_object(corba:object_to_string(IOR4)), - ?line IOR5 = corba:string_to_object(corba:object_to_string(IOR5)), - ?line IOR6 = corba:string_to_object(corba:object_to_string(IOR6)), - ?line IOR7 = corba:string_to_object(corba:object_to_string(IOR7)), - ?line ?match(ok, corba:print_object(IOR1)), - ?line ?match(ok, corba:print_object(IOR2)), - ?line ?match(ok, corba:print_object(IOR3)), - ?line ?match(ok, corba:print_object(IOR4)), - ?line ?match(ok, corba:print_object(IOR5)), - ?line ?match(ok, corba:print_object(IOR6)), - ?line ?match(ok, corba:print_object(IOR7)), - ?line ?match(ok, corba:print_object("IOR:000303030000000d49444c3a746573743a312e300003030300000002000000000000003000010001000000136d792e686f73742e65726c616e672e6f72670001801a02020000000c424f410a00000a0000070a010000000100000024000303030000000100000001000000140003030300010001000000000001010900000000")), + IOR1 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e3000030303000000040000000000000100000102010000000a3132372e302e302e31009d610000002dabacab3131303432343836383731005f526f6f74504f4100414c4c5f504f410000cafebabe3e2316570000000003030300000002000000210000007800010202000000010040020200000022000000080003030300000000004000400000000806066781020101010000001b0401000806066781020101010000000b40616469726f6e2e636f6d010400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c00030303000100010000000400010020000101090001010005010001000101090000000200010100050100010000000000000184000102010000000a3132372e302e302e310000000000002dabacab3131303432343836383731005f526f6f74504f4100414c4c5f504f410000cafebabe3e231657000000000303030000000300000021000000ec000102020000000200060202000000240000001c0001006600060202000000010000000a3132372e302e302e31009d600000000000000000000000000400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f00460202000000240000001c0001006600060202000000010000000a3132372e302e302e31009d62004000400000000806066781020101010000001b0401000806066781020101010000000b40616469726f6e2e636f6d010400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f00000014000000080001006600069d5e000000010000002c000303030001000100000004000100200001010900010100050100010001010900000002000101000501000100000000000000dc000102010000000a3132372e302e302e31009d5f0000002dabacab3131303432343836383731005f526f6f74504f4100414c4c5f504f410000cafebabe3e23165700000000030303000000020000002100000054000102020000000100000202000000220000000800030303000000000000000000000000000000000400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c00030303000100010000000400010020000101090001010005010001000101090000000200010100050100010000000000000080000102010000000a3132372e302e302e31009d5d0000002dabacab3131303432343836383731005f526f6f74504f4100414c4c5f504f410000cafebabe3e2316570000000003030300000001000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")), + IOR2 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e30000303030000000100000000000000e0000102010000000a3132372e302e302e31009d5f00000034abacab3131303432343836383731005f526f6f74504f410049494f505f43534976325f504f410000cafebabe3e23165700000000000000020000002100000054000102020000000100000202000000220000000800030303000000000000000000000000000000000400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")), + IOR3 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e3000030303000000010000000000000108000102010000000a3132372e302e302e31009d6100000037abacab3131303432343836383731005f526f6f74504f410049494f505f43534976325f55505f504f410000cafebabe3e231657000000000100000002000000210000007800010202000000010040020200000022000000080003030300000000004000400000000806066781020101010000001b0401000806066781020101010000000b40616469726f6e2e636f6d010400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")), + IOR4 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e3000030303000000010000000000000080000102010000000a3132372e302e302e31009d5d0000002eabacab3131303432343836383731005f526f6f74504f410049494f505f504f410000cafebabe3e23165700000000020200000001000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")), + IOR5 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e30000303030000000100000000000000fc000102010000000a3132372e302e302e3100000000000033abacab3131303432343836383731005f526f6f74504f4100544c535f43534976325f504f410000cafebabe3e231657000000000100000002000000210000007000010202000000010006020200000024000000220001006600060202000000010000000f3132382e3233302e3230382e353500019d6000000000020200000000000000000400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")), + IOR6 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e3000030303000000010000000000000124000102010000000a3132372e302e302e3100000000000036abacab3131303432343836383731005f526f6f74504f4100544c535f43534976325f55505f504f410000cafebabe3e23165700000000020200000002000000210000009400010202000000010046020200000024000000220001006600060202000000010000000f3132382e3233302e3230382e353500019d620040004002020000000806066781020101010000001b0401000806066781020101010000000b40616469726f6e2e636f6d010400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")), + IOR7 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e3000030303000000010000000000000090000102010000000a3132372e302e302e310000000000002dabacab3131303432343836383731005f526f6f74504f4100544c535f504f410000cafebabe3e231657000000000303030000000200000014000000080001006600069d5e000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")), + IOR1 = corba:string_to_object(corba:object_to_string(IOR1)), + IOR2 = corba:string_to_object(corba:object_to_string(IOR2)), + IOR3 = corba:string_to_object(corba:object_to_string(IOR3)), + IOR4 = corba:string_to_object(corba:object_to_string(IOR4)), + IOR5 = corba:string_to_object(corba:object_to_string(IOR5)), + IOR6 = corba:string_to_object(corba:object_to_string(IOR6)), + IOR7 = corba:string_to_object(corba:object_to_string(IOR7)), + ?match(ok, corba:print_object(IOR1)), + ?match(ok, corba:print_object(IOR2)), + ?match(ok, corba:print_object(IOR3)), + ?match(ok, corba:print_object(IOR4)), + ?match(ok, corba:print_object(IOR5)), + ?match(ok, corba:print_object(IOR6)), + ?match(ok, corba:print_object(IOR7)), + ?match(ok, corba:print_object("IOR:000303030000000d49444c3a746573743a312e300003030300000002000000000000003000010001000000136d792e686f73742e65726c616e672e6f72670001801a02020000000c424f410a00000a0000070a010000000100000024000303030000000100000001000000140003030300010001000000000001010900000000")), [IP] = ?match([_], orber:host()), ?match(#'IOP_IOR'{profiles=[#'IOP_TaggedProfile' {tag=?TAG_INTERNET_IOP, @@ -199,124 +197,112 @@ corba_api(_) -> %%----------------------------------------------------------------- %% API tests for interface BOA %%----------------------------------------------------------------- -boa_api(doc) -> ["BOA API tests", ""]; -boa_api(suite) -> []; boa_api(_) -> ok. %%----------------------------------------------------------------- %% API tests for interface OBJECT %%----------------------------------------------------------------- -object_api(doc) -> ["Object API tests", ""]; -object_api(suite) -> []; object_api(_) -> - ?line oe_orber_test_server:oe_register(), - ?line EC = orber_test_server:oe_create(), - ?line NS = corba:resolve_initial_references("NameService"), + oe_orber_test_server:oe_register(), + EC = orber_test_server:oe_create(), + NS = corba:resolve_initial_references("NameService"), %% testing corba_object:is_a(Obj, IFRID) locally. - ?line orber_test_lib:corba_object_tests(EC, NS), + orber_test_lib:corba_object_tests(EC, NS), - ?line ?match(false, corba_object:non_existent(NS)), + ?match(false, corba_object:non_existent(NS)), - ?line corba:dispose(EC), - ?line oe_orber_test_server:oe_unregister(), + corba:dispose(EC), + oe_orber_test_server:oe_unregister(), ok. %%----------------------------------------------------------------- %% API tests for orbers main module %%----------------------------------------------------------------- -orber_api(doc) -> ["orber API tests", ""]; -orber_api(suite) -> []; orber_api(_) -> - ?line ok = orber:uninstall(), - ?line orber:install([node()]), - ?line application:start(orber), - ?line NodeList = orber:orber_nodes(), - ?line NL = node(), - ?line [NL] = NodeList, + ok = orber:uninstall(), + orber:install([node()]), + application:start(orber), + NodeList = orber:orber_nodes(), + NL = node(), + [NL] = NodeList, ok. %%----------------------------------------------------------------- %% API tests for exception mapping %%----------------------------------------------------------------- -exception_info_api(doc) -> ["orber API tests", ""]; -exception_info_api(suite) -> []; exception_info_api(_) -> - ?line {ok, S1} = orber:exception_info({'EXCEPTION',{'MARSHAL',[],1163001858,'COMPLETED_NO'}}), - ?line {ok, S2} = orber:exception_info({'EXCEPTION',{'MARSHAL',[],1330446337,'COMPLETED_NO'}}), - ?line {ok, S3} = orber:exception_info({'EXCEPTION',{'MARSHAL',[],1398079490,'COMPLETED_NO'}}), - ?line {ok, S4} = orber:exception_info({'EXCEPTION',{'MARSHAL',[],1347813377,'COMPLETED_NO'}}), - ?line {ok, S5} = orber:exception_info({'EXCEPTION', {'CosNaming_NamingContext_InvalidName',"IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"}}), - ?line error_logger:info_msg("~s", [S1]), - ?line error_logger:info_msg("~s", [S2]), - ?line error_logger:info_msg("~s", [S3]), - ?line error_logger:info_msg("~s", [S4]), - ?line error_logger:info_msg("~s", [S5]), + {ok, S1} = orber:exception_info({'EXCEPTION',{'MARSHAL',[],1163001858,'COMPLETED_NO'}}), + {ok, S2} = orber:exception_info({'EXCEPTION',{'MARSHAL',[],1330446337,'COMPLETED_NO'}}), + {ok, S3} = orber:exception_info({'EXCEPTION',{'MARSHAL',[],1398079490,'COMPLETED_NO'}}), + {ok, S4} = orber:exception_info({'EXCEPTION',{'MARSHAL',[],1347813377,'COMPLETED_NO'}}), + {ok, S5} = orber:exception_info({'EXCEPTION', {'CosNaming_NamingContext_InvalidName',"IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"}}), + error_logger:info_msg("~s", [S1]), + error_logger:info_msg("~s", [S2]), + error_logger:info_msg("~s", [S3]), + error_logger:info_msg("~s", [S4]), + error_logger:info_msg("~s", [S5]), ok. %%----------------------------------------------------------------- %% API tests for orbers pseudo objects. %%----------------------------------------------------------------- -orber_pseudo_objects(doc) -> ["orber_pseudo_objects API tests", ""]; -orber_pseudo_objects(suite) -> []; orber_pseudo_objects(_) -> - ?line oe_orber_test_server:oe_register(), + oe_orber_test_server:oe_register(), Obj1=(catch orber_test_server:oe_create(state,[{pseudo,true}, {local_typecheck, true}])), - ?line ?match({_,pseudo,orber_test_server_impl, _,_, _}, Obj1), + ?match({_,pseudo,orber_test_server_impl, _,_, _}, Obj1), Obj2=(catch orber_test_server:oe_create([],[{pseudo, truce}])), - ?line ?match({'EXCEPTION',{'BAD_PARAM',[],_,'COMPLETED_NO'}}, Obj2), + ?match({'EXCEPTION',{'BAD_PARAM',[],_,'COMPLETED_NO'}}, Obj2), spawn(?MODULE, pseudo_calls, [20, Obj1]), - ?line ?match({ok, 10000}, orber_test_server:pseudo_call_delay(Obj1, 10000)), + ?match({ok, 10000}, orber_test_server:pseudo_call_delay(Obj1, 10000)), spawn(?MODULE, pseudo_casts, [20, Obj1]), - ?line ?match(ok, orber_test_server:pseudo_cast_delay(Obj1, 10000)), + ?match(ok, orber_test_server:pseudo_cast_delay(Obj1, 10000)), - ?line ?match('object_here', corba:locate(Obj1)), + ?match('object_here', corba:locate(Obj1)), - ?line NS = corba:resolve_initial_references("NameService"), + NS = corba:resolve_initial_references("NameService"), - ?line orber_test_lib:corba_object_tests(Obj1, NS), + orber_test_lib:corba_object_tests(Obj1, NS), - ?line ?match("IDL:omg.org/orber_test/server:1.0",orber_test_server:typeID()), + ?match("IDL:omg.org/orber_test/server:1.0",orber_test_server:typeID()), %% Test if exceptions are handled properly. - ?line ?match({'EXCEPTION',{'BAD_QOS',_,_,_}}, + ?match({'EXCEPTION',{'BAD_QOS',_,_,_}}, orber_test_server:pseudo_call_raise_exc(Obj1, 1)), - ?line ?match({'EXCEPTION',{'BAD_QOS',_,_,_}}, + ?match({'EXCEPTION',{'BAD_QOS',_,_,_}}, orber_test_server:pseudo_call_raise_exc(Obj1, 2)), %% Test if exit is handled properly. - ?line ?match({'EXCEPTION',{'TRANSIENT',_,_,_}}, + ?match({'EXCEPTION',{'TRANSIENT',_,_,_}}, orber_test_server:stop_brutal(Obj1)), orber_test_lib:test_coding(Obj1, true), %% possible to use subobject key? - ?line ?match(state, binary_to_term(corba:get_subobject_key(Obj1))), + ?match(state, binary_to_term(corba:get_subobject_key(Obj1))), - ?line ?match({'EXCEPTION',{'INV_OBJREF',[],_,'COMPLETED_NO'}}, + ?match({'EXCEPTION',{'INV_OBJREF',[],_,'COMPLETED_NO'}}, corba:get_pid(Obj1)), - ?line ?match(false, corba_object:non_existent(Obj1)), + ?match(false, corba_object:non_existent(Obj1)), - ?line ?match(ok, corba:dispose(Obj1)), + ?match(ok, corba:dispose(Obj1)), - ?line ?match(false, corba_object:non_existent(Obj1)), + ?match(false, corba_object:non_existent(Obj1)), %% Try if it's possible to stringify and recover the object reference. IOR_string = (catch corba:object_to_string(Obj1)), Obj3 =(catch corba:string_to_object(IOR_string)), - ?line ?match(IOR_string, corba:object_to_string(Obj3)), + ?match(IOR_string, corba:object_to_string(Obj3)), Obj4=(catch orber_test_server:oe_create(undefined,[{pseudo,true}])), - ?line ?match(ok, corba:dispose(Obj4)), - ?line oe_orber_test_server:oe_unregister(), + ?match(ok, corba:dispose(Obj4)), + oe_orber_test_server:oe_unregister(), ok. %%----------------------------------------------------------------- %% API tests for orbers objectkeys server. %%----------------------------------------------------------------- -orber_objectkeys_api(doc) -> ["orber_objectkeys API tests", ""]; -orber_objectkeys_api(suite) -> []; orber_objectkeys_api(_) -> Obj0=(catch orber_test_server:oe_create([], [{sup_child, true}])), Obj1=(catch orber_test_server:oe_create([], [{persistent, true}, @@ -327,23 +313,23 @@ orber_objectkeys_api(_) -> %% Obj0 is supposed to be a child started by a supervisor (r6) which %% handles not only {ok, Pid} but also {ok,Pid, Returnvalue}. In our %% case the Returnvalue is an ObjectRef. - ?line ?match({ok,_,{_,key,_, _,_, _}}, Obj0), + ?match({ok,_,{_,key,_, _,_, _}}, Obj0), {ok,_,Obj0Ref} = Obj0, corba:dispose(Obj0Ref), %% Only 'global' servers are at the moment allowed to be persistent. - ?line ?match({'EXCEPTION',{'BAD_PARAM',[],_,'COMPLETED_NO'}}, Obj1), + ?match({'EXCEPTION',{'BAD_PARAM',[],_,'COMPLETED_NO'}}, Obj1), %% We created a persistent object successfully. - ?line ?match({_,key,_,_,_, _}, Obj2), + ?match({_,key,_,_,_, _}, Obj2), %% Get key and Pid {_,_,Key,_,_, _} = Obj2, PID=(catch orber_objectkeys:get_pid(Key)), %% Use the two different ways to look up if the server is persistent. - ?line ?match(true, orber_objectkeys:is_persistent(Key)), - ?line ?match(true, orber_objectkeys:is_persistent(PID)), + ?match(true, orber_objectkeys:is_persistent(Key)), + ?match(true, orber_objectkeys:is_persistent(PID)), %% Create servers using every possible way. O1=(catch orber_test_server:oe_create()), @@ -359,42 +345,42 @@ orber_objectkeys_api(_) -> O8=(catch orber_test_server:oe_create_link([], {'global', {o8, obj}})), %% Test if all the object references are correct. - ?line ?match({_,key,_,_,_, _}, O1), - ?line ?match({_,key,_,_,_, _}, O2), - ?line ?match({_,key,_,_,_, _}, O3), - ?line ?match({_,key,_,_,_, _}, O4), - ?line ?match({_, registered, o5, _,_, _}, O5), - ?line ?match({_,key,_,_,_, _}, O6), - ?line ?match({_, registered, o7, _,_, _}, O7), - ?line ?match({_,key,_,_,_, _}, O8), + ?match({_,key,_,_,_, _}, O1), + ?match({_,key,_,_,_, _}, O2), + ?match({_,key,_,_,_, _}, O3), + ?match({_,key,_,_,_, _}, O4), + ?match({_, registered, o5, _,_, _}, O5), + ?match({_,key,_,_,_, _}, O6), + ?match({_, registered, o7, _,_, _}, O7), + ?match({_,key,_,_,_, _}, O8), %% Test if persistent. {_,_,Key1,_,_, _} = O1, PID1=(catch orber_objectkeys:get_pid(Key1)), - ?line ?match(false, orber_objectkeys:is_persistent(Key1)), - ?line ?match(false, orber_objectkeys:is_persistent(PID1)), + ?match(false, orber_objectkeys:is_persistent(Key1)), + ?match(false, orber_objectkeys:is_persistent(PID1)), %% all the servers are alive(?!). - ?line ?match(false, corba_object:non_existent(O1)), - ?line ?match(false, corba_object:non_existent(O2)), - ?line ?match(false, corba_object:non_existent(O3)), - ?line ?match(false, corba_object:non_existent(O4)), - ?line ?match(false, corba_object:non_existent(O5)), - ?line ?match(false, corba_object:non_existent(O6)), - ?line ?match(false, corba_object:non_existent(O7)), - ?line ?match(false, corba_object:non_existent(O8)), - ?line ?match(false, corba_object:non_existent(Obj2)), + ?match(false, corba_object:non_existent(O1)), + ?match(false, corba_object:non_existent(O2)), + ?match(false, corba_object:non_existent(O3)), + ?match(false, corba_object:non_existent(O4)), + ?match(false, corba_object:non_existent(O5)), + ?match(false, corba_object:non_existent(O6)), + ?match(false, corba_object:non_existent(O7)), + ?match(false, corba_object:non_existent(O8)), + ?match(false, corba_object:non_existent(Obj2)), %% Does locate work? - ?line ?match('object_here', corba:locate(O1)), - ?line ?match('object_here', corba:locate(O2)), - ?line ?match('object_here', corba:locate(O3)), - ?line ?match('object_here', corba:locate(O4)), - ?line ?match('object_here', corba:locate(O5)), - ?line ?match('object_here', corba:locate(O6)), - ?line ?match('object_here', corba:locate(O7)), - ?line ?match('object_here', corba:locate(O8)), - ?line ?match('object_here', corba:locate(Obj2)), + ?match('object_here', corba:locate(O1)), + ?match('object_here', corba:locate(O2)), + ?match('object_here', corba:locate(O3)), + ?match('object_here', corba:locate(O4)), + ?match('object_here', corba:locate(O5)), + ?match('object_here', corba:locate(O6)), + ?match('object_here', corba:locate(O7)), + ?match('object_here', corba:locate(O8)), + ?match('object_here', corba:locate(Obj2)), %% Terminate all servers with reason 'normal'. catch corba:dispose(O1), @@ -415,15 +401,15 @@ orber_objectkeys_api(_) -> %% all the servers are dead(?!). If one of these test-cases %% fails the only error can be that we didn't sleep long enough, i.e., %% try a longer timeout. If still fails something is wrong. - ?line ?match(true, corba_object:non_existent(O1)), - ?line ?match(true, corba_object:non_existent(O2)), - ?line ?match(true, corba_object:non_existent(O3)), - ?line ?match(true, corba_object:non_existent(O4)), - ?line ?match(true, corba_object:non_existent(O5)), - ?line ?match(true, corba_object:non_existent(O6)), - ?line ?match(true, corba_object:non_existent(O7)), - ?line ?match(true, corba_object:non_existent(O8)), - ?line ?match(true, corba_object:non_existent(Obj2)), + ?match(true, corba_object:non_existent(O1)), + ?match(true, corba_object:non_existent(O2)), + ?match(true, corba_object:non_existent(O3)), + ?match(true, corba_object:non_existent(O4)), + ?match(true, corba_object:non_existent(O5)), + ?match(true, corba_object:non_existent(O6)), + ?match(true, corba_object:non_existent(O7)), + ?match(true, corba_object:non_existent(O8)), + ?match(true, corba_object:non_existent(Obj2)), %% Create a new persistent server. Obj3=(catch orber_test_server:oe_create([], @@ -431,10 +417,10 @@ orber_objectkeys_api(_) -> {regname, {global,{obj2, 12345}}}])), %% OK?! - ?line ?match({_,key,_,_,_, _}, Obj3), + ?match({_,key,_,_,_, _}, Obj3), %% Try to create a server with the same name (naturally it fails). - ?line ?match({'EXCEPTION',{'INTERNAL',[],_,'COMPLETED_NO'}}, + ?match({'EXCEPTION',{'INTERNAL',[],_,'COMPLETED_NO'}}, orber_test_server:oe_create([], [{persistent, true}, {regname, {global,{obj2, 12345}}}])), @@ -449,20 +435,20 @@ orber_objectkeys_api(_) -> %% Give time to clean up. timer:sleep(2000), - ?line ?match({'EXCEPTION',{'TRANSIENT',[],_,'COMPLETED_NO'}}, + ?match({'EXCEPTION',{'TRANSIENT',[],_,'COMPLETED_NO'}}, gen_server:call(orber_objkeyserver, {get_pid, Key3}, infinity)), - ?line ?match(false,corba_object:non_existent(Obj3)), + ?match(false,corba_object:non_existent(Obj3)), %% Run gc wit a "huge" time-limit. Will not erase the dead object. orber_objectkeys:gc(10000), - ?line ?match(false,corba_object:non_existent(Obj3)), + ?match(false,corba_object:non_existent(Obj3)), %% Run gc with minimum time-limit. Will erase the dead object. orber_objectkeys:gc(0), - ?line ?match(true,corba_object:non_existent(Obj3)), + ?match(true,corba_object:non_existent(Obj3)), %% Create a new persistent server. Obj4=(catch orber_test_server:oe_create([], @@ -477,22 +463,22 @@ orber_objectkeys_api(_) -> %% Give time to clean up. timer:sleep(2000), -% ?line ?match({'EXCEPTION',{'COMM_FAILURE',[],0,'COMPLETED_NO'}}, - ?line ?match({error, _}, +% ?match({'EXCEPTION',{'COMM_FAILURE',[],0,'COMPLETED_NO'}}, + ?match({error, _}, corba:get_pid(Obj4)), - ?line ?match(false,corba_object:non_existent(Obj4)), + ?match(false,corba_object:non_existent(Obj4)), %% Restart the object. Obj5=(catch orber_test_server:oe_create([], [{persistent, true}, {regname, {global,{obj2, 12345}}}])), %% OK?! - ?line ?match({_,key,_,_,_, _}, Obj5), + ?match({_,key,_,_,_, _}, Obj5), %% Run gc with minimum time-limit. orber_objectkeys:gc(0), - ?line ?match(false,corba_object:non_existent(Obj5)), + ?match(false,corba_object:non_existent(Obj5)), corba:dispose(Obj5), ok. @@ -508,337 +494,327 @@ orber_objectkeys_api(_) -> -callback_ok_api(doc) -> ["Successful callbak API tests", ""]; -callback_ok_api(suite) -> []; +%% Successful callback API tests callback_ok_api(_) -> %% Init - ?line ?match({ok, {?DO_EXIT, state}}, corba:handle_init(?MODULE, {?DO_EXIT_FLAG, state})), + ?match({ok, {?DO_EXIT, state}}, corba:handle_init(?MODULE, {?DO_EXIT_FLAG, state})), %% Terminate - ?line ?match(ok, corba:handle_terminate(?MODULE, "reason", {?DO_EXIT, state})), + ?match(ok, corba:handle_terminate(?MODULE, "reason", {?DO_EXIT, state})), %% Handle_call - ?line ?match({reply,ok,{?DO_EXIT,state}}, + ?match({reply,ok,{?DO_EXIT,state}}, corba:handle_call(?MODULE, foo, [], {?DO_EXIT, state}, [], false, false)), %% Handle_cast - ?line ?match({noreply, {?DO_EXIT,state}}, + ?match({noreply, {?DO_EXIT,state}}, corba:handle_cast(?MODULE, foo_1w, [], {?DO_EXIT, state}, [], false)), %% Handle_call precond/postcond - ?line ?match({reply, ok, {?DO_EXIT, state}}, + ?match({reply, ok, {?DO_EXIT, state}}, corba:handle_call(?MODULE, foo, [], {?DO_EXIT, state}, [], false, false, {?MODULE, precond}, {?MODULE, postcond}, ?MODULE)), %% Handle_cast precond/postcond - ?line ?match({noreply, {?DO_EXIT, state}}, + ?match({noreply, {?DO_EXIT, state}}, corba:handle_cast(?MODULE, foo_1w, [], {?DO_EXIT, state}, [], false, {?MODULE, precond}, {?MODULE, postcond}, ?MODULE)), %% Handle_info - ?line ?match({noreply, {?DO_EXIT, state}}, + ?match({noreply, {?DO_EXIT, state}}, corba:handle_info(?MODULE, "info", {?DO_EXIT, state})), ok. -callback_arity_api(doc) -> ["callbak arity API tests", ""]; -callback_arity_api(suite) -> []; +%% Callback arity API tests callback_arity_api(_) -> %% Handle_call - stay-alive == false - ?line ?match({'EXIT', {undef,_}}, + ?match({'EXIT', {undef,_}}, corba:handle_call(?MODULE, foo, [to, many, arguments], {?DO_EXIT, state}, [], false, false)), %% Handle_call - stay-alive == true - ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _}, + ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _}, corba:handle_call(?MODULE, foo, [to, many, arguments], {?NO_EXIT, state}, [], false, false)), %% Handle_call - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_call(?MODULE, foo, [], {?DO_EXIT, arity}, [], false, false)), %% Handle_call - stay-alive == true - ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _}, + ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _}, corba:handle_call(?MODULE, foo, [], {?NO_EXIT, arity}, [], false, false)), %% Handle_cast - stay-alive == false - ?line ?match({'EXIT', {undef,_}}, + ?match({'EXIT', {undef,_}}, corba:handle_cast(?MODULE, foo_1w, [to, many, arguments], {?DO_EXIT, state}, [], false)), %% Handle_cast - stay-alive == true - ?line ?match({noreply, {?NO_EXIT, state}}, + ?match({noreply, {?NO_EXIT, state}}, corba:handle_cast(?MODULE, foo_1w, [to, many, arguments], {?NO_EXIT, state}, [], false)), %% Handle_cast - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_cast(?MODULE, foo_1w, [], {?DO_EXIT, arity}, [], false)), %% Handle_cast - stay-alive == true - ?line ?match({noreply, {?NO_EXIT, arity}}, + ?match({noreply, {?NO_EXIT, arity}}, corba:handle_cast(?MODULE, foo_1w, [], {?NO_EXIT, arity}, [], false)), %% Handle_info - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_info(?MODULE, "info", {?DO_EXIT, arity})), %% Handle_info - stay-alive == true - ?line ?match({noreply, {?NO_EXIT, arity}}, + ?match({noreply, {?NO_EXIT, arity}}, corba:handle_info(?MODULE, "info", {?NO_EXIT, arity})), ok. -callback_module_api(doc) -> ["Module callbak API tests", ""]; -callback_module_api(suite) -> []; +%% Module callback API tests callback_module_api(_) -> %% Handle_call - stay-alive == false - ?line ?match({'EXIT', {undef,_}}, + ?match({'EXIT', {undef,_}}, corba:handle_call(wrong_mod, foo, [], {?DO_EXIT, state}, [], false, false)), %% Handle_call - stay-alive == true - ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _}, + ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _}, corba:handle_call(wrong_mod, foo, [], {?NO_EXIT, state}, [], false, false)), %% Handle_cast - stay-alive == false - ?line ?match({'EXIT', {undef,_}}, + ?match({'EXIT', {undef,_}}, corba:handle_cast(wrong_mod, foo_1w, [], {?DO_EXIT, state}, [], false)), %% Handle_cast - stay-alive == true - ?line ?match({noreply, {?NO_EXIT, state}}, + ?match({noreply, {?NO_EXIT, state}}, corba:handle_cast(wrong_mod, foo_1w, [], {?NO_EXIT, state}, [], false)), %% Handle_info - stay-alive == false. - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_info(wrong_mod, "info", {?DO_EXIT, state})), %% Handle_info - stay-alive == true. - ?line ?match({noreply, {?NO_EXIT, state}}, + ?match({noreply, {?NO_EXIT, state}}, corba:handle_info(wrong_mod, "info", {?NO_EXIT, state})), ok. -callback_function_api(doc) -> ["Function callbak API tests", ""]; -callback_function_api(suite) -> []; +%% Function callback API tests callback_function_api(_) -> %% Handle_call - stay-alive == false - ?line ?match({'EXIT', {undef,_}}, + ?match({'EXIT', {undef,_}}, corba:handle_call(?MODULE, bad_function, [], {?DO_EXIT, state}, [], false, false)), %% Handle_call - stay-alive == true - ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _}, + ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _}, corba:handle_call(?MODULE, bad_function, [], {?NO_EXIT, state}, [], false, false)), %% Handle_cast - stay-alive == false - ?line ?match({'EXIT', {undef,_}}, + ?match({'EXIT', {undef,_}}, corba:handle_cast(?MODULE, bad_function, [], {?DO_EXIT, state}, [], false)), %% Handle_cast - stay-alive == true - ?line ?match({noreply, {?NO_EXIT, state}}, + ?match({noreply, {?NO_EXIT, state}}, corba:handle_cast(?MODULE, bad_function, [], {?NO_EXIT, state}, [], false)), %% Handle_info - stay-alive == false. Note, we cannot use ?MODULE here. - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_info(corba, "info", {?DO_EXIT, state})), %% Handle_info - stay-alive == true. Note, we cannot use ?MODULE here. - ?line ?match({noreply, {?NO_EXIT, state}}, + ?match({noreply, {?NO_EXIT, state}}, corba:handle_info(corba, "info", {?NO_EXIT, state})), ok. -callback_precond_api(doc) -> ["Precond callbak API tests", ""]; -callback_precond_api(suite) -> []; +%% Precond callback API tests callback_precond_api(_) -> %% Handle_call - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_call(?MODULE, foo, [], {?DO_EXIT, state}, [], false, false, {wrong_mod, precond}, {?MODULE, postcond}, ?MODULE)), %% Handle_call - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_call(?MODULE, foo, [], {?DO_EXIT, state}, [], false, false, {?MODULE, bad_precond}, {?MODULE, postcond}, ?MODULE)), %% Handle_call - stay-alive == true - ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}},_}, + ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}},_}, corba:handle_call(?MODULE, foo, [], {?NO_EXIT, state}, [], false, false, {wrong_mod, precond}, {?MODULE, postcond}, ?MODULE)), %% Handle_call - stay-alive == true - ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}},_}, + ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}},_}, corba:handle_call(?MODULE, foo, [], {?NO_EXIT, state}, [], false, false, {?MODULE, bad_precond}, {?MODULE, postcond}, ?MODULE)), %% Handle_cast - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_cast(?MODULE, foo_1w, [], {?DO_EXIT, state}, [], false, {wrong_mod, precond}, {?MODULE, postcond}, ?MODULE)), %% Handle_cast - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_cast(?MODULE, foo_1w, [], {?DO_EXIT, state}, [], false, {?MODULE, bad_precond}, {?MODULE, postcond}, ?MODULE)), %% Handle_cast - stay-alive == true - ?line ?match({noreply, {?NO_EXIT, state}}, + ?match({noreply, {?NO_EXIT, state}}, corba:handle_cast(?MODULE, foo_1w, [], {?NO_EXIT, state}, [], false, {wrong_mod, precond}, {?MODULE, postcond}, ?MODULE)), %% Handle_cast - stay-alive == true - ?line ?match({noreply, {?NO_EXIT, state}}, + ?match({noreply, {?NO_EXIT, state}}, corba:handle_cast(?MODULE, foo_1w, [], {?NO_EXIT, state}, [], false, {?MODULE, bad_precond}, {?MODULE, postcond}, ?MODULE)), ok. -callback_postcond_api(doc) -> ["Postcond callbak API tests", ""]; -callback_postcond_api(suite) -> []; +%% Postcond callback API tests callback_postcond_api(_) -> %% Handle_call - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_call(?MODULE, foo, [], {?DO_EXIT, state}, [], false, false, {?MODULE, precond}, {wrong_mod, postcond}, ?MODULE)), %% Handle_call - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_call(?MODULE, foo, [], {?DO_EXIT, state}, [], false, false, {?MODULE, precond}, {?MODULE, bad_postcond}, ?MODULE)), %% Handle_call - stay-alive == true - ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}},_}, + ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}},_}, corba:handle_call(?MODULE, foo, [], {?NO_EXIT, state}, [], false, false, {?MODULE, precond}, {wrong_mod, postcond}, ?MODULE)), %% Handle_call - stay-alive == true - ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}},_}, + ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}},_}, corba:handle_call(?MODULE, foo, [], {?NO_EXIT, state}, [], false, false, {?MODULE, precond}, {?MODULE, bad_postcond}, ?MODULE)), %% Handle_cast - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_cast(?MODULE, foo_1w, [], {?DO_EXIT, state}, [], false, {?MODULE, precond}, {wrong_mod, postcond}, ?MODULE)), %% Handle_cast - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_cast(?MODULE, foo_1w, [], {?DO_EXIT, state}, [], false, {?MODULE, precond}, {?MODULE, bad_postcond}, ?MODULE)), %% Handle_cast - stay-alive == true - ?line ?match({noreply, {?NO_EXIT, state}}, + ?match({noreply, {?NO_EXIT, state}}, corba:handle_cast(?MODULE, foo_1w, [], {?NO_EXIT, state}, [], false, {?MODULE, precond}, {wrong_mod, postcond}, ?MODULE)), %% Handle_cast - stay-alive == true - ?line ?match({noreply, {?NO_EXIT, state}}, + ?match({noreply, {?NO_EXIT, state}}, corba:handle_cast(?MODULE, foo_1w, [], {?NO_EXIT, state}, [], false, {?MODULE, precond}, {?MODULE, bad_postcond}, ?MODULE)), ok. -callback_exit_api(doc) -> ["Callbak exit API tests", ""]; -callback_exit_api(suite) -> []; +%% Callback exit API tests callback_exit_api(_) -> %% Handle_call - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_call(?MODULE, foo, [], {?DO_EXIT, exit}, [], false, false)), %% Handle_call - stay-alive == true - ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _}, + ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _}, corba:handle_call(?MODULE, foo, [], {?NO_EXIT, exit}, [], false, false)), %% Handle_cast - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_cast(?MODULE, foo_1w, [], {?DO_EXIT, exit}, [], false)), %% Handle_cast - stay-alive == true - ?line ?match({noreply, {?NO_EXIT, exit}}, + ?match({noreply, {?NO_EXIT, exit}}, corba:handle_cast(?MODULE, foo_1w, [], {?NO_EXIT, exit}, [], false)), %% Handle_info - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_info(?MODULE, "info", {?DO_EXIT, exit})), %% Handle_info - stay-alive == true - ?line ?match({noreply, {?NO_EXIT, exit}}, + ?match({noreply, {?NO_EXIT, exit}}, corba:handle_info(?MODULE, "info", {?NO_EXIT, exit})), ok. -callback_badarith_api(doc) -> ["callbak badarith API tests", ""]; -callback_badarith_api(suite) -> []; +%% Callback badarith API tests callback_badarith_api(_) -> %% Handle_call - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_call(?MODULE, foo, [], {?DO_EXIT, badarith}, [], false, false)), %% Handle_call - stay-alive == true - ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}},_}, + ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}},_}, corba:handle_call(?MODULE, foo, [], {?NO_EXIT, badarith}, [], false, false)), %% Handle_cast - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_cast(?MODULE, foo_1w, [], {?DO_EXIT, badarith}, [], false)), %% Handle_cast - stay-alive == true - ?line ?match({noreply, {?NO_EXIT, badarith}}, + ?match({noreply, {?NO_EXIT, badarith}}, corba:handle_cast(?MODULE, foo_1w, [], {?NO_EXIT, badarith}, [], false)), %% Handle_info - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_info(?MODULE, "info", {?DO_EXIT, badarith})), %% Handle_info - stay-alive == true - ?line ?match({noreply, {?NO_EXIT, badarith}}, + ?match({noreply, {?NO_EXIT, badarith}}, corba:handle_info(?MODULE, "info", {?NO_EXIT, badarith})), ok. -callback_case_clause_api(doc) -> ["callbak case_clause API tests", ""]; -callback_case_clause_api(suite) -> []; +%% Callback case_clause API tests callback_case_clause_api(_) -> %% Handle_call - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_call(?MODULE, foo, [], {?DO_EXIT, case_clause}, [], false, false)), %% Handle_call - stay-alive == true - ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _}, + ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _}, corba:handle_call(?MODULE, foo, [], {?NO_EXIT, case_clause}, [], false, false)), %% Handle_cast - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_cast(?MODULE, foo_1w, [], {?DO_EXIT, case_clause}, [], false)), %% Handle_cast - stay-alive == true - ?line ?match({noreply, {?NO_EXIT, case_clause}}, + ?match({noreply, {?NO_EXIT, case_clause}}, corba:handle_cast(?MODULE, foo_1w, [], {?NO_EXIT, case_clause}, [], false)), %% Handle_info - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_info(?MODULE, "info", {?DO_EXIT, case_clause})), %% Handle_info - stay-alive == true - ?line ?match({noreply, {?NO_EXIT, case_clause}}, + ?match({noreply, {?NO_EXIT, case_clause}}, corba:handle_info(?MODULE, "info", {?NO_EXIT, case_clause})), ok. -callback_function_clause_api(doc) -> ["callbak function_clause API tests", ""]; -callback_function_clause_api(suite) -> []; +%% Callback function_clause API tests callback_function_clause_api(_) -> %% Handle_call - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_call(?MODULE, foo, [], {?DO_EXIT, function_clause}, [], false, false)), %% Handle_call - stay-alive == true - ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _}, + ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _}, corba:handle_call(?MODULE, foo, [], {?NO_EXIT, function_clause}, [], false, false)), %% Handle_cast - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_cast(?MODULE, foo_1w, [], {?DO_EXIT, function_clause}, [], false)), %% Handle_cast - stay-alive == true - ?line ?match({noreply, {?NO_EXIT, function_clause}}, + ?match({noreply, {?NO_EXIT, function_clause}}, corba:handle_cast(?MODULE, foo_1w, [], {?NO_EXIT, function_clause}, [], false)), %% Handle_info - stay-alive == false - ?line ?match({'EXIT', _}, + ?match({'EXIT', _}, corba:handle_info(?MODULE, "info", {?DO_EXIT, function_clause})), %% Handle_info - stay-alive == true - ?line ?match({noreply, {?NO_EXIT, function_clause}}, + ?match({noreply, {?NO_EXIT, function_clause}}, corba:handle_info(?MODULE, "info", {?NO_EXIT, function_clause})), ok. diff --git a/lib/orber/test/csiv2_SUITE.erl b/lib/orber/test/csiv2_SUITE.erl index 48818e4cab..7844060582 100644 --- a/lib/orber/test/csiv2_SUITE.erl +++ b/lib/orber/test/csiv2_SUITE.erl @@ -18,7 +18,6 @@ %% %CopyrightEnd% %% %% - -module(csiv2_SUITE). -include_lib("common_test/include/ct.hrl"). @@ -31,7 +30,7 @@ -include_lib("orber/COSS/CosNaming/CosNaming_NamingContext.hrl"). %%-include_lib("orber/src/OrberCSIv2.hrl"). --define(default_timeout, ?t:minutes(5)). +-define(default_timeout, test_server:minutes(5)). -define(match(ExpectedRes,Expr), fun() -> @@ -44,7 +43,7 @@ _ -> io:format("###### ERROR ERROR ######~nRESULT: ~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -357,7 +356,7 @@ end_per_testcase(_Case, Config) -> orber:jump_stop(), Path = code:which(?MODULE), code:del_path(filename:join(filename:dirname(Path), "idl_output")), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -389,8 +388,8 @@ end_per_suite(Config) -> -ifdef(false). %% OrberCSIv2 -code_CertificateChain_api(doc) -> ["Code CertificateChain"]; -code_CertificateChain_api(suite) -> []; +%%----------------------------------------------------------------- +%% Code CertificateChain code_CertificateChain_api(_Config) -> {ok, Enc} = ?match({ok, _}, @@ -399,8 +398,7 @@ code_CertificateChain_api(_Config) -> 'OrberCSIv2':decode('CertificateChain', list_to_binary(Enc))), ok. -code_AttributeCertChain_api(doc) -> ["Code AttributeCertChain"]; -code_AttributeCertChain_api(suite) -> []; +%% Code AttributeCertChain code_AttributeCertChain_api(_Config) -> {ok, Enc} = ?match({ok, _}, @@ -409,8 +407,7 @@ code_AttributeCertChain_api(_Config) -> 'OrberCSIv2':decode('AttributeCertChain', list_to_binary(Enc))), ok. -code_VerifyingCertChain_api(doc) -> ["Code VerifyingCertChain"]; -code_VerifyingCertChain_api(suite) -> []; +%% Code VerifyingCertChain code_VerifyingCertChain_api(_Config) -> {ok, Enc} = ?match({ok, _}, @@ -420,8 +417,8 @@ code_VerifyingCertChain_api(_Config) -> ok. %% PKIXAttributeCertificate -code_AttributeCertificate_api(doc) -> ["Code AttributeCertificate"]; -code_AttributeCertificate_api(suite) -> []; +%%----------------------------------------------------------------- +%% Code AttributeCertificate code_AttributeCertificate_api(_Config) -> {ok, Enc} = ?match({ok, _}, @@ -430,8 +427,7 @@ code_AttributeCertificate_api(_Config) -> 'OrberCSIv2':decode('AttributeCertificate', list_to_binary(Enc))), ok. -code_AttributeCertificateInfo_api(doc) -> ["Code AttributeCertificateInfo"]; -code_AttributeCertificateInfo_api(suite) -> []; +%% Code AttributeCertificateInfo code_AttributeCertificateInfo_api(_Config) -> {ok, Enc} = ?match({ok, _}, @@ -440,8 +436,7 @@ code_AttributeCertificateInfo_api(_Config) -> 'OrberCSIv2':decode('AttributeCertificateInfo', list_to_binary(Enc))), ok. -code_AttCertVersion_api(doc) -> ["Code AttCertVersion"]; -code_AttCertVersion_api(suite) -> []; +%% Code AttCertVersion code_AttCertVersion_api(_Config) -> {ok, Enc} = ?match({ok, _}, @@ -450,8 +445,7 @@ code_AttCertVersion_api(_Config) -> 'OrberCSIv2':decode('AttCertVersion', list_to_binary(Enc))), ok. -code_Holder_api(doc) -> ["Code Holder"]; -code_Holder_api(suite) -> []; +%% Code Holder code_Holder_api(_Config) -> {ok, Enc} = ?match({ok, _}, @@ -460,8 +454,7 @@ code_Holder_api(_Config) -> 'OrberCSIv2':decode('Holder', list_to_binary(Enc))), ok. -code_AttCertIssuer_api(doc) -> ["Code AttCertIssuer"]; -code_AttCertIssuer_api(suite) -> []; +%% Code AttCertIssuer code_AttCertIssuer_api(_Config) -> {ok, Enc} = ?match({ok, _}, @@ -470,8 +463,7 @@ code_AttCertIssuer_api(_Config) -> 'OrberCSIv2':decode('AttCertIssuer', list_to_binary(Enc))), ok. -code_AttCertValidityPeriod_api(doc) -> ["Code AttCertValidityPeriod"]; -code_AttCertValidityPeriod_api(suite) -> []; +%% Code AttCertValidityPeriod code_AttCertValidityPeriod_api(_Config) -> {ok, Enc} = ?match({ok, _}, 'OrberCSIv2':encode('AttCertValidityPeriod', ?AttCertValidityPeriod)), @@ -479,8 +471,7 @@ code_AttCertValidityPeriod_api(_Config) -> 'OrberCSIv2':decode('AttCertValidityPeriod', list_to_binary(Enc))), ok. -code_V2Form_api(doc) -> ["Code V2Form"]; -code_V2Form_api(suite) -> []; +%% Code V2Form code_V2Form_api(_Config) -> {ok, Enc} = ?match({ok, _}, @@ -489,8 +480,7 @@ code_V2Form_api(_Config) -> 'OrberCSIv2':decode('V2Form', list_to_binary(Enc))), ok. -code_IssuerSerial_api(doc) -> ["Code IssuerSerial"]; -code_IssuerSerial_api(suite) -> []; +%% Code IssuerSerial code_IssuerSerial_api(_Config) -> {ok, Enc} = ?match({ok, _}, @@ -499,8 +489,7 @@ code_IssuerSerial_api(_Config) -> 'OrberCSIv2':decode('IssuerSerial', list_to_binary(Enc))), ok. -code_ObjectDigestInfo_api(doc) -> ["Code ObjectDigestInfo"]; -code_ObjectDigestInfo_api(suite) -> []; +%% Code ObjectDigestInfo code_ObjectDigestInfo_api(_Config) -> {ok, Enc} = ?match({ok, _}, @@ -510,8 +499,8 @@ code_ObjectDigestInfo_api(_Config) -> ok. %% PKIX1Explicit88 -code_Certificate_api(doc) -> ["Code Certificate"]; -code_Certificate_api(suite) -> []; +%%----------------------------------------------------------------- +%% Code Certificate code_Certificate_api(_Config) -> {ok, Enc} = ?match({ok, _}, @@ -520,8 +509,7 @@ code_Certificate_api(_Config) -> 'OrberCSIv2':decode('Certificate', list_to_binary(Enc))), ok. -code_TBSCertificate_api(doc) -> ["Code TBSCertificate"]; -code_TBSCertificate_api(suite) -> []; +%% Code TBSCertificate code_TBSCertificate_api(_Config) -> {ok, Enc} = ?match({ok, _}, @@ -530,8 +518,7 @@ code_TBSCertificate_api(_Config) -> 'OrberCSIv2':decode('TBSCertificate', list_to_binary(Enc))), ok. -code_CertificateSerialNumber_api(doc) -> ["Code CertificateSerialNumber"]; -code_CertificateSerialNumber_api(suite) -> []; +%% Code CertificateSerialNumber"]; code_CertificateSerialNumber_api(_Config) -> {ok, Enc} = ?match({ok, _}, @@ -540,16 +527,14 @@ code_CertificateSerialNumber_api(_Config) -> 'OrberCSIv2':decode('CertificateSerialNumber', list_to_binary(Enc))), ok. -code_Version_api(doc) -> ["Code Version"]; -code_Version_api(suite) -> []; +%% Code Version code_Version_api(_Config) -> {ok, Enc} = ?match({ok, _}, 'OrberCSIv2':encode('Version', ?Version)), ?match({ok, ?Version}, 'OrberCSIv2':decode('Version', list_to_binary(Enc))), ok. -code_AlgorithmIdentifier_api(doc) -> ["Code AlgorithmIdentifier"]; -code_AlgorithmIdentifier_api(suite) -> []; +%% Code AlgorithmIdentifier code_AlgorithmIdentifier_api(_Config) -> {ok, Enc} = ?match({ok, _}, 'OrberCSIv2':encode('AlgorithmIdentifier', ?AlgorithmIdentifier)), @@ -557,8 +542,7 @@ code_AlgorithmIdentifier_api(_Config) -> 'OrberCSIv2':decode('AlgorithmIdentifier', list_to_binary(Enc))), ok. -code_Name_api(doc) -> ["Code Name"]; -code_Name_api(suite) -> []; +%% Code Name code_Name_api(_Config) -> {ok, Enc} = ?match({ok, _}, 'OrberCSIv2':encode('Name', ?Name)), @@ -566,8 +550,7 @@ code_Name_api(_Config) -> 'OrberCSIv2':decode('Name', list_to_binary(Enc))), ok. -code_RDNSequence_api(doc) -> ["Code RDNSequence"]; -code_RDNSequence_api(suite) -> []; +%% Code RDNSequence code_RDNSequence_api(_Config) -> {ok, Enc} = ?match({ok, _}, 'OrberCSIv2':encode('RDNSequence', ?RDNSequence)), @@ -575,8 +558,7 @@ code_RDNSequence_api(_Config) -> 'OrberCSIv2':decode('RDNSequence', list_to_binary(Enc))), ok. -code_RelativeDistinguishedName_api(doc) -> ["Code RelativeDistinguishedName"]; -code_RelativeDistinguishedName_api(suite) -> []; +%% Code RelativeDistinguishedName code_RelativeDistinguishedName_api(_Config) -> {ok, Enc} = ?match({ok, _}, 'OrberCSIv2':encode('RelativeDistinguishedName', ?RelativeDistinguishedName)), @@ -584,8 +566,7 @@ code_RelativeDistinguishedName_api(_Config) -> 'OrberCSIv2':decode('RelativeDistinguishedName', list_to_binary(Enc))), ok. -code_AttributeTypeAndValue_api(doc) -> ["Code AttributeTypeAndValue"]; -code_AttributeTypeAndValue_api(suite) -> []; +%% Code AttributeTypeAndValue code_AttributeTypeAndValue_api(_Config) -> {ok, Enc} = ?match({ok, _}, 'OrberCSIv2':encode('AttributeTypeAndValue', ?AttributeTypeAndValue)), @@ -593,8 +574,7 @@ code_AttributeTypeAndValue_api(_Config) -> 'OrberCSIv2':decode('AttributeTypeAndValue', list_to_binary(Enc))), ok. -code_Attribute_api(doc) -> ["Code Attribute"]; -code_Attribute_api(suite) -> []; +%% Code Attribute"]; code_Attribute_api(_Config) -> {ok, Enc} = ?match({ok, _}, 'OrberCSIv2':encode('Attribute', ?Attribute)), @@ -602,8 +582,7 @@ code_Attribute_api(_Config) -> 'OrberCSIv2':decode('Attribute', list_to_binary(Enc))), ok. -code_Validity_api(doc) -> ["Code Validity"]; -code_Validity_api(suite) -> []; +%% Code Validity code_Validity_api(_Config) -> {ok, Enc} = ?match({ok, _}, 'OrberCSIv2':encode('Validity', ?Validity)), @@ -611,8 +590,7 @@ code_Validity_api(_Config) -> 'OrberCSIv2':decode('Validity', list_to_binary(Enc))), ok. -code_SubjectPublicKeyInfo_api(doc) -> ["Code SubjectPublicKeyInfo"]; -code_SubjectPublicKeyInfo_api(suite) -> []; +%% Code SubjectPublicKeyInfo code_SubjectPublicKeyInfo_api(_Config) -> {ok, Enc} = ?match({ok, _}, 'OrberCSIv2':encode('SubjectPublicKeyInfo', ?SubjectPublicKeyInfo)), @@ -620,16 +598,14 @@ code_SubjectPublicKeyInfo_api(_Config) -> 'OrberCSIv2':decode('SubjectPublicKeyInfo', list_to_binary(Enc))), ok. -code_UniqueIdentifier_api(doc) -> ["Code UniqueIdentifier"]; -code_UniqueIdentifier_api(suite) -> []; +%% Code UniqueIdentifier code_UniqueIdentifier_api(_Config) -> {ok, Enc} = ?match({ok, _}, 'OrberCSIv2':encode('UniqueIdentifier', ?UniqueIdentifier)), ?match({ok, _}, 'OrberCSIv2':decode('UniqueIdentifier', list_to_binary(Enc))), ok. -code_Extensions_api(doc) -> ["Code Extensions"]; -code_Extensions_api(suite) -> []; +%% Code Extensions code_Extensions_api(_Config) -> {ok, Enc} = ?match({ok, _}, 'OrberCSIv2':encode('Extensions', ?Extensions)), @@ -637,8 +613,7 @@ code_Extensions_api(_Config) -> 'OrberCSIv2':decode('Extensions', list_to_binary(Enc))), ok. -code_Extension_api(doc) -> ["Code Extension"]; -code_Extension_api(suite) -> []; +%% Code Extension code_Extension_api(_Config) -> {ok, Enc} = ?match({ok, _}, 'OrberCSIv2':encode('Extension', ?Extension)), @@ -647,8 +622,8 @@ code_Extension_api(_Config) -> ok. %% OpenSSL generated x509 Certificate -code_OpenSSL509_api(doc) -> ["Code OpenSSL generated x509 Certificate"]; -code_OpenSSL509_api(suite) -> []; +%%----------------------------------------------------------------- +%% Code OpenSSL generated x509 Certificate code_OpenSSL509_api(_Config) -> {ok, Cert} = ?match({ok, #'Certificate'{}}, @@ -666,8 +641,7 @@ code_OpenSSL509_api(_Config) -> %%----------------------------------------------------------------- %% Test ssl:peercert %%----------------------------------------------------------------- -ssl_server_peercert_api(doc) -> ["Test ssl:peercert (server side)"]; -ssl_server_peercert_api(suite) -> []; +%% Test ssl:peercert (server side) ssl_server_peercert_api(_Config) -> Options = orber_test_lib:get_options(iiop_ssl, server, 2, [{iiop_ssl_port, 0}]), @@ -685,8 +659,7 @@ ssl_server_peercert_api(_Config) -> destroy_fake_ORB(ssl, Socket), ok. -ssl_client_peercert_api(doc) -> ["Test ssl:peercert (client side)"]; -ssl_client_peercert_api(suite) -> []; +%% Test ssl:peercert (client side) ssl_client_peercert_api(_Config) -> Options = orber_test_lib:get_options(iiop_ssl, client, 2, [{iiop_ssl_port, 0}]), @@ -827,7 +800,7 @@ context_test(Obj) -> context_data = MTContextError}, #'IOP_ServiceContext'{context_id=?IOP_SecurityAttributeService, context_data = MTMessageInContext}], - ?line ?match(ok, orber_test_server:testing_iiop_context(Obj, [{context, Ctx}])). + ?match(ok, orber_test_server:testing_iiop_context(Obj, [{context, Ctx}])). fake_server_ORB(Type, Port, Options) -> diff --git a/lib/orber/test/data_types_SUITE.erl b/lib/orber/test/data_types_SUITE.erl index 8dd404a173..3873bfbaf6 100644 --- a/lib/orber/test/data_types_SUITE.erl +++ b/lib/orber/test/data_types_SUITE.erl @@ -29,7 +29,7 @@ -include_lib("common_test/include/ct.hrl"). -include_lib("orber/include/corba.hrl"). --define(default_timeout, ?t:minutes(3)). +-define(default_timeout, test_server:minutes(3)). -define(match(ExpectedRes, Expr), fun() -> @@ -42,7 +42,7 @@ _ -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -89,24 +89,22 @@ end_per_group(_GroupName, Config) -> init_per_testcase(_Case, Config) -> Path = code:which(?MODULE), code:add_pathz(filename:join(filename:dirname(Path), "idl_output")), - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> Path = code:which(?MODULE), code:del_path(filename:join(filename:dirname(Path), "idl_output")), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. %%----------------------------------------------------------------- -%% Test Case: name component handling tests +%% Test Case: Fixed Point Datatype %% Description: %%----------------------------------------------------------------- -fixed_type(doc) -> ["Test the Fixed Point Datatype."]; -fixed_type(suite) -> []; fixed_type(_) -> Val1 = ?match({fixed,3,2,314}, orber_test_server:val1()), _Val2 = ?match({fixed,3,2,314}, orber_test_server:val2()), @@ -165,11 +163,9 @@ fixed_type(_) -> ok. %%----------------------------------------------------------------- -%% Test Case: any type +%% Test Case: Any type %% Description: %%----------------------------------------------------------------- -any_type(doc) -> ["Test the Any Datatype."]; -any_type(suite) -> []; any_type(_) -> ?match(#any{typecode=undefined, value=undefined}, any:create()), diff --git a/lib/orber/test/generated_SUITE.erl b/lib/orber/test/generated_SUITE.erl index 2062afe2bb..3550941dfd 100644 --- a/lib/orber/test/generated_SUITE.erl +++ b/lib/orber/test/generated_SUITE.erl @@ -29,7 +29,7 @@ -include_lib("common_test/include/ct.hrl"). -include_lib("orber/include/corba.hrl"). --define(default_timeout, ?t:minutes(3)). +-define(default_timeout, test_server:minutes(3)). -define(match(ExpectedRes, Expr), fun() -> @@ -40,7 +40,7 @@ _ -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -51,7 +51,7 @@ Not -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS); + exit(AcTuAlReS); _ -> AcTuAlReS end @@ -63,7 +63,7 @@ case orber_tc:check_tc(TC) of false -> io:format("###### ERROR ERROR ######~n~p - ~p~n", [Op, TC]), - ?line exit(TC); + exit(TC); true -> true end @@ -122,12 +122,12 @@ end_per_group(_GroupName, Config) -> %% Init and cleanup functions. %%----------------------------------------------------------------- init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -135,8 +135,6 @@ end_per_testcase(_Case, Config) -> %% Test Case:'OrberApp_IFR' %% Description: %%----------------------------------------------------------------- -'OrberApp_IFR'(doc) -> [""]; -'OrberApp_IFR'(suite) -> []; 'OrberApp_IFR'(_) -> ?nomatch(undefined, 'OrberApp_IFR':oe_tc(get_absolute_name)), ?nomatch(undefined, 'OrberApp_IFR':oe_tc(get_user_exception_type)), @@ -153,8 +151,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: erlang_binary %% Description: %%----------------------------------------------------------------- -erlang_binary(doc) -> [""]; -erlang_binary(suite) -> []; erlang_binary(_) -> ?match(true, orber_tc:check_tc(erlang_binary:tc())), ?match("IDL:erlang/binary:1.0", erlang_binary:id()), @@ -165,8 +161,6 @@ erlang_binary(_) -> %% Test Case: erlang_pid %% Description: %%----------------------------------------------------------------- -erlang_pid(doc) -> [""]; -erlang_pid(suite) -> []; erlang_pid(_) -> ?match(true, orber_tc:check_tc(erlang_pid:tc())), ?match("IDL:erlang/pid:1.0", erlang_pid:id()), @@ -177,8 +171,6 @@ erlang_pid(_) -> %% Test Case: erlang_port %% Description: %%----------------------------------------------------------------- -erlang_port(doc) -> [""]; -erlang_port(suite) -> []; erlang_port(_) -> ?match(true, orber_tc:check_tc(erlang_port:tc())), ?match("IDL:erlang/port:1.0", erlang_port:id()), @@ -189,8 +181,6 @@ erlang_port(_) -> %% Test Case: erlang_ref %% Description: %%----------------------------------------------------------------- -erlang_ref(doc) -> [""]; -erlang_ref(suite) -> []; erlang_ref(_) -> ?match(true, orber_tc:check_tc(erlang_ref:tc())), ?match("IDL:erlang/ref:1.0", erlang_ref:id()), @@ -201,8 +191,6 @@ erlang_ref(_) -> %% Test Case: 'CosNaming_Binding' %% Description: %%----------------------------------------------------------------- -'CosNaming_Binding'(doc) -> [""]; -'CosNaming_Binding'(suite) -> []; 'CosNaming_Binding'(_) -> ?match(true, orber_tc:check_tc('CosNaming_Binding':tc())), ?match("IDL:omg.org/CosNaming/Binding:1.0", 'CosNaming_Binding':id()), @@ -213,8 +201,6 @@ erlang_ref(_) -> %% Test Case: 'CosNaming_BindingList' %% Description: %%----------------------------------------------------------------- -'CosNaming_BindingList'(doc) -> [""]; -'CosNaming_BindingList'(suite) -> []; 'CosNaming_BindingList'(_) -> ?match(true, orber_tc:check_tc('CosNaming_BindingList':tc())), ?match("IDL:omg.org/CosNaming/BindingList:1.0", 'CosNaming_BindingList':id()), @@ -225,8 +211,6 @@ erlang_ref(_) -> %% Test Case: 'CosNaming_Name' %% Description: %%----------------------------------------------------------------- -'CosNaming_Name'(doc) -> [""]; -'CosNaming_Name'(suite) -> []; 'CosNaming_Name'(_) -> ?match(true, orber_tc:check_tc('CosNaming_Name':tc())), ?match("IDL:omg.org/CosNaming/Name:1.0", 'CosNaming_Name':id()), @@ -237,8 +221,6 @@ erlang_ref(_) -> %% Test Case: 'CosNaming_NameComponent' %% Description: %%----------------------------------------------------------------- -'CosNaming_NameComponent'(doc) -> [""]; -'CosNaming_NameComponent'(suite) -> []; 'CosNaming_NameComponent'(_) -> ?match(true, orber_tc:check_tc('CosNaming_NameComponent':tc())), ?match("IDL:omg.org/CosNaming/NameComponent:1.0", 'CosNaming_NameComponent':id()), @@ -249,8 +231,6 @@ erlang_ref(_) -> %% Test Case: 'CosNaming_NamingContextExt_InvalidAddress' %% Description: %%----------------------------------------------------------------- -'CosNaming_NamingContextExt_InvalidAddress'(doc) -> [""]; -'CosNaming_NamingContextExt_InvalidAddress'(suite) -> []; 'CosNaming_NamingContextExt_InvalidAddress'(_) -> ?match(true, orber_tc:check_tc('CosNaming_NamingContextExt_InvalidAddress':tc())), ?match("IDL:omg.org/CosNaming/NamingContextExt/InvalidAddress:1.0", 'CosNaming_NamingContextExt_InvalidAddress':id()), @@ -261,8 +241,6 @@ erlang_ref(_) -> %% Test Case: 'CosNaming_NamingContext_AlreadyBound' %% Description: %%----------------------------------------------------------------- -'CosNaming_NamingContext_AlreadyBound'(doc) -> [""]; -'CosNaming_NamingContext_AlreadyBound'(suite) -> []; 'CosNaming_NamingContext_AlreadyBound'(_) -> ?match(true, orber_tc:check_tc('CosNaming_NamingContext_AlreadyBound':tc())), ?match("IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0", 'CosNaming_NamingContext_AlreadyBound':id()), @@ -273,8 +251,6 @@ erlang_ref(_) -> %% Test Case: 'CosNaming_NamingContext_CannotProceed' %% Description: %%----------------------------------------------------------------- -'CosNaming_NamingContext_CannotProceed'(doc) -> [""]; -'CosNaming_NamingContext_CannotProceed'(suite) -> []; 'CosNaming_NamingContext_CannotProceed'(_) -> ?match(true, orber_tc:check_tc('CosNaming_NamingContext_CannotProceed':tc())), ?match("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0", 'CosNaming_NamingContext_CannotProceed':id()), @@ -285,8 +261,6 @@ erlang_ref(_) -> %% Test Case: 'CosNaming_NamingContext_InvalidName' %% Description: %%----------------------------------------------------------------- -'CosNaming_NamingContext_InvalidName'(doc) -> [""]; -'CosNaming_NamingContext_InvalidName'(suite) -> []; 'CosNaming_NamingContext_InvalidName'(_) -> ?match(true, orber_tc:check_tc('CosNaming_NamingContext_InvalidName':tc())), ?match("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0", 'CosNaming_NamingContext_InvalidName':id()), @@ -297,8 +271,6 @@ erlang_ref(_) -> %% Test Case: 'CosNaming_NamingContext_NotEmpty' %% Description: %%----------------------------------------------------------------- -'CosNaming_NamingContext_NotEmpty'(doc) -> [""]; -'CosNaming_NamingContext_NotEmpty'(suite) -> []; 'CosNaming_NamingContext_NotEmpty'(_) -> ?match(true, orber_tc:check_tc('CosNaming_NamingContext_NotEmpty':tc())), ?match("IDL:omg.org/CosNaming/NamingContext/NotEmpty:1.0", 'CosNaming_NamingContext_NotEmpty':id()), @@ -309,8 +281,6 @@ erlang_ref(_) -> %% Test Case: 'CosNaming_NamingContext_NotFound' %% Description: %%----------------------------------------------------------------- -'CosNaming_NamingContext_NotFound'(doc) -> [""]; -'CosNaming_NamingContext_NotFound'(suite) -> []; 'CosNaming_NamingContext_NotFound'(_) -> ?match(true, orber_tc:check_tc('CosNaming_NamingContext_NotFound':tc())), ?match("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0", 'CosNaming_NamingContext_NotFound':id()), @@ -321,8 +291,6 @@ erlang_ref(_) -> %% Test Case: 'CosNaming_BindingIterator' %% Description: %%----------------------------------------------------------------- -'CosNaming_BindingIterator'(doc) -> [""]; -'CosNaming_BindingIterator'(suite) -> []; 'CosNaming_BindingIterator'(_) -> ?nomatch(undefined, 'CosNaming_BindingIterator':oe_tc(next_one)), ?nomatch(undefined, 'CosNaming_BindingIterator':oe_tc(next_n)), @@ -341,8 +309,6 @@ erlang_ref(_) -> %% Test Case: 'CosNaming_NamingContext' %% Description: %%----------------------------------------------------------------- -'CosNaming_NamingContext'(doc) -> [""]; -'CosNaming_NamingContext'(suite) -> []; 'CosNaming_NamingContext'(_) -> ?nomatch(undefined, 'CosNaming_NamingContext':oe_tc(bind)), ?nomatch(undefined, 'CosNaming_NamingContext':oe_tc(rebind)), @@ -368,8 +334,6 @@ erlang_ref(_) -> %% Test Case: 'CosNaming_NamingContexExt' %% Description: %%----------------------------------------------------------------- -'CosNaming_NamingContextExt'(doc) -> [""]; -'CosNaming_NamingContextExt'(suite) -> []; 'CosNaming_NamingContextExt'(_) -> ?nomatch(undefined, 'CosNaming_NamingContextExt':oe_tc(to_string)), ?nomatch(undefined, 'CosNaming_NamingContextExt':oe_tc(to_name)), diff --git a/lib/orber/test/interceptors_SUITE.erl b/lib/orber/test/interceptors_SUITE.erl index 1bce0a3bfd..cec4cd1fab 100644 --- a/lib/orber/test/interceptors_SUITE.erl +++ b/lib/orber/test/interceptors_SUITE.erl @@ -30,7 +30,7 @@ -include_lib("orber/include/corba.hrl"). -include_lib("orber/src/orber_iiop.hrl"). --define(default_timeout, ?t:minutes(3)). +-define(default_timeout, test_server:minutes(3)). -define(match(ExpectedRes, Expr), fun() -> @@ -43,7 +43,7 @@ _ -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -54,7 +54,7 @@ Not -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS); + exit(AcTuAlReS); _ -> io:format("------ CORRECT RESULT ------~n~p~n", [AcTuAlReS]), @@ -105,7 +105,7 @@ end_per_group(_GroupName, Config) -> %% Init and cleanup functions. %%----------------------------------------------------------------- init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), Path = code:which(?MODULE), code:add_pathz(filename:join(filename:dirname(Path), "idl_output")), corba:orb_init([{flags, (?ORB_ENV_USE_PI bor ?ORB_ENV_LOCAL_TYPECHECKING)}, @@ -120,7 +120,7 @@ end_per_testcase(_Case, Config) -> orber:jump_stop(), Path = code:which(?MODULE), code:del_path(filename:join(filename:dirname(Path), "idl_output")), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -128,8 +128,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: local_pseudo %% Description: %%----------------------------------------------------------------- -local_pseudo(doc) -> [""]; -local_pseudo(suite) -> []; local_pseudo(_) -> ?match({native, [?MODULE]}, orber:get_local_interceptors()), %% Global settings @@ -177,8 +175,6 @@ local_pseudo(_) -> %% Test Case: local_default %% Description: %%----------------------------------------------------------------- -local_default(doc) -> [""]; -local_default(suite) -> []; local_default(_) -> ?match({native, [?MODULE]}, orber:get_local_interceptors()), %% Global settings @@ -226,8 +222,6 @@ local_default(_) -> %% Test Case: local_local %% Description: %%----------------------------------------------------------------- -local_local(doc) -> [""]; -local_local(suite) -> []; local_local(_) -> ?match({native, [?MODULE]}, orber:get_local_interceptors()), %% Global settings @@ -276,8 +270,6 @@ local_local(_) -> %% Test Case: local_global %% Description: %%----------------------------------------------------------------- -local_global(doc) -> [""]; -local_global(suite) -> []; local_global(_) -> ?match({native, [?MODULE]}, orber:get_local_interceptors()), %% Global settings diff --git a/lib/orber/test/iop_ior_10_SUITE.erl b/lib/orber/test/iop_ior_10_SUITE.erl index 8779e123e0..68a6793f62 100644 --- a/lib/orber/test/iop_ior_10_SUITE.erl +++ b/lib/orber/test/iop_ior_10_SUITE.erl @@ -29,7 +29,7 @@ -include_lib("common_test/include/ct.hrl"). -include_lib("orber/src/orber_iiop.hrl"). --define(default_timeout, ?t:minutes(3)). +-define(default_timeout, test_server:minutes(3)). %%----------------------------------------------------------------- %% External exports @@ -74,12 +74,12 @@ end_per_group(_GroupName, Config) -> %%----------------------------------------------------------------- init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -88,8 +88,6 @@ end_per_testcase(_Case, Config) -> %% Description: Just testing the string_encoding function because the %% other encodings is called from them. %%----------------------------------------------------------------- -encoding(doc) -> ["Description", "more description"]; -encoding(suite) -> []; encoding(_) -> V = #'IIOP_Version'{major=1,minor=0}, M0 = 'Module_Interface', @@ -97,12 +95,12 @@ encoding(_) -> H0 = "my.hostname.org", P0 = 4040, N0 = 'name', - ?line O0 = corba_fake_mk_objkey(M0, registered, N0), + O0 = corba_fake_mk_objkey(M0, registered, N0), PB0 = #'IIOP_ProfileBody_1_0'{iiop_version=V, host=H0, port=P0, object_key=O0}, TP0 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB0}, S0 = #'IOP_IOR'{type_id=T0, profiles=[TP0]}, N1 = list_to_pid("<0.100.0>"), - ?line O1 = corba_fake_mk_objkey(M0, key, N1), + O1 = corba_fake_mk_objkey(M0, key, N1), PB1 = #'IIOP_ProfileBody_1_0'{iiop_version=V, host=H0, port=P0, object_key=O1}, TP1 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB1}, S1 = #'IOP_IOR'{type_id=T0, profiles=[TP1]}, @@ -110,12 +108,12 @@ encoding(_) -> PB2 = #'IIOP_ProfileBody_1_0'{iiop_version=V, host=H0, port=P0, object_key=O2}, TP2 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB2}, S2 = #'IOP_IOR'{type_id=T0, profiles=[TP2]}, - ?line C0 = iop_ior:string_code(S0), - ?line {S0, <<>>, _} = iop_ior:string_decode(C0), - ?line C1 = iop_ior:string_code(S1), - ?line {S1, <<>>, _} = iop_ior:string_decode(C1), - ?line C2 = iop_ior:string_code(S2), - ?line {S2, <<>>, _} = iop_ior:string_decode(C2), + C0 = iop_ior:string_code(S0), + {S0, <<>>, _} = iop_ior:string_decode(C0), + C1 = iop_ior:string_code(S1), + {S1, <<>>, _} = iop_ior:string_decode(C1), + C2 = iop_ior:string_code(S2), + {S2, <<>>, _} = iop_ior:string_decode(C2), ok. @@ -123,8 +121,6 @@ encoding(_) -> %% Test Case: IOR creation test %% Description: %%----------------------------------------------------------------- -create_and_get_ops(doc) -> ["Description", "more description"]; -create_and_get_ops(suite) -> []; create_and_get_ops(_) -> V = #'IIOP_Version'{major=1,minor=0}, M0 = 'Module_Interface', @@ -132,41 +128,41 @@ create_and_get_ops(_) -> H0 = "my.hostname.org", P0 = 4040, N0 = 'name', - ?line O0 = corba_fake_mk_objkey(M0, registered, N0), + O0 = corba_fake_mk_objkey(M0, registered, N0), PB0 = #'IIOP_ProfileBody_1_0'{iiop_version=V, host=H0, port=P0, object_key=O0}, TP0 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB0}, S0 = #'IOP_IOR'{type_id=T0, profiles=[TP0]}, - ?line S0 = iop_ior:create({1, 0}, T0, [H0], P0, -1, O0, [], 0, 0), + S0 = iop_ior:create({1, 0}, T0, [H0], P0, -1, O0, [], 0, 0), N1 = list_to_pid("<0.100.0>"), - ?line O1 = corba_fake_mk_objkey(M0, key, N1), + O1 = corba_fake_mk_objkey(M0, key, N1), {_,_,K1,_,_,_} = O1, PB1 = #'IIOP_ProfileBody_1_0'{iiop_version=V, host=H0, port=P0, object_key=O1}, TP1 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB1}, S1 = #'IOP_IOR'{type_id=T0, profiles=[TP1]}, - ?line S1 = iop_ior:create({1, 0}, T0, [H0], P0, -1, O1, [], 0, 0), + S1 = iop_ior:create({1, 0}, T0, [H0], P0, -1, O1, [], 0, 0), O2 = "This is an external objectkey", PB2 = #'IIOP_ProfileBody_1_0'{iiop_version=V, host=H0, port=P0, object_key=O2}, TP2 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB2}, S2 = #'IOP_IOR'{type_id=T0, profiles=[TP2]}, - ?line {'internal_registered', N0, _, _, M0} = iop_ior:get_key(S0), - ?line {'internal', K1, _, _, M0} = iop_ior:get_key(S1), - ?line {'external', {H0, P0, O2, _,_, - #host_data{protocol = normal, - ssl_data = undefined, - version = {1,0}, - csiv2_mech = undefined, - csiv2_statefull = false, - charset = 65537, - wcharset = 65801, - ft_heartbeat = false, - ft_primary = false, - ft_group = undefined, - csiv2_addresses = []}}} + {'internal_registered', N0, _, _, M0} = iop_ior:get_key(S0), + {'internal', K1, _, _, M0} = iop_ior:get_key(S1), + {'external', {H0, P0, O2, _,_, + #host_data{protocol = normal, + ssl_data = undefined, + version = {1,0}, + csiv2_mech = undefined, + csiv2_statefull = false, + charset = 65537, + wcharset = 65801, + ft_heartbeat = false, + ft_primary = false, + ft_group = undefined, + csiv2_addresses = []}}} = iop_ior:get_key(S2), - ?line T0 = iop_ior:get_typeID(S0), - ?line O0 = iop_ior:get_objkey(S0), - ?line O1 = iop_ior:get_objkey(S1), - ?line O2 = iop_ior:get_objkey(S2), + T0 = iop_ior:get_typeID(S0), + O0 = iop_ior:get_objkey(S0), + O1 = iop_ior:get_objkey(S1), + O2 = iop_ior:get_objkey(S2), ok. %%----------------------------------------------------------------- diff --git a/lib/orber/test/iop_ior_11_SUITE.erl b/lib/orber/test/iop_ior_11_SUITE.erl index 46342ddfd7..8276feeb93 100644 --- a/lib/orber/test/iop_ior_11_SUITE.erl +++ b/lib/orber/test/iop_ior_11_SUITE.erl @@ -29,7 +29,7 @@ -include_lib("common_test/include/ct.hrl"). -include_lib("orber/src/orber_iiop.hrl"). --define(default_timeout, ?t:minutes(3)). +-define(default_timeout, test_server:minutes(3)). %%----------------------------------------------------------------- %% External exports @@ -74,12 +74,12 @@ end_per_group(_GroupName, Config) -> %%----------------------------------------------------------------- init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -88,8 +88,6 @@ end_per_testcase(_Case, Config) -> %% Description: Just testing the string_encoding function because the %% other encodings is called from them. %%----------------------------------------------------------------- -encoding(doc) -> ["Description", "more description"]; -encoding(suite) -> []; encoding(_) -> V = #'IIOP_Version'{major=1,minor=1}, M0 = 'Module_Interface', @@ -107,13 +105,13 @@ encoding(_) -> cdrlib:enc_unsigned_short(2, cdrlib:enc_unsigned_short(SSLPort, [])))]}] end, - ?line O0 = corba_fake_mk_objkey(M0, registered, N0), + O0 = corba_fake_mk_objkey(M0, registered, N0), PB0 = #'IIOP_ProfileBody_1_1'{iiop_version=V, host=H0, port=P0, object_key=O0, components=Components}, TP0 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB0}, S0 = #'IOP_IOR'{type_id=T0, profiles=[TP0]}, N1 = list_to_pid("<0.100.0>"), - ?line O1 = corba_fake_mk_objkey(M0, key, N1), + O1 = corba_fake_mk_objkey(M0, key, N1), PB1 = #'IIOP_ProfileBody_1_1'{iiop_version=V, host=H0, port=P0, object_key=O1, components=[]}, TP1 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB1}, @@ -123,12 +121,12 @@ encoding(_) -> components=[]}, TP2 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB2}, S2 = #'IOP_IOR'{type_id=T0, profiles=[TP2]}, - ?line C0 = iop_ior:string_code(S0), - ?line {S0, <<>>, _} = iop_ior:string_decode(C0), - ?line C1 = iop_ior:string_code(S1), - ?line {S1, <<>>, _} = iop_ior:string_decode(C1), - ?line C2 = iop_ior:string_code(S2), - ?line {S2, <<>>, _} = iop_ior:string_decode(C2), + C0 = iop_ior:string_code(S0), + {S0, <<>>, _} = iop_ior:string_decode(C0), + C1 = iop_ior:string_code(S1), + {S1, <<>>, _} = iop_ior:string_decode(C1), + C2 = iop_ior:string_code(S2), + {S2, <<>>, _} = iop_ior:string_decode(C2), ok. @@ -136,8 +134,6 @@ encoding(_) -> %% Test Case: IOR creation test %% Description: %%----------------------------------------------------------------- -create_and_get_ops(doc) -> ["Description", "more description"]; -create_and_get_ops(suite) -> []; create_and_get_ops(_) -> V = #'IIOP_Version'{major=1,minor=1}, CSC = #'IOP_TaggedComponent'{tag=?TAG_CODE_SETS, @@ -147,46 +143,46 @@ create_and_get_ops(_) -> H0 = "my.hostname.org", P0 = 4040, N0 = 'name', - ?line O0 = corba_fake_mk_objkey(M0, registered, N0), + O0 = corba_fake_mk_objkey(M0, registered, N0), PB0 = #'IIOP_ProfileBody_1_1' {iiop_version=V, host=H0, port=P0, object_key=O0, components=[CSC]}, TP0 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB0}, S0 = #'IOP_IOR'{type_id=T0, profiles=[TP0]}, - ?line S0 = iop_ior:create({1, 1}, T0, [H0], P0, -1, O0, [CSC], 0, 0), + S0 = iop_ior:create({1, 1}, T0, [H0], P0, -1, O0, [CSC], 0, 0), N1 = list_to_pid("<0.100.0>"), - ?line O1 = corba_fake_mk_objkey(M0, key, N1), + O1 = corba_fake_mk_objkey(M0, key, N1), {_,_,K1,_,_,_} = O1, PB1 = #'IIOP_ProfileBody_1_1' {iiop_version=V, host=H0, port=P0, object_key=O1, components=[CSC]}, TP1 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB1}, S1 = #'IOP_IOR'{type_id=T0, profiles=[TP1]}, - ?line S1 = iop_ior:create({1, 1}, T0, [H0], P0, -1, O1, [CSC], 0, 0), + S1 = iop_ior:create({1, 1}, T0, [H0], P0, -1, O1, [CSC], 0, 0), O2 = "This is an external objectkey", PB2 = #'IIOP_ProfileBody_1_1'{iiop_version=V, host=H0, port=P0, object_key=O2, components=[]}, TP2 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB2}, S2 = #'IOP_IOR'{type_id=T0, profiles=[TP2]}, - ?line {'internal_registered', N0, _, _, M0} = iop_ior:get_key(S0), - ?line {'internal', K1, _, _, M0} = iop_ior:get_key(S1), - ?line {'external', {H0, P0, O2, _,_, - #host_data{protocol = normal, - ssl_data = undefined, - version = {1,1}, - csiv2_mech = undefined, - csiv2_statefull = false, - charset = 65537, - wcharset = 65801, - ft_heartbeat = false, - ft_primary = false, - ft_group = undefined, - csiv2_addresses = []}}} = + {'internal_registered', N0, _, _, M0} = iop_ior:get_key(S0), + {'internal', K1, _, _, M0} = iop_ior:get_key(S1), + {'external', {H0, P0, O2, _,_, + #host_data{protocol = normal, + ssl_data = undefined, + version = {1,1}, + csiv2_mech = undefined, + csiv2_statefull = false, + charset = 65537, + wcharset = 65801, + ft_heartbeat = false, + ft_primary = false, + ft_group = undefined, + csiv2_addresses = []}}} = iop_ior:get_key(S2), - ?line T0 = iop_ior:get_typeID(S0), - ?line O0 = iop_ior:get_objkey(S0), - ?line O1 = iop_ior:get_objkey(S1), - ?line O2 = iop_ior:get_objkey(S2), + T0 = iop_ior:get_typeID(S0), + O0 = iop_ior:get_objkey(S0), + O1 = iop_ior:get_objkey(S1), + O2 = iop_ior:get_objkey(S2), ok. %%----------------------------------------------------------------- diff --git a/lib/orber/test/iop_ior_12_SUITE.erl b/lib/orber/test/iop_ior_12_SUITE.erl index bce9f3af88..802b0b11a2 100644 --- a/lib/orber/test/iop_ior_12_SUITE.erl +++ b/lib/orber/test/iop_ior_12_SUITE.erl @@ -30,7 +30,7 @@ -include_lib("common_test/include/ct.hrl"). -include_lib("orber/src/orber_iiop.hrl"). --define(default_timeout, ?t:minutes(3)). +-define(default_timeout, test_server:minutes(3)). %%----------------------------------------------------------------- %% External exports @@ -75,12 +75,12 @@ end_per_group(_GroupName, Config) -> %%----------------------------------------------------------------- init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -89,8 +89,6 @@ end_per_testcase(_Case, Config) -> %% Description: Just testing the string_encoding function because the %% other encodings is called from them. %%----------------------------------------------------------------- -encoding(doc) -> ["Description", "more description"]; -encoding(suite) -> []; encoding(_) -> V = #'IIOP_Version'{major=1,minor=2}, M0 = 'Module_Interface', @@ -105,31 +103,31 @@ encoding(_) -> [#'IOP_TaggedComponent'{tag=?TAG_SSL_SEC_TRANS, component_data=[0 | cdrlib:enc_unsigned_short(2, - cdrlib:enc_unsigned_short(2, + cdrlib:enc_unsigned_short(2, cdrlib:enc_unsigned_short(SSLPort, [])))]}] end, - ?line O0 = corba_fake_mk_objkey(M0, registered, N0), + O0 = corba_fake_mk_objkey(M0, registered, N0), PB0 = #'IIOP_ProfileBody_1_1'{iiop_version=V, host=H0, port=P0, object_key=O0, - components=Components}, + components=Components}, TP0 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB0}, S0 = #'IOP_IOR'{type_id=T0, profiles=[TP0]}, N1 = list_to_pid("<0.100.0>"), - ?line O1 = corba_fake_mk_objkey(M0, key, N1), + O1 = corba_fake_mk_objkey(M0, key, N1), PB1 = #'IIOP_ProfileBody_1_1'{iiop_version=V, host=H0, port=P0, object_key=O1, - components=[]}, + components=[]}, TP1 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB1}, S1 = #'IOP_IOR'{type_id=T0, profiles=[TP1]}, O2 = "This is an external objectkey", PB2 = #'IIOP_ProfileBody_1_1'{iiop_version=V, host=H0, port=P0, object_key=O2, - components=[]}, + components=[]}, TP2 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB2}, S2 = #'IOP_IOR'{type_id=T0, profiles=[TP2]}, - ?line C0 = iop_ior:string_code(S0), - ?line {S0, <<>>, _} = iop_ior:string_decode(C0), - ?line C1 = iop_ior:string_code(S1), - ?line {S1, <<>>, _} = iop_ior:string_decode(C1), - ?line C2 = iop_ior:string_code(S2), - ?line {S2, <<>>, _} = iop_ior:string_decode(C2), + C0 = iop_ior:string_code(S0), + {S0, <<>>, _} = iop_ior:string_decode(C0), + C1 = iop_ior:string_code(S1), + {S1, <<>>, _} = iop_ior:string_decode(C1), + C2 = iop_ior:string_code(S2), + {S2, <<>>, _} = iop_ior:string_decode(C2), ok. @@ -137,8 +135,6 @@ encoding(_) -> %% Test Case: IOR creation test %% Description: %%----------------------------------------------------------------- -create_and_get_ops(doc) -> ["Description", "more description"]; -create_and_get_ops(suite) -> []; create_and_get_ops(_) -> V = #'IIOP_Version'{major=1,minor=2}, CSC = #'IOP_TaggedComponent'{tag=?TAG_CODE_SETS, @@ -148,46 +144,46 @@ create_and_get_ops(_) -> H0 = "my.hostname.org", P0 = 4040, N0 = 'name', - ?line O0 = corba_fake_mk_objkey(M0, registered, N0), + O0 = corba_fake_mk_objkey(M0, registered, N0), PB0 = #'IIOP_ProfileBody_1_1' {iiop_version=V, host=H0, port=P0, object_key=O0, components=[CSC]}, TP0 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB0}, S0 = #'IOP_IOR'{type_id=T0, profiles=[TP0]}, - ?line S0 = iop_ior:create({1, 2}, T0, [H0], P0, -1, O0, [CSC], 0, 0), + S0 = iop_ior:create({1, 2}, T0, [H0], P0, -1, O0, [CSC], 0, 0), N1 = list_to_pid("<0.100.0>"), - ?line O1 = corba_fake_mk_objkey(M0, key, N1), + O1 = corba_fake_mk_objkey(M0, key, N1), {_,_,K1,_,_,_} = O1, PB1 = #'IIOP_ProfileBody_1_1' {iiop_version=V, host=H0, port=P0, object_key=O1, components=[CSC]}, TP1 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB1}, S1 = #'IOP_IOR'{type_id=T0, profiles=[TP1]}, - ?line S1 = iop_ior:create({1, 2}, T0, [H0], P0, -1, O1, [CSC], 0, 0), + S1 = iop_ior:create({1, 2}, T0, [H0], P0, -1, O1, [CSC], 0, 0), O2 = "This is an external objectkey", PB2 = #'IIOP_ProfileBody_1_1'{iiop_version=V, host=H0, port=P0, object_key=O2, - components=[]}, + components=[]}, TP2 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB2}, S2 = #'IOP_IOR'{type_id=T0, profiles=[TP2]}, - ?line {'internal_registered', N0, _, _, M0} = iop_ior:get_key(S0), - ?line {'internal', K1, _, _, M0} = iop_ior:get_key(S1), - ?line {'external', {H0, P0, O2,_,_, - #host_data{protocol = normal, - ssl_data = undefined, - version = {1,2}, - csiv2_mech = undefined, - csiv2_statefull = false, - charset = 65537, - wcharset = 65801, - ft_heartbeat = false, - ft_primary = false, - ft_group = undefined, - csiv2_addresses = []}}} + {'internal_registered', N0, _, _, M0} = iop_ior:get_key(S0), + {'internal', K1, _, _, M0} = iop_ior:get_key(S1), + {'external', {H0, P0, O2,_,_, + #host_data{protocol = normal, + ssl_data = undefined, + version = {1,2}, + csiv2_mech = undefined, + csiv2_statefull = false, + charset = 65537, + wcharset = 65801, + ft_heartbeat = false, + ft_primary = false, + ft_group = undefined, + csiv2_addresses = []}}} = iop_ior:get_key(S2), - ?line T0 = iop_ior:get_typeID(S0), - ?line O0 = iop_ior:get_objkey(S0), - ?line O1 = iop_ior:get_objkey(S1), - ?line O2 = iop_ior:get_objkey(S2), + T0 = iop_ior:get_typeID(S0), + O0 = iop_ior:get_objkey(S0), + O1 = iop_ior:get_objkey(S1), + O2 = iop_ior:get_objkey(S2), ok. %%----------------------------------------------------------------- diff --git a/lib/orber/test/ip_v4v6_interop_SUITE.erl b/lib/orber/test/ip_v4v6_interop_SUITE.erl index cc5bcd71a5..48cc77eca7 100644 --- a/lib/orber/test/ip_v4v6_interop_SUITE.erl +++ b/lib/orber/test/ip_v4v6_interop_SUITE.erl @@ -59,7 +59,7 @@ %%---------------------------------------------------------------------- %% Macros %%---------------------------------------------------------------------- --define(default_timeout, ?t:minutes(15)). +-define(default_timeout, test_server:minutes(15)). -define(match(ExpectedRes,Expr), fun() -> @@ -72,7 +72,7 @@ _ -> io:format("###### ERROR ERROR ######~nRESULT: ~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). %%---------------------------------------------------------------------- @@ -93,7 +93,7 @@ init_per_testcase(_Case, Config) -> end_per_testcase(_Case, Config) -> orber:jump_stop(), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -126,8 +126,7 @@ end_per_group(_GroupName, Config) -> %%==================================================================== %% Test Cases %%==================================================================== -dual_ipv4v6(doc) -> - ["ORB configured for supporting both IPv4 and IPv6"]; +%% ORB configured for supporting both IPv4 and IPv6 dual_ipv4v6(_Config) -> %% Starting slave node with ipv4 configured ORB diff --git a/lib/orber/test/lname_SUITE.erl b/lib/orber/test/lname_SUITE.erl index a12f2b88a7..cb67cd6136 100644 --- a/lib/orber/test/lname_SUITE.erl +++ b/lib/orber/test/lname_SUITE.erl @@ -30,7 +30,7 @@ -include_lib("orber/COSS/CosNaming/CosNaming.hrl"). -include_lib("orber/COSS/CosNaming/lname.hrl"). --define(default_timeout, ?t:minutes(3)). +-define(default_timeout, test_server:minutes(3)). %%----------------------------------------------------------------- %% External exports @@ -75,12 +75,12 @@ end_per_group(_GroupName, Config) -> %%----------------------------------------------------------------- init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -89,34 +89,32 @@ end_per_testcase(_Case, Config) -> %% Test Case: name component handling tests %% Description: %%----------------------------------------------------------------- -lname_component(doc) -> ["Description", "more description"]; -lname_component(suite) -> []; lname_component(_) -> create_test(), get_tests(), set_tests(). create_test() -> - ?line #'CosNaming_NameComponent'{} = lname_component:create(), + #'CosNaming_NameComponent'{} = lname_component:create(), ok. get_tests() -> NC = #'CosNaming_NameComponent'{id="first", kind="apple"}, NC1 = #'CosNaming_NameComponent'{id="", kind="apple"}, NC2 = #'CosNaming_NameComponent'{id="first", kind=""}, - ?line "first" = lname_component:get_id(NC), - ?line "apple" = lname_component:get_kind(NC), - ?line {'EXCEPTION', #'LNameComponent_NotSet'{}} = + "first" = lname_component:get_id(NC), + "apple" = lname_component:get_kind(NC), + {'EXCEPTION', #'LNameComponent_NotSet'{}} = (catch lname_component:get_id(NC1)), - ?line {'EXCEPTION', #'LNameComponent_NotSet'{}} = + {'EXCEPTION', #'LNameComponent_NotSet'{}} = (catch lname_component:get_kind(NC2)), ok. set_tests() -> NC = #'CosNaming_NameComponent'{id="first", kind="apple"}, - ?line #'CosNaming_NameComponent'{id="second", kind="apple"} = + #'CosNaming_NameComponent'{id="second", kind="apple"} = lname_component:set_id(NC, "second"), - ?line #'CosNaming_NameComponent'{id="first", kind="pear"} = + #'CosNaming_NameComponent'{id="first", kind="pear"} = lname_component:set_kind(NC, "pear"), ok. @@ -124,8 +122,6 @@ set_tests() -> %% Test Case: name handling tests %% Description: %%----------------------------------------------------------------- -lname(doc) -> ["Description", "more description"]; -lname(suite) -> []; lname(_) -> Name = [#'CosNaming_NameComponent'{id="first", kind="apple"}, #'CosNaming_NameComponent'{id="last", kind="peach"}, @@ -139,79 +135,79 @@ lname(_) -> insert_tests(Name) -> NC = #'CosNaming_NameComponent'{id="new", kind="pear"}, - ?line [NC, #'CosNaming_NameComponent'{id="first", kind="apple"}, + [NC, #'CosNaming_NameComponent'{id="first", kind="apple"}, #'CosNaming_NameComponent'{id="last", kind="peach"}, #'CosNaming_NameComponent'{id="and", kind="plum"}, #'CosNaming_NameComponent'{id="always", kind="orange"}] = lname:insert_component(Name, 1, NC), - ?line [#'CosNaming_NameComponent'{id="first", kind="apple"}, + [#'CosNaming_NameComponent'{id="first", kind="apple"}, #'CosNaming_NameComponent'{id="last", kind="peach"}, #'CosNaming_NameComponent'{id="and", kind="plum"}, #'CosNaming_NameComponent'{id="always", kind="orange"}, NC] = lname:insert_component(Name, 5, NC), - ?line [#'CosNaming_NameComponent'{id="first", kind="apple"}, + [#'CosNaming_NameComponent'{id="first", kind="apple"}, #'CosNaming_NameComponent'{id="last", kind="peach"}, #'CosNaming_NameComponent'{id="and", kind="plum"}, NC, #'CosNaming_NameComponent'{id="always", kind="orange"}] = lname:insert_component(Name, 4, NC), - ?line [#'CosNaming_NameComponent'{id="first", kind="apple"}, + [#'CosNaming_NameComponent'{id="first", kind="apple"}, #'CosNaming_NameComponent'{id="last", kind="peach"}, NC, #'CosNaming_NameComponent'{id="and", kind="plum"}, #'CosNaming_NameComponent'{id="always", kind="orange"}] = lname:insert_component(Name, 3, NC), - ?line {'EXCEPTION', #'LName_NoComponent'{}} = + {'EXCEPTION', #'LName_NoComponent'{}} = (catch lname:insert_component(Name, 6, NC)), - ?line {'EXCEPTION', #'LName_NoComponent'{}} = + {'EXCEPTION', #'LName_NoComponent'{}} = (catch lname:insert_component(Name, 0, NC)), - ?line {'EXCEPTION', #'LName_NoComponent'{}} = + {'EXCEPTION', #'LName_NoComponent'{}} = (catch lname:insert_component(Name, -2, NC)), ok. get_tests(Name) -> - ?line #'CosNaming_NameComponent'{id="first", kind="apple"} = + #'CosNaming_NameComponent'{id="first", kind="apple"} = lname:get_component(Name, 1), - ?line #'CosNaming_NameComponent'{id="always", kind="orange"} = + #'CosNaming_NameComponent'{id="always", kind="orange"} = lname:get_component(Name, 4), - ?line #'CosNaming_NameComponent'{id="and", kind="plum"} = + #'CosNaming_NameComponent'{id="and", kind="plum"} = lname:get_component(Name, 3), - ?line {'EXCEPTION', #'LName_NoComponent'{}} = + {'EXCEPTION', #'LName_NoComponent'{}} = (catch lname:get_component(Name, 5)), - ?line {'EXCEPTION', #'LName_NoComponent'{}} = + {'EXCEPTION', #'LName_NoComponent'{}} = (catch lname:get_component(Name, 0)), - ?line {'EXCEPTION', #'LName_NoComponent'{}} = + {'EXCEPTION', #'LName_NoComponent'{}} = (catch lname:get_component(Name, -2)), ok. delete_tests(Name) -> - ?line [#'CosNaming_NameComponent'{id="last", kind="peach"}, + [#'CosNaming_NameComponent'{id="last", kind="peach"}, #'CosNaming_NameComponent'{id="and", kind="plum"}, #'CosNaming_NameComponent'{id="always", kind="orange"}] = lname:delete_component(Name, 1), - ?line [#'CosNaming_NameComponent'{id="first", kind="apple"}, + [#'CosNaming_NameComponent'{id="first", kind="apple"}, #'CosNaming_NameComponent'{id="last", kind="peach"}, #'CosNaming_NameComponent'{id="and", kind="plum"}] = lname:delete_component(Name, 4), - ?line [#'CosNaming_NameComponent'{id="first", kind="apple"}, + [#'CosNaming_NameComponent'{id="first", kind="apple"}, #'CosNaming_NameComponent'{id="last", kind="peach"}, #'CosNaming_NameComponent'{id="always", kind="orange"}] = lname:delete_component(Name, 3), - ?line {'EXCEPTION', #'LName_NoComponent'{}} = + {'EXCEPTION', #'LName_NoComponent'{}} = (catch lname:delete_component(Name, 6)), - ?line {'EXCEPTION', #'LName_NoComponent'{}} = + {'EXCEPTION', #'LName_NoComponent'{}} = (catch lname:delete_component(Name, 0)), - ?line {'EXCEPTION', #'LName_NoComponent'{}} = + {'EXCEPTION', #'LName_NoComponent'{}} = (catch lname:delete_component(Name, -2)), ok. comparision_tests(Name) -> - ?line true = lname:equal(Name, Name), - ?line false = lname:equal(Name, lname:delete_component(Name, 2)), - ?line true = lname:less_than(lname:delete_component(Name, 2), Name), - ?line false = lname:less_than(Name, Name), - ?line false = lname:less_than(Name, lname:delete_component(Name, 2)), + true = lname:equal(Name, Name), + false = lname:equal(Name, lname:delete_component(Name, 2)), + true = lname:less_than(lname:delete_component(Name, 2), Name), + false = lname:less_than(Name, Name), + false = lname:less_than(Name, lname:delete_component(Name, 2)), ok. convertion_tests(Name) -> - ?line Name = lname:from_idl_form(Name), - ?line Name = lname:to_idl_form(Name), + Name = lname:from_idl_form(Name), + Name = lname:to_idl_form(Name), ok. diff --git a/lib/orber/test/multi_ORB_SUITE.erl b/lib/orber/test/multi_ORB_SUITE.erl index 9708111525..d739e47cc1 100644 --- a/lib/orber/test/multi_ORB_SUITE.erl +++ b/lib/orber/test/multi_ORB_SUITE.erl @@ -31,7 +31,7 @@ -include_lib("orber/COSS/CosNaming/CosNaming_NamingContext.hrl"). --define(default_timeout, ?t:minutes(15)). +-define(default_timeout, test_server:minutes(15)). -define(match(ExpectedRes,Expr), fun() -> @@ -44,7 +44,7 @@ _ -> io:format("###### ERROR ERROR ######~nRESULT: ~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -159,7 +159,7 @@ init_per_testcase(_Case, Config) -> init_all(Config). init_ssl(Config) -> - case ?config(crypto_started, Config) of + case proplists:get_value(crypto_started, Config) of true -> case orber_test_lib:ssl_version() of no_ssl -> @@ -172,7 +172,7 @@ init_ssl(Config) -> end. init_ssl_3(Config) -> - case ?config(crypto_started, Config) of + case proplists:get_value(crypto_started, Config) of true -> case orber_test_lib:ssl_version() of 3 -> @@ -200,7 +200,7 @@ end_per_testcase(_Case, Config) -> orber:jump_stop(), Path = code:which(?MODULE), code:del_path(filename:join(filename:dirname(Path), "idl_output")), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -225,8 +225,7 @@ end_per_suite(Config) -> %% API tests for ORB to ORB, no security %%----------------------------------------------------------------- -implicit_context_api(doc) -> ["IIOP Implicit Contex tests"]; -implicit_context_api(suite) -> []; +%% IIOP Implicit Contex tests implicit_context_api(_Config) -> IP = orber_test_lib:get_host(), Loopback = orber_test_lib:get_loopback_interface(), @@ -257,9 +256,7 @@ implicit_context_api(_Config) -> ?match(true, lists:keymember(Loopback, 1, Conns)), ok. -implicit_context_roundtrip_api(doc) -> - ["IIOP Implicit Contex roundtrip tests"]; -implicit_context_roundtrip_api(suite) -> []; +%% IIOP Implicit Contex roundtrip tests implicit_context_roundtrip_api(_Config) -> IP = orber_test_lib:get_host(), Loopback = orber_test_lib:get_loopback_interface(), @@ -289,10 +286,7 @@ implicit_context_roundtrip_api(_Config) -> ?match(true, lists:keymember(Loopback, 1, Conns)), ok. - - -oneway_implicit_context_api(doc) -> ["IIOP Implicit Contex oneway tests"]; -oneway_implicit_context_api(suite) -> []; +%% IIOP Implicit Contex oneway tests oneway_implicit_context_api(_Config) -> IP = orber_test_lib:get_host(), Loopback = orber_test_lib:get_loopback_interface(), @@ -326,9 +320,7 @@ oneway_implicit_context_api(_Config) -> ?match(true, lists:keymember(Loopback, 1, Conns)), ok. - -pseudo_implicit_context_api(doc) -> ["IIOP Implicit Contex tests (via pseudo object)"]; -pseudo_implicit_context_api(suite) -> []; +%% IIOP Implicit Contex tests (via pseudo object) pseudo_implicit_context_api(_Config) -> IP = orber_test_lib:get_host(), Loopback = orber_test_lib:get_loopback_interface(), @@ -358,9 +350,7 @@ pseudo_implicit_context_api(_Config) -> ?match(true, lists:keymember(Loopback, 1, Conns)), ok. -pseudo_two_implicit_context_api(doc) -> - ["IIOP two Implicit Contex tests (via pseudo object)"]; -pseudo_two_implicit_context_api(suite) -> []; +%% IIOP two Implicit Contex tests (via pseudo object) pseudo_two_implicit_context_api(_Config) -> IP = orber_test_lib:get_host(), Loopback = orber_test_lib:get_loopback_interface(), @@ -394,8 +384,7 @@ pseudo_two_implicit_context_api(_Config) -> ?match(true, lists:keymember(Loopback, 1, Conns)), ok. -oneway_pseudo_implicit_context_api(doc) -> ["IIOP Implicit Contex tests (via pseudo object oneway)"]; -oneway_pseudo_implicit_context_api(suite) -> []; +%% IIOP Implicit Contex tests (via pseudo object oneway) oneway_pseudo_implicit_context_api(_Config) -> IP = orber_test_lib:get_host(), Loopback = orber_test_lib:get_loopback_interface(), @@ -425,9 +414,7 @@ oneway_pseudo_implicit_context_api(_Config) -> ?match(true, lists:keymember(Loopback, 1, Conns)), ok. -oneway_pseudo_two_implicit_context_api(doc) -> - ["IIOP two Implicit Contex tests (via pseudo object oneway)"]; -oneway_pseudo_two_implicit_context_api(suite) -> []; +%% IIOP two Implicit Contex tests (via pseudo object oneway) oneway_pseudo_two_implicit_context_api(_Config) -> IP = orber_test_lib:get_host(), Loopback = orber_test_lib:get_loopback_interface(), @@ -464,8 +451,7 @@ oneway_pseudo_two_implicit_context_api(_Config) -> -multiple_accept_api(doc) -> ["IIOP Multiple Accept tests"]; -multiple_accept_api(suite) -> []; +%% IIOP Multiple Accept tests multiple_accept_api(_Config) -> IP = orber_test_lib:get_host(), Loopback = orber_test_lib:get_loopback_interface(), @@ -537,10 +523,9 @@ multiple_accept_api(_Config) -> ok. -proxy_interface_api(doc) -> ["IIOP Proxy Interface tests", - "This case test if the server ORB use the correct", - "interface when exporting IOR:s"]; -proxy_interface_api(suite) -> []; +%% IIOP Proxy Interface tests +%% This case test if the server ORB use the correct +%% interface when exporting IOR:s proxy_interface_api(_Config) -> IP = orber_test_lib:get_host(), Loopback = orber_test_lib:get_loopback_interface(), @@ -557,10 +542,9 @@ proxy_interface_api(_Config) -> iop_ior:get_key(IOR2)), ok. -proxy_interface_ipv6_api(doc) -> ["IIOP Proxy Interface tests", - "This case test if the server ORB use the correct", - "IPv6 interface when exporting IOR:s"]; -proxy_interface_ipv6_api(suite) -> []; +%% IIOP Proxy Interface tests +%% This case test if the server ORB use the correct +%% IPv6 interface when exporting IOR:s proxy_interface_ipv6_api(_Config) -> case orber_test_lib:version_ok() of true -> @@ -593,10 +577,9 @@ proxy_interface_ipv6_api2() -> orber_test_lib:remote_apply(ClientNode, iop_ior, get_key, [IOR2])), ok. -local_interface_api(doc) -> ["IIOP Local Interface tests", - "This case test if the server ORB use the correct", - "local interface when connecting to another ORB"]; -local_interface_api(suite) -> []; +%% IIOP Local Interface tests +%% This case test if the server ORB use the correct +%% local interface when connecting to another ORB local_interface_api(_Config) -> IP = orber_test_lib:get_host(), Loopback = orber_test_lib:get_loopback_interface(), @@ -627,11 +610,9 @@ local_interface_api(_Config) -> ok. -local_interface_ctx_override_api(doc) -> - ["IIOP Local Interface tests", - "This case test if the server ORB use the correct", - "local interface when connecting to another ORB"]; -local_interface_ctx_override_api(suite) -> []; +%% IIOP Local Interface tests +%% This case test if the server ORB use the correct +%% local interface when connecting to another ORB local_interface_ctx_override_api(_Config) -> IP = orber_test_lib:get_host(), Loopback = orber_test_lib:get_loopback_interface(), @@ -664,11 +645,9 @@ local_interface_ctx_override_api(_Config) -> ok. -local_interface_acl_override_api(doc) -> - ["IIOP Local Interface tests", - "This case test if the server ORB use the correct", - "local interface when connecting to another ORB"]; -local_interface_acl_override_api(suite) -> []; +%% IIOP Local Interface tests +%% This case test if the server ORB use the correct +%% local interface when connecting to another ORB local_interface_acl_override_api(_Config) -> IP = orber_test_lib:get_host(), Loopback = orber_test_lib:get_loopback_interface(), @@ -708,9 +687,8 @@ local_interface_acl_override_api(_Config) -> ok. -iiop_timeout_api(doc) -> ["IIOP TIMEOUT API tests", - "This case test if timeout configuration behaves correctly"]; -iiop_timeout_api(suite) -> []; +%% IIOP TIMEOUT API tests +%% This case test if timeout configuration behaves correctly iiop_timeout_api(_Config) -> %% Install two secure orber. @@ -754,9 +732,8 @@ iiop_timeout_api(_Config) -> [timeout])), ok. -iiop_timeout_added_api(doc) -> ["IIOP TIMEOUT API tests", - "This case test if timeout configuration behaves correctly"]; -iiop_timeout_added_api(suite) -> []; +%% IIOP TIMEOUT API tests +%% This case test if timeout configuration behaves correctly iiop_timeout_added_api(_Config) -> IP = orber_test_lib:get_host(), {ok, Node, _Host} = ?match({ok,_,_}, orber_test_lib:js_node([])), @@ -791,12 +768,10 @@ iiop_timeout_added_api(_Config) -> %% API tests for ORB to ORB using pseudo call/cast, no security %%----------------------------------------------------------------- -multi_pseudo_orber_api(doc) -> - ["MULTI ORB PSEUDO API tests", - "This case test if data encode/decode (IIOP) for pseudo objects", - "produce the correct result, i.e., the test_server echos", - "the input parameter or an exception is raised (MARSHAL)."]; -multi_pseudo_orber_api(suite) -> []; +%% MULTI ORB PSEUDO API tests +%% This case test if data encode/decode (IIOP) for pseudo objects +%% produce the correct result, i.e., the test_server echos +%% the input parameter or an exception is raised (MARSHAL) multi_pseudo_orber_api(_Config) -> %% --- Create a slave-node --- {ok, Node, Host} = @@ -840,9 +815,7 @@ multi_pseudo_orber_api(_Config) -> %%----------------------------------------------------------------- %% API tests for ORB to ORB with local flags definition set. %%----------------------------------------------------------------- -flags_added_api(doc) -> - ["MULTI ORB PSEUDO with local flags definition set"]; -flags_added_api(suite) -> []; +%% MULTI ORB PSEUDO with local flags definition set flags_added_api(_Config) -> %% --- Create a slave-node --- IP = orber_test_lib:get_host(), @@ -880,9 +853,7 @@ flags_added_api(_Config) -> %%----------------------------------------------------------------- %% API tests for ORB to ORB with limited concurrent requests %%----------------------------------------------------------------- -max_requests_api(doc) -> - ["MULTI ORB PSEUDO with limited concurrent requests tests"]; -max_requests_api(suite) -> []; +%% MULTI ORB PSEUDO with limited concurrent requests tests max_requests_api(_Config) -> %% --- Create a slave-node --- {ok, Node, Host} = @@ -890,9 +861,7 @@ max_requests_api(_Config) -> Port = orber_test_lib:remote_apply(Node, orber, iiop_port, []), max_requests(Node, Host, Port). -max_requests_added_api(doc) -> - ["MULTI ORB PSEUDO with limited concurrent requests tests"]; -max_requests_added_api(suite) -> []; +%% MULTI ORB PSEUDO with limited concurrent requests tests max_requests_added_api(_Config) -> %% --- Create a slave-node --- [IP] = ?match([_], orber:host()), @@ -940,9 +909,7 @@ max_requests(Node, Host, Port) -> %%----------------------------------------------------------------- %% API tests for ORB to ORB with limited concurrent connections %%----------------------------------------------------------------- -max_connections_api(doc) -> - ["MULTI ORB PSEUDO with limited concurrent connections tests"]; -max_connections_api(suite) -> []; +%% MULTI ORB PSEUDO with limited concurrent connections tests max_connections_api(_Config) -> %% --- Create a slave-node --- {ok, ServerNode, ServerHost} = @@ -1012,9 +979,7 @@ max_connections_api(_Config) -> %%----------------------------------------------------------------- %% API tests for terminating connection by using an IOR. %%----------------------------------------------------------------- -close_connections_api(doc) -> - ["Close outgoing connection "]; -close_connections_api(suite) -> []; +%% Close outgoing connection close_connections_api(_Config) -> %% --- Create a slave-node --- IP = orber_test_lib:get_host(), @@ -1047,11 +1012,9 @@ close_connections_api(_Config) -> ok. -close_connections_local_interface_api(doc) -> - ["IIOP Local Interface disconnect tests", - "This case test if the server ORB use the correct", - "local interface when connecting to another ORB"]; -close_connections_local_interface_api(suite) -> []; +%% IIOP Local Interface disconnect tests +%% This case test if the server ORB use the correct +%% local interface when connecting to another ORB close_connections_local_interface_api(_Config) -> IP = orber_test_lib:get_host(), Loopback = orber_test_lib:get_loopback_interface(), @@ -1083,11 +1046,9 @@ close_connections_local_interface_api(_Config) -> ok. -close_connections_local_interface_ctx_override_api(doc) -> - ["IIOP Local Interface disconnect tests", - "This case test if the server ORB use the correct", - "local interface when connecting to another ORB"]; -close_connections_local_interface_ctx_override_api(suite) -> []; +%% IIOP Local Interface disconnect tests +%% This case test if the server ORB use the correct +%% local interface when connecting to another ORB close_connections_local_interface_ctx_override_api(_Config) -> IP = orber_test_lib:get_host(), Loopback = orber_test_lib:get_loopback_interface(), @@ -1147,11 +1108,9 @@ close_connections_local_interface_ctx_override_api(_Config) -> iiop_connections, [out])), ok. -close_connections_alt_iiop_addr_api(doc) -> - ["IIOP alternate address disconnect tests", - "This case test if the server ORB use the correct", - "local interface when connecting to another ORB"]; -close_connections_alt_iiop_addr_api(suite) -> []; +%% IIOP alternate address disconnect tests +%% This case test if the server ORB use the correct +%% local interface when connecting to another ORB close_connections_alt_iiop_addr_api(_Config) -> %% --- Create a slave-node --- Loopback = orber_test_lib:get_loopback_interface(), @@ -1187,11 +1146,9 @@ close_connections_alt_iiop_addr_api(_Config) -> iiop_connections, [in])), ok. -close_connections_multiple_profiles_api(doc) -> - ["IIOP alternate address disconnect tests", - "This case test if the server ORB use the correct", - "local interface when connecting to another ORB"]; -close_connections_multiple_profiles_api(suite) -> []; +%% IIOP alternate address disconnect tests +%% This case test if the server ORB use the correct +%% local interface when connecting to another ORB close_connections_multiple_profiles_api(_Config) -> IP = orber_test_lib:get_host(), Loopback = orber_test_lib:get_loopback_interface(), @@ -1228,9 +1185,7 @@ close_connections_multiple_profiles_api(_Config) -> %%----------------------------------------------------------------- %% API tests for ORB to ORB with iiop_packet_size set %%----------------------------------------------------------------- -max_packet_size_exceeded_api(doc) -> - ["Exceed the maximum request size"]; -max_packet_size_exceeded_api(suite) -> []; +%% Exceed the maximum request size max_packet_size_exceeded_api(_Config) -> case catch gen_tcp:listen(0, [{packet,cdr}, {packet_size, 14}]) of {'EXIT',badarg} -> @@ -1250,9 +1205,7 @@ max_packet_size_exceeded_api(_Config) -> %%----------------------------------------------------------------- %% API tests for ORB to ORB with iiop_packet_size set %%----------------------------------------------------------------- -max_packet_size_ok_api(doc) -> - ["Not exceed the maximum request size"]; -max_packet_size_ok_api(suite) -> []; +%% Not exceed the maximum request size max_packet_size_ok_api(_Config) -> case catch gen_tcp:listen(0, [{packet,cdr}, {packet_size, 14}]) of {'EXIT',badarg} -> @@ -1274,9 +1227,7 @@ max_packet_size_ok_api(_Config) -> %%----------------------------------------------------------------- %% API tests for ORB to ORB, no security %%----------------------------------------------------------------- - -light_ifr_api(doc) -> ["LIGHT IFR ORB API tests"]; -light_ifr_api(suite) -> []; +%% LIGHT IFR ORB API tests light_ifr_api(_Config) -> {ok, ClientNode, _ClientHost} = @@ -1349,11 +1300,9 @@ light_ifr_api(_Config) -> %%----------------------------------------------------------------- %% API tests for ORB to ORB, no security %%----------------------------------------------------------------- - -light_orber_api(doc) -> ["LIGHT ORB API tests", - "This case test if a light Orber can communicate correctly", - "with an fully installed Orber."]; -light_orber_api(suite) -> []; +%% LIGHT ORB API tests +%% This case test if a light Orber can communicate correctly +%% with an fully installed Orber. light_orber_api(_Config) -> %% --- Create a slave-node --- LocalHost = net_adm:localhost(), @@ -1398,13 +1347,11 @@ light_orber_api(_Config) -> %%----------------------------------------------------------------- %% API tests for ORB to ORB, no security %%----------------------------------------------------------------- - -light_orber2_api(doc) -> ["LIGHT ORB API tests", - "This case test if a light Orber can communicate correctly", - "with an fully installed Orber. This case test if we can", - "start as lightweight without first setting the environment", - "variable"]; -light_orber2_api(suite) -> []; +%% LIGHT ORB API tests +%% This case test if a light Orber can communicate correctly +%% with an fully installed Orber. This case test if we can +%% start as lightweight without first setting the environment +%% variable light_orber2_api(_Config) -> %% --- Create a slave-node --- LocalHost = net_adm:localhost(), @@ -1450,12 +1397,10 @@ light_orber2_api(_Config) -> %%----------------------------------------------------------------- %% API tests for ORB to ORB, no security %%----------------------------------------------------------------- - -multi_orber_api(doc) -> ["MULTI ORB API tests", - "This case test if data encode/decode (IIOP)", - "produce the correct result, i.e., the test_server echos", - "the input parameter or an exception is raised (MARSHAL)."]; -multi_orber_api(suite) -> []; +%% MULTI ORB API tests +%% This case test if data encode/decode (IIOP) +%% produce the correct result, i.e., the test_server echos +%% the input parameter or an exception is raised (MARSHAL). multi_orber_api(_Config) -> NewICObj1 = ?match({_,_,_,_,_,_}, orber_test_server:oe_create([])), @@ -1535,12 +1480,11 @@ multi_orber_api(_Config) -> %%----------------------------------------------------------------- %% API tests for ORB to ORB, no security, using basic interceptors %%----------------------------------------------------------------- -basic_PI_api(doc) -> ["MULTI ORB API tests", - "This case test if data encode/decode (IIOP)", - "produce the correct result when using basic interceptors,", - "i.e., the test_server echos", - "the input parameter or an exception is raised (MARSHAL)."]; -basic_PI_api(suite) -> []; +%% MULTI ORB API tests +%% This case test if data encode/decode (IIOP) +%% produce the correct result when using basic interceptors +%% i.e., the test_server echos the input parameter or +%% an exception is raised (MARSHAL). basic_PI_api(_Config) -> %% Change configuration to use Basic Interceptors. orber:configure_override(interceptors, {native, [orber_test_lib]}), @@ -1612,11 +1556,10 @@ basic_PI_api(_Config) -> %% API tests for ORB to ORB, ssl security depth 1 %%----------------------------------------------------------------- -ssl_1_multi_orber_api(doc) -> ["SECURE MULTI ORB API tests (SSL depth 1)", - "This case set up two secure orbs and test if they can", - "communicate. The case also test to access one of the", - "secure orbs which must raise a NO_PERMISSION exception."]; -ssl_1_multi_orber_api(suite) -> []; +%% SECURE MULTI ORB API tests (SSL depth 1) +%% This case set up two secure orbs and test if they can +%% communicate. The case also test to access one of the +%% secure orbs which must raise a NO_PERMISSION exception. ssl_1_multi_orber_api(_Config) -> ServerOptions = orber_test_lib:get_options_old(iiop_ssl, server, 1, [{iiop_ssl_port, 0}]), @@ -1625,11 +1568,10 @@ ssl_1_multi_orber_api(_Config) -> ssl_suite(ServerOptions, ClientOptions). -ssl_1_multi_orber_generation_3_api(doc) -> ["SECURE MULTI ORB API tests (SSL depth 1)", - "This case set up two secure orbs and test if they can", - "communicate. The case also test to access one of the", - "secure orbs which must raise a NO_PERMISSION exception."]; -ssl_1_multi_orber_generation_3_api(suite) -> []; +%% SECURE MULTI ORB API tests (SSL depth 1) +%% This case set up two secure orbs and test if they can +%% communicate. The case also test to access one of the +%% secure orbs which must raise a NO_PERMISSION exception. ssl_1_multi_orber_generation_3_api(_Config) -> ServerOptions = orber_test_lib:get_options(iiop_ssl, server, @@ -1644,11 +1586,10 @@ ssl_1_multi_orber_generation_3_api(_Config) -> %% API tests for ORB to ORB, ssl security depth 2 %%----------------------------------------------------------------- -ssl_2_multi_orber_api(doc) -> ["SECURE MULTI ORB API tests (SSL depth 2)", - "This case set up two secure orbs and test if they can", - "communicate. The case also test to access one of the", - "secure orbs which must raise a NO_PERMISSION exception."]; -ssl_2_multi_orber_api(suite) -> []; +%% SECURE MULTI ORB API tests (SSL depth 2) +%% These case set up two secure orbs and test if they can +%% communicate. They also test to access one of the +%% secure orbs which must raise a NO_PERMISSION exception. ssl_2_multi_orber_api(_Config) -> ServerOptions = orber_test_lib:get_options_old(iiop_ssl, server, @@ -1657,12 +1598,6 @@ ssl_2_multi_orber_api(_Config) -> 2, [{iiop_ssl_port, 0}]), ssl_suite(ServerOptions, ClientOptions). - -ssl_2_multi_orber_generation_3_api(doc) -> ["SECURE MULTI ORB API tests (SSL depth 2)", - "This case set up two secure orbs and test if they can", - "communicate. The case also test to access one of the", - "secure orbs which must raise a NO_PERMISSION exception."]; -ssl_2_multi_orber_generation_3_api(suite) -> []; ssl_2_multi_orber_generation_3_api(_Config) -> ServerOptions = orber_test_lib:get_options(iiop_ssl, server, @@ -1676,17 +1611,16 @@ ssl_2_multi_orber_generation_3_api(_Config) -> %% API tests for ORB to ORB, ssl security depth 2 %%----------------------------------------------------------------- -ssl_reconfigure_api(doc) -> ["SECURE MULTI ORB API tests (SSL depth 2)", - "This case set up two secure orbs and test if they can", - "communicate. The case also test to access one of the", - "secure orbs which must raise a NO_PERMISSION exception."]; -ssl_reconfigure_api(suite) -> []; +%% SECURE MULTI ORB API tests (SSL depth 2) +%% These case set up two secure orbs and test if they can +%% communicate. They also test to access one of the +%% secure orbs which must raise a NO_PERMISSION exception. ssl_reconfigure_api(_Config) -> ssl_reconfigure_old([]). -ssl_reconfigure_generation_3_api_old(_Config) -> - ssl_reconfigure_old([{ssl_generation, 3}]). +% ssl_reconfigure_generation_3_api_old(_Config) -> +% ssl_reconfigure_old([{ssl_generation, 3}]). ssl_reconfigure_old(ExtraSSLOptions) -> @@ -1737,11 +1671,6 @@ ssl_reconfigure_old(ExtraSSLOptions) -> print, [Obj])). -ssl_reconfigure_generation_3_api(doc) -> ["SECURE MULTI ORB API tests (SSL depth 2)", - "This case set up two secure orbs and test if they can", - "communicate. The case also test to access one of the", - "secure orbs which must raise a NO_PERMISSION exception."]; -ssl_reconfigure_generation_3_api(suite) -> []; ssl_reconfigure_generation_3_api(_Config) -> ssl_reconfigure([{ssl_generation, 3}]). @@ -1795,18 +1724,6 @@ ssl_reconfigure(ExtraSSLOptions) -> print, [Obj])). -%%----------------------------------------------------------------- -%% API tests for Orber to Java ORB, no security -%%----------------------------------------------------------------- - -%orber_java_api(doc) -> ["ERLANG-ORB <-> JAVA-ORB API tests", -% "This case test if data encode/decode (IIOP)", -% "produce the correct result, i.e., the test_server echos", -% "the input parameter or an exception is raised (MARSHAL)."]; -%orber_java_api(suite) -> []; -%orber_java_api(Config) -> -% ok. - %%------------------------------------------------------------ %% function : ssl_suite %% Arguments: Config @@ -1814,7 +1731,6 @@ ssl_reconfigure(ExtraSSLOptions) -> %% Returns : ok %% Effect : %%------------------------------------------------------------ - ssl_suite(ServerOptions, ClientOptions) -> {ok, ServerNode, ServerHost} = @@ -1861,8 +1777,6 @@ ssl_suite(ServerOptions, ClientOptions) -> %%----------------------------------------------------------------- %% iiop_setup_connection_timeout API tests for ORB to ORB. %%----------------------------------------------------------------- -setup_connection_timeout_api(doc) -> ["iiop_setup_connection_timeout API tests for ORB to ORB."]; -setup_connection_timeout_api(suite) -> []; setup_connection_timeout_api(_Config) -> ?match(ok, application:set_env(orber, iiop_backlog, 0)), %% Wait to be sure that the configuration has kicked in. @@ -1886,9 +1800,6 @@ setup_connection_timeout_api(_Config) -> %%----------------------------------------------------------------- %% iiop_setup_connection_timeout API tests for ORB to ORB. %%----------------------------------------------------------------- -setup_multi_connection_timeout_api(doc) -> - ["iiop_multi_setup_connection_timeout API tests for ORB to ORB."]; -setup_multi_connection_timeout_api(suite) -> []; setup_multi_connection_timeout_api(_Config) -> ?match(ok, application:set_env(orber, iiop_backlog, 0)), %% Wait to be sure that the configuration has kicked in. @@ -1911,9 +1822,6 @@ setup_multi_connection_timeout_api(_Config) -> ?match(ok, application:set_env(orber, iiop_out_ports, undefined)), ok. -setup_multi_connection_timeout_attempts_api(doc) -> - ["iiop_multi_setup_connection_timeout API tests for ORB to ORB."]; -setup_multi_connection_timeout_attempts_api(suite) -> []; setup_multi_connection_timeout_attempts_api(_Config) -> ?match(ok, application:set_env(orber, iiop_backlog, 0)), %% Wait to be sure that the configuration has kicked in. @@ -1937,9 +1845,6 @@ setup_multi_connection_timeout_attempts_api(_Config) -> ?match(ok, application:set_env(orber, iiop_out_ports, undefined)), ok. -setup_multi_connection_timeout_random_api(doc) -> - ["iiop_multi_setup_connection_timeout API tests for ORB to ORB."]; -setup_multi_connection_timeout_random_api(suite) -> []; setup_multi_connection_timeout_random_api(_Config) -> ?match(ok, application:set_env(orber, iiop_backlog, 0)), %% Wait to be sure that the configuration has kicked in. @@ -1966,8 +1871,6 @@ setup_multi_connection_timeout_random_api(_Config) -> %%----------------------------------------------------------------- %% Sending an incorrect header to the server-side ORB. %%----------------------------------------------------------------- -bad_giop_header_api(doc) -> ["Sending an incorrect header to the server-side ORB."]; -bad_giop_header_api(suite) -> []; bad_giop_header_api(_Config) -> orber:configure_override(interceptors, {native,[orber_iiop_tracer]}), orber:configure(orber_debug_level, 10), @@ -1996,8 +1899,6 @@ bad_giop_header_api(_Config) -> -define(FRAG_4, <<71,73,79,80,1,2,0,7,0,0,0,5,0,0,0,?REQUEST_ID,0>>). -fragments_server_api(doc) -> ["fragments API tests for server-side ORB."]; -fragments_server_api(suite) -> []; fragments_server_api(_Config) -> %% --- Create a slave-node --- {ok, Node, Host} = @@ -2054,8 +1955,6 @@ fragments_server_api(_Config) -> %%----------------------------------------------------------------- %% Fragmented IIOP tests (Server-side). Exceeding Maximum. %%----------------------------------------------------------------- -fragments_max_server_api(doc) -> ["Maximum fragments API tests for server-side ORB."]; -fragments_max_server_api(suite) -> []; fragments_max_server_api(_Config) -> %% --- Create a slave-node --- IP = orber_test_lib:get_host(), @@ -2065,8 +1964,6 @@ fragments_max_server_api(_Config) -> ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []), fragments_max_server(ServerNode, IP, ServerPort). -fragments_max_server_added_api(doc) -> ["Maximum fragments API tests for server-side ORB."]; -fragments_max_server_added_api(suite) -> []; fragments_max_server_added_api(_Config) -> %% --- Create a slave-node --- IP = orber_test_lib:get_host(), @@ -2128,8 +2025,6 @@ fragments_max_server(ServerNode, ServerHost, ServerPort) -> %%----------------------------------------------------------------- %% Fragmented IIOP tests (Client-side). %%----------------------------------------------------------------- -fragments_client_api(doc) -> ["fragments API tests for client-side ORB."]; -fragments_client_api(suite) -> []; fragments_client_api(_Config) -> Any = #any{typecode = {tk_string,0}, value = "123"}, @@ -2147,11 +2042,6 @@ fragments_client_api(_Config) -> orber:configure(orber_debug_level, 0), ok. -%%----------------------------------------------------------------- -%% Fragmented IIOP tests (Client-side). -%%----------------------------------------------------------------- -bad_fragment_id_client_api(doc) -> ["fragments API tests for client-side ORB."]; -bad_fragment_id_client_api(suite) -> []; bad_fragment_id_client_api(_Config) -> application:set_env(orber, interceptors, {native,[orber_iiop_tracer]}), orber:configure(orber_debug_level, 10), @@ -2171,8 +2061,6 @@ bad_fragment_id_client_api(_Config) -> %%----------------------------------------------------------------- %% Non-existing request id %%----------------------------------------------------------------- -bad_id_cancel_request_api(doc) -> ["Description", "more description"]; -bad_id_cancel_request_api(suite) -> []; bad_id_cancel_request_api(Config) when is_list(Config) -> Req10 = cdr_encode:enc_cancel_request(#giop_env{version = {1, 0}, request_id = 556}), diff --git a/lib/orber/test/naming_context_SUITE.erl b/lib/orber/test/naming_context_SUITE.erl index 12d93caf9f..2afede287a 100644 --- a/lib/orber/test/naming_context_SUITE.erl +++ b/lib/orber/test/naming_context_SUITE.erl @@ -31,7 +31,7 @@ -include_lib("orber/src/orber_iiop.hrl"). -include_lib("orber/include/corba.hrl"). --define(default_timeout, ?t:minutes(5)). +-define(default_timeout, test_server:minutes(5)). %%----------------------------------------------------------------- %% External exports @@ -68,7 +68,7 @@ _ -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -102,7 +102,7 @@ cases() -> init_per_testcase(_Case, Config) -> Path = code:which(?MODULE), code:add_pathz(filename:join(filename:dirname(Path), "idl_output")), - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), orber:jump_start(0), [{watchdog, Dog}|Config]. @@ -111,7 +111,7 @@ end_per_testcase(_Case, Config) -> Path = code:which(?MODULE), code:del_path(filename:join(filename:dirname(Path), "idl_output")), orber:jump_stop(), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -125,139 +125,134 @@ end_per_suite(Config) -> %% Test Case: name handling tests %% Description: %%----------------------------------------------------------------- -name_context(doc) -> ["Description", "more description"]; -name_context(suite) -> []; name_context(_) -> ?REMAP_EXCEPT(name_context_run()). name_context_run() -> - ?line Ns = corba:resolve_initial_references("NameService"), + Ns = corba:resolve_initial_references("NameService"), ?match({'EXCEPTION', #'NO_PERMISSION'{}}, 'CosNaming_NamingContextExt':destroy(Ns)), %% Create a test context. - ?line Tc = 'CosNaming_NamingContext':bind_new_context(Ns, + Tc = 'CosNaming_NamingContext':bind_new_context(Ns, [#'CosNaming_NameComponent'{id="testcontext", kind=""}]), %% Start testing - ?line 'CosNaming_NamingContext':bind(Tc, [#'CosNaming_NameComponent' + 'CosNaming_NamingContext':bind(Tc, [#'CosNaming_NameComponent' {id="hej", kind=""}], Ns), - ?line Ns = 'CosNaming_NamingContext':resolve(Tc, + Ns = 'CosNaming_NamingContext':resolve(Tc, [#'CosNaming_NameComponent'{id="hej", kind=""}]), - ?line Nc = 'CosNaming_NamingContext':new_context(Tc), - ?line 'CosNaming_NamingContext':bind(Tc, [#'CosNaming_NameComponent' + Nc = 'CosNaming_NamingContext':new_context(Tc), + 'CosNaming_NamingContext':bind(Tc, [#'CosNaming_NameComponent' {id="stop", kind=""}], Nc), - ?line Nc = 'CosNaming_NamingContext':resolve(Tc, + Nc = 'CosNaming_NamingContext':resolve(Tc, [#'CosNaming_NameComponent'{id="stop", kind=""}]), - ?line {'EXCEPTION', E0} = + {'EXCEPTION', E0} = (catch 'CosNaming_NamingContext':bind(Tc, [#'CosNaming_NameComponent'{id="stop", kind=""}], Ns)), - ?line ok = 'CosNaming_NamingContext':rebind(Tc, + ok = 'CosNaming_NamingContext':rebind(Tc, [#'CosNaming_NameComponent'{id="stop", kind=""}], Ns), - ?line {'CosNaming_NamingContext_AlreadyBound', _} = E0, - ?line 'CosNaming_NamingContext':bind_context(Tc, + {'CosNaming_NamingContext_AlreadyBound', _} = E0, + 'CosNaming_NamingContext':bind_context(Tc, [#'CosNaming_NameComponent'{id="evaluate", kind=""}], Nc), - ?line Nc = + Nc = 'CosNaming_NamingContext':resolve(Tc, [#'CosNaming_NameComponent'{id="evaluate", kind=""}]), - ?line 'CosNaming_NamingContext':bind(Tc, + 'CosNaming_NamingContext':bind(Tc, [#'CosNaming_NameComponent'{id="evaluate", kind=""}, #'CosNaming_NameComponent'{id="hej", kind=""}], Ns), - ?line ok = 'CosNaming_NamingContext':rebind(Tc, + ok = 'CosNaming_NamingContext':rebind(Tc, [#'CosNaming_NameComponent'{id="evaluate", kind=""}, #'CosNaming_NameComponent'{id="hej", kind=""}], Ns), - ?line Ns = 'CosNaming_NamingContext':resolve(Tc, + Ns = 'CosNaming_NamingContext':resolve(Tc, [#'CosNaming_NameComponent'{id="evaluate", kind=""}, #'CosNaming_NameComponent'{id="hej", kind=""}]), - ?line {'EXCEPTION', E1} = + {'EXCEPTION', E1} = (catch 'CosNaming_NamingContext':resolve(Tc, [#'CosNaming_NameComponent'{id="stop", kind=""}, #'CosNaming_NameComponent'{id="hej", kind=""}])), - ?line ?match(ok, orber_diagnostics:nameservice()), + ?match(ok, orber_diagnostics:nameservice()), - ?line {'CosNaming_NamingContext_CannotProceed', _,_,_} = E1, - ?line {'EXCEPTION', E2} = (catch 'CosNaming_NamingContext':destroy(Nc)), - ?line {'CosNaming_NamingContext_NotEmpty', _} = E2, - ?line ok = 'CosNaming_NamingContext':unbind(Tc, + {'CosNaming_NamingContext_CannotProceed', _,_,_} = E1, + {'EXCEPTION', E2} = (catch 'CosNaming_NamingContext':destroy(Nc)), + {'CosNaming_NamingContext_NotEmpty', _} = E2, + ok = 'CosNaming_NamingContext':unbind(Tc, [#'CosNaming_NameComponent'{id="evaluate", kind=""}, #'CosNaming_NameComponent'{id="hej", kind=""}]), - ?line ok = 'CosNaming_NamingContext':destroy(Nc), - ?line ok = 'CosNaming_NamingContext':unbind(Tc, + ok = 'CosNaming_NamingContext':destroy(Nc), + ok = 'CosNaming_NamingContext':unbind(Tc, [#'CosNaming_NameComponent'{id="evaluate", kind=""}]), - ?line ok = 'CosNaming_NamingContext':unbind(Tc, + ok = 'CosNaming_NamingContext':unbind(Tc, [#'CosNaming_NameComponent'{id="stop", kind=""}]), - ?line ok = 'CosNaming_NamingContext':unbind(Tc, + ok = 'CosNaming_NamingContext':unbind(Tc, [#'CosNaming_NameComponent'{id="hej", kind=""}]), - ?line case 'CosNaming_NamingContext':list(Tc, 3) of + case 'CosNaming_NamingContext':list(Tc, 3) of {ok, [], ?ORBER_NIL_OBJREF} -> ok; _ -> exit(not_empty) end, - ?line ok = 'CosNaming_NamingContext':unbind(Ns, + ok = 'CosNaming_NamingContext':unbind(Ns, [#'CosNaming_NameComponent'{id="testcontext", kind=""}]), - ?line ok = 'CosNaming_NamingContext':destroy(Tc), + ok = 'CosNaming_NamingContext':destroy(Tc), ok. -check_list(doc) -> - ["Check that the CosNaming::NamingContext::list()", - "returns ok.", - "Own Id: OTP-2023"]; -check_list(suite) -> []; +%% Check that the CosNaming::NamingContext::list() returns ok. +%% Own Id: OTP-2023 check_list(Config) when is_list(Config) -> ?REMAP_EXCEPT(check_list_run(Config)). check_list_run(_Config) -> create_default_contexts(), - ?line Ns = corba:resolve_initial_references("NameService"), - ?line {_, BL, _} = ?match({ok, _, ?ORBER_NIL_OBJREF}, + Ns = corba:resolve_initial_references("NameService"), + {_, BL, _} = ?match({ok, _, ?ORBER_NIL_OBJREF}, 'CosNaming_NamingContext':list(Ns, 256)), FF = fun(X) -> XX = hd(X#'CosNaming_Binding'.binding_name), XX#'CosNaming_NameComponent'.id end, L = lists:sort(lists:map(FF, BL)), - ?line ["host", "workgroup"] = L, + ["host", "workgroup"] = L, %% Test next_n/2 - ?line {_, _, BI} = ?match({ok, [], _BI}, 'CosNaming_NamingContext':list(Ns, 0)), - ?line ?match({true, []}, 'CosNaming_BindingIterator':next_n(BI, 0)), - ?line ?match({true, [_]}, 'CosNaming_BindingIterator':next_n(BI, 1)), - ?line ?match({false, [_]}, 'CosNaming_BindingIterator':next_n(BI, 1)), - ?line ?match({false, []}, 'CosNaming_BindingIterator':next_n(BI, 1)), - ?line ?match(ok, 'CosNaming_BindingIterator':destroy(BI)), - - ?line {_, _, BI2} = ?match({ok, [], _BI2}, 'CosNaming_NamingContext':list(Ns, 0)), - ?line ?match({true, _}, 'CosNaming_BindingIterator':next_one(BI2)), - ?line ?match({true, _}, 'CosNaming_BindingIterator':next_one(BI2)), - ?line ?match({false, _}, 'CosNaming_BindingIterator':next_one(BI2)), - ?line ?match(ok, 'CosNaming_BindingIterator':destroy(BI2)), - ?line ?match(ok, orber_diagnostics:nameservice()), + {_, _, BI} = ?match({ok, [], _BI}, 'CosNaming_NamingContext':list(Ns, 0)), + ?match({true, []}, 'CosNaming_BindingIterator':next_n(BI, 0)), + ?match({true, [_]}, 'CosNaming_BindingIterator':next_n(BI, 1)), + ?match({false, [_]}, 'CosNaming_BindingIterator':next_n(BI, 1)), + ?match({false, []}, 'CosNaming_BindingIterator':next_n(BI, 1)), + ?match(ok, 'CosNaming_BindingIterator':destroy(BI)), + + {_, _, BI2} = ?match({ok, [], _BI2}, 'CosNaming_NamingContext':list(Ns, 0)), + ?match({true, _}, 'CosNaming_BindingIterator':next_one(BI2)), + ?match({true, _}, 'CosNaming_BindingIterator':next_one(BI2)), + ?match({false, _}, 'CosNaming_BindingIterator':next_one(BI2)), + ?match(ok, 'CosNaming_BindingIterator':destroy(BI2)), + ?match(ok, orber_diagnostics:nameservice()), ok. create_default_contexts() -> @@ -308,13 +303,11 @@ create_default_contexts() -> %% Test Case: %% Description: %%----------------------------------------------------------------- -name_context_ext(doc) -> ["Description", "more description"]; -name_context_ext(suite) -> []; name_context_ext(_Config) -> ?REMAP_EXCEPT(name_context_ext_run()). name_context_ext_run() -> - ?line NS = ?match({_,pseudo,_, _,_, _}, + NS = ?match({_,pseudo,_, _,_, _}, corba:resolve_initial_references("NameService")), Name1 = [#'CosNaming_NameComponent'{id="\\", kind="kind1"}, @@ -357,7 +350,7 @@ name_context_ext_run() -> 'CosNaming_NamingContextExt':to_name(NS, BadString2)), %% Create a test context. - ?line Tc = ?match({_,pseudo,_, _,_, _}, + Tc = ?match({_,pseudo,_, _,_, _}, 'CosNaming_NamingContext':bind_new_context(NS, [#'CosNaming_NameComponent'{id="testcontext", kind=""}])), diff --git a/lib/orber/test/orber_SUITE.erl b/lib/orber/test/orber_SUITE.erl index 46403c00cb..75da31bc5f 100644 --- a/lib/orber/test/orber_SUITE.erl +++ b/lib/orber/test/orber_SUITE.erl @@ -21,7 +21,7 @@ -module(orber_SUITE). -include_lib("common_test/include/ct.hrl"). --define(default_timeout, ?t:minutes(15)). +-define(default_timeout, test_server:minutes(15)). -define(application, orber). % Test server specific exports @@ -64,21 +64,19 @@ end_per_group(_GroupName, Config) -> init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> - Dog=?config(watchdog, Config), + Dog=proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. % % Test cases starts here. % -app_test(doc) -> []; -app_test(suite) -> []; app_test(_Config) -> - ?line ok=?t:app_test(orber), + ok=test_server:app_test(orber), ok. otp_9887(_Config) -> @@ -103,10 +101,6 @@ otp_9887(_Config) -> ok. %% Install Orber using the load_order option. -install_load_order(suite) -> - []; -install_load_order(doc) -> - []; install_load_order(_Config) -> orber:jump_stop(), case catch install_load_order2() of @@ -129,10 +123,6 @@ install_load_order2() -> ok. %% Install Orber using the local_content option. -install_local_content(suite) -> - []; -install_local_content(doc) -> - []; install_local_content(_Config) -> orber:jump_stop(), case catch install_local_content2() of @@ -157,10 +147,6 @@ install_local_content2() -> %% Check for undefined functions -undefined_functions(suite) -> - []; -undefined_functions(doc) -> - []; undefined_functions(_Config) -> App = orber, Root = code:root_dir(), diff --git a/lib/orber/test/orber_acl_SUITE.erl b/lib/orber/test/orber_acl_SUITE.erl index 43dc4497bd..2b0a48adc9 100644 --- a/lib/orber/test/orber_acl_SUITE.erl +++ b/lib/orber/test/orber_acl_SUITE.erl @@ -28,7 +28,7 @@ -include_lib("common_test/include/ct.hrl"). --define(default_timeout, ?t:minutes(5)). +-define(default_timeout, test_server:minutes(5)). -define(match(ExpectedRes,Expr), fun() -> @@ -41,7 +41,7 @@ _ -> io:format("###### ERROR ERROR ######~nRESULT: ~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -92,21 +92,19 @@ end_per_suite(Config) -> init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. %%----------------------------------------------------------------- -%% Test Case : -%% Description: +%% Test Case +%% Description: Testing IPv4 Verify Operation %%----------------------------------------------------------------- -ipv4_verify(doc) -> ["Testing IPv4 Verify Operation."]; -ipv4_verify(suite) -> []; ipv4_verify(_) -> ?match(true, orber_acl:verify("192.168.64.148", "192.168.64.0/17", inet)), ?match({false,"192.168.128.0","192.168.255.255"}, @@ -133,10 +131,8 @@ ipv4_verify(_) -> %%----------------------------------------------------------------- %% Test Case : -%% Description: +%% Description: Testing IPv4 Range Operation %%----------------------------------------------------------------- -ipv4_range(doc) -> ["Testing IPv4 Range Operation."]; -ipv4_range(suite) -> []; ipv4_range(_) -> ?match({ok,"192.168.0.0", "192.168.127.255"}, orber_acl:range("192.168.64.0/17")), @@ -162,10 +158,8 @@ ipv4_range(_) -> %%----------------------------------------------------------------- %% Test Case : -%% Description: +%% Description: Testing IPv4 Interfaces Operation %%----------------------------------------------------------------- -ipv4_interfaces(doc) -> ["Testing IPv4 Interfaces Operation."]; -ipv4_interfaces(suite) -> []; ipv4_interfaces(_) -> ?match({ok, _}, orber_acl:init_acl([{tcp_in, "192.168.128.0/18", ["10.1.1.1"]}, @@ -185,19 +179,15 @@ ipv4_interfaces(_) -> %%----------------------------------------------------------------- %% Test Case : -%% Description: +%% Description: Benchmarking runtime critical IPv4 Operations %%----------------------------------------------------------------- -ipv4_bm(doc) -> ["Benchmarking runtime critical IPv4 Operations."]; -ipv4_bm(suite) -> []; ipv4_bm(_) -> ?match({ok, _, _, _}, bm2([{tcp_in, "192.168.64.0/17"}], inet, "192.168.64.148")), ok. %%----------------------------------------------------------------- %% Test Case : -%% Description: +%% Description: Testing IPv6 Verify Operation %%----------------------------------------------------------------- -ipv6_verify(doc) -> ["Testing IPv6 Verify Operation."]; -ipv6_verify(suite) -> []; ipv6_verify(_) -> case orber_test_lib:version_ok() of true -> @@ -215,10 +205,8 @@ ipv6_verify(_) -> %%----------------------------------------------------------------- %% Test Case : -%% Description: +%% Description: Testing IPv6 Range Operation %%----------------------------------------------------------------- -ipv6_range(doc) -> ["Testing IPv6 Range Operation."]; -ipv6_range(suite) -> []; ipv6_range(_) -> case orber_test_lib:version_ok() of true -> @@ -233,10 +221,8 @@ ipv6_range(_) -> %%----------------------------------------------------------------- %% Test Case : -%% Description: +%% Description: Testing IPv6 Interfaces Operation %%----------------------------------------------------------------- -ipv6_interfaces(doc) -> ["Testing IPv6 Interfaces Operation."]; -ipv6_interfaces(suite) -> []; ipv6_interfaces(_) -> case orber_test_lib:version_ok() of true -> @@ -252,10 +238,8 @@ ipv6_interfaces(_) -> %%----------------------------------------------------------------- %% Test Case : -%% Description: +%% Description: Benchmarking runtime critical IPv6 Operations %%----------------------------------------------------------------- -ipv6_bm(doc) -> ["Benchmarking runtime critical IPv6 Operations."]; -ipv6_bm(suite) -> []; ipv6_bm(_) -> case orber_test_lib:version_ok() of true -> diff --git a/lib/orber/test/orber_firewall_ipv4_in_SUITE.erl b/lib/orber/test/orber_firewall_ipv4_in_SUITE.erl index a76682608f..6d085d3bf5 100644 --- a/lib/orber/test/orber_firewall_ipv4_in_SUITE.erl +++ b/lib/orber/test/orber_firewall_ipv4_in_SUITE.erl @@ -30,7 +30,7 @@ -include_lib("orber/COSS/CosNaming/CosNaming_NamingContextExt.hrl"). -include_lib("orber/COSS/CosNaming/CosNaming_NamingContext.hrl"). --define(default_timeout, ?t:minutes(15)). +-define(default_timeout, test_server:minutes(15)). -define(match(ExpectedRes,Expr), fun() -> @@ -43,7 +43,7 @@ _ -> io:format("###### ERROR ERROR ######~nRESULT: ~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -87,12 +87,12 @@ cases() -> init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -113,8 +113,7 @@ end_per_suite(Config) -> %%----------------------------------------------------------------- %% Incomming connections - Deny %%----------------------------------------------------------------- -deny_port_api(doc) -> ["Deny Access due to invalid local port"]; -deny_port_api(suite) -> []; +%% Deny Access due to invalid local port deny_port_api(_Config) -> [IP] = ?match([_], orber:host()), {ok, ServerNode, _ServerHost} = @@ -123,11 +122,10 @@ deny_port_api(_Config) -> ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []), ?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}}, corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. -deny_port_range_api(doc) -> ["Deny Access due to invalid local port range"]; -deny_port_range_api(suite) -> []; +%% Deny Access due to invalid local port range deny_port_range_api(_Config) -> [IP] = ?match([_], orber:host()), {ok, ServerNode, _ServerHost} = @@ -136,12 +134,11 @@ deny_port_range_api(_Config) -> ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []), ?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}}, corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. -deny_host_api(doc) -> ["Deny Access due to invalid host"]; -deny_host_api(suite) -> []; +%% Deny Access due to invalid host deny_host_api(_Config) -> [IP] = ?match([_], orber:host()), {ok, ServerNode, _ServerHost} = @@ -150,11 +147,10 @@ deny_host_api(_Config) -> ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []), ?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}}, corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. -deny_peerhost_api(doc) -> ["Deny Access due to invalid peerhost"]; -deny_peerhost_api(suite) -> []; +%% Deny Access due to invalid peerhost deny_peerhost_api(_Config) -> [IP] = ?match([_], orber:host()), {ok, ServerNode, _ServerHost} = @@ -163,14 +159,13 @@ deny_peerhost_api(_Config) -> ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []), ?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}}, corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. %%----------------------------------------------------------------- %% Incomming connections - Allow %%----------------------------------------------------------------- -allow_port_range_api(doc) -> ["Allow Access due to valid local port range"]; -allow_port_range_api(suite) -> []; +%% Allow Access due to valid local port range allow_port_range_api(_Config) -> [IP] = ?match([_], orber:host()), {ok, ServerNode, _ServerHost} = @@ -181,12 +176,11 @@ allow_port_range_api(_Config) -> ?match({'IOP_IOR',_,_}, corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")), ?match(false, corba_object:not_existent(IOR)), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. -allow_host_api(doc) -> ["Allow Access due to valid host"]; -allow_host_api(suite) -> []; +%% Allow Access due to valid host allow_host_api(_Config) -> [IP] = ?match([_], orber:host()), {ok, ServerNode, _ServerHost} = @@ -197,11 +191,10 @@ allow_host_api(_Config) -> ?match({'IOP_IOR',_,_}, corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")), ?match(false, corba_object:not_existent(IOR)), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. -allow_peerhost_api(doc) -> ["Allow Access due to valid peerhost"]; -allow_peerhost_api(suite) -> []; +%% Allow Access due to valid peerhost allow_peerhost_api(_Config) -> [IP] = ?match([_], orber:host()), {ok, ServerNode, _ServerHost} = @@ -218,14 +211,12 @@ allow_peerhost_api(_Config) -> [#'IOP_ServiceContext' {context_id=?ORBER_GENERIC_CTX_ID, context_data = {interface, IP}}])), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. %%----------------------------------------------------------------- %% Test corbaloc strings %%----------------------------------------------------------------- -check_address_api(doc) -> ["Test corbaloc strings"]; -check_address_api(suite) -> []; check_address_api(_Config) -> ?match({[[iiop,{1,0},"10.0.0.1",2809]],"NameService"}, orber_cosnaming_utils:addresses(":10.0.0.1/NameService")), @@ -287,7 +278,7 @@ check_address_api(_Config) -> ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []), ?match({'IOP_IOR',_,_}, corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. diff --git a/lib/orber/test/orber_firewall_ipv4_out_SUITE.erl b/lib/orber/test/orber_firewall_ipv4_out_SUITE.erl index b1c8e00aba..e061d0410d 100644 --- a/lib/orber/test/orber_firewall_ipv4_out_SUITE.erl +++ b/lib/orber/test/orber_firewall_ipv4_out_SUITE.erl @@ -30,7 +30,7 @@ -include_lib("orber/COSS/CosNaming/CosNaming_NamingContextExt.hrl"). -include_lib("orber/COSS/CosNaming/CosNaming_NamingContext.hrl"). --define(default_timeout, ?t:minutes(15)). +-define(default_timeout, test_server:minutes(15)). -define(match(ExpectedRes,Expr), fun() -> @@ -43,7 +43,7 @@ _ -> io:format("###### ERROR ERROR ######~nRESULT: ~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -87,12 +87,12 @@ cases() -> init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -113,8 +113,7 @@ end_per_suite(Config) -> %%----------------------------------------------------------------- %% Incomming connections - Deny %%----------------------------------------------------------------- -deny_port_api(doc) -> ["Deny Access due to invalid local port"]; -deny_port_api(suite) -> []; +%% Deny Access due to invalid local port deny_port_api(_Config) -> [IP] = ?match([_], orber:host()), ServerPort = orber:iiop_port(), @@ -124,11 +123,10 @@ deny_port_api(_Config) -> ?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}}, orber_test_lib:remote_apply(ClientNode, corba, string_to_object, ["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])), -% ?line catch orber_test_lib:destroy_node(ClientNode, timeout), +% catch orber_test_lib:destroy_node(ClientNode, timeout), ok. -deny_port_range_api(doc) -> ["Deny Access due to invalid local port range"]; -deny_port_range_api(suite) -> []; +%% Deny Access due to invalid local port range deny_port_range_api(_Config) -> [IP] = ?match([_], orber:host()), ServerPort = orber:iiop_port(), @@ -138,12 +136,11 @@ deny_port_range_api(_Config) -> ?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}}, orber_test_lib:remote_apply(ClientNode, corba, string_to_object, ["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])), -% ?line catch orber_test_lib:destroy_node(ClientNode, timeout), +% catch orber_test_lib:destroy_node(ClientNode, timeout), ok. -deny_host_api(doc) -> ["Deny Access due to invalid host"]; -deny_host_api(suite) -> []; +%% Deny Access due to invalid host deny_host_api(_Config) -> [IP] = ?match([_], orber:host()), {ok, ClientNode, _ClientHost} = @@ -153,14 +150,13 @@ deny_host_api(_Config) -> ?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}}, orber_test_lib:remote_apply(ClientNode, corba, string_to_object, ["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])), -% ?line catch orber_test_lib:destroy_node(ClientNode, timeout), +% catch orber_test_lib:destroy_node(ClientNode, timeout), ok. %%----------------------------------------------------------------- %% Incomming connections - Allow %%----------------------------------------------------------------- -allow_port_api(doc) -> ["Allow Access due to valid local port range"]; -allow_port_api(suite) -> []; +%% Allow Access due to valid local port range allow_port_api(_Config) -> [IP] = ?match([_], orber:host()), ServerPort = orber:iiop_port(), @@ -173,11 +169,10 @@ allow_port_api(_Config) -> ["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])), ?match(false, orber_test_lib:remote_apply(ClientNode, corba_object, not_existent, [IOR])), -% ?line catch orber_test_lib:destroy_node(ClientNode, timeout), +% catch orber_test_lib:destroy_node(ClientNode, timeout), ok. -allow_port_range_api(doc) -> ["Allow Access due to valid local port range"]; -allow_port_range_api(suite) -> []; +%% Allow Access due to valid local port range allow_port_range_api(_Config) -> [IP] = ?match([_], orber:host()), ServerPort = orber:iiop_port(), @@ -190,12 +185,11 @@ allow_port_range_api(_Config) -> ["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])), ?match(false, orber_test_lib:remote_apply(ClientNode, corba_object, not_existent, [IOR])), -% ?line catch orber_test_lib:destroy_node(ClientNode, timeout), +% catch orber_test_lib:destroy_node(ClientNode, timeout), ok. -allow_host_api(doc) -> ["Allow Access due to valid host"]; -allow_host_api(suite) -> []; +%% Allow Access due to valid host allow_host_api(_Config) -> [IP] = ?match([_], orber:host()), {ok, ClientNode, _ClientHost} = @@ -208,11 +202,10 @@ allow_host_api(_Config) -> ["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])), ?match(false, orber_test_lib:remote_apply(ClientNode, corba_object, not_existent, [IOR])), -% ?line catch orber_test_lib:destroy_node(ClientNode, timeout), +% catch orber_test_lib:destroy_node(ClientNode, timeout), ok. -local_interface_api(doc) -> ["Allow Access due to valid host via a spcific interface"]; -local_interface_api(suite) -> []; +%% Allow Access due to valid host via a spcific interface local_interface_api(_Config) -> IP = orber_test_lib:get_host(), Loopback = orber_test_lib:get_loopback_interface(), @@ -231,6 +224,6 @@ local_interface_api(_Config) -> ["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])), ?match(false, orber_test_lib:remote_apply(ClientNode, corba_object, not_existent, [IOR])), -% ?line catch orber_test_lib:destroy_node(ClientNode, timeout), +% catch orber_test_lib:destroy_node(ClientNode, timeout), ok. diff --git a/lib/orber/test/orber_firewall_ipv6_in_SUITE.erl b/lib/orber/test/orber_firewall_ipv6_in_SUITE.erl index e1a172140c..ee879f5ea8 100644 --- a/lib/orber/test/orber_firewall_ipv6_in_SUITE.erl +++ b/lib/orber/test/orber_firewall_ipv6_in_SUITE.erl @@ -30,7 +30,7 @@ -include_lib("orber/COSS/CosNaming/CosNaming_NamingContextExt.hrl"). -include_lib("orber/COSS/CosNaming/CosNaming_NamingContext.hrl"). --define(default_timeout, ?t:minutes(15)). +-define(default_timeout, test_server:minutes(15)). -define(match(ExpectedRes,Expr), fun() -> @@ -43,7 +43,7 @@ _ -> io:format("###### ERROR ERROR ######~nRESULT: ~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -87,7 +87,7 @@ cases() -> init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), orber:jump_start([{iiop_port, 0}, {iiop_out_ports, {5980, 6000}}, {flags, ?ORB_ENV_USE_IPV6}]), @@ -96,7 +96,7 @@ init_per_testcase(_Case, Config) -> end_per_testcase(_Case, Config) -> orber:jump_stop(), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -120,8 +120,7 @@ end_per_suite(Config) -> %%----------------------------------------------------------------- %% Incomming connections - Deny %%----------------------------------------------------------------- -deny_port_api(doc) -> ["Deny Access due to invalid local port"]; -deny_port_api(suite) -> []; +%% Deny Access due to invalid local port deny_port_api(_Config) -> [IP] = ?match([_], orber:host()), {ok, ServerNode, ServerHost} = @@ -131,11 +130,10 @@ deny_port_api(_Config) -> ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []), ?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}}, corba:string_to_object("corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService")), - % ?line catch orber_test_lib:destroy_node(ServerNode, timeout), + % catch orber_test_lib:destroy_node(ServerNode, timeout), ok. -deny_port_range_api(doc) -> ["Deny Access due to invalid local port range"]; -deny_port_range_api(suite) -> []; +%% Deny Access due to invalid local port range deny_port_range_api(_Config) -> [IP] = ?match([_], orber:host()), {ok, ServerNode, ServerHost} = @@ -145,12 +143,11 @@ deny_port_range_api(_Config) -> ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []), ?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}}, corba:string_to_object("corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService")), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. -deny_host_api(doc) -> ["Deny Access due to invalid host"]; -deny_host_api(suite) -> []; +%% Deny Access due to invalid host deny_host_api(_Config) -> {ok, ServerNode, ServerHost} = ?match({ok,_,_}, orber_test_lib:js_node([{flags, (?ORB_ENV_USE_IPV6 bor @@ -159,11 +156,10 @@ deny_host_api(_Config) -> ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []), ?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}}, corba:string_to_object("corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService")), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. -deny_peerhost_api(doc) -> ["Deny Access due to invalid peer host"]; -deny_peerhost_api(suite) -> []; +%% Deny Access due to invalid peer host deny_peerhost_api(_Config) -> [IP] = ?match([_], orber:host()), {ok, ServerNode, ServerHost} = @@ -174,14 +170,13 @@ deny_peerhost_api(_Config) -> ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []), ?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}}, corba:string_to_object("corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService")), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. %%----------------------------------------------------------------- %% Incomming connections - Allow %%----------------------------------------------------------------- -allow_port_range_api(doc) -> ["Allow Access due to valid local port range"]; -allow_port_range_api(suite) -> []; +%% Allow Access due to valid local port range allow_port_range_api(_Config) -> [IP] = ?match([_], orber:host()), {ok, ServerNode, ServerHost} = @@ -194,12 +189,11 @@ allow_port_range_api(_Config) -> ?match({'IOP_IOR',_,_}, corba:string_to_object("corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService")), ?match(false, corba_object:not_existent(IOR)), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. -allow_host_api(doc) -> ["Allow Access due to valid host"]; -allow_host_api(suite) -> []; +%% Allow Access due to valid host allow_host_api(_Config) -> [IP] = ?match([_], orber:host()), {ok, ServerNode, ServerHost} = @@ -212,11 +206,10 @@ allow_host_api(_Config) -> corba:string_to_object("corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService")), ?match(false, corba_object:not_existent(IOR)), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. -allow_peerhost_api(doc) -> ["Allow Access due to valid host"]; -allow_peerhost_api(suite) -> []; +%% Allow Access due to valid host allow_peerhost_api(_Config) -> [IP] = ?match([_], orber:host()), {ok, ServerNode, ServerHost} = @@ -235,14 +228,12 @@ allow_peerhost_api(_Config) -> {context_id=?ORBER_GENERIC_CTX_ID, context_data = {interface, IP}}])), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. %%----------------------------------------------------------------- %% Test corbaloc strings %%----------------------------------------------------------------- -check_address_api(doc) -> ["Test corbaloc strings"]; -check_address_api(suite) -> []; check_address_api(_Config) -> ?match({[[iiop,{1,0},"0:0:0:0:0:FFFF:C02A:2A2A",2809]],"NameService"}, orber_cosnaming_utils:addresses(":[0:0:0:0:0:FFFF:C02A:2A2A]/NameService")), @@ -318,7 +309,7 @@ check_address_api(_Config) -> ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []), ?match({'IOP_IOR',_,_}, corba:string_to_object("corbaloc::1.2@["++IP++"]:"++integer_to_list(ServerPort)++"/NameService")), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. diff --git a/lib/orber/test/orber_firewall_ipv6_out_SUITE.erl b/lib/orber/test/orber_firewall_ipv6_out_SUITE.erl index 8dfc7d9d6f..0fe305aeb5 100644 --- a/lib/orber/test/orber_firewall_ipv6_out_SUITE.erl +++ b/lib/orber/test/orber_firewall_ipv6_out_SUITE.erl @@ -30,7 +30,7 @@ -include_lib("orber/COSS/CosNaming/CosNaming_NamingContextExt.hrl"). -include_lib("orber/COSS/CosNaming/CosNaming_NamingContext.hrl"). --define(default_timeout, ?t:minutes(15)). +-define(default_timeout, test_server:minutes(15)). -define(match(ExpectedRes,Expr), fun() -> @@ -43,7 +43,7 @@ _ -> io:format("###### ERROR ERROR ######~nRESULT: ~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -87,7 +87,7 @@ cases() -> init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), orber:jump_start([{iiop_port, 0}, {iiop_out_ports, {5980, 6000}}, {flags, ?ORB_ENV_USE_IPV6}]), @@ -96,7 +96,7 @@ init_per_testcase(_Case, Config) -> end_per_testcase(_Case, Config) -> orber:jump_stop(), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -120,8 +120,7 @@ end_per_suite(Config) -> %%----------------------------------------------------------------- %% Incomming connections - Deny %%----------------------------------------------------------------- -deny_port_api(doc) -> ["Deny Access due to invalid local port"]; -deny_port_api(suite) -> []; +%% Deny Access due to invalid local port deny_port_api(_Config) -> [IP] = ?match([_], orber:host()), ServerPort = orber:iiop_port(), @@ -132,11 +131,10 @@ deny_port_api(_Config) -> ?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}}, orber_test_lib:remote_apply(ServerNode, corba, string_to_object, ["corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService"])), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. -deny_port_range_api(doc) -> ["Deny Access due to invalid local port range"]; -deny_port_range_api(suite) -> []; +%% Deny Access due to invalid local port range deny_port_range_api(_Config) -> [IP] = ?match([_], orber:host()), ServerPort = orber:iiop_port(), @@ -147,12 +145,11 @@ deny_port_range_api(_Config) -> ?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}}, orber_test_lib:remote_apply(ServerNode, corba, string_to_object, ["corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService"])), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. -deny_host_api(doc) -> ["Deny Access due to invalid host"]; -deny_host_api(suite) -> []; +%% Deny Access due to invalid host deny_host_api(_Config) -> {ok, ServerNode, ServerHost} = ?match({ok,_,_}, orber_test_lib:js_node([{flags, (?ORB_ENV_USE_IPV6 bor @@ -162,14 +159,13 @@ deny_host_api(_Config) -> ?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}}, orber_test_lib:remote_apply(ServerNode, corba, string_to_object, ["corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService"])), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. %%----------------------------------------------------------------- %% Incomming connections - Allow %%----------------------------------------------------------------- -allow_port_api(doc) -> ["Allow Access due to valid local port"]; -allow_port_api(suite) -> []; +%% Allow Access due to valid local port allow_port_api(_Config) -> [IP] = ?match([_], orber:host()), ServerPort = orber:iiop_port(), @@ -183,11 +179,10 @@ allow_port_api(_Config) -> ["corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService"])), ?match(false, orber_test_lib:remote_apply(ServerNode, corba_object, not_existent, [IOR])), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. -allow_port_range_api(doc) -> ["Allow Access due to valid local port range"]; -allow_port_range_api(suite) -> []; +%% Allow Access due to valid local port range allow_port_range_api(_Config) -> [IP] = ?match([_], orber:host()), ServerPort = orber:iiop_port(), @@ -201,12 +196,11 @@ allow_port_range_api(_Config) -> ["corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService"])), ?match(false, orber_test_lib:remote_apply(ServerNode, corba_object, not_existent, [IOR])), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. -allow_host_api(doc) -> ["Allow Access due to valid host"]; -allow_host_api(suite) -> []; +%% Allow Access due to valid host allow_host_api(_Config) -> [IP] = ?match([_], orber:host()), {ok, ServerNode, ServerHost} = @@ -220,11 +214,10 @@ allow_host_api(_Config) -> ["corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService"])), ?match(false, orber_test_lib:remote_apply(ServerNode, corba_object, not_existent, [IOR])), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. -local_interface_api(doc) -> ["Allow Access due to valid host via a spcific interface"]; -local_interface_api(suite) -> []; +%% Allow Access due to valid host via a spcific interface local_interface_api(_Config) -> [IP] = ?match([_], orber:host()), {ok, ServerNode, ServerHost} = @@ -238,6 +231,6 @@ local_interface_api(_Config) -> ["corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService"])), ?match(false, orber_test_lib:remote_apply(ServerNode, corba_object, not_existent, [IOR])), -% ?line catch orber_test_lib:destroy_node(ServerNode, timeout), +% catch orber_test_lib:destroy_node(ServerNode, timeout), ok. diff --git a/lib/orber/test/orber_nat_SUITE.erl b/lib/orber/test/orber_nat_SUITE.erl index 24744a6348..029a5e529b 100644 --- a/lib/orber/test/orber_nat_SUITE.erl +++ b/lib/orber/test/orber_nat_SUITE.erl @@ -31,7 +31,7 @@ -include_lib("orber/COSS/CosNaming/CosNaming_NamingContext.hrl"). --define(default_timeout, ?t:minutes(15)). +-define(default_timeout, test_server:minutes(15)). -define(match(ExpectedRes,Expr), fun() -> @@ -44,7 +44,7 @@ _ -> io:format("###### ERROR ERROR ######~nRESULT: ~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -102,7 +102,7 @@ cases() -> init_per_testcase(TC, Config) when TC =:= nat_iiop_ssl_port; TC =:= nat_iiop_ssl_port_local -> - case ?config(crypto_started, Config) of + case proplists:get_value(crypto_started, Config) of true -> case orber_test_lib:ssl_version() of no_ssl -> @@ -128,7 +128,7 @@ end_per_testcase(_Case, Config) -> orber:jump_stop(), Path = code:which(?MODULE), code:del_path(filename:join(filename:dirname(Path), "idl_output")), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -152,10 +152,8 @@ end_per_suite(Config) -> %%----------------------------------------------------------------- %% API tests for NAT %%----------------------------------------------------------------- - -nat_ip_address(doc) -> ["This case test if the server ORB use the correct", - "interface when exporting IOR:s"]; -nat_ip_address(suite) -> []; +%% These case test if the server ORB use the correct +%% interface when exporting IOR:s nat_ip_address(_Config) -> IP = orber_test_lib:get_host(), Loopback = orber_test_lib:get_loopback_interface(), @@ -169,9 +167,6 @@ nat_ip_address(_Config) -> iop_ior:get_key(IOR)), ok. -nat_ip_address_multiple(doc) -> ["This case test if the server ORB use the correct", - "interface when exporting IOR:s"]; -nat_ip_address_multiple(suite) -> []; nat_ip_address_multiple(_Config) -> IP = orber_test_lib:get_host(), @@ -185,9 +180,6 @@ nat_ip_address_multiple(_Config) -> iop_ior:get_key(IOR)), ok. -nat_ip_address_local(doc) -> ["This case test if the server ORB use the correct", - "interface when exporting IOR:s"]; -nat_ip_address_local(suite) -> []; nat_ip_address_local(_Config) -> IP = orber_test_lib:get_host(), {ok, ServerNode, _ServerHost} = @@ -200,9 +192,6 @@ nat_ip_address_local(_Config) -> iop_ior:get_key(IOR)), ok. -nat_ip_address_local_local(doc) -> ["This case test if the server ORB use the correct", - "interface when exporting IOR:s"]; -nat_ip_address_local_local(suite) -> []; nat_ip_address_local_local(_Config) -> IP = orber_test_lib:get_host(), Loopback = orber_test_lib:get_loopback_interface(), @@ -222,9 +211,6 @@ nat_ip_address_local_local(_Config) -> iop_ior:get_key(IOR2)), ok. -nat_iiop_port(doc) -> ["This case test if the server ORB use the correct", - "port when exporting IOR:s"]; -nat_iiop_port(suite) -> []; nat_iiop_port(_Config) -> IP = orber_test_lib:get_host(), {ok, ServerNode, _ServerHost} = @@ -237,9 +223,6 @@ nat_iiop_port(_Config) -> iop_ior:get_key(IOR)), ok. -nat_iiop_port_local(doc) -> ["This case test if the server ORB use the correct", - "port when exporting IOR:s"]; -nat_iiop_port_local(suite) -> []; nat_iiop_port_local(_Config) -> IP = orber_test_lib:get_host(), {ok, ServerNode, _ServerHost} = @@ -252,9 +235,6 @@ nat_iiop_port_local(_Config) -> iop_ior:get_key(IOR)), ok. -nat_iiop_port_local_local(doc) -> ["This case test if the server ORB use the correct", - "port when exporting IOR:s"]; -nat_iiop_port_local_local(suite) -> []; nat_iiop_port_local_local(_Config) -> IP = orber_test_lib:get_host(), Loopback = orber_test_lib:get_loopback_interface(), @@ -286,11 +266,8 @@ nat_iiop_port_local_local(_Config) -> %%----------------------------------------------------------------- %% API tests for ORB to ORB, ssl security depth 1 %%----------------------------------------------------------------- - - -nat_iiop_ssl_port(doc) -> ["SECURE MULTI ORB API tests (SSL depth 1)", - "Make sure NAT works for SSL"]; -nat_iiop_ssl_port(suite) -> []; +%% SECURE MULTI ORB API tests (SSL depth 1) +%% Make sure NAT works for SSL nat_iiop_ssl_port(_Config) -> IP = orber_test_lib:get_host(), @@ -337,9 +314,6 @@ nat_iiop_ssl_port(_Config) -> remove_listen_interface, [Ref])), ok. -nat_iiop_ssl_port_local(doc) -> ["SECURE MULTI ORB API tests (SSL depth 1)", - "Make sure NAT works for SSL"]; -nat_iiop_ssl_port_local(suite) -> []; nat_iiop_ssl_port_local(_Config) -> IP = orber_test_lib:get_host(), diff --git a/lib/orber/test/orber_web_SUITE.erl b/lib/orber/test/orber_web_SUITE.erl index 2966fbd994..b272eb3fcf 100644 --- a/lib/orber/test/orber_web_SUITE.erl +++ b/lib/orber/test/orber_web_SUITE.erl @@ -30,7 +30,7 @@ -include_lib("orber/include/corba.hrl"). -include_lib("orber/src/orber_iiop.hrl"). --define(default_timeout, ?t:minutes(3)). +-define(default_timeout, test_server:minutes(3)). -define(match(ExpectedRes, Expr), fun() -> @@ -43,7 +43,7 @@ _ -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -54,7 +54,7 @@ Not -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS); + exit(AcTuAlReS); _ -> io:format("------ CORRECT RESULT ------~n~p~n", [AcTuAlReS]), @@ -106,7 +106,7 @@ end_per_group(_GroupName, Config) -> %% Init and cleanup functions. %%----------------------------------------------------------------- init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), Path = code:which(?MODULE), code:add_pathz(filename:join(filename:dirname(Path), "idl_output")), orber:jump_start(2875), @@ -119,7 +119,7 @@ end_per_testcase(_Case, Config) -> orber:jump_stop(), Path = code:which(?MODULE), code:del_path(filename:join(filename:dirname(Path), "idl_output")), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -127,8 +127,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: menu %% Description: %%----------------------------------------------------------------- -menu(doc) -> [""]; -menu(suite) -> []; menu(_) -> Node = atom_to_list(node()), OK = orber_web:menu(env, [{"node", Node}]), @@ -141,8 +139,6 @@ menu(_) -> %% Test Case: configure %% Description: %%----------------------------------------------------------------- -configure(doc) -> [""]; -configure(suite) -> []; configure(_) -> Node = atom_to_list(node()), ?match({'EXIT', _}, orber_web:configure(env, [])), @@ -162,8 +158,6 @@ configure(_) -> %% Test Case: info %% Description: %%----------------------------------------------------------------- -info(doc) -> [""]; -info(suite) -> []; info(_) -> ?match({'EXIT', _}, orber_web:info(env, [])), ?match({'EXIT', _}, orber_web:info(env, [{"node", localhost}])), @@ -174,8 +168,6 @@ info(_) -> %% Test Case: nameservice %% Description: %%----------------------------------------------------------------- -nameservice(doc) -> [""]; -nameservice(suite) -> []; nameservice(_) -> NodeStr = atom_to_list(node()), ?match({'EXIT', _}, orber_web:nameservice(env, [{"node", localhost}, @@ -215,8 +207,6 @@ nameservice(_) -> %% Test Case: ifr_select %% Description: %%----------------------------------------------------------------- -ifr_select(doc) -> [""]; -ifr_select(suite) -> []; ifr_select(_) -> ?match({'EXIT', _}, orber_web:ifr_select(env, [])), ?match({'EXIT', _}, orber_web:ifr_select(env, [{"node", localhost}])), @@ -228,8 +218,6 @@ ifr_select(_) -> %% Test Case: ifr_data %% Description: %%----------------------------------------------------------------- -ifr_data(doc) -> [""]; -ifr_data(suite) -> []; ifr_data(_) -> ?match({'EXIT', _}, orber_web:ifr_data(env, [])), ?match({'EXIT', _}, orber_web:ifr_data(env, [{"node", localhost}, @@ -266,8 +254,6 @@ ifr_data(_) -> %% Test Case: create %% Description: %%----------------------------------------------------------------- -create(doc) -> [""]; -create(suite) -> []; create(_) -> NodeStr = atom_to_list(node()), ?match({'EXIT', _}, orber_web:create(env, [])), @@ -347,8 +333,6 @@ create(_) -> %% Test Case: delete_ctx %% Description: %%----------------------------------------------------------------- -delete_ctx(doc) -> [""]; -delete_ctx(suite) -> []; delete_ctx(_) -> ?match({ok, _}, orber_web:delete_ctx(env, [{"node", atom_to_list(node())}, {"context", "id1"}])), @@ -363,8 +347,6 @@ delete_ctx(_) -> %% Test Case: add_ctx %% Description: %%----------------------------------------------------------------- -add_ctx(doc) -> [""]; -add_ctx(suite) -> []; add_ctx(_) -> ?match({error, _}, orber_web:add_ctx(env, [{"node", "bad_node"}, {"context", "root"}, @@ -384,8 +366,6 @@ add_ctx(_) -> %% Test Case: delete_obj %% Description: %%----------------------------------------------------------------- -delete_obj(doc) -> [""]; -delete_obj(suite) -> []; delete_obj(_) -> NodeStr = atom_to_list(node()), ?match({error, _}, orber_web:delete_obj(env, [{"node", "bad_node"}, @@ -436,8 +416,6 @@ delete_obj(_) -> %% Test Case: server %% Description: %%----------------------------------------------------------------- -server(doc) -> [""]; -server(suite) -> []; server(_) -> NodeStr = "node=" ++ atom_to_list(node()), {ok, Pid} = ?match({ok,_}, orber_web_server:start()), diff --git a/lib/orber/test/tc_SUITE.erl b/lib/orber/test/tc_SUITE.erl index 565d9f4645..4572057403 100644 --- a/lib/orber/test/tc_SUITE.erl +++ b/lib/orber/test/tc_SUITE.erl @@ -3,7 +3,7 @@ %% %% Copyright Ericsson AB 2004-2016. All Rights Reserved. %% -%% Licensed under the Apache License, Version 2.0 (the "License"); +%% Licensed under the Apache Li2cense, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% @@ -29,7 +29,7 @@ -include_lib("common_test/include/ct.hrl"). -include_lib("orber/src/orber_iiop.hrl"). --define(default_timeout, ?t:minutes(3)). +-define(default_timeout, test_server:minutes(3)). -define(match(Expr), fun() -> @@ -173,12 +173,12 @@ end_per_group(_GroupName, Config) -> %%----------------------------------------------------------------- init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -186,66 +186,54 @@ end_per_testcase(_Case, Config) -> %% Test Case: null test %% Description: %%----------------------------------------------------------------- -null(doc) -> []; -null(suite) -> []; null(_) -> - ?line true = orber_tc:check_tc(orber_tc:null()), - ?line code(orber_tc:null()), + true = orber_tc:check_tc(orber_tc:null()), + code(orber_tc:null()), ok. %%----------------------------------------------------------------- %% Test Case: void test %% Description: %%----------------------------------------------------------------- -void(doc) -> []; -void(suite) -> []; void(_) -> - ?line true = orber_tc:check_tc(orber_tc:void()), - ?line code(orber_tc:void()), + true = orber_tc:check_tc(orber_tc:void()), + code(orber_tc:void()), ok. %%----------------------------------------------------------------- %% Test Case: short integer test %% Description: %%----------------------------------------------------------------- -short(doc) -> []; -short(suite) -> []; short(_) -> - ?line true = orber_tc:check_tc(orber_tc:short()), - ?line code(orber_tc:short()), + true = orber_tc:check_tc(orber_tc:short()), + code(orber_tc:short()), ok. %%----------------------------------------------------------------- %% Test Case: unsigned short integer test %% Description: %%----------------------------------------------------------------- -ushort(doc) -> []; -ushort(suite) -> []; ushort(_) -> - ?line true = orber_tc:check_tc(orber_tc:unsigned_short()), - ?line code(orber_tc:unsigned_short()), + true = orber_tc:check_tc(orber_tc:unsigned_short()), + code(orber_tc:unsigned_short()), ok. %%----------------------------------------------------------------- %% Test Case: long integer test %% Description: %%----------------------------------------------------------------- -long(doc) -> []; -long(suite) -> []; long(_) -> - ?line true = orber_tc:check_tc(orber_tc:long()), - ?line code(orber_tc:long()), + true = orber_tc:check_tc(orber_tc:long()), + code(orber_tc:long()), ok. %%----------------------------------------------------------------- %% Test Case: unsigned long integer test %% Description: %%----------------------------------------------------------------- -ulong(doc) -> []; -ulong(suite) -> []; ulong(_) -> - ?line true = orber_tc:check_tc(orber_tc:unsigned_long()), - ?line code(orber_tc:unsigned_long()), + true = orber_tc:check_tc(orber_tc:unsigned_long()), + code(orber_tc:unsigned_long()), ok. @@ -253,22 +241,18 @@ ulong(_) -> %% Test Case: long integer test %% Description: %%----------------------------------------------------------------- -longlong(doc) -> []; -longlong(suite) -> []; longlong(_) -> - ?line true = orber_tc:check_tc(orber_tc:long_long()), - ?line code(orber_tc:long_long()), + true = orber_tc:check_tc(orber_tc:long_long()), + code(orber_tc:long_long()), ok. %%----------------------------------------------------------------- %% Test Case: unsigned long integer test %% Description: %%----------------------------------------------------------------- -ulonglong(doc) -> []; -ulonglong(suite) -> []; ulonglong(_) -> - ?line true = orber_tc:check_tc(orber_tc:unsigned_long_long()), - ?line code(orber_tc:unsigned_long_long()), + true = orber_tc:check_tc(orber_tc:unsigned_long_long()), + code(orber_tc:unsigned_long_long()), ok. @@ -276,110 +260,90 @@ ulonglong(_) -> %% Test Case: float test %% Description: %%----------------------------------------------------------------- -float(doc) -> []; -float(suite) -> []; float(_) -> - ?line true = orber_tc:check_tc(orber_tc:'float'()), - ?line code(orber_tc:'float'()), + true = orber_tc:check_tc(orber_tc:'float'()), + code(orber_tc:'float'()), ok. %%----------------------------------------------------------------- %% Test Case: double test %% Description: %%----------------------------------------------------------------- -double(doc) -> []; -double(suite) -> []; double(_) -> - ?line true = orber_tc:check_tc(orber_tc:double()), - ?line code(orber_tc:double()), + true = orber_tc:check_tc(orber_tc:double()), + code(orber_tc:double()), ok. %%----------------------------------------------------------------- %% Test Case: longdouble test %% Description: %%----------------------------------------------------------------- -longdouble(doc) -> []; -longdouble(suite) -> []; longdouble(_) -> - ?line true = orber_tc:check_tc(orber_tc:longdouble()), - ?line code(orber_tc:longdouble()), + true = orber_tc:check_tc(orber_tc:longdouble()), + code(orber_tc:longdouble()), ok. %%----------------------------------------------------------------- %% Test Case: boolean test %% Description: %%----------------------------------------------------------------- -boolean(doc) -> []; -boolean(suite) -> []; boolean(_) -> - ?line true = orber_tc:check_tc(orber_tc:boolean()), - ?line code(orber_tc:boolean()), + true = orber_tc:check_tc(orber_tc:boolean()), + code(orber_tc:boolean()), ok. %%----------------------------------------------------------------- %% Test Case: character test %% Description: %%----------------------------------------------------------------- -char(doc) -> []; -char(suite) -> []; char(_) -> - ?line true = orber_tc:check_tc(orber_tc:char()), - ?line code(orber_tc:char()), + true = orber_tc:check_tc(orber_tc:char()), + code(orber_tc:char()), ok. %%----------------------------------------------------------------- %% Test Case: character test %% Description: %%----------------------------------------------------------------- -wchar(doc) -> []; -wchar(suite) -> []; wchar(_) -> - ?line true = orber_tc:check_tc(orber_tc:wchar()), - ?line code(orber_tc:wchar()), + true = orber_tc:check_tc(orber_tc:wchar()), + code(orber_tc:wchar()), ok. %%----------------------------------------------------------------- %% Test Case: octet test %% Description: %%----------------------------------------------------------------- -octet(doc) -> []; -octet(suite) -> []; octet(_) -> - ?line true = orber_tc:check_tc(orber_tc:octet()), - ?line code(orber_tc:octet()), + true = orber_tc:check_tc(orber_tc:octet()), + code(orber_tc:octet()), ok. %%----------------------------------------------------------------- %% Test Case: any test %% Description: %%----------------------------------------------------------------- -any(doc) -> []; -any(suite) -> []; any(_) -> - ?line true = orber_tc:check_tc(orber_tc:any()), - ?line code(orber_tc:any()), + true = orber_tc:check_tc(orber_tc:any()), + code(orber_tc:any()), ok. %%----------------------------------------------------------------- %% Test Case: typecode test %% Description: %%----------------------------------------------------------------- -typecode(doc) -> []; -typecode(suite) -> []; typecode(_) -> - ?line true = orber_tc:check_tc(orber_tc:typecode()), - ?line code(orber_tc:typecode()), + true = orber_tc:check_tc(orber_tc:typecode()), + code(orber_tc:typecode()), ok. %%----------------------------------------------------------------- %% Test Case: principal test %% Description: %%----------------------------------------------------------------- -principal(doc) -> []; -principal(suite) -> []; principal(_) -> - ?line true = orber_tc:check_tc(orber_tc:principal()), - ?line code(orber_tc:principal()), + true = orber_tc:check_tc(orber_tc:principal()), + code(orber_tc:principal()), ok. @@ -387,62 +351,56 @@ principal(_) -> %% Test Case: object_reference test %% Description: %%----------------------------------------------------------------- -object_reference(doc) -> []; -object_reference(suite) -> []; object_reference(_) -> - ?line true = orber_tc:check_tc(orber_tc:object_reference("Id", "Name")), - ?line false = orber_tc:check_tc(orber_tc:object_reference(42, "Name")), - ?line false = orber_tc:check_tc(orber_tc:object_reference("Id", 42)), - ?line code(orber_tc:object_reference("Id", "Name")), - ?line ?match(code(orber_tc:object_reference(42, "Name"))), - ?line ?match(code(orber_tc:object_reference("Id", 42))), + true = orber_tc:check_tc(orber_tc:object_reference("Id", "Name")), + false = orber_tc:check_tc(orber_tc:object_reference(42, "Name")), + false = orber_tc:check_tc(orber_tc:object_reference("Id", 42)), + code(orber_tc:object_reference("Id", "Name")), + ?match(code(orber_tc:object_reference(42, "Name"))), + ?match(code(orber_tc:object_reference("Id", 42))), ok. %%----------------------------------------------------------------- %% Test Case: struct %% Description: %%----------------------------------------------------------------- -struct(doc) -> []; -struct(suite) -> []; struct(_) -> - ?line true = orber_tc:check_tc(orber_tc:struct("Id", "Name", ?ELIST)), - ?line false = orber_tc:check_tc(orber_tc:struct(42, "Name", ?ELIST)), - ?line false = orber_tc:check_tc(orber_tc:struct("Id", false, ?ELIST)), - ?line false = orber_tc:check_tc(orber_tc:struct("Id", "Name", ?VELIST)), - ?line false = orber_tc:check_tc(orber_tc:struct("Id", "Name", "wrong")), - ?line code(orber_tc:struct("Id", "Name", ?ELIST)), - ?line ?match(code(orber_tc:struct(42, "Name", ?ELIST))), - ?line ?match(code(orber_tc:struct("Id", false, ?ELIST))), - ?line ?match(code(orber_tc:struct("Id", "Name", ?VELIST))), - ?line ?match(code(orber_tc:struct("Id", "Name", "wrong"))), + true = orber_tc:check_tc(orber_tc:struct("Id", "Name", ?ELIST)), + false = orber_tc:check_tc(orber_tc:struct(42, "Name", ?ELIST)), + false = orber_tc:check_tc(orber_tc:struct("Id", false, ?ELIST)), + false = orber_tc:check_tc(orber_tc:struct("Id", "Name", ?VELIST)), + false = orber_tc:check_tc(orber_tc:struct("Id", "Name", "wrong")), + code(orber_tc:struct("Id", "Name", ?ELIST)), + ?match(code(orber_tc:struct(42, "Name", ?ELIST))), + ?match(code(orber_tc:struct("Id", false, ?ELIST))), + ?match(code(orber_tc:struct("Id", "Name", ?VELIST))), + ?match(code(orber_tc:struct("Id", "Name", "wrong"))), ok. %%----------------------------------------------------------------- %% Test Case: union %% Description: %%----------------------------------------------------------------- -union(doc) -> []; -union(suite) -> []; union(_) -> - ?line true = orber_tc:check_tc(orber_tc:union("Id", "Name", orber_tc:long(), + true = orber_tc:check_tc(orber_tc:union("Id", "Name", orber_tc:long(), -1, [{1, "long", orber_tc:long()}, {2, "longlong", orber_tc:long()}])), - ?line false = orber_tc:check_tc(orber_tc:union("Id", "Name", orber_tc:long(), + false = orber_tc:check_tc(orber_tc:union("Id", "Name", orber_tc:long(), -1, ?ELIST)), - ?line false = orber_tc:check_tc(orber_tc:union(42, "Name", orber_tc:long(), + false = orber_tc:check_tc(orber_tc:union(42, "Name", orber_tc:long(), -1, [{1, "long", orber_tc:long()}, {2, "longlong", orber_tc:long()}])), - ?line false = orber_tc:check_tc(orber_tc:union("Id", false, orber_tc:long(), + false = orber_tc:check_tc(orber_tc:union("Id", false, orber_tc:long(), -1, [{1, "long", orber_tc:long()}, {2, "longlong", orber_tc:long()}])), - ?line false = orber_tc:check_tc(orber_tc:union("Id", "Name", bad_tc, + false = orber_tc:check_tc(orber_tc:union("Id", "Name", bad_tc, -1, [{1, "long", orber_tc:long()}, {2, "longlong", orber_tc:long()}])), - ?line false = orber_tc:check_tc(orber_tc:union("Id", "Name", orber_tc:long(), + false = orber_tc:check_tc(orber_tc:union("Id", "Name", orber_tc:long(), "wrong", [{1, "long", orber_tc:long()}, {2, "longlong", orber_tc:long()}])), - ?line code(orber_tc:union("Id", "Name", orber_tc:long(), + code(orber_tc:union("Id", "Name", orber_tc:long(), -1, [{1, "long", orber_tc:long()}, {2, "longlong", orber_tc:long()}])), ok. @@ -452,109 +410,95 @@ union(_) -> %% Test Case: enum test %% Description: %%----------------------------------------------------------------- -enum(doc) -> []; -enum(suite) -> []; enum(_) -> - ?line true = orber_tc:check_tc(orber_tc:enum("Id", "Name", + true = orber_tc:check_tc(orber_tc:enum("Id", "Name", ["E1", "E2", "E3"])), - ?line false = orber_tc:check_tc(orber_tc:enum(42, "Name", + false = orber_tc:check_tc(orber_tc:enum(42, "Name", ["E1", "E2", "E3"])), - ?line false = orber_tc:check_tc(orber_tc:enum("Id", false, + false = orber_tc:check_tc(orber_tc:enum("Id", false, ["E1", "E2", "E3"])), - ?line false = orber_tc:check_tc(orber_tc:enum("Id", "Name", + false = orber_tc:check_tc(orber_tc:enum("Id", "Name", ["E1", false, "E3"])), - ?line code(orber_tc:enum("Id", "Name", ["E1", "E2", "E3"])), - ?line ?match(code(orber_tc:enum(false, "Name", ["E1", "E2", "E3"]))), - ?line ?match(code(orber_tc:enum("Id", 42, ["E1", "E2", "E3"]))), - ?line ?match(code(orber_tc:enum("Id", "Name", ["E1", false, "E3"]))), + code(orber_tc:enum("Id", "Name", ["E1", "E2", "E3"])), + ?match(code(orber_tc:enum(false, "Name", ["E1", "E2", "E3"]))), + ?match(code(orber_tc:enum("Id", 42, ["E1", "E2", "E3"]))), + ?match(code(orber_tc:enum("Id", "Name", ["E1", false, "E3"]))), ok. %%----------------------------------------------------------------- %% Test Case: string %% Description: %%----------------------------------------------------------------- -string(doc) -> []; -string(suite) -> []; string(_) -> - ?line true = orber_tc:check_tc(orber_tc:string(0)), - ?line true = orber_tc:check_tc(orber_tc:string(1)), - ?line false = orber_tc:check_tc(orber_tc:string("wrong")), - ?line code(orber_tc:string(0)), - ?line code(orber_tc:string(1)), - ?line ?match(code(orber_tc:string(-1))), - ?line ?match(code(orber_tc:string(?ULONGMAX+1))), - ?line ?match(code(orber_tc:string("wrong"))), + true = orber_tc:check_tc(orber_tc:string(0)), + true = orber_tc:check_tc(orber_tc:string(1)), + false = orber_tc:check_tc(orber_tc:string("wrong")), + code(orber_tc:string(0)), + code(orber_tc:string(1)), + ?match(code(orber_tc:string(-1))), + ?match(code(orber_tc:string(?ULONGMAX+1))), + ?match(code(orber_tc:string("wrong"))), ok. %%----------------------------------------------------------------- %% Test Case: wstring %% Description: %%----------------------------------------------------------------- -wstring(doc) -> []; -wstring(suite) -> []; wstring(_) -> - ?line true = orber_tc:check_tc(orber_tc:wstring(0)), - ?line true = orber_tc:check_tc(orber_tc:wstring(1)), - ?line false = orber_tc:check_tc(orber_tc:wstring("wrong")), - ?line code(orber_tc:wstring(0)), - ?line code(orber_tc:wstring(1)), - ?line ?match(code(orber_tc:wstring(-1))), - ?line ?match(code(orber_tc:wstring(?ULONGMAX+1))), - ?line ?match(code(orber_tc:wstring(false))), + true = orber_tc:check_tc(orber_tc:wstring(0)), + true = orber_tc:check_tc(orber_tc:wstring(1)), + false = orber_tc:check_tc(orber_tc:wstring("wrong")), + code(orber_tc:wstring(0)), + code(orber_tc:wstring(1)), + ?match(code(orber_tc:wstring(-1))), + ?match(code(orber_tc:wstring(?ULONGMAX+1))), + ?match(code(orber_tc:wstring(false))), ok. %%----------------------------------------------------------------- %% Test Case: sequence %% Description: %%----------------------------------------------------------------- -sequence(doc) -> []; -sequence(suite) -> []; sequence(_) -> - ?line true = orber_tc:check_tc(orber_tc:sequence(orber_tc:struct("Id", "Name", ?ELIST), 0)), - ?line code(orber_tc:sequence(orber_tc:struct("Id", "Name", ?ELIST), 0)), + true = orber_tc:check_tc(orber_tc:sequence(orber_tc:struct("Id", "Name", ?ELIST), 0)), + code(orber_tc:sequence(orber_tc:struct("Id", "Name", ?ELIST), 0)), ok. %%----------------------------------------------------------------- %% Test Case: array %% Description: %%----------------------------------------------------------------- -array(doc) -> []; -array(suite) -> []; array(_) -> - ?line true = orber_tc:check_tc(orber_tc:array(orber_tc:struct("Id", "Name", ?ELIST), 1)), - ?line code(orber_tc:array(orber_tc:struct("Id", "Name", ?ELIST), 1)), + true = orber_tc:check_tc(orber_tc:array(orber_tc:struct("Id", "Name", ?ELIST), 1)), + code(orber_tc:array(orber_tc:struct("Id", "Name", ?ELIST), 1)), ok. %%----------------------------------------------------------------- %% Test Case: alias %% Description: %%----------------------------------------------------------------- -alias(doc) -> []; -alias(suite) -> []; alias(_) -> - ?line true = orber_tc:check_tc(orber_tc:alias("Id", "Name", orber_tc:struct("Id", "Name", ?ELIST))), - ?line false = orber_tc:check_tc(orber_tc:alias(false, "Name", orber_tc:struct("Id", "Name", ?ELIST))), - ?line false = orber_tc:check_tc(orber_tc:alias("Id", 42, orber_tc:struct("Id", "Name", ?ELIST))), - ?line false = orber_tc:check_tc(orber_tc:alias("Id", "Name", "wrong")), - ?line code(orber_tc:alias("Id", "Name", orber_tc:struct("Id", "Name", ?ELIST))), - ?line ?match(code(orber_tc:alias("Id", "Name", orber_tc:struct("Id", "Name", ?VELIST)))), + true = orber_tc:check_tc(orber_tc:alias("Id", "Name", orber_tc:struct("Id", "Name", ?ELIST))), + false = orber_tc:check_tc(orber_tc:alias(false, "Name", orber_tc:struct("Id", "Name", ?ELIST))), + false = orber_tc:check_tc(orber_tc:alias("Id", 42, orber_tc:struct("Id", "Name", ?ELIST))), + false = orber_tc:check_tc(orber_tc:alias("Id", "Name", "wrong")), + code(orber_tc:alias("Id", "Name", orber_tc:struct("Id", "Name", ?ELIST))), + ?match(code(orber_tc:alias("Id", "Name", orber_tc:struct("Id", "Name", ?VELIST)))), ok. %%----------------------------------------------------------------- %% Test Case: exception %% Description: %%----------------------------------------------------------------- -exception(doc) -> []; -exception(suite) -> []; exception(_) -> - ?line true = orber_tc:check_tc(orber_tc:exception("Id", "Name", ?ELIST)), - ?line false = orber_tc:check_tc(orber_tc:exception(42, "Name", ?ELIST)), - ?line false = orber_tc:check_tc(orber_tc:exception("Id", false, ?ELIST)), - ?line false = orber_tc:check_tc(orber_tc:exception("Id", "Name", "wrong")), - ?line code(orber_tc:exception("Id", "Name", ?ELIST)), - ?line ?match(code(orber_tc:exception(42, "Name", ?ELIST))), - ?line ?match(code(orber_tc:exception("Id", false, ?ELIST))), - ?line ?match(code(orber_tc:exception("Id", "Name", "wrong"))), + true = orber_tc:check_tc(orber_tc:exception("Id", "Name", ?ELIST)), + false = orber_tc:check_tc(orber_tc:exception(42, "Name", ?ELIST)), + false = orber_tc:check_tc(orber_tc:exception("Id", false, ?ELIST)), + false = orber_tc:check_tc(orber_tc:exception("Id", "Name", "wrong")), + code(orber_tc:exception("Id", "Name", ?ELIST)), + ?match(code(orber_tc:exception(42, "Name", ?ELIST))), + ?match(code(orber_tc:exception("Id", false, ?ELIST))), + ?match(code(orber_tc:exception("Id", "Name", "wrong"))), ok. @@ -562,86 +506,76 @@ exception(_) -> %% Test Case: fixed %% Description: %%----------------------------------------------------------------- -fixed(doc) -> []; -fixed(suite) -> []; fixed(_) -> - ?line true = orber_tc:check_tc(orber_tc:fixed(25, 2)), - ?line code(orber_tc:fixed(25, 2)), + true = orber_tc:check_tc(orber_tc:fixed(25, 2)), + code(orber_tc:fixed(25, 2)), ok. %%----------------------------------------------------------------- %% Test Case: value %% Description: %%----------------------------------------------------------------- -value(doc) -> []; -value(suite) -> []; value(_) -> - ?line true = orber_tc:check_tc(orber_tc:value("Id", "Name", 42, + true = orber_tc:check_tc(orber_tc:value("Id", "Name", 42, orber_tc:fixed(25, 2), ?VELIST)), - ?line false = orber_tc:check_tc(orber_tc:value(42, "Name", 42, + false = orber_tc:check_tc(orber_tc:value(42, "Name", 42, orber_tc:fixed(25, 2), ?VELIST)), - ?line false = orber_tc:check_tc(orber_tc:value("Id", 42, 42, + false = orber_tc:check_tc(orber_tc:value("Id", 42, 42, orber_tc:fixed(25, 2), ?VELIST)), - ?line false = orber_tc:check_tc(orber_tc:value("Id", "Name", "wrong", + false = orber_tc:check_tc(orber_tc:value("Id", "Name", "wrong", orber_tc:fixed(25, 2), ?VELIST)), - ?line false = orber_tc:check_tc(orber_tc:value("Id", "Name", "42", + false = orber_tc:check_tc(orber_tc:value("Id", "Name", "42", orber_tc:fixed(25, 2), ?VELIST)), - ?line false = orber_tc:check_tc(orber_tc:value("Id", "Name", "42", + false = orber_tc:check_tc(orber_tc:value("Id", "Name", "42", ?VELIST, ?VELIST)), - ?line false = orber_tc:check_tc(orber_tc:value("Id", "Name", "42", + false = orber_tc:check_tc(orber_tc:value("Id", "Name", "42", orber_tc:fixed(25, 2), false)), - ?line code(orber_tc:value("Id", "Name", 42, orber_tc:long(), ?VELIST)), + code(orber_tc:value("Id", "Name", 42, orber_tc:long(), ?VELIST)), ok. %%----------------------------------------------------------------- %% Test Case: value_box %% Description: %%----------------------------------------------------------------- -value_box(doc) -> []; -value_box(suite) -> []; value_box(_) -> - ?line true = orber_tc:check_tc(orber_tc:value_box("Id", "Name", + true = orber_tc:check_tc(orber_tc:value_box("Id", "Name", orber_tc:fixed(25, 2))), - ?line false = orber_tc:check_tc(orber_tc:value_box(42, "Name", + false = orber_tc:check_tc(orber_tc:value_box(42, "Name", orber_tc:fixed(25, 2))), - ?line false = orber_tc:check_tc(orber_tc:value_box("Id", 42, + false = orber_tc:check_tc(orber_tc:value_box("Id", 42, orber_tc:fixed(25, 2))), - ?line false = orber_tc:check_tc(orber_tc:value_box("Id", "Name", "wrong")), - ?line code(orber_tc:value_box("Id", "Name", orber_tc:long())), - ?line ?match(code(orber_tc:value_box(42, "Name", orber_tc:short()))), - ?line ?match(code(orber_tc:value_box("Id", 42, orber_tc:char()))), - ?line ?match(code(orber_tc:value_box("Id", "Name", false))), + false = orber_tc:check_tc(orber_tc:value_box("Id", "Name", "wrong")), + code(orber_tc:value_box("Id", "Name", orber_tc:long())), + ?match(code(orber_tc:value_box(42, "Name", orber_tc:short()))), + ?match(code(orber_tc:value_box("Id", 42, orber_tc:char()))), + ?match(code(orber_tc:value_box("Id", "Name", false))), ok. %%----------------------------------------------------------------- %% Test Case: native %% Description: %%----------------------------------------------------------------- -native(doc) -> []; -native(suite) -> []; native(_) -> - ?line true = orber_tc:check_tc(orber_tc:native("Id", "Name")), - ?line false = orber_tc:check_tc(orber_tc:native(42, "Name")), - ?line false = orber_tc:check_tc(orber_tc:native("Id", 42)), - ?line code(orber_tc:native("Id", "Name")), - ?line ?match(code(orber_tc:native(42, "Name"))), - ?line ?match(code(orber_tc:native("Id", 42))), + true = orber_tc:check_tc(orber_tc:native("Id", "Name")), + false = orber_tc:check_tc(orber_tc:native(42, "Name")), + false = orber_tc:check_tc(orber_tc:native("Id", 42)), + code(orber_tc:native("Id", "Name")), + ?match(code(orber_tc:native(42, "Name"))), + ?match(code(orber_tc:native("Id", 42))), ok. %%----------------------------------------------------------------- %% Test Case: abstract_interface %% Description: %%----------------------------------------------------------------- -abstract_interface(doc) -> []; -abstract_interface(suite) -> []; abstract_interface(_) -> - ?line true = orber_tc:check_tc(orber_tc:abstract_interface("RepId", "Name")), - ?line false = orber_tc:check_tc(orber_tc:abstract_interface(false, "Name")), - ?line false = orber_tc:check_tc(orber_tc:abstract_interface("RepId", 42)), - ?line code(orber_tc:abstract_interface("RepId", "Name")), - ?line ?match(code(orber_tc:abstract_interface(42, "Name"))), - ?line ?match(code(orber_tc:abstract_interface("Id", 42))), + true = orber_tc:check_tc(orber_tc:abstract_interface("RepId", "Name")), + false = orber_tc:check_tc(orber_tc:abstract_interface(false, "Name")), + false = orber_tc:check_tc(orber_tc:abstract_interface("RepId", 42)), + code(orber_tc:abstract_interface("RepId", "Name")), + ?match(code(orber_tc:abstract_interface(42, "Name"))), + ?match(code(orber_tc:abstract_interface("Id", 42))), ok. @@ -650,22 +584,18 @@ abstract_interface(_) -> %% Test Case: indirection %% Description: %%----------------------------------------------------------------- -indirection(doc) -> []; -indirection(suite) -> []; indirection(_) -> - ?line true = orber_tc:check_tc({'none', 42}), + true = orber_tc:check_tc({'none', 42}), ok. %%----------------------------------------------------------------- %% Test Case: get_tc %% Description: %%----------------------------------------------------------------- -get_tc(doc) -> []; -get_tc(suite) -> []; get_tc(_) -> TC = 'CosNaming_Binding':tc(), - ?line TC = orber_tc:get_tc({'CosNaming_Binding', 42}), - ?line ?match(orber_tc:get_tc({'none', 42})), + TC = orber_tc:get_tc({'CosNaming_Binding', 42}), + ?match(orber_tc:get_tc({'none', 42})), ok. %%----------------------------------------------------------------- -- cgit v1.2.3 From d28922838a940cb58f4fcfe0ea2b3bab7c687e7b Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Thu, 16 Jun 2016 08:20:51 +0200 Subject: [cosEvent] Update the test suites to follow the new style --- lib/cosEvent/test/event_channel_SUITE.erl | 17 +++++------ lib/cosEvent/test/generated_SUITE.erl | 50 ++++--------------------------- 2 files changed, 13 insertions(+), 54 deletions(-) (limited to 'lib') diff --git a/lib/cosEvent/test/event_channel_SUITE.erl b/lib/cosEvent/test/event_channel_SUITE.erl index d237db8e9b..9901cd91bd 100644 --- a/lib/cosEvent/test/event_channel_SUITE.erl +++ b/lib/cosEvent/test/event_channel_SUITE.erl @@ -32,7 +32,7 @@ %% Macros %%----------------------------------------------------------------- --define(default_timeout, ?t:minutes(5)). +-define(default_timeout, test_server:minutes(5)). -define(match(ExpectedRes, Expr), @@ -46,7 +46,7 @@ _ -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -87,12 +87,12 @@ cases() -> %%----------------------------------------------------------------- init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplist:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -131,8 +131,7 @@ app_test(_Config) -> -event_objects_api(doc) -> ["Testing the CosEvent API to setup a complete service", ""]; -event_objects_api(suite) -> []; +%% Testing the CosEvent API to setup a complete service event_objects_api(_Config) -> Ch = ?match({_,key,_,_,_,_}, cosEventApp:start_channel([{typecheck, true}, @@ -234,8 +233,7 @@ event_objects_api(_Config) -> ok. -events_api(doc) -> ["Testing the CosEvent API for sending events asynchronous", ""]; -events_api(suite) -> []; +%% Testing the CosEvent API for sending events asynchronous events_api(_Config) -> Ch = ?match({_,key,_,_,_,_}, cosEventApp:start_channel([{typecheck, true}, @@ -244,8 +242,7 @@ events_api(_Config) -> event_sender(Ch). -events_sync_api(doc) -> ["Testing the CosEvent API for sending events synchronous", ""]; -events_sync_api(suite) -> []; +%% Testing the CosEvent API for sending events synchronous events_sync_api(_Config) -> Ch = ?match({_,key,_,_,_,_}, cosEventApp:start_channel([{typecheck, true}, diff --git a/lib/cosEvent/test/generated_SUITE.erl b/lib/cosEvent/test/generated_SUITE.erl index 2fa15c3a96..bbf4fe2439 100644 --- a/lib/cosEvent/test/generated_SUITE.erl +++ b/lib/cosEvent/test/generated_SUITE.erl @@ -29,7 +29,7 @@ -include_lib("common_test/include/ct.hrl"). -include_lib("orber/include/corba.hrl"). --define(default_timeout, ?t:minutes(3)). +-define(default_timeout, test_server:minutes(3)). -define(match(ExpectedRes, Expr), fun() -> @@ -40,7 +40,7 @@ _ -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -51,7 +51,7 @@ Not -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS); + exit(AcTuAlReS); _ -> AcTuAlReS end @@ -63,7 +63,7 @@ case orber_tc:check_tc(TC) of false -> io:format("###### ERROR ERROR ######~n~p - ~p~n", [Op, TC]), - ?line exit(TC); + exit(TC); true -> true end @@ -125,12 +125,12 @@ end_per_group(_GroupName, Config) -> %% Init and cleanup functions. %%----------------------------------------------------------------- init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplist:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -139,8 +139,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventChannelAdmin_AlreadyConnected' %% Description: %%----------------------------------------------------------------- -'CosEventChannelAdmin_AlreadyConnected'(doc) -> [""]; -'CosEventChannelAdmin_AlreadyConnected'(suite) -> []; 'CosEventChannelAdmin_AlreadyConnected'(_) -> ?match(true, orber_tc:check_tc('CosEventChannelAdmin_AlreadyConnected':tc())), ?match("IDL:omg.org/CosEventChannelAdmin/AlreadyConnected:1.0", @@ -154,8 +152,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventChannelAdmin_TypeError' %% Description: %%----------------------------------------------------------------- -'CosEventChannelAdmin_TypeError'(doc) -> [""]; -'CosEventChannelAdmin_TypeError'(suite) -> []; 'CosEventChannelAdmin_TypeError'(_) -> ?match(true, orber_tc:check_tc('CosEventChannelAdmin_TypeError':tc())), ?match("IDL:omg.org/CosEventChannelAdmin/TypeError:1.0", @@ -169,8 +165,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventComm_Disconnected' %% Description: %%----------------------------------------------------------------- -'CosEventComm_Disconnected'(doc) -> [""]; -'CosEventComm_Disconnected'(suite) -> []; 'CosEventComm_Disconnected'(_) -> ?match(true, orber_tc:check_tc('CosEventComm_Disconnected':tc())), ?match("IDL:omg.org/CosEventComm/Disconnected:1.0", @@ -183,8 +177,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventChannelAdmin_ConsumerAdmin' %% Description: %%----------------------------------------------------------------- -'CosEventChannelAdmin_ConsumerAdmin'(doc) -> [""]; -'CosEventChannelAdmin_ConsumerAdmin'(suite) -> []; 'CosEventChannelAdmin_ConsumerAdmin'(_) -> ?nomatch(undefined, 'CosEventChannelAdmin_ConsumerAdmin':oe_tc(obtain_push_supplier)), ?nomatch(undefined, 'CosEventChannelAdmin_ConsumerAdmin':oe_tc(obtain_pull_supplier)), @@ -201,8 +193,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventChannelAdmin_EventChannel' %% Description: %%----------------------------------------------------------------- -'CosEventChannelAdmin_EventChannel'(doc) -> [""]; -'CosEventChannelAdmin_EventChannel'(suite) -> []; 'CosEventChannelAdmin_EventChannel'(_) -> ?nomatch(undefined, 'CosEventChannelAdmin_EventChannel':oe_tc(for_consumers)), ?nomatch(undefined, 'CosEventChannelAdmin_EventChannel':oe_tc(for_suppliers)), @@ -220,8 +210,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventChannelAdmin_ProxyPullConsumer' %% Description: %%----------------------------------------------------------------- -'CosEventChannelAdmin_ProxyPullConsumer'(doc) -> [""]; -'CosEventChannelAdmin_ProxyPullConsumer'(suite) -> []; 'CosEventChannelAdmin_ProxyPullConsumer'(_) -> ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPullConsumer':oe_tc(connect_pull_supplier)), ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPullConsumer':oe_tc(disconnect_pull_consumer)), @@ -239,8 +227,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventChannelAdmin_ProxyPullSupplier' %% Description: %%----------------------------------------------------------------- -'CosEventChannelAdmin_ProxyPullSupplier'(doc) -> [""]; -'CosEventChannelAdmin_ProxyPullSupplier'(suite) -> []; 'CosEventChannelAdmin_ProxyPullSupplier'(_) -> ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPullSupplier':oe_tc(connect_pull_consumer)), ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPullSupplier':oe_tc(pull)), @@ -260,8 +246,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventChannelAdmin_ProxyPushConsumer' %% Description: %%----------------------------------------------------------------- -'CosEventChannelAdmin_ProxyPushConsumer'(doc) -> [""]; -'CosEventChannelAdmin_ProxyPushConsumer'(suite) -> []; 'CosEventChannelAdmin_ProxyPushConsumer'(_) -> ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPushConsumer':oe_tc(connect_push_supplier)), ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPushConsumer':oe_tc(push)), @@ -280,8 +264,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventChannelAdmin_ProxyPushSupplier' %% Description: %%----------------------------------------------------------------- -'CosEventChannelAdmin_ProxyPushSupplier'(doc) -> [""]; -'CosEventChannelAdmin_ProxyPushSupplier'(suite) -> []; 'CosEventChannelAdmin_ProxyPushSupplier'(_) -> ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPushSupplier':oe_tc(connect_push_consumer)), ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPushSupplier':oe_tc(disconnect_push_supplier)), @@ -299,8 +281,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventChannelAdmin_SupplierAdmin' %% Description: %%----------------------------------------------------------------- -'CosEventChannelAdmin_SupplierAdmin'(doc) -> [""]; -'CosEventChannelAdmin_SupplierAdmin'(suite) -> []; 'CosEventChannelAdmin_SupplierAdmin'(_) -> ?nomatch(undefined, 'CosEventChannelAdmin_SupplierAdmin':oe_tc(obtain_push_consumer)), ?nomatch(undefined, 'CosEventChannelAdmin_SupplierAdmin':oe_tc(obtain_pull_consumer)), @@ -317,8 +297,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'oe_CosEventComm_CAdmin' %% Description: %%----------------------------------------------------------------- -'oe_CosEventComm_CAdmin'(doc) -> [""]; -'oe_CosEventComm_CAdmin'(suite) -> []; 'oe_CosEventComm_CAdmin'(_) -> ?nomatch(undefined, 'oe_CosEventComm_CAdmin':oe_tc(obtain_push_supplier)), ?nomatch(undefined, 'oe_CosEventComm_CAdmin':oe_tc(obtain_pull_supplier)), @@ -339,8 +317,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'oe_CosEventComm_Channel' %% Description: %%----------------------------------------------------------------- -'oe_CosEventComm_Channel'(doc) -> [""]; -'oe_CosEventComm_Channel'(suite) -> []; 'oe_CosEventComm_Channel'(_) -> ?nomatch(undefined, 'oe_CosEventComm_Channel':oe_tc(for_consumers)), ?nomatch(undefined, 'oe_CosEventComm_Channel':oe_tc(for_suppliers)), @@ -362,8 +338,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'oe_CosEventComm_Event' %% Description: %%----------------------------------------------------------------- -'oe_CosEventComm_Event'(doc) -> [""]; -'oe_CosEventComm_Event'(suite) -> []; 'oe_CosEventComm_Event'(_) -> ?nomatch(undefined, 'oe_CosEventComm_Event':oe_tc(send)), ?nomatch(undefined, 'oe_CosEventComm_Event':oe_tc(send_sync)), @@ -380,8 +354,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'oe_CosEventComm_PullerS' %% Description: %%----------------------------------------------------------------- -'oe_CosEventComm_PullerS'(doc) -> [""]; -'oe_CosEventComm_PullerS'(suite) -> []; 'oe_CosEventComm_PullerS'(_) -> ?nomatch(undefined, 'oe_CosEventComm_PullerS':oe_tc(connect_pull_consumer)), ?nomatch(undefined, 'oe_CosEventComm_PullerS':oe_tc(pull)), @@ -405,8 +377,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'oe_CosEventComm_PusherS' %% Description: %%----------------------------------------------------------------- -'oe_CosEventComm_PusherS'(doc) -> [""]; -'oe_CosEventComm_PusherS'(suite) -> []; 'oe_CosEventComm_PusherS'(_) -> ?nomatch(undefined, 'oe_CosEventComm_PusherS':oe_tc(connect_push_consumer)), ?nomatch(undefined, 'oe_CosEventComm_PusherS':oe_tc(disconnect_push_supplier)), @@ -428,8 +398,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventComm_PullConsumer' %% Description: %%----------------------------------------------------------------- -'CosEventComm_PullConsumer'(doc) -> [""]; -'CosEventComm_PullConsumer'(suite) -> []; 'CosEventComm_PullConsumer'(_) -> ?nomatch(undefined, 'CosEventComm_PullConsumer':oe_tc(disconnect_pull_consumer)), ?match(undefined, 'CosEventComm_PullConsumer':oe_tc(undefined)), @@ -445,8 +413,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventComm_PullSupplier' %% Description: %%----------------------------------------------------------------- -'CosEventComm_PullSupplier'(doc) -> [""]; -'CosEventComm_PullSupplier'(suite) -> []; 'CosEventComm_PullSupplier'(_) -> ?nomatch(undefined, 'CosEventComm_PullSupplier':oe_tc(pull)), ?nomatch(undefined, 'CosEventComm_PullSupplier':oe_tc(try_pull)), @@ -464,8 +430,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventComm_PushConsumer' %% Description: %%----------------------------------------------------------------- -'CosEventComm_PushConsumer'(doc) -> [""]; -'CosEventComm_PushConsumer'(suite) -> []; 'CosEventComm_PushConsumer'(_) -> ?nomatch(undefined, 'CosEventComm_PushConsumer':oe_tc(push)), ?nomatch(undefined, 'CosEventComm_PushConsumer':oe_tc(disconnect_push_consumer)), @@ -482,8 +446,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventComm_PushSupplier' %% Description: %%----------------------------------------------------------------- -'CosEventComm_PushSupplier'(doc) -> [""]; -'CosEventComm_PushSupplier'(suite) -> []; 'CosEventComm_PushSupplier'(_) -> ?nomatch(undefined, 'CosEventComm_PushSupplier':oe_tc(disconnect_push_supplier)), ?match(undefined, 'CosEventComm_PushSupplier':oe_tc(undefined)), -- cgit v1.2.3 From 96b5dfa37b674ee83e3f5678ce6d21babfec6d1f Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Thu, 16 Jun 2016 08:25:28 +0200 Subject: [cosEventDomain] Update the test suites to follow the new style --- lib/cosEventDomain/test/event_domain_SUITE.erl | 16 ++++------ lib/cosEventDomain/test/generated_SUITE.erl | 42 ++++---------------------- 2 files changed, 12 insertions(+), 46 deletions(-) (limited to 'lib') diff --git a/lib/cosEventDomain/test/event_domain_SUITE.erl b/lib/cosEventDomain/test/event_domain_SUITE.erl index b80b16ae6f..c20988701c 100644 --- a/lib/cosEventDomain/test/event_domain_SUITE.erl +++ b/lib/cosEventDomain/test/event_domain_SUITE.erl @@ -35,7 +35,7 @@ %% Macros %%----------------------------------------------------------------- --define(default_timeout, ?t:minutes(5)). +-define(default_timeout, test_server:minutes(5)). -define(match(ExpectedRes, Expr), @@ -49,7 +49,7 @@ _ -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -89,12 +89,12 @@ cases() -> %%----------------------------------------------------------------- init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplist:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -129,15 +129,12 @@ end_per_suite(Config) when is_list(Config) -> %%----------------------------------------------------------------- %% Tests app file %%----------------------------------------------------------------- -app_test(doc) -> []; -app_test(suite) -> []; app_test(_Config) -> ok=test_server:app_test(cosEventDomain), ok. -event_domain_api(doc) -> ["Testing the CosEventDomain Domain API", ""]; -event_domain_api(suite) -> []; +%% Testing the CosEventDomain Domain API event_domain_api(_Config) -> %% We will setup a cluster looking like: @@ -418,8 +415,7 @@ event_domain_api(_Config) -> ok. -event_domain_factory_api(doc) -> ["Testing the CosEventDomain Factory API", ""]; -event_domain_factory_api(suite) -> []; +%% Testing the CosEventDomain Factory API event_domain_factory_api(_Config) -> Cyclic = #'CosNotification_Property'{name=?CycleDetection, diff --git a/lib/cosEventDomain/test/generated_SUITE.erl b/lib/cosEventDomain/test/generated_SUITE.erl index 51b627f0d6..afd925359a 100644 --- a/lib/cosEventDomain/test/generated_SUITE.erl +++ b/lib/cosEventDomain/test/generated_SUITE.erl @@ -29,7 +29,7 @@ -include_lib("common_test/include/ct.hrl"). -include_lib("orber/include/corba.hrl"). --define(default_timeout, ?t:minutes(3)). +-define(default_timeout, test_server:minutes(3)). -define(match(ExpectedRes, Expr), fun() -> @@ -40,7 +40,7 @@ _ -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -51,7 +51,7 @@ Not -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS); + exit(AcTuAlReS); _ -> AcTuAlReS end @@ -63,7 +63,7 @@ case orber_tc:check_tc(TC) of false -> io:format("###### ERROR ERROR ######~n~p - ~p~n", [Op, TC]), - ?line exit(TC); + exit(TC); true -> true end @@ -123,12 +123,12 @@ end_per_group(_GroupName, Config) -> %% Init and cleanup functions. %%----------------------------------------------------------------- init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplist:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -137,8 +137,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventDomainAdmin' %% Description: %%----------------------------------------------------------------- -'CosEventDomainAdmin'(doc) -> ["CosEventDomainAdmin"]; -'CosEventDomainAdmin'(suite) -> []; 'CosEventDomainAdmin'(_) -> ?match("CycleDetection", 'CosEventDomainAdmin':'CycleDetection'()), ?match(0, 'CosEventDomainAdmin':'AuthorizeCycles'()), @@ -152,8 +150,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventDomainAdmin_DiamondSeq' %% Description: %%----------------------------------------------------------------- -'CosEventDomainAdmin_DiamondSeq'(doc) -> ["CosEventDomainAdmin_DiamondSeq"]; -'CosEventDomainAdmin_DiamondSeq'(suite) -> []; 'CosEventDomainAdmin_DiamondSeq'(_) -> ?match(true, orber_tc:check_tc('CosEventDomainAdmin_DiamondSeq':tc())), ?match("IDL:omg.org/CosEventDomainAdmin/DiamondSeq:1.0", @@ -166,8 +162,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventDomainAdmin_AlreadyExists' %% Description: %%----------------------------------------------------------------- -'CosEventDomainAdmin_AlreadyExists'(doc) -> ["CosEventDomainAdmin_AlreadyExists"]; -'CosEventDomainAdmin_AlreadyExists'(suite) -> []; 'CosEventDomainAdmin_AlreadyExists'(_) -> ?match(true, orber_tc:check_tc('CosEventDomainAdmin_AlreadyExists':tc())), ?match("IDL:omg.org/CosEventDomainAdmin/AlreadyExists:1.0", @@ -180,8 +174,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventDomainAdmin_DomainIDSeq' %% Description: %%----------------------------------------------------------------- -'CosEventDomainAdmin_DomainIDSeq'(doc) -> ["CosEventDomainAdmin_DomainIDSeq"]; -'CosEventDomainAdmin_DomainIDSeq'(suite) -> []; 'CosEventDomainAdmin_DomainIDSeq'(_) -> ?match(true, orber_tc:check_tc('CosEventDomainAdmin_DomainIDSeq':tc())), ?match("IDL:omg.org/CosEventDomainAdmin/DomainIDSeq:1.0", @@ -194,8 +186,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventDomainAdmin_Connection' %% Description: %%----------------------------------------------------------------- -'CosEventDomainAdmin_Connection'(doc) -> ["CosEventDomainAdmin_Connection"]; -'CosEventDomainAdmin_Connection'(suite) -> []; 'CosEventDomainAdmin_Connection'(_) -> ?match(true, orber_tc:check_tc('CosEventDomainAdmin_Connection':tc())), ?match("IDL:omg.org/CosEventDomainAdmin/Connection:1.0", @@ -208,8 +198,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventDomainAdmin_ConnectionIDSeq' %% Description: %%----------------------------------------------------------------- -'CosEventDomainAdmin_ConnectionIDSeq'(doc) -> ["CosEventDomainAdmin_ConnectionIDSeq"]; -'CosEventDomainAdmin_ConnectionIDSeq'(suite) -> []; 'CosEventDomainAdmin_ConnectionIDSeq'(_) -> ?match(true, orber_tc:check_tc('CosEventDomainAdmin_ConnectionIDSeq':tc())), ?match("IDL:omg.org/CosEventDomainAdmin/ConnectionIDSeq:1.0", @@ -222,8 +210,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventDomainAdmin_ConnectionNotFound' %% Description: %%----------------------------------------------------------------- -'CosEventDomainAdmin_ConnectionNotFound'(doc) -> ["CosEventDomainAdmin_ConnectionNotFound"]; -'CosEventDomainAdmin_ConnectionNotFound'(suite) -> []; 'CosEventDomainAdmin_ConnectionNotFound'(_) -> ?match(true, orber_tc:check_tc('CosEventDomainAdmin_ConnectionNotFound':tc())), ?match("IDL:omg.org/CosEventDomainAdmin/ConnectionNotFound:1.0", @@ -236,8 +222,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventDomainAdmin_CycleCreationForbidden' %% Description: %%----------------------------------------------------------------- -'CosEventDomainAdmin_CycleCreationForbidden'(doc) -> ["CosEventDomainAdmin_CycleCreationForbidden"]; -'CosEventDomainAdmin_CycleCreationForbidden'(suite) -> []; 'CosEventDomainAdmin_CycleCreationForbidden'(_) -> ?match(true, orber_tc:check_tc('CosEventDomainAdmin_CycleCreationForbidden':tc())), ?match("IDL:omg.org/CosEventDomainAdmin/CycleCreationForbidden:1.0", @@ -250,8 +234,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventDomainAdmin_CycleSeq' %% Description: %%----------------------------------------------------------------- -'CosEventDomainAdmin_CycleSeq'(doc) -> ["CosEventDomainAdmin_CycleSeq"]; -'CosEventDomainAdmin_CycleSeq'(suite) -> []; 'CosEventDomainAdmin_CycleSeq'(_) -> ?match(true, orber_tc:check_tc('CosEventDomainAdmin_CycleSeq':tc())), ?match("IDL:omg.org/CosEventDomainAdmin/CycleSeq:1.0", @@ -264,8 +246,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventDomainAdmin_DiamondCreationForbidden' %% Description: %%----------------------------------------------------------------- -'CosEventDomainAdmin_DiamondCreationForbidden'(doc) -> ["CosEventDomainAdmin_DiamondCreationForbidden"]; -'CosEventDomainAdmin_DiamondCreationForbidden'(suite) -> []; 'CosEventDomainAdmin_DiamondCreationForbidden'(_) -> ?match(true, orber_tc:check_tc('CosEventDomainAdmin_DiamondCreationForbidden':tc())), ?match("IDL:omg.org/CosEventDomainAdmin/DiamondCreationForbidden:1.0", @@ -278,8 +258,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventDomainAdmin_DomainNotFound' %% Description: %%----------------------------------------------------------------- -'CosEventDomainAdmin_DomainNotFound'(doc) -> ["CosEventDomainAdmin_DomainNotFound"]; -'CosEventDomainAdmin_DomainNotFound'(suite) -> []; 'CosEventDomainAdmin_DomainNotFound'(_) -> ?match(true, orber_tc:check_tc('CosEventDomainAdmin_DomainNotFound':tc())), ?match("IDL:omg.org/CosEventDomainAdmin/DomainNotFound:1.0", @@ -292,8 +270,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventDomainAdmin_MemberIDSeq' %% Description: %%----------------------------------------------------------------- -'CosEventDomainAdmin_MemberIDSeq'(doc) -> ["CosEventDomainAdmin_MemberIDSeq"]; -'CosEventDomainAdmin_MemberIDSeq'(suite) -> []; 'CosEventDomainAdmin_MemberIDSeq'(_) -> ?match(true, orber_tc:check_tc('CosEventDomainAdmin_MemberIDSeq':tc())), ?match("IDL:omg.org/CosEventDomainAdmin/MemberIDSeq:1.0", @@ -306,8 +282,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventDomainAdmin_RouteSeq' %% Description: %%----------------------------------------------------------------- -'CosEventDomainAdmin_RouteSeq'(doc) -> ["CosEventDomainAdmin_RouteSeq"]; -'CosEventDomainAdmin_RouteSeq'(suite) -> []; 'CosEventDomainAdmin_RouteSeq'(_) -> ?match(true, orber_tc:check_tc('CosEventDomainAdmin_RouteSeq':tc())), ?match("IDL:omg.org/CosEventDomainAdmin/RouteSeq:1.0", @@ -320,8 +294,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventDomainAdmin_EventDomainFactory' %% Description: %%----------------------------------------------------------------- -'CosEventDomainAdmin_EventDomainFactory'(doc) -> ["CosEventDomainAdmin_EventDomainFactory"]; -'CosEventDomainAdmin_EventDomainFactory'(suite) -> []; 'CosEventDomainAdmin_EventDomainFactory'(_) -> ?nomatch(undefined, 'CosEventDomainAdmin_EventDomainFactory':oe_tc(create_event_domain)), ?nomatch(undefined, 'CosEventDomainAdmin_EventDomainFactory':oe_tc(get_all_domains)), @@ -340,8 +312,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosEventDomainAdmin_EventDomain' %% Description: %%----------------------------------------------------------------- -'CosEventDomainAdmin_EventDomain'(doc) -> ["CosEventDomainAdmin_EventDomain"]; -'CosEventDomainAdmin_EventDomain'(suite) -> []; 'CosEventDomainAdmin_EventDomain'(_) -> ?nomatch(undefined, 'CosEventDomainAdmin_EventDomain':oe_tc(add_channel)), ?nomatch(undefined, 'CosEventDomainAdmin_EventDomain':oe_tc(get_all_channels)), -- cgit v1.2.3 From 300319eacedbbb98f368a27619e37c4e33d0c723 Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Thu, 16 Jun 2016 08:32:18 +0200 Subject: [cosFileTransfer] Update the test suites to follow the new style --- lib/cosFileTransfer/test/fileTransfer_SUITE.erl | 290 +++++++++++------------- 1 file changed, 135 insertions(+), 155 deletions(-) (limited to 'lib') diff --git a/lib/cosFileTransfer/test/fileTransfer_SUITE.erl b/lib/cosFileTransfer/test/fileTransfer_SUITE.erl index 7ca6eaf7b3..7596072da6 100644 --- a/lib/cosFileTransfer/test/fileTransfer_SUITE.erl +++ b/lib/cosFileTransfer/test/fileTransfer_SUITE.erl @@ -32,7 +32,7 @@ -include_lib("common_test/include/ct.hrl"). %%--------------- DEFINES ------------------------------------ --define(default_timeout, ?t:minutes(20)). +-define(default_timeout, test_server:minutes(20)). -define(match(ExpectedRes, Expr), fun() -> AcTuAlReS = (catch (Expr)), @@ -122,12 +122,12 @@ cases() -> %%----------------------------------------------------------------- init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplist:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -192,7 +192,6 @@ end_per_suite(Config) -> -define(FTP_PASS, "fileTransfer_SUITE@localhost"). -define(TEST_DIR,["/", "incoming"]). - -define(FTP_PORT, 21). -define(FTP_ACC, "anonymous"). @@ -203,53 +202,48 @@ end_per_suite(Config) -> -define(TEST_FILE_DATA, "If this file exists after a completed test an error occurred."). -define(TEST_FILE_DATA2, "1234567890123"). - %%----------------------------------------------------------------- %% aoo-file test %%----------------------------------------------------------------- -app_test(doc) -> []; -app_test(suite) -> []; app_test(_Config) -> - ?line ok=?t:app_test(cosFileTransfer), + ok=?t:app_test(cosFileTransfer), ok. %%----------------------------------------------------------------- %% FileIterator API tests %%----------------------------------------------------------------- -fileIterator_api(doc) -> ["CosFileTransfer FileIterator API tests.", ""]; -fileIterator_api(suite) -> []; fileIterator_api(Config) -> case ftp_host(Config) of {skipped, SkippedReason} -> {skipped, SkippedReason}; Host -> - ?line {ok, Node} = create_node("fileIterator_api", 4008, normal), - ?line ?match(ok, remote_apply(Node, ?MODULE, install_data, + {ok, Node} = create_node("fileIterator_api", 4008, normal), + ?match(ok, remote_apply(Node, ?MODULE, install_data, [tcp, {{'NATIVE', 'cosFileTransferNATIVE_file'}, Host, "fileIterator_api"}])), %% Create a Virtual File System. -%% ?line VFS = ?match({_,_,_,_,_,_}, +%% VFS = ?match({_,_,_,_,_,_}, %% cosFileTransferApp:create_VFS({'NATIVE', %% 'cosFileTransferNATIVE_file'}, %% [], Host, ?FTP_PORT)), - ?line VFS = ?matchnopr({'IOP_IOR',"IDL:omg.org/CosFileTransfer/VirtualFileSystem:1.0",_}, + VFS = ?matchnopr({'IOP_IOR',"IDL:omg.org/CosFileTransfer/VirtualFileSystem:1.0",_}, corba:string_to_object("corbaname::1.2@localhost:4008/NameService#fileIterator_api")), %% Start two File Transfer Sessions (Source and Target). - ?line {FS, Dir} = ?matchnopr({{_,_,_},{_,_,_}}, + {FS, Dir} = ?matchnopr({{_,_,_},{_,_,_}}, 'CosFileTransfer_VirtualFileSystem':login(VFS, ?FTP_USER, ?FTP_PASS, ?FTP_ACC)), %% Do some basic test on one of the Directories attributes. - ?line ?match([_H|_], 'CosFileTransfer_Directory':'_get_name'(Dir)), - ?line ?match([_H|_], 'CosFileTransfer_Directory':'_get_complete_file_name'(Dir)), - ?line ?match({'IOP_IOR',[],[]}, 'CosFileTransfer_Directory':'_get_parent'(Dir)), - ?line ?matchnopr(FS, 'CosFileTransfer_Directory':'_get_associated_session'(Dir)), + ?match([_H|_], 'CosFileTransfer_Directory':'_get_name'(Dir)), + ?match([_H|_], 'CosFileTransfer_Directory':'_get_complete_file_name'(Dir)), + ?match({'IOP_IOR',[],[]}, 'CosFileTransfer_Directory':'_get_parent'(Dir)), + ?matchnopr(FS, 'CosFileTransfer_Directory':'_get_associated_session'(Dir)), {ok,[],FileIter} = ?match({ok,[],_}, 'CosFileTransfer_Directory':list(Dir, 0)), %% Usually the working directory for the test is not empty so no need for %% creating files of our own?! @@ -259,23 +253,23 @@ fileIterator_api(Config) -> if Children > 5 -> - ?line ?matchnopr({true, _}, 'CosFileTransfer_FileIterator':next_one(FileIter)), - ?line ?matchnopr({true, _}, 'CosFileTransfer_FileIterator':next_n(FileIter, 3)), - ?line ?matchnopr({true, _}, 'CosFileTransfer_FileIterator':next_n(FileIter, + ?matchnopr({true, _}, 'CosFileTransfer_FileIterator':next_one(FileIter)), + ?matchnopr({true, _}, 'CosFileTransfer_FileIterator':next_n(FileIter, 3)), + ?matchnopr({true, _}, 'CosFileTransfer_FileIterator':next_n(FileIter, Children)), - ?line ?matchnopr({false, _}, 'CosFileTransfer_FileIterator':next_one(FileIter)), - ?line ?match({false, []}, 'CosFileTransfer_FileIterator':next_n(FileIter, 1)), + ?matchnopr({false, _}, 'CosFileTransfer_FileIterator':next_one(FileIter)), + ?match({false, []}, 'CosFileTransfer_FileIterator':next_n(FileIter, 1)), ok; true -> ok end, - ?line ?match(ok, 'CosFileTransfer_FileIterator':destroy(FileIter)), - ?line ?match(false, corba_object:non_existent(FS)), - ?line ?match(ok, 'CosFileTransfer_FileTransferSession':logout(FS)), + ?match(ok, 'CosFileTransfer_FileIterator':destroy(FileIter)), + ?match(false, corba_object:non_existent(FS)), + ?match(ok, 'CosFileTransfer_FileTransferSession':logout(FS)), %% To make sure Orber can remove it from mnesia. timer:sleep(1000), - ?line ?match(true, corba_object:non_existent(FS)), - ?line ?match(ok, remote_apply(Node, ?MODULE, uninstall_data, ["fileIterator_api"])), + ?match(true, corba_object:non_existent(FS)), + ?match(ok, remote_apply(Node, ?MODULE, uninstall_data, ["fileIterator_api"])), stop_orber_remote(Node, normal), ok end. @@ -284,36 +278,27 @@ fileIterator_api(Config) -> %%----------------------------------------------------------------- %% FileTransferSession API tests %%----------------------------------------------------------------- -fts_ftp_file_api(doc) -> ["CosFileTransfer FTP FileTransferSession API tests.", ""]; -fts_ftp_file_api(suite) -> []; fts_ftp_file_api(Config) -> - ?line {ok, Node} = create_node("ftp_file_api", 4004, normal), + {ok, Node} = create_node("ftp_file_api", 4004, normal), file_helper(Config, 'FTP', ?TEST_DIR, Node, 4004, "ftp_file_api", tcp). -fts_ftp_file_ssl_api(doc) -> ["CosFileTransfer FTP FileTransferSession API tests.", ""]; -fts_ftp_file_ssl_api(suite) -> []; fts_ftp_file_ssl_api(Config) -> - ?line {ok, Node} = create_node("ftp_file_api_ssl", {4005, 1}, ssl), + {ok, Node} = create_node("ftp_file_api_ssl", {4005, 1}, ssl), file_helper(Config, 'FTP', ?TEST_DIR, Node, 4005, "ftp_file_api_ssl", ssl). -fts_native_file_api(doc) -> ["CosFileTransfer NATIVE FileTransferSession API tests.", ""]; -fts_native_file_api(suite) -> []; fts_native_file_api(Config) -> - ?line {ok, Node} = create_node("native_file_api", 4006, normal), + {ok, Node} = create_node("native_file_api", 4006, normal), {ok, Pwd} = file:get_cwd(), file_helper(Config,{'NATIVE', 'cosFileTransferNATIVE_file'},filename:split(Pwd), Node, 4006, "native_file_api", tcp). -fts_native_file_ssl_api(doc) -> ["CosFileTransfer NATIVE FileTransferSession API tests.", ""]; -fts_native_file_ssl_api(suite) -> []; fts_native_file_ssl_api(Config) -> - ?line {ok, Node} = create_node("native_file_ssl_api", {4007, 1}, ssl), + {ok, Node} = create_node("native_file_ssl_api", {4007, 1}, ssl), {ok, Pwd} = file:get_cwd(), file_helper(Config,{'NATIVE', 'cosFileTransferNATIVE_file'},filename:split(Pwd), Node, 4007, "native_file_ssl_api", ssl). - file_helper(Config, WhichType, TEST_DIR, Node, Port, Name, Type) -> case ftp_host(Config) of {skipped, SkippedReason} -> @@ -326,47 +311,47 @@ file_helper(Config, WhichType, TEST_DIR, Node, Port, Name, Type) -> io:format("<<<<<< CosFileTransfer Testing Configuration >>>>>>~n",[]), io:format("Source: ~p~nTarget: ~p~n", [TEST_SOURCE, TEST_TARGET]), - ?line ?match(ok, remote_apply(Node, ?MODULE, install_data, + ?match(ok, remote_apply(Node, ?MODULE, install_data, [Type, {WhichType, Host, Name}])), - ?line VFST = ?match({'IOP_IOR',"IDL:omg.org/CosFileTransfer/VirtualFileSystem:1.0",_}, + VFST = ?match({'IOP_IOR',"IDL:omg.org/CosFileTransfer/VirtualFileSystem:1.0",_}, corba:string_to_object("corbaname::1.2@localhost:"++integer_to_list(Port)++"/NameService#"++Name)), %% Create a Virtual File System. - ?line VFS = ?match({_,_,_,_,_,_}, + VFS = ?match({_,_,_,_,_,_}, cosFileTransferApp:create_VFS(WhichType, [], Host, ?FTP_PORT, [{protocol, Type}])), %% Start two File Transfer Sessions (Source and Target). - ?line {FST, _DirT} = ?match({{_,_,_},{_,_,_}}, + {FST, _DirT} = ?match({{_,_,_},{_,_,_}}, 'CosFileTransfer_VirtualFileSystem':login(VFST, ?FTP_USER, ?FTP_PASS, ?FTP_ACC)), - ?line {FSS, DirS} = ?match({{_,_,_,_,_,_},{_,_,_,_,_,_}}, + {FSS, DirS} = ?match({{_,_,_,_,_,_},{_,_,_,_,_,_}}, 'CosFileTransfer_VirtualFileSystem':login(VFS, ?FTP_USER, ?FTP_PASS, ?FTP_ACC)), %% Do some basic test on one of the Directories attributes. - ?line ?match([_H|_], 'CosFileTransfer_Directory':'_get_name'(DirS)), - ?line ?match([_H|_], 'CosFileTransfer_Directory':'_get_complete_file_name'(DirS)), - ?line ?match({'IOP_IOR',[],[]}, 'CosFileTransfer_Directory':'_get_parent'(DirS)), - ?line ?match(FSS, 'CosFileTransfer_Directory':'_get_associated_session'(DirS)), + ?match([_H|_], 'CosFileTransfer_Directory':'_get_name'(DirS)), + ?match([_H|_], 'CosFileTransfer_Directory':'_get_complete_file_name'(DirS)), + ?match({'IOP_IOR',[],[]}, 'CosFileTransfer_Directory':'_get_parent'(DirS)), + ?match(FSS, 'CosFileTransfer_Directory':'_get_associated_session'(DirS)), %% Get a FileList before we create any new Files - ?line #'CosFileTransfer_FileWrapper'{the_file = Dir} = + #'CosFileTransfer_FileWrapper'{the_file = Dir} = ?match({'CosFileTransfer_FileWrapper', _, ndirectory}, 'CosFileTransfer_FileTransferSession':get_file(FSS, TEST_DIR)), - ?line {ok,FileList, Iter1} = ?match({ok,_,_}, 'CosFileTransfer_Directory':list(Dir, 10)), - ?line loop_files(FileList), + {ok,FileList, Iter1} = ?match({ok,_,_}, 'CosFileTransfer_Directory':list(Dir, 10)), + loop_files(FileList), case Iter1 of {'IOP_IOR',[],[]} -> ok; _-> - ?line ?match(ok, 'CosFileTransfer_FileIterator':destroy(Iter1)) + ?match(ok, 'CosFileTransfer_FileIterator':destroy(Iter1)) end, #any{value=Count1} = ?match({any, _, _}, 'CosPropertyService_PropertySet': @@ -374,17 +359,17 @@ file_helper(Config, WhichType, TEST_DIR, Node, Port, Name, Type) -> %% Now we want to transfer a file from source to target. First, we'll create %% a a file to work with. - ?line create_file_on_source_node(WhichType, Config, Host, + create_file_on_source_node(WhichType, Config, Host, filename:join(TEST_SOURCE), TEST_DIR, ?TEST_FILE_DATA), - ?line create_file_on_source_node(WhichType, Config, Host, + create_file_on_source_node(WhichType, Config, Host, filename:join(TEST_SOURCE2), TEST_DIR, ?TEST_FILE_DATA2), - ?line #'CosFileTransfer_FileWrapper'{the_file = FileS} = + #'CosFileTransfer_FileWrapper'{the_file = FileS} = ?matchnopr({'CosFileTransfer_FileWrapper', _, nfile}, 'CosFileTransfer_FileTransferSession':get_file(FSS, TEST_SOURCE)), - ?line #'CosFileTransfer_FileWrapper'{the_file = FileS2} = + #'CosFileTransfer_FileWrapper'{the_file = FileS2} = ?matchnopr({'CosFileTransfer_FileWrapper', _, nfile}, 'CosFileTransfer_FileTransferSession':get_file(FSS, TEST_SOURCE2)), @@ -394,27 +379,27 @@ file_helper(Config, WhichType, TEST_DIR, Node, Port, Name, Type) -> ?match(true, (Count1+2 == Count2)), %% Create a target File - ?line FileT = ?matchnopr({_,_,_}, + FileT = ?matchnopr({_,_,_}, 'CosFileTransfer_FileTransferSession':create_file(FST, TEST_TARGET)), %% Try to delete the non-existing file. - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_FileTransferSession':delete(FST, FileT)), - ?line ?match(ok, 'CosFileTransfer_FileTransferSession':transfer(FSS, FileS, FileT)), + ?match(ok, 'CosFileTransfer_FileTransferSession':transfer(FSS, FileS, FileT)), %% Remove this test when ftp supports append. case WhichType of {'NATIVE', 'cosFileTransferNATIVE_file'} -> - ?line ?match(ok, 'CosFileTransfer_FileTransferSession':append(FSS, FileS, FileT)), - ?line ?match(ok, 'CosFileTransfer_FileTransferSession':insert(FSS, FileS2, FileT, 7)); + ?match(ok, 'CosFileTransfer_FileTransferSession':append(FSS, FileS, FileT)), + ?match(ok, 'CosFileTransfer_FileTransferSession':insert(FSS, FileS2, FileT, 7)); _-> ok end, %% Delete source and target files - ?line ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FSS, FileS)), - ?line ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FSS, FileS2)), - ?line ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FST, FileT)), + ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FSS, FileS)), + ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FSS, FileS2)), + ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FST, FileT)), %% Should be back where we started. timer:sleep(2000), @@ -423,15 +408,15 @@ file_helper(Config, WhichType, TEST_DIR, Node, Port, Name, Type) -> ?match(true, (Count1 == Count3)), - ?line ?match(false, corba_object:non_existent(FSS)), - ?line ?match(false, corba_object:non_existent(FST)), - ?line ?match(ok, 'CosFileTransfer_FileTransferSession':logout(FSS)), - ?line ?match(ok, 'CosFileTransfer_FileTransferSession':logout(FST)), + ?match(false, corba_object:non_existent(FSS)), + ?match(false, corba_object:non_existent(FST)), + ?match(ok, 'CosFileTransfer_FileTransferSession':logout(FSS)), + ?match(ok, 'CosFileTransfer_FileTransferSession':logout(FST)), %% To make sure Orber can remove it from mnesia. timer:sleep(2000), - ?line ?match(true, corba_object:non_existent(FSS)), - ?line ?match(true, corba_object:non_existent(FST)), - ?line ?match(ok, remote_apply(Node, ?MODULE, uninstall_data, [Name])), + ?match(true, corba_object:non_existent(FSS)), + ?match(true, corba_object:non_existent(FST)), + ?match(ok, remote_apply(Node, ?MODULE, uninstall_data, [Name])), stop_orber_remote(Node, normal), ok end. @@ -439,17 +424,12 @@ file_helper(Config, WhichType, TEST_DIR, Node, Port, Name, Type) -> %%----------------------------------------------------------------- %% FileTransferSession API tests %%----------------------------------------------------------------- -fts_ftp_dir_api(doc) -> ["CosFileTransfer FTP FileTransferSession API tests.", ""]; -fts_ftp_dir_api(suite) -> []; fts_ftp_dir_api(Config) -> - ?line {ok, Node} = create_node("ftp_dir_api", 4009, normal), + {ok, Node} = create_node("ftp_dir_api", 4009, normal), dir_helper(Config, 'FTP', ?TEST_DIR, Node, 4009, "ftp_dir_api"). - -fts_native_dir_api(doc) -> ["CosFileTransfer NATIVE FileTransferSession API tests.", ""]; -fts_native_dir_api(suite) -> []; fts_native_dir_api(Config) -> - ?line {ok, Node} = create_node("native_dir_api", 4010, normal), + {ok, Node} = create_node("native_dir_api", 4010, normal), {ok, Pwd} = file:get_cwd(), dir_helper(Config, {'NATIVE', 'cosFileTransferNATIVE_file'}, filename:split(Pwd), Node, 4010, "native_dir_api"). @@ -465,235 +445,235 @@ dir_helper(Config, WhichType, TEST_DIR, Node, Port, Name) -> io:format("<<<<<< CosFileTransfer Testing Configuration >>>>>>~n",[]), io:format("Top Dir: ~p~nLevel2 Dir: ~p~n", [TEST_DIR_LEVEL1, TEST_DIR_LEVEL2]), - ?line ?match(ok, remote_apply(Node, ?MODULE, install_data, + ?match(ok, remote_apply(Node, ?MODULE, install_data, [tcp, {WhichType, Host, Name}])), - ?line VFS = ?matchnopr({'IOP_IOR',"IDL:omg.org/CosFileTransfer/VirtualFileSystem:1.0",_}, + VFS = ?matchnopr({'IOP_IOR',"IDL:omg.org/CosFileTransfer/VirtualFileSystem:1.0",_}, corba:string_to_object("corbaname::1.2@localhost:"++integer_to_list(Port)++"/NameService#"++Name)), %% Start two File Transfer Sessions (Source and Target). - ?line {FS, DirS} = ?matchnopr({{'IOP_IOR',_,_}, _}, + {FS, DirS} = ?matchnopr({{'IOP_IOR',_,_}, _}, 'CosFileTransfer_VirtualFileSystem':login(VFS, ?FTP_USER, ?FTP_PASS, ?FTP_ACC)), %% Do some basic test on one of the Directories attributes. - ?line ?match([_H|_], 'CosFileTransfer_Directory':'_get_name'(DirS)), - ?line ?match([_H|_], 'CosFileTransfer_Directory':'_get_complete_file_name'(DirS)), - ?line ?match({'IOP_IOR',[],[]}, 'CosFileTransfer_Directory':'_get_parent'(DirS)), - ?line ?matchnopr(FS, 'CosFileTransfer_Directory':'_get_associated_session'(DirS)), + ?match([_H|_], 'CosFileTransfer_Directory':'_get_name'(DirS)), + ?match([_H|_], 'CosFileTransfer_Directory':'_get_complete_file_name'(DirS)), + ?match({'IOP_IOR',[],[]}, 'CosFileTransfer_Directory':'_get_parent'(DirS)), + ?matchnopr(FS, 'CosFileTransfer_Directory':'_get_associated_session'(DirS)), %% Create a Root Directory. Currently we only need to create one but %% later on, when supporting other protocols than FTP it's not enough. - ?line Dir1 = 'CosFileTransfer_FileTransferSession':create_directory(FS, + Dir1 = 'CosFileTransfer_FileTransferSession':create_directory(FS, TEST_DIR_LEVEL1), io:format("<<<<<< CosFileTransfer Testing Properties >>>>>>~n",[]), - ?line ?match({ok, [tk_long, tk_boolean]}, + ?match({ok, [tk_long, tk_boolean]}, 'CosFileTransfer_Directory':get_allowed_property_types(Dir1)), - ?line ?match({ok, [_,_]}, + ?match({ok, [_,_]}, 'CosFileTransfer_Directory':get_allowed_properties(Dir1)), - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_Directory':define_property_with_mode(Dir1, "num_children", #any{typecode=tk_long, value=0}, fixed_readonly)), - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_Directory':define_property_with_mode(Dir1, "wrong", #any{typecode=tk_long, value=0}, fixed_readonly)), - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_Directory':define_property_with_mode(Dir1, "num_children", #any{typecode=tk_short, value=0}, fixed_readonly)), - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_Directory':define_property_with_mode(Dir1, "num_children", #any{typecode=tk_long, value=0}, fixed_normal)), - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_Directory':define_properties_with_modes(Dir1, [#'CosPropertyService_PropertyDef' {property_name = "num_children", property_value = #any{typecode=tk_long, value=0}, property_mode = fixed_readonly}])), - ?line ?match(fixed_readonly, + ?match(fixed_readonly, 'CosFileTransfer_Directory':get_property_mode(Dir1, "num_children")), - ?line ?match({true, + ?match({true, [#'CosPropertyService_PropertyMode'{property_name = "num_children", property_mode = fixed_readonly}]}, 'CosFileTransfer_Directory':get_property_modes(Dir1, ["num_children"])), - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_Directory':set_property_mode(Dir1, "num_children", fixed_readonly)), - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_Directory': set_property_modes(Dir1, [#'CosPropertyService_PropertyMode' {property_name = "num_children", property_mode = fixed_readonly}])), - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_Directory': set_property_modes(Dir1, [#'CosPropertyService_PropertyMode' {property_name = "wrong", property_mode = fixed_readonly}])), - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_Directory': set_property_modes(Dir1, [#'CosPropertyService_PropertyMode' {property_name = "num_children", property_mode = fixed_normal}])), - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_Directory':define_property(Dir1, "num_children", #any{typecode=tk_long, value=0})), - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_Directory':define_property(Dir1, "wrong", #any{typecode=tk_long, value=0})), - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_Directory':define_property(Dir1, "num_children", #any{typecode=tk_short, value=0})), - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_Directory':define_property(Dir1, "num_children", #any{typecode=tk_long, value=0})), - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_Directory': define_properties(Dir1, [#'CosPropertyService_Property' {property_name = "num_children", property_value = #any{typecode=tk_long, value=0}}])), - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_Directory': define_properties(Dir1, [#'CosPropertyService_Property' {property_name = "wrong", property_value = #any{typecode=tk_long, value=0}}])), - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_Directory': define_properties(Dir1, [#'CosPropertyService_Property' {property_name = "num_children", property_value = #any{typecode=tk_short, value=0}}])), - ?line ?match(2, 'CosFileTransfer_Directory':get_number_of_properties(Dir1)), + ?match(2, 'CosFileTransfer_Directory':get_number_of_properties(Dir1)), - ?line ?match({ok, ["num_children", "is_directory"], {'IOP_IOR',[],[]}}, + ?match({ok, ["num_children", "is_directory"], {'IOP_IOR',[],[]}}, 'CosFileTransfer_Directory':get_all_property_names(Dir1, 2)), - ?line ?match({ok, ["is_directory"], _}, + ?match({ok, ["is_directory"], _}, 'CosFileTransfer_Directory':get_all_property_names(Dir1, 1)), - ?line ?match(#any{}, + ?match(#any{}, 'CosFileTransfer_Directory':get_property_value(Dir1, "num_children")), - ?line ?match(#any{}, + ?match(#any{}, 'CosFileTransfer_Directory':get_property_value(Dir1, "is_directory")), - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_Directory':get_property_value(Dir1, "wrong")), - ?line ?match({true, + ?match({true, [#'CosPropertyService_Property'{property_name = "num_children"}]}, 'CosFileTransfer_Directory':get_properties(Dir1, ["num_children"])), - ?line ?match({false, + ?match({false, [#'CosPropertyService_Property'{property_name = "wrong"}]}, 'CosFileTransfer_Directory':get_properties(Dir1, ["wrong"])), - ?line ?match({ok, [_],_}, + ?match({ok, [_],_}, 'CosFileTransfer_Directory':get_all_properties(Dir1, 1)), - ?line ?match({ok, [_,_], {'IOP_IOR',[],[]}}, + ?match({ok, [_,_], {'IOP_IOR',[],[]}}, 'CosFileTransfer_Directory':get_all_properties(Dir1, 2)), - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_Directory':delete_property(Dir1, "num_children")), - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_Directory':delete_property(Dir1, "wrong")), - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_Directory':delete_properties(Dir1, ["num_children"])), - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_Directory':delete_properties(Dir1, ["wrong"])), - ?line ?match(false, 'CosFileTransfer_Directory':delete_all_properties(Dir1)), - ?line ?match(true, + ?match(false, 'CosFileTransfer_Directory':delete_all_properties(Dir1)), + ?match(true, 'CosFileTransfer_Directory':is_property_defined(Dir1, "num_children")), - ?line ?match(false, + ?match(false, 'CosFileTransfer_Directory':is_property_defined(Dir1, "wrong")), %% The Top Dir should be empty and ... - ?line ?match({ok,[],_}, 'CosFileTransfer_Directory':list(Dir1, 1000)), - ?line ?match( #any{value=0}, + ?match({ok,[],_}, 'CosFileTransfer_Directory':list(Dir1, 1000)), + ?match( #any{value=0}, 'CosPropertyService_PropertySet':get_property_value(Dir1, "num_children")), %% Create a sub-directory. - ?line Dir2 = 'CosFileTransfer_FileTransferSession':create_directory(FS, + Dir2 = 'CosFileTransfer_FileTransferSession':create_directory(FS, TEST_DIR_LEVEL2), - ?line ?match( #any{value=1}, + ?match( #any{value=1}, 'CosPropertyService_PropertySet':get_property_value(Dir1, "num_children")), - ?line ?match({ok, [_,_], {'IOP_IOR',[],[]}}, + ?match({ok, [_,_], {'IOP_IOR',[],[]}}, 'CosFileTransfer_Directory':get_all_properties(Dir1, 2)), - ?line {_,_,Iterator1} = ?match({ok, [_], _}, + {_,_,Iterator1} = ?match({ok, [_], _}, 'CosFileTransfer_Directory':get_all_properties(Dir1, 1)), - ?line ?match({false, [_]}, + ?match({false, [_]}, 'CosPropertyService_PropertiesIterator':next_n(Iterator1,4)), - ?line {_,_,Iterator0} = ?match({ok, [], _}, + {_,_,Iterator0} = ?match({ok, [], _}, 'CosFileTransfer_Directory':get_all_properties(Dir1, 0)), - ?line ?match({false, [_, {'CosPropertyService_Property', + ?match({false, [_, {'CosPropertyService_Property', "num_children",{any,tk_long,1}}]}, 'CosPropertyService_PropertiesIterator':next_n(Iterator0,4)), - ?line ?match({true, + ?match({true, [#'CosPropertyService_Property'{property_name = "num_children"}]}, 'CosFileTransfer_Directory':get_properties(Dir1, ["num_children"])), %% The Top Directory is not emtpy any more and ... - ?line {ok,[#'CosFileTransfer_FileWrapper'{the_file = DirRef}],_} = + {ok,[#'CosFileTransfer_FileWrapper'{the_file = DirRef}],_} = ?matchnopr({ok,[{'CosFileTransfer_FileWrapper', _, ndirectory}],_}, 'CosFileTransfer_Directory':list(Dir1, 1000)), %% ... its name eq. to 'TEST_DIR_LEVEL2' - ?line ?match(TEST_DIR_LEVEL2, + ?match(TEST_DIR_LEVEL2, 'CosFileTransfer_Directory':'_get_complete_file_name'(DirRef)), - ?line #'CosFileTransfer_FileWrapper'{the_file = Dir3} = + #'CosFileTransfer_FileWrapper'{the_file = Dir3} = ?matchnopr({'CosFileTransfer_FileWrapper', _, ndirectory}, 'CosFileTransfer_FileTransferSession':get_file(FS, TEST_DIR_LEVEL1)), %% Must get the same result for the 'get_file' operation. - ?line {ok,[#'CosFileTransfer_FileWrapper'{the_file = DirRef2}],_} = + {ok,[#'CosFileTransfer_FileWrapper'{the_file = DirRef2}],_} = ?matchnopr({ok,[{'CosFileTransfer_FileWrapper', _, ndirectory}],_}, 'CosFileTransfer_Directory':list(Dir3,1000)), - ?line ?match(TEST_DIR_LEVEL2, + ?match(TEST_DIR_LEVEL2, 'CosFileTransfer_Directory':'_get_complete_file_name'(DirRef2)), %% Since the top directory isn't empty deleting it must fail. - ?line ?match({'EXCEPTION', _}, + ?match({'EXCEPTION', _}, 'CosFileTransfer_FileTransferSession':delete(FS, Dir1)), %% Delete the sub-directory and ... - ?line ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FS, Dir2)), + ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FS, Dir2)), %% ... see if the top directory realyy is empty. - ?line ?match({ok,[],_}, 'CosFileTransfer_Directory':list(Dir1, 1000)), + ?match({ok,[],_}, 'CosFileTransfer_Directory':list(Dir1, 1000)), - ?line ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FS, Dir1)), + ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FS, Dir1)), %% Test if the top directory been removed as intended. - ?line ?match({'EXCEPTION', {'CosFileTransfer_FileNotFoundException', _, _}}, + ?match({'EXCEPTION', {'CosFileTransfer_FileNotFoundException', _, _}}, 'CosFileTransfer_FileTransferSession':get_file(FS, TEST_DIR_LEVEL1)), - ?line ?match(false, corba_object:non_existent(FS)), - ?line ?match(ok, 'CosFileTransfer_FileTransferSession':logout(FS)), + ?match(false, corba_object:non_existent(FS)), + ?match(ok, 'CosFileTransfer_FileTransferSession':logout(FS)), %% To make sure Orber can remove it from mnesia. timer:sleep(1000), - ?line ?match(true, corba_object:non_existent(FS)), - ?line ?match(ok, remote_apply(Node, ?MODULE, uninstall_data, [Name])), + ?match(true, corba_object:non_existent(FS)), + ?match(ok, remote_apply(Node, ?MODULE, uninstall_data, [Name])), stop_orber_remote(Node, normal), ok end. @@ -790,10 +770,10 @@ create_node(Name, Port, Retries, Type, Args, Options) -> [_, Host] = ?match([_,_],string:tokens(atom_to_list(node()), [$@])), case starter(Host, Name, Args) of {ok, NewNode} -> - ?line ?match(pong, net_adm:ping(NewNode)), + ?match(pong, net_adm:ping(NewNode)), {ok, Cwd} = file:get_cwd(), Path = code:get_path(), - ?line ?match(ok, rpc:call(NewNode, file, set_cwd, [Cwd])), + ?match(ok, rpc:call(NewNode, file, set_cwd, [Cwd])), true = rpc:call(NewNode, code, set_path, [Path]), ?match(ok, start_orber_remote(NewNode, Type, Options, Port)), spawn_link(NewNode, ?MODULE, slave_sup, []), @@ -939,7 +919,7 @@ install_data(Protocol, {WhichType, Host, Name}) -> io:format("<<<<<< Starting ~p/~p VFS at ~p/~p>>>>>>~n", [Protocol, WhichType, Host, Name]), %% Create a Virtual File System. - ?line VFS = ?match({_,_,_,_,_,_}, + VFS = ?match({_,_,_,_,_,_}, cosFileTransferApp:create_VFS(WhichType, [], Host, ?FTP_PORT, [{protocol, Protocol}])), NS = corba:resolve_initial_references("NameService"), @@ -948,9 +928,9 @@ install_data(Protocol, {WhichType, Host, Name}) -> 'CosNaming_NamingContext':rebind(NS, N, VFS). uninstall_data(Name) -> - ?line VFS = ?match({_,_,_,_,_,_}, + VFS = ?match({_,_,_,_,_,_}, corba:string_to_object("corbaname:rir:/NameService#"++Name)), - ?line ?match(ok, corba:dispose(VFS)), + ?match(ok, corba:dispose(VFS)), ok. -- cgit v1.2.3 From f57ec4d3b95a187141f56e601c875301f7805c2f Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Thu, 16 Jun 2016 10:36:46 +0200 Subject: [cosEventDomain] Fix mispelled module name --- lib/cosEventDomain/test/event_domain_SUITE.erl | 2 +- lib/cosEventDomain/test/generated_SUITE.erl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/cosEventDomain/test/event_domain_SUITE.erl b/lib/cosEventDomain/test/event_domain_SUITE.erl index c20988701c..031b7726c5 100644 --- a/lib/cosEventDomain/test/event_domain_SUITE.erl +++ b/lib/cosEventDomain/test/event_domain_SUITE.erl @@ -94,7 +94,7 @@ init_per_testcase(_Case, Config) -> end_per_testcase(_Case, Config) -> - Dog = proplist:get_value(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. diff --git a/lib/cosEventDomain/test/generated_SUITE.erl b/lib/cosEventDomain/test/generated_SUITE.erl index afd925359a..172465da2f 100644 --- a/lib/cosEventDomain/test/generated_SUITE.erl +++ b/lib/cosEventDomain/test/generated_SUITE.erl @@ -128,7 +128,7 @@ init_per_testcase(_Case, Config) -> end_per_testcase(_Case, Config) -> - Dog = proplist:get_value(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. -- cgit v1.2.3 From 1abff53fe014ced20a55ec09457dcbdce57c3aa0 Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Thu, 16 Jun 2016 10:38:50 +0200 Subject: [cosEvent] Fix mispelled module name --- lib/cosEvent/test/event_channel_SUITE.erl | 2 +- lib/cosEvent/test/generated_SUITE.erl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/cosEvent/test/event_channel_SUITE.erl b/lib/cosEvent/test/event_channel_SUITE.erl index 9901cd91bd..bbae8d782a 100644 --- a/lib/cosEvent/test/event_channel_SUITE.erl +++ b/lib/cosEvent/test/event_channel_SUITE.erl @@ -92,7 +92,7 @@ init_per_testcase(_Case, Config) -> end_per_testcase(_Case, Config) -> - Dog = proplist:get_value(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. diff --git a/lib/cosEvent/test/generated_SUITE.erl b/lib/cosEvent/test/generated_SUITE.erl index bbf4fe2439..86794023af 100644 --- a/lib/cosEvent/test/generated_SUITE.erl +++ b/lib/cosEvent/test/generated_SUITE.erl @@ -130,7 +130,7 @@ init_per_testcase(_Case, Config) -> end_per_testcase(_Case, Config) -> - Dog = proplist:get_value(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. -- cgit v1.2.3 From c7180120e0ade56b1c1ea2dcbaf5719ef256dedd Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Thu, 16 Jun 2016 10:39:56 +0200 Subject: [cosFileTransfer] Fix mispelled module name --- lib/cosFileTransfer/test/fileTransfer_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/cosFileTransfer/test/fileTransfer_SUITE.erl b/lib/cosFileTransfer/test/fileTransfer_SUITE.erl index 7596072da6..12aef2913a 100644 --- a/lib/cosFileTransfer/test/fileTransfer_SUITE.erl +++ b/lib/cosFileTransfer/test/fileTransfer_SUITE.erl @@ -127,7 +127,7 @@ init_per_testcase(_Case, Config) -> end_per_testcase(_Case, Config) -> - Dog = proplist:get_value(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. -- cgit v1.2.3 From 36349b71974125e10882b950bdad954654554046 Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Thu, 16 Jun 2016 10:41:32 +0200 Subject: [cosNotification] Update the test suites to follow the new style --- lib/cosNotification/test/eventDB_SUITE.erl | 85 +++++------ lib/cosNotification/test/generated_SUITE.erl | 185 +----------------------- lib/cosNotification/test/grammar_SUITE.erl | 25 +--- lib/cosNotification/test/notification_SUITE.erl | 47 +----- 4 files changed, 51 insertions(+), 291 deletions(-) (limited to 'lib') diff --git a/lib/cosNotification/test/eventDB_SUITE.erl b/lib/cosNotification/test/eventDB_SUITE.erl index 337c7effed..a0c47ad4c7 100644 --- a/lib/cosNotification/test/eventDB_SUITE.erl +++ b/lib/cosNotification/test/eventDB_SUITE.erl @@ -45,7 +45,7 @@ -include_lib("common_test/include/ct.hrl"). %%--------------- DEFINES ------------------------------------ --define(default_timeout, ?t:minutes(20)). +-define(default_timeout, test_server:minutes(20)). -define(match(ExpectedRes, Expr), fun() -> AcTuAlReS = (catch (Expr)), @@ -57,7 +57,7 @@ _ -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -297,14 +297,13 @@ cases() -> %%----------------------------------------------------------------- %% Init and cleanup functions. %%----------------------------------------------------------------- - init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -333,12 +332,10 @@ end_per_suite(Config) -> %%----------------------------------------------------------------- %% cosNotification_eventDB lookup API tests %%----------------------------------------------------------------- -mapping_filter_api(doc) -> ["The event DB is used to store events which cannot be", - "delivered at once. This case is supposed to test", - "that the events are delivered in the correct order", - "if a MappingFilter have benn associated.", - ""]; -mapping_filter_api(suite) -> []; +%% The event DB is used to store events which cannot be +%% delivered at once. This case is supposed to test +%% that the events are delivered in the correct order +%% if a MappingFilter have benn associated. mapping_filter_api(_Config) -> InitQoS = ?not_CreateInitQoS(), InitQoS2 = ?not_SetMaxEventsPerConsumer(InitQoS,100), @@ -405,12 +402,10 @@ do_lookup(QoS, Events, Return, Txt, DLFilter, PrioFilter, Timeout) -> %%----------------------------------------------------------------- %% cosNotification_eventDB discard API tests %%----------------------------------------------------------------- -discard_api(doc) -> ["The event DB is used to store events which cannot be", - "delivered at once. If MaxEvents limit is reached there", - "different ways we can discard the. This case will test", - "all permutations of order and discard policies.", - ""]; -discard_api(suite) -> []; +%% The event DB is used to store events which cannot be +%% delivered at once. If MaxEvents limit is reached there +%% different ways we can discard the. This case will test +%% all permutations of order and discard policies. discard_api(_Config) -> InitQoS1 = ?not_CreateInitQoS(), InitQoS2 = ?not_SetPriority(InitQoS1, 10), @@ -523,11 +518,9 @@ do_discard(Events, QoS, Reply, Txt) -> %%----------------------------------------------------------------- %% cosNotification_eventDB lookup API tests %%----------------------------------------------------------------- -lookup_api(doc) -> ["The event DB is used to store events which cannot be", - "delivered at once. This case is supposed to test", - "that the events are delivered in the correct order.", - ""]; -lookup_api(suite) -> []; +%% The event DB is used to store events which cannot be +%% delivered at once. This case is supposed to test +%% that the events are delivered in the correct order. lookup_api(_Config) -> InitQoS = ?not_CreateInitQoS(), InitQoS2 = ?not_SetMaxEventsPerConsumer(InitQoS,100), @@ -562,11 +555,9 @@ do_lookup(QoS, Events, Return, Txt) -> %%----------------------------------------------------------------- %% cosNotification_eventDB max events API tests %%----------------------------------------------------------------- -max_events_api(doc) -> ["The event DB is used to store events which cannot be", - "delivered at once. If the MaxEvents QoS is updated we must be", - "able to reduce the amount of stored events.", - ""]; -max_events_api(suite) -> []; +%% The event DB is used to store events which cannot be +%% delivered at once. If the MaxEvents QoS is updated we must be +%% able to reduce the amount of stored events. max_events_api(_Config) -> QoS1 = ?not_CreateInitQoS(), @@ -602,10 +593,8 @@ max_events_api(_Config) -> %%----------------------------------------------------------------- %% cosNotification_eventDB persisten events API tests %%----------------------------------------------------------------- -persisten_event_api(doc) -> ["The event DB is used to store events which cannot be", - "delivered at once.", - ""]; -persisten_event_api(suite) -> []; +%% The event DB is used to store events which cannot be +%% delivered at once. persisten_event_api(_Config) -> QoS1 = ?not_CreateInitQoS(), @@ -639,11 +628,9 @@ persisten_event_api(_Config) -> %%----------------------------------------------------------------- %% cosNotification_eventDB gc API tests %%----------------------------------------------------------------- -gc_api(doc) -> ["The event DB is used to store events which cannot be", - "delivered at once. If Deadline defined the events that", - "are older must be discarded.", - ""]; -gc_api(suite) -> []; +%% The event DB is used to store events which cannot be +%% delivered at once. If Deadline defined the events that +%% are older must be discarded. gc_api(_Config) -> QoS1 = ?not_CreateInitQoS(), @@ -680,11 +667,9 @@ gc_api(_Config) -> %%----------------------------------------------------------------- %% cosNotification_eventDB gc API tests %%----------------------------------------------------------------- -auto_gc_api(doc) -> ["The event DB is used to store events which cannot be", - "delivered at once. If Deadline defined the events that", - "are older must be discarded.", - ""]; -auto_gc_api(suite) -> []; +%% The event DB is used to store events which cannot be +%% delivered at once. If Deadline defined the events that +%% are older must be discarded. auto_gc_api(_Config) -> QoS1 = ?not_CreateInitQoS(), @@ -717,11 +702,9 @@ auto_gc_api(_Config) -> %%----------------------------------------------------------------- %% cosNotification_eventDB start- and stop-time API tests %%----------------------------------------------------------------- -start_stop_time_api(doc) -> ["The event DB is used to store events which cannot be", - "delivered at once. If Deadline defined the events that", - "are older must be discarded.", - ""]; -start_stop_time_api(suite) -> []; +%% The event DB is used to store events which cannot be +%% delivered at once. If Deadline defined the events that +%% are older must be discarded. start_stop_time_api(_Config) -> QoS1 = ?not_CreateInitQoS(), @@ -823,12 +806,10 @@ start_stop_time_api(_Config) -> %%----------------------------------------------------------------- %% cosNotification_eventDB order API tests %%----------------------------------------------------------------- -reorder_api(doc) -> ["The event DB is used to store events which cannot be", - "delivered at once. If the QoS is updated we must be", - "able to change the ordering of events as the discard", - "and order policies tells us.", - ""]; -reorder_api(suite) -> []; +%% The event DB is used to store events which cannot be +%% delivered at once. If the QoS is updated we must be +%% able to change the ordering of events as the discard +%% and order policies tells us. reorder_api(_Config) -> %% We need to test switching between: %% * Priority -> Fifo diff --git a/lib/cosNotification/test/generated_SUITE.erl b/lib/cosNotification/test/generated_SUITE.erl index 810a007672..8e3ccbd90e 100644 --- a/lib/cosNotification/test/generated_SUITE.erl +++ b/lib/cosNotification/test/generated_SUITE.erl @@ -29,7 +29,7 @@ -include_lib("common_test/include/ct.hrl"). -include_lib("orber/include/corba.hrl"). --define(default_timeout, ?t:minutes(3)). +-define(default_timeout, test_server:minutes(3)). -define(match(ExpectedRes, Expr), fun() -> @@ -40,7 +40,7 @@ _ -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -51,7 +51,7 @@ Not -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS); + exit(AcTuAlReS); _ -> AcTuAlReS end @@ -63,7 +63,7 @@ case orber_tc:check_tc(TC) of false -> io:format("###### ERROR ERROR ######~n~p - ~p~n", [Op, TC]), - ?line exit(TC); + exit(TC); true -> true end @@ -193,12 +193,12 @@ end_per_group(_GroupName, Config) -> %% Init and cleanup functions. %%----------------------------------------------------------------- init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -206,8 +206,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotification' %% Description: %%----------------------------------------------------------------- -'CosNotification'(doc) -> ["CosNotification"]; -'CosNotification'(suite) -> []; 'CosNotification'(_) -> ?match("EventReliability", 'CosNotification':'EventReliability'()), ?match(0, 'CosNotification':'BestEffort'()), @@ -242,8 +240,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotification_EventHeader' %% Description: %%----------------------------------------------------------------- -'CosNotification_EventHeader'(doc) -> ["CosNotification_EventHeader"]; -'CosNotification_EventHeader'(suite) -> []; 'CosNotification_EventHeader'(_) -> ?match(true, orber_tc:check_tc('CosNotification_EventHeader':tc())), ?match("IDL:omg.org/CosNotification/EventHeader:1.0", @@ -257,8 +253,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotification_EventType' %% Description: %%----------------------------------------------------------------- -'CosNotification_EventType'(doc) -> ["CosNotification_EventType"]; -'CosNotification_EventType'(suite) -> []; 'CosNotification_EventType'(_) -> ?match(true, orber_tc:check_tc('CosNotification_EventType':tc())), ?match("IDL:omg.org/CosNotification/EventType:1.0", @@ -272,8 +266,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotification_FixedEventHeader' %% Description: %%----------------------------------------------------------------- -'CosNotification_FixedEventHeader'(doc) -> ["CosNotification_FixedEventHeader"]; -'CosNotification_FixedEventHeader'(suite) -> []; 'CosNotification_FixedEventHeader'(_) -> ?match(true, orber_tc:check_tc('CosNotification_FixedEventHeader':tc())), ?match("IDL:omg.org/CosNotification/FixedEventHeader:1.0", @@ -287,8 +279,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotification_NamedPropertyRange' %% Description: %%----------------------------------------------------------------- -'CosNotification_NamedPropertyRange'(doc) -> ["CosNotification_NamedPropertyRange"]; -'CosNotification_NamedPropertyRange'(suite) -> []; 'CosNotification_NamedPropertyRange'(_) -> ?match(true, orber_tc:check_tc('CosNotification_NamedPropertyRange':tc())), ?match("IDL:omg.org/CosNotification/NamedPropertyRange:1.0", @@ -302,8 +292,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotification_Property' %% Description: %%----------------------------------------------------------------- -'CosNotification_Property'(doc) -> ["CosNotification_Property"]; -'CosNotification_Property'(suite) -> []; 'CosNotification_Property'(_) -> ?match(true, orber_tc:check_tc('CosNotification_Property':tc())), ?match("IDL:omg.org/CosNotification/Property:1.0", @@ -317,8 +305,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotification_PropertyError' %% Description: %%----------------------------------------------------------------- -'CosNotification_PropertyError'(doc) -> ["CosNotification_PropertyError"]; -'CosNotification_PropertyError'(suite) -> []; 'CosNotification_PropertyError'(_) -> ?match(true, orber_tc:check_tc('CosNotification_PropertyError':tc())), ?match("IDL:omg.org/CosNotification/PropertyError:1.0", @@ -332,8 +318,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotification_PropertyRange' %% Description: %%----------------------------------------------------------------- -'CosNotification_PropertyRange'(doc) -> [""]; -'CosNotification_PropertyRange'(suite) -> []; 'CosNotification_PropertyRange'(_) -> ?match(true, orber_tc:check_tc('CosNotification_PropertyRange':tc())), ?match("IDL:omg.org/CosNotification/PropertyRange:1.0", @@ -347,8 +331,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotification_StructuredEvent' %% Description: %%----------------------------------------------------------------- -'CosNotification_StructuredEvent'(doc) -> ["CosNotification_StructuredEvent"]; -'CosNotification_StructuredEvent'(suite) -> []; 'CosNotification_StructuredEvent'(_) -> ?match(true, orber_tc:check_tc('CosNotification_StructuredEvent':tc())), ?match("IDL:omg.org/CosNotification/StructuredEvent:1.0", @@ -362,8 +344,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotification_UnsupportedAdmin' %% Description: %%----------------------------------------------------------------- -'CosNotification_UnsupportedAdmin'(doc) -> ["CosNotification_UnsupportedAdmin"]; -'CosNotification_UnsupportedAdmin'(suite) -> []; 'CosNotification_UnsupportedAdmin'(_) -> ?match(true, orber_tc:check_tc('CosNotification_UnsupportedAdmin':tc())), ?match("IDL:omg.org/CosNotification/UnsupportedAdmin:1.0", @@ -377,8 +357,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotification_UnsupportedQoS' %% Description: %%----------------------------------------------------------------- -'CosNotification_UnsupportedQoS'(doc) -> ["CosNotification_UnsupportedQoS"]; -'CosNotification_UnsupportedQoS'(suite) -> []; 'CosNotification_UnsupportedQoS'(_) -> ?match(true, orber_tc:check_tc('CosNotification_UnsupportedQoS':tc())), ?match("IDL:omg.org/CosNotification/UnsupportedQoS:1.0", @@ -392,8 +370,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotification_EventBatch' %% Description: %%----------------------------------------------------------------- -'CosNotification_EventBatch'(doc) -> ["CosNotification_EventBatch"]; -'CosNotification_EventBatch'(suite) -> []; 'CosNotification_EventBatch'(_) -> ?match(true, orber_tc:check_tc('CosNotification_EventBatch':tc())), ?match("IDL:omg.org/CosNotification/EventBatch:1.0", @@ -407,8 +383,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotification_EventTypeSeq' %% Description: %%----------------------------------------------------------------- -'CosNotification_EventTypeSeq'(doc) -> ["CosNotification_EventTypeSeq"]; -'CosNotification_EventTypeSeq'(suite) -> []; 'CosNotification_EventTypeSeq'(_) -> ?match(true, orber_tc:check_tc('CosNotification_EventTypeSeq':tc())), ?match("IDL:omg.org/CosNotification/EventTypeSeq:1.0", @@ -422,8 +396,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotification_NamedPropertyRangeSeq' %% Description: %%----------------------------------------------------------------- -'CosNotification_NamedPropertyRangeSeq'(doc) -> ["CosNotification_NamedPropertyRangeSeq"]; -'CosNotification_NamedPropertyRangeSeq'(suite) -> []; 'CosNotification_NamedPropertyRangeSeq'(_) -> ?match(true, orber_tc:check_tc('CosNotification_NamedPropertyRangeSeq':tc())), ?match("IDL:omg.org/CosNotification/NamedPropertyRangeSeq:1.0", @@ -437,8 +409,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotification_PropertyErrorSeq' %% Description: %%----------------------------------------------------------------- -'CosNotification_PropertyErrorSeq'(doc) -> ["CosNotification_PropertyErrorSeq"]; -'CosNotification_PropertyErrorSeq'(suite) -> []; 'CosNotification_PropertyErrorSeq'(_) -> ?match(true, orber_tc:check_tc('CosNotification_PropertyErrorSeq':tc())), ?match("IDL:omg.org/CosNotification/PropertyErrorSeq:1.0", @@ -452,8 +422,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotification_PropertySeq' %% Description: %%----------------------------------------------------------------- -'CosNotification_PropertySeq'(doc) -> ["CosNotification_PropertySeq"]; -'CosNotification_PropertySeq'(suite) -> []; 'CosNotification_PropertySeq'(_) -> ?match(true, orber_tc:check_tc('CosNotification_PropertySeq':tc())), ?match("IDL:omg.org/CosNotification/PropertySeq:1.0", @@ -467,8 +435,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_AdminLimit' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_AdminLimit'(doc) -> ["CosNotifyChannelAdmin_AdminLimit"]; -'CosNotifyChannelAdmin_AdminLimit'(suite) -> []; 'CosNotifyChannelAdmin_AdminLimit'(_) -> ?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_AdminLimit':tc())), ?match("IDL:omg.org/CosNotifyChannelAdmin/AdminLimit:1.0", @@ -482,8 +448,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_AdminLimitExceeded' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_AdminLimitExceeded'(doc) -> ["CosNotifyChannelAdmin_AdminLimitExceeded"]; -'CosNotifyChannelAdmin_AdminLimitExceeded'(suite) -> []; 'CosNotifyChannelAdmin_AdminLimitExceeded'(_) -> ?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_AdminLimitExceeded':tc())), ?match("IDL:omg.org/CosNotifyChannelAdmin/AdminLimitExceeded:1.0", @@ -497,8 +461,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_AdminNotFound' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_AdminNotFound'(doc) -> ["CosNotifyChannelAdmin_AdminNotFound"]; -'CosNotifyChannelAdmin_AdminNotFound'(suite) -> []; 'CosNotifyChannelAdmin_AdminNotFound'(_) -> ?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_AdminNotFound':tc())), ?match("IDL:omg.org/CosNotifyChannelAdmin/AdminNotFound:1.0", @@ -512,8 +474,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_ChannelNotFound' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_ChannelNotFound'(doc) -> ["CosNotifyChannelAdmin_ChannelNotFound"]; -'CosNotifyChannelAdmin_ChannelNotFound'(suite) -> []; 'CosNotifyChannelAdmin_ChannelNotFound'(_) -> ?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_ChannelNotFound':tc())), ?match("IDL:omg.org/CosNotifyChannelAdmin/ChannelNotFound:1.0", @@ -527,8 +487,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_ConnectionAlreadyActive' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_ConnectionAlreadyActive'(doc) -> ["CosNotifyChannelAdmin_ConnectionAlreadyActive"]; -'CosNotifyChannelAdmin_ConnectionAlreadyActive'(suite) -> []; 'CosNotifyChannelAdmin_ConnectionAlreadyActive'(_) -> ?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_ConnectionAlreadyActive':tc())), ?match("IDL:omg.org/CosNotifyChannelAdmin/ConnectionAlreadyActive:1.0", @@ -537,13 +495,10 @@ end_per_testcase(_Case, Config) -> 'CosNotifyChannelAdmin_ConnectionAlreadyActive':name()), ok. - %%----------------------------------------------------------------- %% Test Case: 'CosNotifyChannelAdmin_ConnectionAlreadyInactive' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_ConnectionAlreadyInactive'(doc) -> ["CosNotifyChannelAdmin_ConnectionAlreadyInactive"]; -'CosNotifyChannelAdmin_ConnectionAlreadyInactive'(suite) -> []; 'CosNotifyChannelAdmin_ConnectionAlreadyInactive'(_) -> ?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_ConnectionAlreadyInactive':tc())), ?match("IDL:omg.org/CosNotifyChannelAdmin/ConnectionAlreadyInactive:1.0", @@ -556,8 +511,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_NotConnected' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_NotConnected'(doc) -> ["CosNotifyChannelAdmin_NotConnected"]; -'CosNotifyChannelAdmin_NotConnected'(suite) -> []; 'CosNotifyChannelAdmin_NotConnected'(_) -> ?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_NotConnected':tc())), ?match("IDL:omg.org/CosNotifyChannelAdmin/NotConnected:1.0", @@ -570,8 +523,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_AdminIDSeq' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_AdminIDSeq'(doc) -> ["CosNotifyChannelAdmin_AdminIDSeq"]; -'CosNotifyChannelAdmin_AdminIDSeq'(suite) -> []; 'CosNotifyChannelAdmin_AdminIDSeq'(_) -> ?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_AdminIDSeq':tc())), ?match("IDL:omg.org/CosNotifyChannelAdmin/AdminIDSeq:1.0", @@ -584,8 +535,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_ChannelIDSeq' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_ChannelIDSeq'(doc) -> ["CosNotifyChannelAdmin_ChannelIDSeq"]; -'CosNotifyChannelAdmin_ChannelIDSeq'(suite) -> []; 'CosNotifyChannelAdmin_ChannelIDSeq'(_) -> ?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_ChannelIDSeq':tc())), ?match("IDL:omg.org/CosNotifyChannelAdmin/ChannelIDSeq:1.0", @@ -598,8 +547,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_ProxyIDSeq' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_ProxyIDSeq'(doc) -> ["CosNotifyChannelAdmin_ProxyIDSeq"]; -'CosNotifyChannelAdmin_ProxyIDSeq'(suite) -> []; 'CosNotifyChannelAdmin_ProxyIDSeq'(_) -> ?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_ProxyIDSeq':tc())), ?match("IDL:omg.org/CosNotifyChannelAdmin/ProxyIDSeq:1.0", @@ -612,8 +559,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_CallbackNotFound' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_CallbackNotFound'(doc) -> ["CosNotifyFilter_CallbackNotFound"]; -'CosNotifyFilter_CallbackNotFound'(suite) -> []; 'CosNotifyFilter_CallbackNotFound'(_) -> ?match(true, orber_tc:check_tc('CosNotifyFilter_CallbackNotFound':tc())), ?match("IDL:omg.org/CosNotifyFilter/CallbackNotFound:1.0", @@ -626,8 +571,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_ConstraintExp' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_ConstraintExp'(doc) -> ["CosNotifyFilter_ConstraintExp"]; -'CosNotifyFilter_ConstraintExp'(suite) -> []; 'CosNotifyFilter_ConstraintExp'(_) -> ?match(true, orber_tc:check_tc('CosNotifyFilter_ConstraintExp':tc())), ?match("IDL:omg.org/CosNotifyFilter/ConstraintExp:1.0", @@ -640,8 +583,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_ConstraintInfo' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_ConstraintInfo'(doc) -> ["CosNotifyFilter_ConstraintInfo"]; -'CosNotifyFilter_ConstraintInfo'(suite) -> []; 'CosNotifyFilter_ConstraintInfo'(_) -> ?match(true, orber_tc:check_tc('CosNotifyFilter_ConstraintInfo':tc())), ?match("IDL:omg.org/CosNotifyFilter/ConstraintInfo:1.0", @@ -654,8 +595,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_ConstraintNotFound' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_ConstraintNotFound'(doc) -> ["CosNotifyFilter_ConstraintNotFound"]; -'CosNotifyFilter_ConstraintNotFound'(suite) -> []; 'CosNotifyFilter_ConstraintNotFound'(_) -> ?match(true, orber_tc:check_tc('CosNotifyFilter_ConstraintNotFound':tc())), ?match("IDL:omg.org/CosNotifyFilter/ConstraintNotFound:1.0", @@ -668,8 +607,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_DuplicateConstraintID' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_DuplicateConstraintID'(doc) -> ["CosNotifyFilter_DuplicateConstraintID"]; -'CosNotifyFilter_DuplicateConstraintID'(suite) -> []; 'CosNotifyFilter_DuplicateConstraintID'(_) -> ?match(true, orber_tc:check_tc('CosNotifyFilter_DuplicateConstraintID':tc())), ?match("IDL:omg.org/CosNotifyFilter/DuplicateConstraintID:1.0", @@ -682,8 +619,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_FilterNotFound' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_FilterNotFound'(doc) -> ["CosNotifyFilter_FilterNotFound"]; -'CosNotifyFilter_FilterNotFound'(suite) -> []; 'CosNotifyFilter_FilterNotFound'(_) -> ?match(true, orber_tc:check_tc('CosNotifyFilter_FilterNotFound':tc())), ?match("IDL:omg.org/CosNotifyFilter/FilterNotFound:1.0", @@ -696,8 +631,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_InvalidConstraint' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_InvalidConstraint'(doc) -> ["CosNotifyFilter_InvalidConstraint"]; -'CosNotifyFilter_InvalidConstraint'(suite) -> []; 'CosNotifyFilter_InvalidConstraint'(_) -> ?match(true, orber_tc:check_tc('CosNotifyFilter_InvalidConstraint':tc())), ?match("IDL:omg.org/CosNotifyFilter/InvalidConstraint:1.0", @@ -710,8 +643,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_InvalidGrammar' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_InvalidGrammar'(doc) -> ["CosNotifyFilter_InvalidGrammar"]; -'CosNotifyFilter_InvalidGrammar'(suite) -> []; 'CosNotifyFilter_InvalidGrammar'(_) -> ?match(true, orber_tc:check_tc('CosNotifyFilter_InvalidGrammar':tc())), ?match("IDL:omg.org/CosNotifyFilter/InvalidGrammar:1.0", @@ -724,8 +655,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_InvalidValue' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_InvalidValue'(doc) -> ["CosNotifyFilter_InvalidValue"]; -'CosNotifyFilter_InvalidValue'(suite) -> []; 'CosNotifyFilter_InvalidValue'(_) -> ?match(true, orber_tc:check_tc('CosNotifyFilter_InvalidValue':tc())), ?match("IDL:omg.org/CosNotifyFilter/InvalidValue:1.0", @@ -738,8 +667,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_MappingConstraintInfo' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_MappingConstraintInfo'(doc) -> ["CosNotifyFilter_MappingConstraintInfo"]; -'CosNotifyFilter_MappingConstraintInfo'(suite) -> []; 'CosNotifyFilter_MappingConstraintInfo'(_) -> ?match(true, orber_tc:check_tc('CosNotifyFilter_MappingConstraintInfo':tc())), ?match("IDL:omg.org/CosNotifyFilter/MappingConstraintInfo:1.0", @@ -752,8 +679,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_MappingConstraintPair' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_MappingConstraintPair'(doc) -> ["CosNotifyFilter_MappingConstraintPair"]; -'CosNotifyFilter_MappingConstraintPair'(suite) -> []; 'CosNotifyFilter_MappingConstraintPair'(_) -> ?match(true, orber_tc:check_tc('CosNotifyFilter_MappingConstraintPair':tc())), ?match("IDL:omg.org/CosNotifyFilter/MappingConstraintPair:1.0", @@ -766,8 +691,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_UnsupportedFilterableData' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_UnsupportedFilterableData'(doc) -> ["CosNotifyFilter_UnsupportedFilterableData"]; -'CosNotifyFilter_UnsupportedFilterableData'(suite) -> []; 'CosNotifyFilter_UnsupportedFilterableData'(_) -> ?match(true, orber_tc:check_tc('CosNotifyFilter_UnsupportedFilterableData':tc())), ?match("IDL:omg.org/CosNotifyFilter/UnsupportedFilterableData:1.0", @@ -780,8 +703,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_CallbackIDSeq' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_CallbackIDSeq'(doc) -> ["CosNotifyFilter_CallbackIDSeq"]; -'CosNotifyFilter_CallbackIDSeq'(suite) -> []; 'CosNotifyFilter_CallbackIDSeq'(_) -> ?match(true, orber_tc:check_tc('CosNotifyFilter_CallbackIDSeq':tc())), ?match("IDL:omg.org/CosNotifyFilter/CallbackIDSeq:1.0", @@ -795,8 +716,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_ConstraintExpSeq' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_ConstraintExpSeq'(doc) -> ["CosNotifyFilter_ConstraintExpSeq"]; -'CosNotifyFilter_ConstraintExpSeq'(suite) -> []; 'CosNotifyFilter_ConstraintExpSeq'(_) -> ?match(true, orber_tc:check_tc('CosNotifyFilter_ConstraintExpSeq':tc())), ?match("IDL:omg.org/CosNotifyFilter/ConstraintExpSeq:1.0", @@ -810,8 +729,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_ConstraintIDSeq' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_ConstraintIDSeq'(doc) -> ["CosNotifyFilter_ConstraintIDSeq"]; -'CosNotifyFilter_ConstraintIDSeq'(suite) -> []; 'CosNotifyFilter_ConstraintIDSeq'(_) -> ?match(true, orber_tc:check_tc('CosNotifyFilter_ConstraintIDSeq':tc())), ?match("IDL:omg.org/CosNotifyFilter/ConstraintIDSeq:1.0", @@ -825,8 +742,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_ConstraintInfoSeq' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_ConstraintInfoSeq'(doc) -> ["CosNotifyFilter_ConstraintInfoSeq"]; -'CosNotifyFilter_ConstraintInfoSeq'(suite) -> []; 'CosNotifyFilter_ConstraintInfoSeq'(_) -> ?match(true, orber_tc:check_tc('CosNotifyFilter_ConstraintInfoSeq':tc())), ?match("IDL:omg.org/CosNotifyFilter/ConstraintInfoSeq:1.0", @@ -840,8 +755,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_FilterIDSeq' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_FilterIDSeq'(doc) -> ["CosNotifyFilter_FilterIDSeq"]; -'CosNotifyFilter_FilterIDSeq'(suite) -> []; 'CosNotifyFilter_FilterIDSeq'(_) -> ?match(true, orber_tc:check_tc('CosNotifyFilter_FilterIDSeq':tc())), ?match("IDL:omg.org/CosNotifyFilter/FilterIDSeq:1.0", @@ -855,8 +768,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_MappingConstraintInfoSeq' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_MappingConstraintInfoSeq'(doc) -> ["CosNotifyFilter_MappingConstraintInfoSeq"]; -'CosNotifyFilter_MappingConstraintInfoSeq'(suite) -> []; 'CosNotifyFilter_MappingConstraintInfoSeq'(_) -> ?match(true, orber_tc:check_tc('CosNotifyFilter_MappingConstraintInfoSeq':tc())), ?match("IDL:omg.org/CosNotifyFilter/MappingConstraintInfoSeq:1.0", @@ -870,8 +781,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_MappingConstraintPairSeq' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_MappingConstraintPairSeq'(doc) -> ["CosNotifyFilter_MappingConstraintPairSeq"]; -'CosNotifyFilter_MappingConstraintPairSeq'(suite) -> []; 'CosNotifyFilter_MappingConstraintPairSeq'(_) -> ?match(true, orber_tc:check_tc('CosNotifyFilter_MappingConstraintPairSeq':tc())), ?match("IDL:omg.org/CosNotifyFilter/MappingConstraintPairSeq:1.0", @@ -885,8 +794,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyComm_InvalidEventType' %% Description: %%----------------------------------------------------------------- -'CosNotifyComm_InvalidEventType'(doc) -> ["CosNotifyComm_InvalidEventType"]; -'CosNotifyComm_InvalidEventType'(suite) -> []; 'CosNotifyComm_InvalidEventType'(_) -> ?match(true, orber_tc:check_tc('CosNotifyComm_InvalidEventType':tc())), ?match("IDL:omg.org/CosNotifyComm/InvalidEventType:1.0", @@ -900,8 +807,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_ProxyNotFound' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_ProxyNotFound'(doc) -> ["CosNotifyChannelAdmin_ProxyNotFound"]; -'CosNotifyChannelAdmin_ProxyNotFound'(suite) -> []; 'CosNotifyChannelAdmin_ProxyNotFound'(_) -> ?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_ProxyNotFound':tc())), ?match("IDL:omg.org/CosNotifyChannelAdmin/ProxyNotFound:1.0", @@ -915,8 +820,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotification_AdminPropertiesAdmin' %% Description: %%----------------------------------------------------------------- -'CosNotification_AdminPropertiesAdmin'(doc) -> ["CosNotification_AdminPropertiesAdmin"]; -'CosNotification_AdminPropertiesAdmin'(suite) -> []; 'CosNotification_AdminPropertiesAdmin'(_) -> ?nomatch(undefined, 'CosNotification_AdminPropertiesAdmin':oe_tc(get_admin)), ?nomatch(undefined, 'CosNotification_AdminPropertiesAdmin':oe_tc(set_admin)), @@ -933,8 +836,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotification_QoSAdmin' %% Description: %%----------------------------------------------------------------- -'CosNotification_QoSAdmin'(doc) -> ["CosNotification_QoSAdmin"]; -'CosNotification_QoSAdmin'(suite) -> []; 'CosNotification_QoSAdmin'(_) -> ?nomatch(undefined, 'CosNotification_QoSAdmin':oe_tc(get_qos)), ?nomatch(undefined, 'CosNotification_QoSAdmin':oe_tc(set_qos)), @@ -952,8 +853,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_ConsumerAdmin' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_ConsumerAdmin'(doc) -> ["CosNotifyChannelAdmin_ConsumerAdmin"]; -'CosNotifyChannelAdmin_ConsumerAdmin'(suite) -> []; 'CosNotifyChannelAdmin_ConsumerAdmin'(_) -> ?nomatch(undefined, 'CosNotifyChannelAdmin_ConsumerAdmin':oe_tc('_get_MyID')), ?nomatch(undefined, 'CosNotifyChannelAdmin_ConsumerAdmin':oe_tc('_get_MyChannel')), @@ -999,8 +898,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_EventChannel' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_EventChannel'(doc) -> ["CosNotifyChannelAdmin_EventChannel"]; -'CosNotifyChannelAdmin_EventChannel'(suite) -> []; 'CosNotifyChannelAdmin_EventChannel'(_) -> ?nomatch(undefined, 'CosNotifyChannelAdmin_EventChannel':oe_tc('_get_MyFactory')), ?nomatch(undefined, 'CosNotifyChannelAdmin_EventChannel':oe_tc('_get_default_consumer_admin')), @@ -1039,8 +936,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_EventChannelFactory' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_EventChannelFactory'(doc) -> ["CosNotifyChannelAdmin_EventChannelFactory"]; -'CosNotifyChannelAdmin_EventChannelFactory'(suite) -> []; 'CosNotifyChannelAdmin_EventChannelFactory'(_) -> ?nomatch(undefined, 'CosNotifyChannelAdmin_EventChannelFactory':oe_tc(create_channel)), ?nomatch(undefined, 'CosNotifyChannelAdmin_EventChannelFactory':oe_tc(get_all_channels)), @@ -1058,8 +953,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_ProxyConsumer' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_ProxyConsumer'(doc) -> ["CosNotifyChannelAdmin_ProxyConsumer"]; -'CosNotifyChannelAdmin_ProxyConsumer'(suite) -> []; 'CosNotifyChannelAdmin_ProxyConsumer'(_) -> ?nomatch(undefined, 'CosNotifyChannelAdmin_ProxyConsumer':oe_tc('_get_MyType')), ?nomatch(undefined, 'CosNotifyChannelAdmin_ProxyConsumer':oe_tc('_get_MyAdmin')), @@ -1088,8 +981,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_ProxyPullConsumer' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_ProxyPullConsumer'(doc) -> ["CosNotifyChannelAdmin_ProxyPullConsumer"]; -'CosNotifyChannelAdmin_ProxyPullConsumer'(suite) -> []; 'CosNotifyChannelAdmin_ProxyPullConsumer'(_) -> ?nomatch(undefined, 'CosNotifyChannelAdmin_ProxyPullConsumer':oe_tc(connect_any_pull_supplier)), ?nomatch(undefined, 'CosNotifyChannelAdmin_ProxyPullConsumer':oe_tc(suspend_connection)), @@ -1129,8 +1020,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_ProxyPullSupplier' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_ProxyPullSupplier'(doc) -> ["CosNotifyChannelAdmin_ProxyPullSupplier"]; -'CosNotifyChannelAdmin_ProxyPullSupplier'(suite) -> []; 'CosNotifyChannelAdmin_ProxyPullSupplier'(_) -> ?nomatch(undefined, 'CosNotifyChannelAdmin_ProxyPullSupplier':oe_tc('_get_MyType')), ?nomatch(undefined, 'CosNotifyChannelAdmin_ProxyPullSupplier':oe_tc('_get_MyAdmin')), @@ -1176,8 +1065,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_ProxyPushConsumer' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_ProxyPushConsumer'(doc) -> ["CosNotifyChannelAdmin_ProxyPushConsumer"]; -'CosNotifyChannelAdmin_ProxyPushConsumer'(suite) -> []; 'CosNotifyChannelAdmin_ProxyPushConsumer'(_) -> ?nomatch(undefined, 'CosNotifyChannelAdmin_ProxyPushConsumer':oe_tc(connect_any_push_supplier)), ?nomatch(undefined, 'CosNotifyChannelAdmin_ProxyPushConsumer':oe_tc('_get_MyType')), @@ -1216,8 +1103,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_ProxyPushSupplier' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_ProxyPushSupplier'(doc) -> ["CosNotifyChannelAdmin_ProxyPushSupplier"]; -'CosNotifyChannelAdmin_ProxyPushSupplier'(suite) -> []; 'CosNotifyChannelAdmin_ProxyPushSupplier'(_) -> ?nomatch(undefined, 'CosNotifyChannelAdmin_ProxyPushSupplier':oe_tc(connect_any_push_consumer)), ?nomatch(undefined, 'CosNotifyChannelAdmin_ProxyPushSupplier':oe_tc(suspend_connection)), @@ -1264,8 +1149,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_ProxySupplier' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_ProxySupplier'(doc) -> ["CosNotifyChannelAdmin_ProxySupplier"]; -'CosNotifyChannelAdmin_ProxySupplier'(suite) -> []; 'CosNotifyChannelAdmin_ProxySupplier'(_) -> ?nomatch(undefined, 'CosNotifyChannelAdmin_ProxySupplier':oe_tc('_get_MyType')), ?nomatch(undefined, 'CosNotifyChannelAdmin_ProxySupplier':oe_tc('_get_MyAdmin')), @@ -1299,8 +1182,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_SequenceProxyPullConsumer' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_SequenceProxyPullConsumer'(doc) -> ["CosNotifyChannelAdmin_SequenceProxyPullConsumer"]; -'CosNotifyChannelAdmin_SequenceProxyPullConsumer'(suite) -> []; 'CosNotifyChannelAdmin_SequenceProxyPullConsumer'(_) -> ?nomatch(undefined, 'CosNotifyChannelAdmin_SequenceProxyPullConsumer':oe_tc(connect_sequence_pull_supplier)), ?nomatch(undefined, 'CosNotifyChannelAdmin_SequenceProxyPullConsumer':oe_tc(suspend_connection)), @@ -1338,8 +1219,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_SequenceProxyPullSupplier' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_SequenceProxyPullSupplier'(doc) -> ["CosNotifyChannelAdmin_SequenceProxyPullSupplier"]; -'CosNotifyChannelAdmin_SequenceProxyPullSupplier'(suite) -> []; 'CosNotifyChannelAdmin_SequenceProxyPullSupplier'(_) -> ?nomatch(undefined, 'CosNotifyChannelAdmin_SequenceProxyPullSupplier':oe_tc(connect_sequence_pull_consumer)), ?nomatch(undefined, 'CosNotifyChannelAdmin_SequenceProxyPullSupplier':oe_tc('_get_MyType')), @@ -1384,8 +1263,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_SequenceProxyPushConsumer' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_SequenceProxyPushConsumer'(doc) -> ["CosNotifyChannelAdmin_SequenceProxyPushConsumer"]; -'CosNotifyChannelAdmin_SequenceProxyPushConsumer'(suite) -> []; 'CosNotifyChannelAdmin_SequenceProxyPushConsumer'(_) -> ?nomatch(undefined, 'CosNotifyChannelAdmin_SequenceProxyPushConsumer':oe_tc(connect_sequence_push_supplier)), ?nomatch(undefined, 'CosNotifyChannelAdmin_SequenceProxyPushConsumer':oe_tc('_get_MyType')), @@ -1422,8 +1299,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_SequenceProxyPushSupplier' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_SequenceProxyPushSupplier'(doc) -> ["CosNotifyChannelAdmin_SequenceProxyPushSupplier"]; -'CosNotifyChannelAdmin_SequenceProxyPushSupplier'(suite) -> []; 'CosNotifyChannelAdmin_SequenceProxyPushSupplier'(_) -> ?nomatch(undefined, 'CosNotifyChannelAdmin_SequenceProxyPushSupplier':oe_tc(connect_sequence_push_consumer)), ?nomatch(undefined, 'CosNotifyChannelAdmin_SequenceProxyPushSupplier':oe_tc(suspend_connection)), @@ -1468,8 +1343,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_StructuredProxyPullConsumer' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_StructuredProxyPullConsumer'(doc) -> ["CosNotifyChannelAdmin_StructuredProxyPullConsumer"]; -'CosNotifyChannelAdmin_StructuredProxyPullConsumer'(suite) -> []; 'CosNotifyChannelAdmin_StructuredProxyPullConsumer'(_) -> ?nomatch(undefined, 'CosNotifyChannelAdmin_StructuredProxyPullConsumer':oe_tc(connect_structured_pull_supplier)), ?nomatch(undefined, 'CosNotifyChannelAdmin_StructuredProxyPullConsumer':oe_tc(suspend_connection)), @@ -1507,8 +1380,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_StructuredProxyPullSupplier' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_StructuredProxyPullSupplier'(doc) -> ["CosNotifyChannelAdmin_StructuredProxyPullSupplier"]; -'CosNotifyChannelAdmin_StructuredProxyPullSupplier'(suite) -> []; 'CosNotifyChannelAdmin_StructuredProxyPullSupplier'(_) -> ?nomatch(undefined, 'CosNotifyChannelAdmin_StructuredProxyPullSupplier':oe_tc(connect_structured_pull_consumer)), ?nomatch(undefined, 'CosNotifyChannelAdmin_StructuredProxyPullSupplier':oe_tc('_get_MyType')), @@ -1553,8 +1424,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_StructuredProxyPushConsumer' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_StructuredProxyPushConsumer'(doc) -> ["CosNotifyChannelAdmin_StructuredProxyPushConsumer"]; -'CosNotifyChannelAdmin_StructuredProxyPushConsumer'(suite) -> []; 'CosNotifyChannelAdmin_StructuredProxyPushConsumer'(_) -> ?nomatch(undefined, 'CosNotifyChannelAdmin_StructuredProxyPushConsumer':oe_tc(connect_structured_push_supplier)), ?nomatch(undefined, 'CosNotifyChannelAdmin_StructuredProxyPushConsumer':oe_tc('_get_MyType')), @@ -1591,8 +1460,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_StructuredProxyPushSupplier' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_StructuredProxyPushSupplier'(doc) -> ["CosNotifyChannelAdmin_StructuredProxyPushSupplier"]; -'CosNotifyChannelAdmin_StructuredProxyPushSupplier'(suite) -> []; 'CosNotifyChannelAdmin_StructuredProxyPushSupplier'(_) -> ?nomatch(undefined, 'CosNotifyChannelAdmin_StructuredProxyPushSupplier':oe_tc(connect_structured_push_consumer)), ?nomatch(undefined, 'CosNotifyChannelAdmin_StructuredProxyPushSupplier':oe_tc(suspend_connection)), @@ -1637,8 +1504,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyChannelAdmin_SupplierAdmin' %% Description: %%----------------------------------------------------------------- -'CosNotifyChannelAdmin_SupplierAdmin'(doc) -> ["CosNotifyChannelAdmin_SupplierAdmin"]; -'CosNotifyChannelAdmin_SupplierAdmin'(suite) -> []; 'CosNotifyChannelAdmin_SupplierAdmin'(_) -> ?nomatch(undefined, 'CosNotifyChannelAdmin_SupplierAdmin':oe_tc('_get_MyID')), ?nomatch(undefined, 'CosNotifyChannelAdmin_SupplierAdmin':oe_tc('_get_MyChannel')), @@ -1681,8 +1546,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_Filter' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_Filter'(doc) -> ["CosNotifyFilter_Filter"]; -'CosNotifyFilter_Filter'(suite) -> []; 'CosNotifyFilter_Filter'(_) -> ?nomatch(undefined, 'CosNotifyFilter_Filter':oe_tc('_get_constraint_grammar')), ?nomatch(undefined, 'CosNotifyFilter_Filter':oe_tc(add_constraints)), @@ -1711,8 +1574,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_FilterAdmin' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_FilterAdmin'(doc) -> ["CosNotifyFilter_FilterAdmin"]; -'CosNotifyFilter_FilterAdmin'(suite) -> []; 'CosNotifyFilter_FilterAdmin'(_) -> ?nomatch(undefined, 'CosNotifyFilter_FilterAdmin':oe_tc(add_filter)), ?nomatch(undefined, 'CosNotifyFilter_FilterAdmin':oe_tc(remove_filter)), @@ -1733,8 +1594,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_FilterFactory' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_FilterFactory'(doc) -> ["CosNotifyFilter_FilterFactory"]; -'CosNotifyFilter_FilterFactory'(suite) -> []; 'CosNotifyFilter_FilterFactory'(_) -> ?nomatch(undefined, 'CosNotifyFilter_FilterFactory':oe_tc(create_filter)), ?nomatch(undefined, 'CosNotifyFilter_FilterFactory':oe_tc(create_mapping_filter)), @@ -1752,8 +1611,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyFilter_MappingFilter' %% Description: %%----------------------------------------------------------------- -'CosNotifyFilter_MappingFilter'(doc) -> ["CosNotifyFilter_MappingFilter"]; -'CosNotifyFilter_MappingFilter'(suite) -> []; 'CosNotifyFilter_MappingFilter'(_) -> ?nomatch(undefined, 'CosNotifyFilter_MappingFilter':oe_tc('_get_constraint_grammar')), ?nomatch(undefined, 'CosNotifyFilter_MappingFilter':oe_tc('_get_value_type')), @@ -1781,8 +1638,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyComm_NotifyPublish' %% Description: %%----------------------------------------------------------------- -'CosNotifyComm_NotifyPublish'(doc) -> ["CosNotifyComm_NotifyPublish"]; -'CosNotifyComm_NotifyPublish'(suite) -> []; 'CosNotifyComm_NotifyPublish'(_) -> ?nomatch(undefined, 'CosNotifyComm_NotifyPublish':oe_tc(offer_change)), ?match(undefined, 'CosNotifyComm_NotifyPublish':oe_tc(undefined)), @@ -1799,8 +1654,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyComm_NotifySubscribe' %% Description: %%----------------------------------------------------------------- -'CosNotifyComm_NotifySubscribe'(doc) -> ["CosNotifyComm_NotifySubscribe"]; -'CosNotifyComm_NotifySubscribe'(suite) -> []; 'CosNotifyComm_NotifySubscribe'(_) -> ?nomatch(undefined, 'CosNotifyComm_NotifySubscribe':oe_tc(subscription_change)), ?match(undefined, 'CosNotifyComm_NotifySubscribe':oe_tc(undefined)), @@ -1817,8 +1670,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyComm_PullConsumer' %% Description: %%----------------------------------------------------------------- -'CosNotifyComm_PullConsumer'(doc) -> ["CosNotifyComm_PullConsumer"]; -'CosNotifyComm_PullConsumer'(suite) -> []; 'CosNotifyComm_PullConsumer'(_) -> ?nomatch(undefined, 'CosNotifyComm_PullConsumer':oe_tc(offer_change)), ?nomatch(undefined, 'CosNotifyComm_PullConsumer':oe_tc(disconnect_pull_consumer)), @@ -1838,8 +1689,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyComm_PullSupplier' %% Description: %%----------------------------------------------------------------- -'CosNotifyComm_PullSupplier'(doc) -> ["CosNotifyComm_PullSupplier"]; -'CosNotifyComm_PullSupplier'(suite) -> []; 'CosNotifyComm_PullSupplier'(_) -> ?nomatch(undefined, 'CosNotifyComm_PullSupplier':oe_tc(subscription_change)), ?nomatch(undefined, 'CosNotifyComm_PullSupplier':oe_tc(pull)), @@ -1861,8 +1710,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyComm_PushConsumer' %% Description: %%----------------------------------------------------------------- -'CosNotifyComm_PushConsumer'(doc) -> ["CosNotifyComm_PushConsumer"]; -'CosNotifyComm_PushConsumer'(suite) -> []; 'CosNotifyComm_PushConsumer'(_) -> ?nomatch(undefined, 'CosNotifyComm_PushConsumer':oe_tc(offer_change)), ?nomatch(undefined, 'CosNotifyComm_PushConsumer':oe_tc(push)), @@ -1883,8 +1730,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyComm_PushSupplier' %% Description: %%----------------------------------------------------------------- -'CosNotifyComm_PushSupplier'(doc) -> ["CosNotifyComm_PushSupplier"]; -'CosNotifyComm_PushSupplier'(suite) -> []; 'CosNotifyComm_PushSupplier'(_) -> ?nomatch(undefined, 'CosNotifyComm_PushSupplier':oe_tc(subscription_change)), ?nomatch(undefined, 'CosNotifyComm_PushSupplier':oe_tc(disconnect_push_supplier)), @@ -1904,8 +1749,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyComm_SequencePullConsumer' %% Description: %%----------------------------------------------------------------- -'CosNotifyComm_SequencePullConsumer'(doc) -> ["CosNotifyComm_SequencePullConsumer"]; -'CosNotifyComm_SequencePullConsumer'(suite) -> []; 'CosNotifyComm_SequencePullConsumer'(_) -> ?nomatch(undefined, 'CosNotifyComm_SequencePullConsumer':oe_tc(disconnect_sequence_pull_consumer)), ?nomatch(undefined, 'CosNotifyComm_SequencePullConsumer':oe_tc(offer_change)), @@ -1924,8 +1767,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyComm_SequencePullSupplier' %% Description: %%----------------------------------------------------------------- -'CosNotifyComm_SequencePullSupplier'(doc) -> ["CosNotifyComm_SequencePullSupplier"]; -'CosNotifyComm_SequencePullSupplier'(suite) -> []; 'CosNotifyComm_SequencePullSupplier'(_) -> ?nomatch(undefined, 'CosNotifyComm_SequencePullSupplier':oe_tc(pull_structured_events)), ?nomatch(undefined, 'CosNotifyComm_SequencePullSupplier':oe_tc(try_pull_structured_events)), @@ -1946,8 +1787,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyComm_SequencePushConsumer' %% Description: %%----------------------------------------------------------------- -'CosNotifyComm_SequencePushConsumer'(doc) -> ["CosNotifyComm_SequencePushConsumer"]; -'CosNotifyComm_SequencePushConsumer'(suite) -> []; 'CosNotifyComm_SequencePushConsumer'(_) -> ?nomatch(undefined, 'CosNotifyComm_SequencePushConsumer':oe_tc(push_structured_events)), ?nomatch(undefined, 'CosNotifyComm_SequencePushConsumer':oe_tc(disconnect_sequence_push_consumer)), @@ -1967,8 +1806,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyComm_SequencePushSupplier' %% Description: %%----------------------------------------------------------------- -'CosNotifyComm_SequencePushSupplier'(doc) -> ["CosNotifyComm_SequencePushSupplier"]; -'CosNotifyComm_SequencePushSupplier'(suite) -> []; 'CosNotifyComm_SequencePushSupplier'(_) -> ?nomatch(undefined, 'CosNotifyComm_SequencePushSupplier':oe_tc(disconnect_sequence_push_supplier)), ?nomatch(undefined, 'CosNotifyComm_SequencePushSupplier':oe_tc(subscription_change)), @@ -1987,8 +1824,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyComm_StructuredPullConsumer' %% Description: %%----------------------------------------------------------------- -'CosNotifyComm_StructuredPullConsumer'(doc) -> ["CosNotifyComm_StructuredPullConsumer"]; -'CosNotifyComm_StructuredPullConsumer'(suite) -> []; 'CosNotifyComm_StructuredPullConsumer'(_) -> ?nomatch(undefined, 'CosNotifyComm_StructuredPullConsumer':oe_tc(disconnect_structured_pull_consumer)), ?nomatch(undefined, 'CosNotifyComm_StructuredPullConsumer':oe_tc(offer_change)), @@ -2007,8 +1842,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyComm_StructuredPullSupplier' %% Description: %%----------------------------------------------------------------- -'CosNotifyComm_StructuredPullSupplier'(doc) -> ["CosNotifyComm_StructuredPullSupplier"]; -'CosNotifyComm_StructuredPullSupplier'(suite) -> []; 'CosNotifyComm_StructuredPullSupplier'(_) -> ?nomatch(undefined, 'CosNotifyComm_StructuredPullSupplier':oe_tc(pull_structured_event)), ?nomatch(undefined, 'CosNotifyComm_StructuredPullSupplier':oe_tc(try_pull_structured_event)), @@ -2029,8 +1862,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyComm_StructuredPushConsumer' %% Description: %%----------------------------------------------------------------- -'CosNotifyComm_StructuredPushConsumer'(doc) -> ["CosNotifyComm_StructuredPushConsumer"]; -'CosNotifyComm_StructuredPushConsumer'(suite) -> []; 'CosNotifyComm_StructuredPushConsumer'(_) -> ?nomatch(undefined, 'CosNotifyComm_StructuredPushConsumer':oe_tc(push_structured_event)), ?nomatch(undefined, 'CosNotifyComm_StructuredPushConsumer':oe_tc(disconnect_structured_push_consumer)), @@ -2050,8 +1881,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosNotifyComm_StructuredPushSupplier' %% Description: %%----------------------------------------------------------------- -'CosNotifyComm_StructuredPushSupplier'(doc) -> ["CosNotifyComm_StructuredPushSupplier"]; -'CosNotifyComm_StructuredPushSupplier'(suite) -> []; 'CosNotifyComm_StructuredPushSupplier'(_) -> ?nomatch(undefined, 'CosNotifyComm_StructuredPushSupplier':oe_tc(disconnect_structured_push_supplier)), ?nomatch(undefined, 'CosNotifyComm_StructuredPushSupplier':oe_tc(subscription_change)), @@ -2070,8 +1899,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'oe_CosNotificationComm_Event' %% Description: %%----------------------------------------------------------------- -'oe_CosNotificationComm_Event'(doc) -> ["oe_CosNotificationComm_Event"]; -'oe_CosNotificationComm_Event'(suite) -> []; 'oe_CosNotificationComm_Event'(_) -> ?nomatch(undefined, 'oe_CosNotificationComm_Event':oe_tc(callSeq)), ?nomatch(undefined, 'oe_CosNotificationComm_Event':oe_tc(callAny)), diff --git a/lib/cosNotification/test/grammar_SUITE.erl b/lib/cosNotification/test/grammar_SUITE.erl index 34b832327d..536292fdee 100644 --- a/lib/cosNotification/test/grammar_SUITE.erl +++ b/lib/cosNotification/test/grammar_SUITE.erl @@ -26,8 +26,6 @@ -module(grammar_SUITE). - - %%--------------- INCLUDES ----------------------------------- -include_lib("orber/include/corba.hrl"). -include_lib("orber/include/ifr_types.hrl"). @@ -46,7 +44,7 @@ -include_lib("common_test/include/ct.hrl"). %%--------------- DEFINES ------------------------------------ --define(default_timeout, ?t:minutes(20)). +-define(default_timeout, test_server:minutes(20)). -define(match(ExpectedRes, Expr), fun() -> AcTuAlReS = (catch (Expr)), @@ -58,7 +56,7 @@ _ -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -100,18 +98,17 @@ cases() -> %%----------------------------------------------------------------- %% Init and cleanup functions. %%----------------------------------------------------------------- - init_per_testcase(_Case, Config) -> Path = code:which(?MODULE), code:add_pathz(filename:join(filename:dirname(Path), "idl_output")), - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> Path = code:which(?MODULE), code:del_path(filename:join(filename:dirname(Path), "idl_output")), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -134,8 +131,6 @@ end_per_suite(Config) -> %%----------------------------------------------------------------- %% simple types grammar tests %%----------------------------------------------------------------- -simple_types_api(doc) -> ["CosNotification simple types grammar tests", ""]; -simple_types_api(suite) -> []; simple_types_api(_Config) -> %% Will always be true, no matter what kind of event we receive. {ok,T1} = ?match({ok, _}, create_filter("2==2 and 3<4")), @@ -208,8 +203,6 @@ simple_types_api(_Config) -> %%----------------------------------------------------------------- %% enum grammar tests %%----------------------------------------------------------------- -enum_api(doc) -> ["CosNotification enum grammar tests", ""]; -enum_api(suite) -> []; enum_api(_Config) -> %% Accept events whose 'in' enum is set to the value 'HOUSE' or 'CAR'. {ok,T1} = ?match({ok, _}, create_filter("$.\\in == HOUSE or $.\\in == CAR")), @@ -221,13 +214,11 @@ enum_api(_Config) -> any:create({tk_enum, "IFRId", "in", ["HOUSE", "CAR"]}, 'GARAGE')))), ok. - + %%----------------------------------------------------------------- %% Union grammar tests %%----------------------------------------------------------------- -union_api(doc) -> ["CosNotification union grammar tests", ""]; -union_api(suite) -> []; union_api(_Config) -> {ok,T1} = ?match({ok, _}, create_filter("exist $.uni1._d and $.uni1._d == 1 and $.uni1.(1) == 10")), {ok,T2} = ?match({ok, _}, create_filter("default $.uni1._d and $.uni1.() == 10")), @@ -541,8 +532,6 @@ union_api(_Config) -> %%----------------------------------------------------------------- %% Variables grammar tests %%----------------------------------------------------------------- -variable_api(doc) -> ["CosNotification variables grammar tests", ""]; -variable_api(suite) -> []; variable_api(_Config) -> %% Accept all "CommunicationsAlarm" events {ok,T0} = ?match({ok, _}, create_filter("$type_name == 'CommunicationsAlarm'")), @@ -873,8 +862,6 @@ variable_api(_Config) -> %%----------------------------------------------------------------- %% Misc grammar tests %%----------------------------------------------------------------- -positional_api(doc) -> ["CosNotification positional notation grammar tests", ""]; -positional_api(suite) -> []; positional_api(_Config) -> {ok,T1} = ?match({ok, _}, create_filter("$.3 < 80 or $.1(midterm) > $.1(final) or $.2[3] < 10")), @@ -929,8 +916,6 @@ positional_api(_Config) -> %%----------------------------------------------------------------- %% Components grammar tests %%----------------------------------------------------------------- -components_api(doc) -> ["CosNotification components grammar tests", ""]; -components_api(suite) -> []; components_api(_Config) -> {ok,T1} = ?match({ok, _}, create_filter("$ == 2")), ?match(true, eval(T1, ?not_CreateSE("DomainName","TypeName","EventName", diff --git a/lib/cosNotification/test/notification_SUITE.erl b/lib/cosNotification/test/notification_SUITE.erl index f23dacce4f..624a76c64a 100644 --- a/lib/cosNotification/test/notification_SUITE.erl +++ b/lib/cosNotification/test/notification_SUITE.erl @@ -44,7 +44,7 @@ -include_lib("common_test/include/ct.hrl"). %%--------------- DEFINES ------------------------------------ --define(default_timeout, ?t:minutes(20)). +-define(default_timeout, test_server:minutes(20)). -define(match(ExpectedRes, Expr), fun() -> AcTuAlReS = (catch (Expr)), @@ -56,7 +56,7 @@ _ -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -164,18 +164,16 @@ cases() -> %%----------------------------------------------------------------- %% Init and cleanup functions. %%----------------------------------------------------------------- - init_per_testcase(_Case, Config) -> Path = code:which(?MODULE), code:add_pathz(filename:join(filename:dirname(Path), "idl_output")), - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. - end_per_testcase(_Case, Config) -> Path = code:which(?MODULE), code:del_path(filename:join(filename:dirname(Path), "idl_output")), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -209,8 +207,6 @@ end_per_suite(Config) -> %%----------------------------------------------------------------- %% Tests app file %%----------------------------------------------------------------- -app_test(doc) -> []; -app_test(suite) -> []; app_test(_Config) -> ok=test_server:app_test(cosNotification), ok. @@ -219,9 +215,6 @@ app_test(_Config) -> %%----------------------------------------------------------------- %% Persistent events max limit %%----------------------------------------------------------------- -persistent_max_events_api(doc) -> ["CosNotification QoS EventReliability Persistent", - ""]; -persistent_max_events_api(suite) -> []; persistent_max_events_api(_Config) -> QoSPersistent = [#'CosNotification_Property'{name='CosNotification':'ConnectionReliability'(), @@ -309,10 +302,6 @@ terminated(Items) -> %%----------------------------------------------------------------- %% Persistent events timeout %%----------------------------------------------------------------- -persistent_timeout_events_api(doc) -> - ["CosNotification QoS EventReliability Persistent", - ""]; -persistent_timeout_events_api(suite) -> []; persistent_timeout_events_api(_Config) -> QoSPersistent = [#'CosNotification_Property'{name='CosNotification':'ConnectionReliability'(), @@ -394,10 +383,6 @@ persistent_timeout_events_api(_Config) -> %%----------------------------------------------------------------- %% Persistent events max limit %%----------------------------------------------------------------- -persistent_recover_events_api(doc) -> - ["CosNotification QoS EventReliability Persistent", - ""]; -persistent_recover_events_api(suite) -> []; persistent_recover_events_api(_Config) -> QoSPersistent = [#'CosNotification_Property'{name='CosNotification':'ConnectionReliability'(), @@ -484,8 +469,6 @@ persistent_recover_events_api(_Config) -> %%----------------------------------------------------------------- %% CosNotifyFilter::Filter API tests %%----------------------------------------------------------------- -mapping_filter_api(doc) -> ["CosNotifyFilter::MappingFilter API tests.", ""]; -mapping_filter_api(suite) -> []; mapping_filter_api(_Config) -> FiFac = 'CosNotifyFilter_FilterFactory':oe_create(), ?match({_,key,_,_,_,_}, FiFac), @@ -514,7 +497,7 @@ mapping_filter_api(_Config) -> constraint_expr = "2==2 and 3<"}, result_to_set = any:create(orber_tc:short(), 10)}])), %% Try adding two correct constraint_expr - ?line[{_,_,CID1,_},{_,_,CID2,_}]= + [{_,_,CID1,_},{_,_,CID2,_}]= ?match([{'CosNotifyFilter_MappingConstraintInfo',_,_,_}, {'CosNotifyFilter_MappingConstraintInfo',_,_,_}], 'CosNotifyFilter_MappingFilter':add_mapping_constraints(Filter, [#'CosNotifyFilter_MappingConstraintPair' @@ -685,8 +668,6 @@ mapping_filter_api(_Config) -> %%----------------------------------------------------------------- %% CosNotifyFilter::Filter API tests %%----------------------------------------------------------------- -filter_api(doc) -> ["CosNotifyFilter::Filter API tests.", ""]; -filter_api(suite) -> []; filter_api(_Config) -> Fac = cosNotificationApp:start_global_factory(?FAC_OPT), ?match({_,key,_,_,_,_}, Fac), @@ -730,7 +711,7 @@ filter_api(_Config) -> type_name = "type"}], constraint_expr = "2==2 and 3<"}])), %% Try adding two correct constraint_expr - ?line[{_,_,CID1},{_,_,CID2}]= + [{_,_,CID1},{_,_,CID2}]= ?match([{'CosNotifyFilter_ConstraintInfo',_,_}, {'CosNotifyFilter_ConstraintInfo',_,_}], 'CosNotifyFilter_Filter':add_constraints(Filter, [#'CosNotifyFilter_ConstraintExp'{event_types = @@ -870,8 +851,6 @@ filter_api(_Config) -> %%----------------------------------------------------------------- %% Subscription handling API tests %%----------------------------------------------------------------- -subscription_api(doc) -> ["CosNotification subscription handling", ""]; -subscription_api(suite) -> []; subscription_api(_Config) -> %% Initialize the application. Fac = (catch cosNotificationApp:start_global_factory(?FAC_OPT)), @@ -1090,8 +1069,6 @@ subscription_api(_Config) -> %%----------------------------------------------------------------- %% Filter admin API tests %%----------------------------------------------------------------- -filter_adm_api(doc) -> ["CosNotification filter admin tests", ""]; -filter_adm_api(suite) -> []; filter_adm_api(_Config) -> Fac = (catch cosNotificationApp:start_global_factory(?FAC_OPT)), ?match({_,key,_,_,_,_}, Fac), @@ -1166,8 +1143,6 @@ filter_tests(Mod, Obj, Filter, Ch) -> %%----------------------------------------------------------------- %% Creating different event pushing and pulling API tests %%----------------------------------------------------------------- -events_api(doc) -> ["CosNotification event pushing and pulling tests", ""]; -events_api(suite) -> []; events_api(_Config) -> %% Initialize the application. Fac = (catch cosNotificationApp:start_global_factory(?FAC_OPT)), @@ -1550,7 +1525,7 @@ events_api_helper(Fac, Ch, _Id1) -> FiFac = 'CosNotifyFilter_FilterFactory':oe_create(), Filter = 'CosNotifyFilter_FilterFactory':create_filter(FiFac,"EXTENDED_TCL"), %% Add constraints to the Filter - ?line[{_,_,CID1},{_,_,CID2}]= + [{_,_,CID1},{_,_,CID2}]= ?match([{'CosNotifyFilter_ConstraintInfo',_,_}, {'CosNotifyFilter_ConstraintInfo',_,_}], 'CosNotifyFilter_Filter':add_constraints(Filter, [#'CosNotifyFilter_ConstraintExp'{event_types = @@ -1728,8 +1703,6 @@ event_filtering(_FiFac, _Filter, _AdminConsumer, StructuredProxyPushConsumer, Pu %%----------------------------------------------------------------- %% Creating different cosEvent API tests %%----------------------------------------------------------------- -cosevent_api(doc) -> ["CosNotification Objects tested with CosEvent API", ""]; -cosevent_api(suite) -> []; cosevent_api(_Config) -> Fac = (catch cosNotificationApp:start_global_factory(?FAC_OPT)), ?match({_,key,_,_,_,_}, Fac), @@ -1844,8 +1817,6 @@ cosevent_api(_Config) -> %%----------------------------------------------------------------- %% AdminPropertiesAdmin API tests %%----------------------------------------------------------------- -adm_api(doc) -> ["CosNotification AdminPropertiesAdmin tests", ""]; -adm_api(suite) -> []; adm_api(_Config) -> Fac = (catch cosNotificationApp:start_global_factory(?FAC_OPT)), ?match({_,key,_,_,_,_}, Fac), @@ -1892,8 +1863,6 @@ adm_api(_Config) -> %%----------------------------------------------------------------- %% QoSAdm API tests %%----------------------------------------------------------------- -qos_api(doc) -> ["CosNotification QoSAdmin tests", ""]; -qos_api(suite) -> []; qos_api(_Config) -> Fac = (catch cosNotificationApp:start_global_factory(?FAC_OPT)), ?match({_,key,_,_,_,_}, Fac), @@ -2060,8 +2029,6 @@ qos_api(_Config) -> %%----------------------------------------------------------------- %% QoSAdm API tests %%----------------------------------------------------------------- -event_qos_api(doc) -> ["CosNotification QoSAdmin tests", ""]; -event_qos_api(suite) -> []; event_qos_api(_Config) -> Fac = (catch cosNotificationApp:start_global_factory(?FAC_OPT)), ?match({_,key,_,_,_,_}, Fac), -- cgit v1.2.3 From 7717668768ade8b2ee344e09cadab1b1626f27fd Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Thu, 16 Jun 2016 10:45:59 +0200 Subject: [cosProperty] Update the test suites to follow the new style --- lib/cosProperty/test/generated_SUITE.erl | 68 +++----------------------------- lib/cosProperty/test/property_SUITE.erl | 29 ++------------ 2 files changed, 10 insertions(+), 87 deletions(-) (limited to 'lib') diff --git a/lib/cosProperty/test/generated_SUITE.erl b/lib/cosProperty/test/generated_SUITE.erl index 8eb794bd8f..313f5bf8f9 100644 --- a/lib/cosProperty/test/generated_SUITE.erl +++ b/lib/cosProperty/test/generated_SUITE.erl @@ -29,7 +29,7 @@ -include_lib("common_test/include/ct.hrl"). -include_lib("orber/include/corba.hrl"). --define(default_timeout, ?t:minutes(3)). +-define(default_timeout, test_server:minutes(3)). -define(match(ExpectedRes, Expr), fun() -> @@ -40,7 +40,7 @@ _ -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -51,7 +51,7 @@ Not -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS); + exit(AcTuAlReS); _ -> AcTuAlReS end @@ -63,7 +63,7 @@ case orber_tc:check_tc(TC) of false -> io:format("###### ERROR ERROR ######~n~p - ~p~n", [Op, TC]), - ?line exit(TC); + exit(TC); true -> true end @@ -136,24 +136,18 @@ end_per_group(_GroupName, Config) -> %% Init and cleanup functions. %%----------------------------------------------------------------- init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. - end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. - - - %%----------------------------------------------------------------- %% Test Case: 'CosPropertyService_ConflictingProperty' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_ConflictingProperty'(doc) -> ["CosPropertyService_ConflictingProperty"]; -'CosPropertyService_ConflictingProperty'(suite) -> []; 'CosPropertyService_ConflictingProperty'(_) -> ?match(true, orber_tc:check_tc('CosPropertyService_ConflictingProperty':tc())), ?match("IDL:omg.org/CosPropertyService/ConflictingProperty:1.0", @@ -167,8 +161,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_ConstraintNotSupported' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_ConstraintNotSupported'(doc) -> ["CosPropertyService_ConstraintNotSupported"]; -'CosPropertyService_ConstraintNotSupported'(suite) -> []; 'CosPropertyService_ConstraintNotSupported'(_) -> ?match(true, orber_tc:check_tc('CosPropertyService_ConstraintNotSupported':tc())), ?match("IDL:omg.org/CosPropertyService/ConstraintNotSupported:1.0", @@ -182,8 +174,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_FixedProperty' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_FixedProperty'(doc) -> ["CosPropertyService_FixedProperty"]; -'CosPropertyService_FixedProperty'(suite) -> []; 'CosPropertyService_FixedProperty'(_) -> ?match(true, orber_tc:check_tc('CosPropertyService_FixedProperty':tc())), ?match("IDL:omg.org/CosPropertyService/FixedProperty:1.0", @@ -197,8 +187,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_InvalidPropertyName' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_InvalidPropertyName'(doc) -> ["CosPropertyService_InvalidPropertyName"]; -'CosPropertyService_InvalidPropertyName'(suite) -> []; 'CosPropertyService_InvalidPropertyName'(_) -> ?match(true, orber_tc:check_tc('CosPropertyService_InvalidPropertyName':tc())), ?match("IDL:omg.org/CosPropertyService/InvalidPropertyName:1.0", @@ -212,8 +200,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_MultipleExceptions' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_MultipleExceptions'(doc) -> ["CosPropertyService_MultipleExceptions"]; -'CosPropertyService_MultipleExceptions'(suite) -> []; 'CosPropertyService_MultipleExceptions'(_) -> ?match(true, orber_tc:check_tc('CosPropertyService_MultipleExceptions':tc())), ?match("IDL:omg.org/CosPropertyService/MultipleExceptions:1.0", @@ -227,8 +213,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_Properties' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_Properties'(doc) -> ["CosPropertyService_Properties"]; -'CosPropertyService_Properties'(suite) -> []; 'CosPropertyService_Properties'(_) -> ?match(true, orber_tc:check_tc('CosPropertyService_Properties':tc())), ?match("IDL:omg.org/CosPropertyService/Properties:1.0", @@ -242,8 +226,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_Property' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_Property'(doc) -> ["CosPropertyService_Property"]; -'CosPropertyService_Property'(suite) -> []; 'CosPropertyService_Property'(_) -> ?match(true, orber_tc:check_tc('CosPropertyService_Property':tc())), ?match("IDL:omg.org/CosPropertyService/Property:1.0", @@ -257,8 +239,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_PropertyDef' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_PropertyDef'(doc) -> ["CosPropertyService_PropertyDef"]; -'CosPropertyService_PropertyDef'(suite) -> []; 'CosPropertyService_PropertyDef'(_) -> ?match(true, orber_tc:check_tc('CosPropertyService_PropertyDef':tc())), ?match("IDL:omg.org/CosPropertyService/PropertyDef:1.0", @@ -272,8 +252,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_PropertyDefs' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_PropertyDefs'(doc) -> ["CosPropertyService_PropertyDefs"]; -'CosPropertyService_PropertyDefs'(suite) -> []; 'CosPropertyService_PropertyDefs'(_) -> ?match(true, orber_tc:check_tc('CosPropertyService_PropertyDefs':tc())), ?match("IDL:omg.org/CosPropertyService/PropertyDefs:1.0", @@ -287,8 +265,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_PropertyException' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_PropertyException'(doc) -> ["CosPropertyService_PropertyException"]; -'CosPropertyService_PropertyException'(suite) -> []; 'CosPropertyService_PropertyException'(_) -> ?match(true, orber_tc:check_tc('CosPropertyService_PropertyException':tc())), ?match("IDL:omg.org/CosPropertyService/PropertyException:1.0", @@ -302,8 +278,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_PropertyExceptions' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_PropertyExceptions'(doc) -> ["CosPropertyService_PropertyExceptions"]; -'CosPropertyService_PropertyExceptions'(suite) -> []; 'CosPropertyService_PropertyExceptions'(_) -> ?match(true, orber_tc:check_tc('CosPropertyService_PropertyExceptions':tc())), ?match("IDL:omg.org/CosPropertyService/PropertyExceptions:1.0", @@ -317,8 +291,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_PropertyMode' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_PropertyMode'(doc) -> ["CosPropertyService_PropertyMode"]; -'CosPropertyService_PropertyMode'(suite) -> []; 'CosPropertyService_PropertyMode'(_) -> ?match(true, orber_tc:check_tc('CosPropertyService_PropertyMode':tc())), ?match("IDL:omg.org/CosPropertyService/PropertyMode:1.0", @@ -332,8 +304,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_PropertyModes' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_PropertyModes'(doc) -> ["CosPropertyService_PropertyModes"]; -'CosPropertyService_PropertyModes'(suite) -> []; 'CosPropertyService_PropertyModes'(_) -> ?match(true, orber_tc:check_tc('CosPropertyService_PropertyModes':tc())), ?match("IDL:omg.org/CosPropertyService/PropertyModes:1.0", @@ -347,8 +317,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_PropertyNames' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_PropertyNames'(doc) -> ["CosPropertyService_PropertyNames"]; -'CosPropertyService_PropertyNames'(suite) -> []; 'CosPropertyService_PropertyNames'(_) -> ?match(true, orber_tc:check_tc('CosPropertyService_PropertyNames':tc())), ?match("IDL:omg.org/CosPropertyService/PropertyNames:1.0", @@ -361,8 +329,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_PropertyNotFound' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_PropertyNotFound'(doc) -> ["CosPropertyService_PropertyNotFound"]; -'CosPropertyService_PropertyNotFound'(suite) -> []; 'CosPropertyService_PropertyNotFound'(_) -> ?match(true, orber_tc:check_tc('CosPropertyService_PropertyNotFound':tc())), ?match("IDL:omg.org/CosPropertyService/PropertyNotFound:1.0", @@ -375,8 +341,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_PropertyTypes' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_PropertyTypes'(doc) -> ["CosPropertyService_PropertyTypes"]; -'CosPropertyService_PropertyTypes'(suite) -> []; 'CosPropertyService_PropertyTypes'(_) -> ?match(true, orber_tc:check_tc('CosPropertyService_PropertyTypes':tc())), ?match("IDL:omg.org/CosPropertyService/PropertyTypes:1.0", @@ -389,8 +353,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_ReadOnlyProperty' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_ReadOnlyProperty'(doc) -> ["CosPropertyService_ReadOnlyProperty"]; -'CosPropertyService_ReadOnlyProperty'(suite) -> []; 'CosPropertyService_ReadOnlyProperty'(_) -> ?match(true, orber_tc:check_tc('CosPropertyService_ReadOnlyProperty':tc())), ?match("IDL:omg.org/CosPropertyService/ReadOnlyProperty:1.0", @@ -403,8 +365,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_UnsupportedMode' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_UnsupportedMode'(doc) -> ["CosPropertyService_UnsupportedMode"]; -'CosPropertyService_UnsupportedMode'(suite) -> []; 'CosPropertyService_UnsupportedMode'(_) -> ?match(true, orber_tc:check_tc('CosPropertyService_UnsupportedMode':tc())), ?match("IDL:omg.org/CosPropertyService/UnsupportedMode:1.0", @@ -417,8 +377,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_UnsupportedProperty' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_UnsupportedProperty'(doc) -> ["CosPropertyService_UnsupportedProperty"]; -'CosPropertyService_UnsupportedProperty'(suite) -> []; 'CosPropertyService_UnsupportedProperty'(_) -> ?match(true, orber_tc:check_tc('CosPropertyService_UnsupportedProperty':tc())), ?match("IDL:omg.org/CosPropertyService/UnsupportedProperty:1.0", @@ -431,8 +389,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_UnsupportedTypeCode' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_UnsupportedTypeCode'(doc) -> ["CosPropertyService_UnsupportedTypeCode"]; -'CosPropertyService_UnsupportedTypeCode'(suite) -> []; 'CosPropertyService_UnsupportedTypeCode'(_) -> ?match(true, orber_tc:check_tc('CosPropertyService_UnsupportedTypeCode':tc())), ?match("IDL:omg.org/CosPropertyService/UnsupportedTypeCode:1.0", @@ -445,8 +401,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_PropertyNamesIterator' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_PropertyNamesIterator'(doc) -> ["CosPropertyService_PropertyNamesIterator"]; -'CosPropertyService_PropertyNamesIterator'(suite) -> []; 'CosPropertyService_PropertyNamesIterator'(_) -> ?nomatch(undefined, 'CosPropertyService_PropertyNamesIterator':oe_tc(reset)), ?nomatch(undefined, 'CosPropertyService_PropertyNamesIterator':oe_tc(next_one)), @@ -465,8 +419,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_PropertiesIterator' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_PropertiesIterator'(doc) -> ["CosPropertyService_PropertiesIterator"]; -'CosPropertyService_PropertiesIterator'(suite) -> []; 'CosPropertyService_PropertiesIterator'(_) -> ?nomatch(undefined, 'CosPropertyService_PropertiesIterator':oe_tc(reset)), ?nomatch(undefined, 'CosPropertyService_PropertiesIterator':oe_tc(next_one)), @@ -486,8 +438,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_PropertySet' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_PropertySet'(doc) -> ["CosPropertyService_PropertySet"]; -'CosPropertyService_PropertySet'(suite) -> []; 'CosPropertyService_PropertySet'(_) -> ?nomatch(undefined, 'CosPropertyService_PropertySet':oe_tc(define_property)), ?nomatch(undefined, 'CosPropertyService_PropertySet':oe_tc(define_properties)), @@ -514,8 +464,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_PropertySetDef' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_PropertySetDef'(doc) -> ["CosPropertyService_PropertySetDef"]; -'CosPropertyService_PropertySetDef'(suite) -> []; 'CosPropertyService_PropertySetDef'(_) -> ?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(get_allowed_property_types)), ?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(get_allowed_properties)), @@ -551,8 +499,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_PropertySetDefFactory' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_PropertySetDefFactory'(doc) -> ["CosPropertyService_PropertySetDefFactory"]; -'CosPropertyService_PropertySetDefFactory'(suite) -> []; 'CosPropertyService_PropertySetDefFactory'(_) -> ?nomatch(undefined, 'CosPropertyService_PropertySetDefFactory':oe_tc(create_propertysetdef)), ?nomatch(undefined, 'CosPropertyService_PropertySetDefFactory':oe_tc(create_constrained_propertysetdef)), @@ -571,8 +517,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosPropertyService_PropertySetFactory' %% Description: %%----------------------------------------------------------------- -'CosPropertyService_PropertySetFactory'(doc) -> ["CosPropertyService_PropertySetFactory"]; -'CosPropertyService_PropertySetFactory'(suite) -> []; 'CosPropertyService_PropertySetFactory'(_) -> ?nomatch(undefined, 'CosPropertyService_PropertySetFactory':oe_tc(create_propertyset)), ?nomatch(undefined, 'CosPropertyService_PropertySetFactory':oe_tc(create_constrained_propertyset)), diff --git a/lib/cosProperty/test/property_SUITE.erl b/lib/cosProperty/test/property_SUITE.erl index 42ddf04038..77f35c319a 100644 --- a/lib/cosProperty/test/property_SUITE.erl +++ b/lib/cosProperty/test/property_SUITE.erl @@ -36,7 +36,7 @@ -include_lib("common_test/include/ct.hrl"). %%--------------- DEFINES ------------------------------------ --define(default_timeout, ?t:minutes(20)). +-define(default_timeout, test_server:minutes(20)). -define(match(ExpectedRes, Expr), fun() -> AcTuAlReS = (catch (Expr)), @@ -122,18 +122,17 @@ cases() -> %%----------------------------------------------------------------- %% Init and cleanup functions. %%----------------------------------------------------------------- - init_per_testcase(_Case, Config) -> Path = code:which(?MODULE), code:add_pathz(filename:join(filename:dirname(Path), "idl_output")), - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> Path = code:which(?MODULE), code:del_path(filename:join(filename:dirname(Path), "idl_output")), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -143,7 +142,7 @@ init_per_suite(Config) -> orber:jump_start(), cosProperty:install(), cosProperty:install_db(), - ?line ?match(ok, application:start(cosProperty)), + ?match(ok, application:start(cosProperty)), if is_list(Config) -> Config; @@ -163,8 +162,6 @@ end_per_suite(Config) -> %%----------------------------------------------------------------- %% Tests app file %%----------------------------------------------------------------- -app_test(doc) -> []; -app_test(suite) -> []; app_test(_Config) -> ok=test_server:app_test(cosProperty), ok. @@ -173,9 +170,6 @@ app_test(_Config) -> %%----------------------------------------------------------------- %% CosPropertyService_PropertySetDefFactory API tests %%----------------------------------------------------------------- -create_setdef_api(doc) -> ["CosPropertyService_PropertySetDefFactory API tests.", - ""]; -create_setdef_api(suite) -> []; create_setdef_api(_Config) -> ValidDefs = [#'CosPropertyService_PropertyDef' @@ -239,9 +233,6 @@ create_setdef_api(_Config) -> %%----------------------------------------------------------------- %% CosPropertyService_PropertySetFactory API tests %%----------------------------------------------------------------- -create_set_api(doc) -> ["CosPropertyService_PropertySetFactory API tests.", - ""]; -create_set_api(suite) -> []; create_set_api(_Config) -> Valid = [#'CosPropertyService_Property' {property_name = ?id1, @@ -296,9 +287,6 @@ create_set_api(_Config) -> %%----------------------------------------------------------------- %% CosPropertyService_PropertySetDef API tests %%----------------------------------------------------------------- -define_api(doc) -> ["CosPropertyService_PropertySet API tests.", - ""]; -define_api(suite) -> []; define_api(_Config) -> ValidDefs = [#'CosPropertyService_Property' {property_name = ?id1, @@ -466,9 +454,6 @@ define_api(_Config) -> %%----------------------------------------------------------------- %% CosPropertyService_PropertySetDef API tests %%----------------------------------------------------------------- -define_with_mode_api(doc) -> ["CosPropertyService_PropertySetDef API tests.", - ""]; -define_with_mode_api(suite) -> []; define_with_mode_api(_Config) -> ValidDefs = [#'CosPropertyService_PropertyDef' {property_name = ?id1, @@ -684,9 +669,6 @@ define_with_mode_api(_Config) -> %%----------------------------------------------------------------- %% CosPropertyService_PropertyNamesIterator API tests %%----------------------------------------------------------------- -names_iterator_api(doc) -> ["CosPropertyService_PropertyNamesIterator API tests.", - ""]; -names_iterator_api(suite) -> []; names_iterator_api(_Config) -> Fac = ?match({_,pseudo,_,_,_,_}, cosProperty:start_SetFactory()), Obj = ?match({_,pseudo,_,_,_,_}, 'CosPropertyService_PropertySetFactory': @@ -717,9 +699,6 @@ names_iterator_api(_Config) -> %%----------------------------------------------------------------- %% CosPropertyService_PropertiesIterator API tests %%----------------------------------------------------------------- -properties_iterator_api(doc) -> ["CosPropertyService_PropertiesIterator API tests.", - ""]; -properties_iterator_api(suite) -> []; properties_iterator_api(_Config) -> Fac = ?match({_,pseudo,_,_,_,_}, cosProperty:start_SetFactory()), Obj = ?match({_,pseudo,_,_,_,_}, 'CosPropertyService_PropertySetFactory': -- cgit v1.2.3 From 68513c22c8e4ab0614cd39a8145218744044719f Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Thu, 16 Jun 2016 10:49:11 +0200 Subject: [cosTime] Update the test suites to follow the new style --- lib/cosTime/test/generated_SUITE.erl | 30 ++----- lib/cosTime/test/time_SUITE.erl | 160 +++++++++++++++++------------------ 2 files changed, 83 insertions(+), 107 deletions(-) (limited to 'lib') diff --git a/lib/cosTime/test/generated_SUITE.erl b/lib/cosTime/test/generated_SUITE.erl index ea1362adef..b030155340 100644 --- a/lib/cosTime/test/generated_SUITE.erl +++ b/lib/cosTime/test/generated_SUITE.erl @@ -29,7 +29,7 @@ -include_lib("common_test/include/ct.hrl"). -include_lib("orber/include/corba.hrl"). --define(default_timeout, ?t:minutes(3)). +-define(default_timeout, test_server:minutes(3)). -define(match(ExpectedRes, Expr), fun() -> @@ -40,7 +40,7 @@ _ -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -51,7 +51,7 @@ Not -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS); + exit(AcTuAlReS); _ -> AcTuAlReS end @@ -63,7 +63,7 @@ case orber_tc:check_tc(TC) of false -> io:format("###### ERROR ERROR ######~n~p - ~p~n", [Op, TC]), - ?line exit(TC); + exit(TC); true -> true end @@ -114,12 +114,12 @@ end_per_group(_GroupName, Config) -> %% Init and cleanup functions. %%----------------------------------------------------------------- init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -127,8 +127,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'TimeBase_IntervalT' %% Description: %%----------------------------------------------------------------- -'TimeBase_IntervalT'(doc) -> ["TimeBase_IntervalT"]; -'TimeBase_IntervalT'(suite) -> []; 'TimeBase_IntervalT'(_) -> ?match(true, orber_tc:check_tc('TimeBase_IntervalT':tc())), ?match("IDL:omg.org/TimeBase/IntervalT:1.0", @@ -142,8 +140,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'TimeBase_UtcT' %% Description: %%----------------------------------------------------------------- -'TimeBase_UtcT'(doc) -> ["TimeBase_UtcT"]; -'TimeBase_UtcT'(suite) -> []; 'TimeBase_UtcT'(_) -> ?match(true, orber_tc:check_tc('TimeBase_UtcT':tc())), ?match("IDL:omg.org/TimeBase/UtcT:1.0", @@ -157,8 +153,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTime_TimeUnavailable' %% Description: %%----------------------------------------------------------------- -'CosTime_TimeUnavailable'(doc) -> ["CosTime_TimeUnavailable"]; -'CosTime_TimeUnavailable'(suite) -> []; 'CosTime_TimeUnavailable'(_) -> ?match(true, orber_tc:check_tc('CosTime_TimeUnavailable':tc())), ?match("IDL:omg.org/CosTime/TimeUnavailable:1.0", @@ -172,8 +166,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTimerEvent_TimerEventT' %% Description: %%----------------------------------------------------------------- -'CosTimerEvent_TimerEventT'(doc) -> ["CosTimerEvent_TimerEventT"]; -'CosTimerEvent_TimerEventT'(suite) -> []; 'CosTimerEvent_TimerEventT'(_) -> ?match(true, orber_tc:check_tc('CosTimerEvent_TimerEventT':tc())), ?match("IDL:omg.org/CosTimerEvent/TimerEventT:1.0", @@ -187,8 +179,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTime_TIO' %% Description: %%----------------------------------------------------------------- -'CosTime_TIO'(doc) -> ["CosTime_TIO"]; -'CosTime_TIO'(suite) -> []; 'CosTime_TIO'(_) -> ?nomatch(undefined, 'CosTime_TIO':oe_tc('_get_time_interval')), ?nomatch(undefined, 'CosTime_TIO':oe_tc(spans)), @@ -207,8 +197,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTime_TimeService' %% Description: %%----------------------------------------------------------------- -'CosTime_TimeService'(doc) -> ["CosTime_TimeService"]; -'CosTime_TimeService'(suite) -> []; 'CosTime_TimeService'(_) -> ?nomatch(undefined, 'CosTime_TimeService':oe_tc(universal_time)), ?nomatch(undefined, 'CosTime_TimeService':oe_tc(secure_universal_time)), @@ -229,8 +217,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTime_UTO' %% Description: %%----------------------------------------------------------------- -'CosTime_UTO'(doc) -> ["CosTime_UTO"]; -'CosTime_UTO'(suite) -> []; 'CosTime_UTO'(_) -> ?nomatch(undefined, 'CosTime_UTO':oe_tc('_get_time')), ?nomatch(undefined, 'CosTime_UTO':oe_tc('_get_inaccuracy')), @@ -253,8 +239,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTimerEvent_TimerEventHandler' %% Description: %%----------------------------------------------------------------- -'CosTimerEvent_TimerEventHandler'(doc) -> ["CosTimerEvent_TimerEventHandler"]; -'CosTimerEvent_TimerEventHandler'(suite) -> []; 'CosTimerEvent_TimerEventHandler'(_) -> ?nomatch(undefined, 'CosTimerEvent_TimerEventHandler':oe_tc('_get_status')), ?nomatch(undefined, 'CosTimerEvent_TimerEventHandler':oe_tc(time_set)), @@ -275,8 +259,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTimerEvent_TimerEventService' %% Description: %%----------------------------------------------------------------- -'CosTimerEvent_TimerEventService'(doc) -> ["CosTimerEvent_TimerEventService"]; -'CosTimerEvent_TimerEventService'(suite) -> []; 'CosTimerEvent_TimerEventService'(_) -> ?nomatch(undefined, 'CosTimerEvent_TimerEventService':oe_tc(register)), ?nomatch(undefined, 'CosTimerEvent_TimerEventService':oe_tc(unregister)), diff --git a/lib/cosTime/test/time_SUITE.erl b/lib/cosTime/test/time_SUITE.erl index 431b1d2d8a..f85f13badb 100644 --- a/lib/cosTime/test/time_SUITE.erl +++ b/lib/cosTime/test/time_SUITE.erl @@ -33,7 +33,7 @@ -include_lib("common_test/include/ct.hrl"). %%--------------- DEFINES ------------------------------------ --define(default_timeout, ?t:minutes(20)). +-define(default_timeout, test_server:minutes(20)). -define(match(ExpectedRes, Expr), fun() -> AcTuAlReS = (catch (Expr)), @@ -105,14 +105,14 @@ cases() -> init_per_testcase(_Case, Config) -> Path = code:which(?MODULE), code:add_pathz(filename:join(filename:dirname(Path), "idl_output")), - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> Path = code:which(?MODULE), code:del_path(filename:join(filename:dirname(Path), "idl_output")), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -150,8 +150,6 @@ end_per_suite(Config) -> %%----------------------------------------------------------------- %% Tests app file %%----------------------------------------------------------------- -app_test(doc) -> []; -app_test(suite) -> []; app_test(_Config) -> ok=test_server:app_test(cosTime), ok. @@ -159,27 +157,25 @@ app_test(_Config) -> %%----------------------------------------------------------------- %% CosTime API tests %%----------------------------------------------------------------- -time_api(doc) -> ["CosTime API tests.", ""]; -time_api(suite) -> []; time_api(_Config) -> - ?line ?match(ok, application:start(cosTime)), + ?match(ok, application:start(cosTime)), TS=cosTime:start_time_service(0, 500), Time=calendar:datetime_to_gregorian_seconds({{1582,1,1},{0,0,0}}), Inaccuracy = 1000, Tdf =1, Utc = #'TimeBase_UtcT'{time=Time, inacclo = ?low_TimeT(Inaccuracy), inacchi = ?high_TimeT(Inaccuracy), tdf = Tdf}, - ?line UTO1='CosTime_TimeService':new_universal_time(TS, Time, Inaccuracy, Tdf), - ?line UTO2='CosTime_TimeService':uto_from_utc(TS, Utc), - ?line ?match(Time, 'CosTime_UTO':'_get_time'(UTO1)), - ?line ?match(Inaccuracy, 'CosTime_UTO':'_get_inaccuracy'(UTO1)), - ?line ?match(Tdf, 'CosTime_UTO':'_get_tdf'(UTO1)), - ?line ?match(Utc, 'CosTime_UTO':'_get_utc_time'(UTO1)), - - ?line ?match(Time, 'CosTime_UTO':'_get_time'(UTO2)), - ?line ?match(Inaccuracy, 'CosTime_UTO':'_get_inaccuracy'(UTO2)), - ?line ?match(Tdf, 'CosTime_UTO':'_get_tdf'(UTO2)), - ?line ?match(Utc, 'CosTime_UTO':'_get_utc_time'(UTO2)), + UTO1='CosTime_TimeService':new_universal_time(TS, Time, Inaccuracy, Tdf), + UTO2='CosTime_TimeService':uto_from_utc(TS, Utc), + ?match(Time, 'CosTime_UTO':'_get_time'(UTO1)), + ?match(Inaccuracy, 'CosTime_UTO':'_get_inaccuracy'(UTO1)), + ?match(Tdf, 'CosTime_UTO':'_get_tdf'(UTO1)), + ?match(Utc, 'CosTime_UTO':'_get_utc_time'(UTO1)), + + ?match(Time, 'CosTime_UTO':'_get_time'(UTO2)), + ?match(Inaccuracy, 'CosTime_UTO':'_get_inaccuracy'(UTO2)), + ?match(Tdf, 'CosTime_UTO':'_get_tdf'(UTO2)), + ?match(Utc, 'CosTime_UTO':'_get_utc_time'(UTO2)), TIO1='CosTime_TimeService':new_interval(TS, 2, 5), _TIO2='CosTime_TimeService':new_interval(TS, 3, 6), @@ -189,40 +185,40 @@ time_api(_Config) -> TIO6='CosTime_TimeService':new_interval(TS, 2, 6), TIO7='CosTime_TimeService':new_interval(TS, 3, 7), - ?line {_,TIO8} = ?match({'OTContained', _}, 'CosTime_TIO':overlaps(TIO1, TIO6)), - ?line {_,TIO9} = ?match({'OTContainer', _}, 'CosTime_TIO':overlaps(TIO1, TIO1)), - ?line {_,TIO10} = ?match({'OTContainer', _}, 'CosTime_TIO':overlaps(TIO1, TIO4)), - ?line {_,TIO11} = ?match({'OTOverlap', _}, 'CosTime_TIO':overlaps(TIO1, TIO3)), - ?line {_,TIO12} = ?match({'OTOverlap', _}, 'CosTime_TIO':overlaps(TIO1, TIO7)), - ?line {_,TIO13} = ?match({'OTNoOverlap', _}, 'CosTime_TIO':overlaps(TIO1, TIO5)), + {_,TIO8} = ?match({'OTContained', _}, 'CosTime_TIO':overlaps(TIO1, TIO6)), + {_,TIO9} = ?match({'OTContainer', _}, 'CosTime_TIO':overlaps(TIO1, TIO1)), + {_,TIO10} = ?match({'OTContainer', _}, 'CosTime_TIO':overlaps(TIO1, TIO4)), + {_,TIO11} = ?match({'OTOverlap', _}, 'CosTime_TIO':overlaps(TIO1, TIO3)), + {_,TIO12} = ?match({'OTOverlap', _}, 'CosTime_TIO':overlaps(TIO1, TIO7)), + {_,TIO13} = ?match({'OTNoOverlap', _}, 'CosTime_TIO':overlaps(TIO1, TIO5)), - ?line ?match({'TimeBase_IntervalT',2,5},'CosTime_TIO':'_get_time_interval'(TIO8)), - ?line ?match({'TimeBase_IntervalT',2,5},'CosTime_TIO':'_get_time_interval'(TIO9)), - ?line ?match({'TimeBase_IntervalT',3,4},'CosTime_TIO':'_get_time_interval'(TIO10)), - ?line ?match({'TimeBase_IntervalT',2,3},'CosTime_TIO':'_get_time_interval'(TIO11)), - ?line ?match({'TimeBase_IntervalT',3,5},'CosTime_TIO':'_get_time_interval'(TIO12)), - ?line ?match({'TimeBase_IntervalT',5,7},'CosTime_TIO':'_get_time_interval'(TIO13)), + ?match({'TimeBase_IntervalT',2,5},'CosTime_TIO':'_get_time_interval'(TIO8)), + ?match({'TimeBase_IntervalT',2,5},'CosTime_TIO':'_get_time_interval'(TIO9)), + ?match({'TimeBase_IntervalT',3,4},'CosTime_TIO':'_get_time_interval'(TIO10)), + ?match({'TimeBase_IntervalT',2,3},'CosTime_TIO':'_get_time_interval'(TIO11)), + ?match({'TimeBase_IntervalT',3,5},'CosTime_TIO':'_get_time_interval'(TIO12)), + ?match({'TimeBase_IntervalT',5,7},'CosTime_TIO':'_get_time_interval'(TIO13)), - ?line UTO3='CosTime_TimeService':new_universal_time(TS, 4, 2, 0), %% 2-6 - ?line UTO4='CosTime_TimeService':new_universal_time(TS, 2, 1, 0), %% 1-3 - ?line UTO5='CosTime_TimeService':new_universal_time(TS, 3, 0, 0), %% 3-3 - ?line UTO6='CosTime_TimeService':new_universal_time(TS, 9, 1, 0), %% 8-10 - ?line UTO7='CosTime_TimeService':new_universal_time(TS, 4, 3, 0), %% 1-7 - ?line UTO8='CosTime_TimeService':new_universal_time(TS, 5, 2, 0), %% 3-7 - - ?line {_,TIO14} = ?match({'OTContained', _}, 'CosTime_TIO':spans(TIO1, UTO7)), - ?line {_,TIO15} = ?match({'OTContainer', _}, 'CosTime_TIO':spans(TIO1, UTO5)), - ?line {_,TIO16} = ?match({'OTOverlap', _}, 'CosTime_TIO':spans(TIO1, UTO4)), - ?line {_,TIO17} = ?match({'OTOverlap', _}, 'CosTime_TIO':spans(TIO1, UTO8)), - ?line {_,TIO18} = ?match({'OTNoOverlap', _}, 'CosTime_TIO':spans(TIO1, UTO6)), - ?line {_,TIO19} = ?match({'OTContained', _}, 'CosTime_TIO':spans(TIO1, UTO3)), - - ?line ?match({'TimeBase_IntervalT',2,5},'CosTime_TIO':'_get_time_interval'(TIO14)), - ?line ?match({'TimeBase_IntervalT',3,3},'CosTime_TIO':'_get_time_interval'(TIO15)), - ?line ?match({'TimeBase_IntervalT',2,3},'CosTime_TIO':'_get_time_interval'(TIO16)), - ?line ?match({'TimeBase_IntervalT',3,5},'CosTime_TIO':'_get_time_interval'(TIO17)), - ?line ?match({'TimeBase_IntervalT',5,8},'CosTime_TIO':'_get_time_interval'(TIO18)), - ?line ?match({'TimeBase_IntervalT',2,5},'CosTime_TIO':'_get_time_interval'(TIO19)), + UTO3='CosTime_TimeService':new_universal_time(TS, 4, 2, 0), %% 2-6 + UTO4='CosTime_TimeService':new_universal_time(TS, 2, 1, 0), %% 1-3 + UTO5='CosTime_TimeService':new_universal_time(TS, 3, 0, 0), %% 3-3 + UTO6='CosTime_TimeService':new_universal_time(TS, 9, 1, 0), %% 8-10 + UTO7='CosTime_TimeService':new_universal_time(TS, 4, 3, 0), %% 1-7 + UTO8='CosTime_TimeService':new_universal_time(TS, 5, 2, 0), %% 3-7 + + {_,TIO14} = ?match({'OTContained', _}, 'CosTime_TIO':spans(TIO1, UTO7)), + {_,TIO15} = ?match({'OTContainer', _}, 'CosTime_TIO':spans(TIO1, UTO5)), + {_,TIO16} = ?match({'OTOverlap', _}, 'CosTime_TIO':spans(TIO1, UTO4)), + {_,TIO17} = ?match({'OTOverlap', _}, 'CosTime_TIO':spans(TIO1, UTO8)), + {_,TIO18} = ?match({'OTNoOverlap', _}, 'CosTime_TIO':spans(TIO1, UTO6)), + {_,TIO19} = ?match({'OTContained', _}, 'CosTime_TIO':spans(TIO1, UTO3)), + + ?match({'TimeBase_IntervalT',2,5},'CosTime_TIO':'_get_time_interval'(TIO14)), + ?match({'TimeBase_IntervalT',3,3},'CosTime_TIO':'_get_time_interval'(TIO15)), + ?match({'TimeBase_IntervalT',2,3},'CosTime_TIO':'_get_time_interval'(TIO16)), + ?match({'TimeBase_IntervalT',3,5},'CosTime_TIO':'_get_time_interval'(TIO17)), + ?match({'TimeBase_IntervalT',5,8},'CosTime_TIO':'_get_time_interval'(TIO18)), + ?match({'TimeBase_IntervalT',2,5},'CosTime_TIO':'_get_time_interval'(TIO19)), cosTime:stop_time_service(TS), @@ -233,66 +229,64 @@ time_api(_Config) -> %%----------------------------------------------------------------- %% CosTimerEvent API tests %%----------------------------------------------------------------- -timerevent_api(doc) -> ["CosTimerEvent API tests.", ""]; -timerevent_api(suite) -> []; timerevent_api(_Config) -> %% Init cosTime apps. - ?line ?match(ok, application:start(cosTime)), - ?line TS=cosTime:start_time_service(0, 500), - ?line TES=cosTime:start_timerevent_service(TS), + ?match(ok, application:start(cosTime)), + TS=cosTime:start_time_service(0, 500), + TES=cosTime:start_timerevent_service(TS), %%----- Initialize the cosNotification application. ----- - ?line cosNotificationApp:start(), - ?line Fac = (catch cosNotificationApp:start_factory([])), - ?line {Ch, _Id1} = (catch 'CosNotifyChannelAdmin_EventChannelFactory':create_channel(Fac, [], [])), + cosNotificationApp:start(), + Fac = (catch cosNotificationApp:start_factory([])), + {Ch, _Id1} = (catch 'CosNotifyChannelAdmin_EventChannelFactory':create_channel(Fac, [], [])), %% Create the Admin objects - ?line {AdminSupplier, _ASID}= ?match({{_,key,_,_,_,_},_}, + {AdminSupplier, _ASID}= ?match({{_,key,_,_,_,_},_}, 'CosNotifyChannelAdmin_EventChannel':new_for_suppliers(Ch,'OR_OP')), - ?line {AdminConsumer, _ACID}= ?match({{_,key,_,_,_,_},_}, + {AdminConsumer, _ACID}= ?match({{_,key,_,_,_,_},_}, 'CosNotifyChannelAdmin_EventChannel':new_for_consumers(Ch,'OR_OP')), %% Create a push consumer TimerEventService will push events to. - ?line {ProxyPushConsumer,_ID10}= ?match({{_,key,_,_,_,_},_}, + {ProxyPushConsumer,_ID10}= ?match({{_,key,_,_,_,_},_}, 'CosNotifyChannelAdmin_SupplierAdmin':obtain_notification_push_consumer(AdminSupplier, 'ANY_EVENT')), %% Create a pull suppliers so we can check we actually got the event. - ?line {ProxyPullSupplier,_ID1} = ?match({{_,key,_,_,_,_},_}, + {ProxyPullSupplier,_ID1} = ?match({{_,key,_,_,_,_},_}, 'CosNotifyChannelAdmin_ConsumerAdmin':obtain_notification_pull_supplier(AdminConsumer, 'ANY_EVENT')), AnyEvent = any:create(orber_tc:long(), 100), - ?line UTO=?match({_,pseudo,_,_,_,_}, 'CosTime_TimeService':new_universal_time(TS, 10*10000000,1,1)), - ?line EH=?match({_,key,_,_,_,_}, 'CosTimerEvent_TimerEventService':register(TES, ProxyPushConsumer, AnyEvent)), - - ?line ?match('ESTimeCleared','CosTimerEvent_TimerEventHandler':'_get_status'(EH)), - ?line ?match({false,_},'CosTimerEvent_TimerEventHandler':time_set(EH)), - ?line ?match(ok,'CosTimerEvent_TimerEventHandler':set_timer(EH, 'TTRelative', UTO)), - ?line ?match({true,_},'CosTimerEvent_TimerEventHandler':time_set(EH)), - ?line ?match('ESTimeSet','CosTimerEvent_TimerEventHandler':'_get_status'(EH)), + UTO=?match({_,pseudo,_,_,_,_}, 'CosTime_TimeService':new_universal_time(TS, 10*10000000,1,1)), + EH=?match({_,key,_,_,_,_}, 'CosTimerEvent_TimerEventService':register(TES, ProxyPushConsumer, AnyEvent)), + + ?match('ESTimeCleared','CosTimerEvent_TimerEventHandler':'_get_status'(EH)), + ?match({false,_},'CosTimerEvent_TimerEventHandler':time_set(EH)), + ?match(ok,'CosTimerEvent_TimerEventHandler':set_timer(EH, 'TTRelative', UTO)), + ?match({true,_},'CosTimerEvent_TimerEventHandler':time_set(EH)), + ?match('ESTimeSet','CosTimerEvent_TimerEventHandler':'_get_status'(EH)), - ?line ?match({{any,tk_null,null}, false}, + ?match({{any,tk_null,null}, false}, 'CosNotifyChannelAdmin_ProxyPullSupplier':try_pull(ProxyPullSupplier)), - ?line ?match(AnyEvent, 'CosNotifyChannelAdmin_ProxyPullSupplier':pull(ProxyPullSupplier)), - ?line ?match('ESTriggered','CosTimerEvent_TimerEventHandler':'_get_status'(EH)), + ?match(AnyEvent, 'CosNotifyChannelAdmin_ProxyPullSupplier':pull(ProxyPullSupplier)), + ?match('ESTriggered','CosTimerEvent_TimerEventHandler':'_get_status'(EH)), %% It's allowed to send an UTO with time eq. to 0 if the server is TTRelative. %% When TTAbsolute BAD_PARAM is raised. - ?line UTO2=?match({_,pseudo,_,_,_,_}, 'CosTime_TimeService':new_universal_time(TS, 0,1,1)), - ?line ?match({'EXCEPTION',_},'CosTimerEvent_TimerEventHandler':set_timer(EH, 'TTAbsolute', UTO2)), - ?line ?match(ok,'CosTimerEvent_TimerEventHandler':set_timer(EH, 'TTRelative', UTO2)), - ?line ?match(AnyEvent, 'CosNotifyChannelAdmin_ProxyPullSupplier':pull(ProxyPullSupplier)), + UTO2=?match({_,pseudo,_,_,_,_}, 'CosTime_TimeService':new_universal_time(TS, 0,1,1)), + ?match({'EXCEPTION',_},'CosTimerEvent_TimerEventHandler':set_timer(EH, 'TTAbsolute', UTO2)), + ?match(ok,'CosTimerEvent_TimerEventHandler':set_timer(EH, 'TTRelative', UTO2)), + ?match(AnyEvent, 'CosNotifyChannelAdmin_ProxyPullSupplier':pull(ProxyPullSupplier)), %% TTPeriodic is defined to be relative, i.e., we can use the tactic as above. - ?line ?match(ok,'CosTimerEvent_TimerEventHandler':set_timer(EH, 'TTPeriodic', UTO2)), + ?match(ok,'CosTimerEvent_TimerEventHandler':set_timer(EH, 'TTPeriodic', UTO2)), %% Sleep for UTO*2+4 secs. At this point the Timer should have delivered 2 events. timer:sleep(24000), %% Cancel the timer so no more events will be delivered. - ?line ?match(true,'CosTimerEvent_TimerEventHandler':cancel_timer(EH)), + ?match(true,'CosTimerEvent_TimerEventHandler':cancel_timer(EH)), - ?line ?match({AnyEvent, true}, 'CosNotifyChannelAdmin_ProxyPullSupplier':try_pull(ProxyPullSupplier)), - ?line ?match({AnyEvent, true}, 'CosNotifyChannelAdmin_ProxyPullSupplier':try_pull(ProxyPullSupplier)), - ?line ?match({{any,tk_null,null}, false}, + ?match({AnyEvent, true}, 'CosNotifyChannelAdmin_ProxyPullSupplier':try_pull(ProxyPullSupplier)), + ?match({AnyEvent, true}, 'CosNotifyChannelAdmin_ProxyPullSupplier':try_pull(ProxyPullSupplier)), + ?match({{any,tk_null,null}, false}, 'CosNotifyChannelAdmin_ProxyPullSupplier':try_pull(ProxyPullSupplier)), -- cgit v1.2.3 From 395f31e3d22c1f4e273830122862769c78a7fcc1 Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Thu, 16 Jun 2016 10:53:32 +0200 Subject: [cosTransactions] Update the test suites to follow the new style --- lib/cosTransactions/test/generated_SUITE.erl | 62 ++--------- lib/cosTransactions/test/transactions_SUITE.erl | 131 +++++++++++------------- 2 files changed, 66 insertions(+), 127 deletions(-) (limited to 'lib') diff --git a/lib/cosTransactions/test/generated_SUITE.erl b/lib/cosTransactions/test/generated_SUITE.erl index e4a7a5bf27..52b850b189 100644 --- a/lib/cosTransactions/test/generated_SUITE.erl +++ b/lib/cosTransactions/test/generated_SUITE.erl @@ -30,7 +30,7 @@ -include_lib("common_test/include/ct.hrl"). -include_lib("orber/include/corba.hrl"). --define(default_timeout, ?t:minutes(3)). +-define(default_timeout, test_server:minutes(3)). -define(match(ExpectedRes, Expr), fun() -> @@ -41,7 +41,7 @@ _ -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -52,7 +52,7 @@ Not -> io:format("###### ERROR ERROR ######~n~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS); + exit(AcTuAlReS); _ -> AcTuAlReS end @@ -64,7 +64,7 @@ case orber_tc:check_tc(TC) of false -> io:format("###### ERROR ERROR ######~n~p - ~p~n", [Op, TC]), - ?line exit(TC); + exit(TC); true -> true end @@ -133,22 +133,18 @@ end_per_group(_GroupName, Config) -> %% Init and cleanup functions. %%----------------------------------------------------------------- init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. - end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. - %%----------------------------------------------------------------- %% Test Case: 'CosTransactions_HeuristicCommit' %% Description: %%----------------------------------------------------------------- -'CosTransactions_HeuristicCommit'(doc) -> ["CosTransactions_HeuristicCommit"]; -'CosTransactions_HeuristicCommit'(suite) -> []; 'CosTransactions_HeuristicCommit'(_) -> ?match(true, orber_tc:check_tc('CosTransactions_HeuristicCommit':tc())), ?match("IDL:omg.org/CosTransactions/HeuristicCommit:1.0", @@ -162,8 +158,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_HeuristicHazard' %% Description: %%----------------------------------------------------------------- -'CosTransactions_HeuristicHazard'(doc) -> ["CosTransactions_HeuristicHazard"]; -'CosTransactions_HeuristicHazard'(suite) -> []; 'CosTransactions_HeuristicHazard'(_) -> ?match(true, orber_tc:check_tc('CosTransactions_HeuristicHazard':tc())), ?match("IDL:omg.org/CosTransactions/HeuristicHazard:1.0", @@ -177,8 +171,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_HeuristicMixed' %% Description: %%----------------------------------------------------------------- -'CosTransactions_HeuristicMixed'(doc) -> ["CosTransactions_HeuristicMixed"]; -'CosTransactions_HeuristicMixed'(suite) -> []; 'CosTransactions_HeuristicMixed'(_) -> ?match(true, orber_tc:check_tc('CosTransactions_HeuristicMixed':tc())), ?match("IDL:omg.org/CosTransactions/HeuristicMixed:1.0", @@ -192,8 +184,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_HeuristicRollback' %% Description: %%----------------------------------------------------------------- -'CosTransactions_HeuristicRollback'(doc) -> ["CosTransactions_HeuristicRollback"]; -'CosTransactions_HeuristicRollback'(suite) -> []; 'CosTransactions_HeuristicRollback'(_) -> ?match(true, orber_tc:check_tc('CosTransactions_HeuristicRollback':tc())), ?match("IDL:omg.org/CosTransactions/HeuristicRollback:1.0", @@ -207,8 +197,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_Inactive' %% Description: %%----------------------------------------------------------------- -'CosTransactions_Inactive'(doc) -> ["CosTransactions_Inactive"]; -'CosTransactions_Inactive'(suite) -> []; 'CosTransactions_Inactive'(_) -> ?match(true, orber_tc:check_tc('CosTransactions_Inactive':tc())), ?match("IDL:omg.org/CosTransactions/Inactive:1.0", @@ -222,8 +210,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_InvalidControl' %% Description: %%----------------------------------------------------------------- -'CosTransactions_InvalidControl'(doc) -> ["CosTransactions_InvalidControl"]; -'CosTransactions_InvalidControl'(suite) -> []; 'CosTransactions_InvalidControl'(_) -> ?match(true, orber_tc:check_tc('CosTransactions_InvalidControl':tc())), ?match("IDL:omg.org/CosTransactions/InvalidControl:1.0", @@ -237,8 +223,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_NoTransaction' %% Description: %%----------------------------------------------------------------- -'CosTransactions_NoTransaction'(doc) -> ["CosTransactions_NoTransaction"]; -'CosTransactions_NoTransaction'(suite) -> []; 'CosTransactions_NoTransaction'(_) -> ?match(true, orber_tc:check_tc('CosTransactions_NoTransaction':tc())), ?match("IDL:omg.org/CosTransactions/NoTransaction:1.0", @@ -252,8 +236,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_NotPrepared' %% Description: %%----------------------------------------------------------------- -'CosTransactions_NotPrepared'(doc) -> ["CosTransactions_NotPrepared"]; -'CosTransactions_NotPrepared'(suite) -> []; 'CosTransactions_NotPrepared'(_) -> ?match(true, orber_tc:check_tc('CosTransactions_NotPrepared':tc())), ?match("IDL:omg.org/CosTransactions/NotPrepared:1.0", @@ -267,8 +249,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_NotSubtransaction' %% Description: %%----------------------------------------------------------------- -'CosTransactions_NotSubtransaction'(doc) -> ["CosTransactions_NotSubtransaction"]; -'CosTransactions_NotSubtransaction'(suite) -> []; 'CosTransactions_NotSubtransaction'(_) -> ?match(true, orber_tc:check_tc('CosTransactions_NotSubtransaction':tc())), ?match("IDL:omg.org/CosTransactions/NotSubtransaction:1.0", @@ -282,8 +262,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_SubtransactionsUnavailable' %% Description: %%----------------------------------------------------------------- -'CosTransactions_SubtransactionsUnavailable'(doc) -> ["CosTransactions_SubtransactionsUnavailable"]; -'CosTransactions_SubtransactionsUnavailable'(suite) -> []; 'CosTransactions_SubtransactionsUnavailable'(_) -> ?match(true, orber_tc:check_tc('CosTransactions_SubtransactionsUnavailable':tc())), ?match("IDL:omg.org/CosTransactions/SubtransactionsUnavailable:1.0", @@ -297,8 +275,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_Unavailable' %% Description: %%----------------------------------------------------------------- -'CosTransactions_Unavailable'(doc) -> ["CosTransactions_Unavailable"]; -'CosTransactions_Unavailable'(suite) -> []; 'CosTransactions_Unavailable'(_) -> ?match(true, orber_tc:check_tc('CosTransactions_Unavailable':tc())), ?match("IDL:omg.org/CosTransactions/Unavailable:1.0", @@ -312,8 +288,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_SynchronizationUnavailable' %% Description: %%----------------------------------------------------------------- -'CosTransactions_SynchronizationUnavailable'(doc) -> ["CosTransactions_SynchronizationUnavailable"]; -'CosTransactions_SynchronizationUnavailable'(suite) -> []; 'CosTransactions_SynchronizationUnavailable'(_) -> ?match(true, orber_tc:check_tc('CosTransactions_SynchronizationUnavailable':tc())), ?match("IDL:omg.org/CosTransactions/SynchronizationUnavailable:1.0", @@ -326,8 +300,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_TransIdentity' %% Description: %%----------------------------------------------------------------- -'CosTransactions_TransIdentity'(doc) -> ["CosTransactions_TransIdentity"]; -'CosTransactions_TransIdentity'(suite) -> []; 'CosTransactions_TransIdentity'(_) -> ?match(true, orber_tc:check_tc('CosTransactions_TransIdentity':tc())), ?match("IDL:omg.org/CosTransactions/TransIdentity:1.0", @@ -340,8 +312,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_PropagationContext' %% Description: %%----------------------------------------------------------------- -'CosTransactions_PropagationContext'(doc) -> ["CosTransactions_PropagationContext"]; -'CosTransactions_PropagationContext'(suite) -> []; 'CosTransactions_PropagationContext'(_) -> ?match(true, orber_tc:check_tc('CosTransactions_PropagationContext':tc())), ?match("IDL:omg.org/CosTransactions/PropagationContext:1.0", @@ -354,8 +324,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_otid_t' %% Description: %%----------------------------------------------------------------- -'CosTransactions_otid_t'(doc) -> ["CosTransactions_otid_t"]; -'CosTransactions_otid_t'(suite) -> []; 'CosTransactions_otid_t'(_) -> ?match(true, orber_tc:check_tc('CosTransactions_otid_t':tc())), ?match("IDL:omg.org/CosTransactions/otid_t:1.0", @@ -368,8 +336,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_WrongTransaction' %% Description: %%----------------------------------------------------------------- -'CosTransactions_WrongTransaction'(doc) -> ["CosTransactions_WrongTransaction"]; -'CosTransactions_WrongTransaction'(suite) -> []; 'CosTransactions_WrongTransaction'(_) -> ?match(true, orber_tc:check_tc('CosTransactions_WrongTransaction':tc())), ?match("IDL:omg.org/CosTransactions/WrongTransaction:1.0", @@ -383,8 +349,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_Control' %% Description: %%----------------------------------------------------------------- -'CosTransactions_Control'(doc) -> ["CosTransactions_Control"]; -'CosTransactions_Control'(suite) -> []; 'CosTransactions_Control'(_) -> ?nomatch(undefined, 'CosTransactions_Control':oe_tc(get_terminator)), ?nomatch(undefined, 'CosTransactions_Control':oe_tc(get_coordinator)), @@ -402,8 +366,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_Coordinator' %% Description: %%----------------------------------------------------------------- -'CosTransactions_Coordinator'(doc) -> ["CosTransactions_Coordinator"]; -'CosTransactions_Coordinator'(suite) -> []; 'CosTransactions_Coordinator'(_) -> ?nomatch(undefined, 'CosTransactions_Coordinator':oe_tc(get_status)), ?nomatch(undefined, 'CosTransactions_Coordinator':oe_tc(get_parent_status)), @@ -435,8 +397,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_RecoveryCoordinator' %% Description: %%----------------------------------------------------------------- -'CosTransactions_RecoveryCoordinator'(doc) -> ["CosTransactions_RecoveryCoordinator"]; -'CosTransactions_RecoveryCoordinator'(suite) -> []; 'CosTransactions_RecoveryCoordinator'(_) -> ?nomatch(undefined, 'CosTransactions_RecoveryCoordinator':oe_tc(replay_completion)), ?match(undefined, 'CosTransactions_RecoveryCoordinator':oe_tc(undefined)), @@ -453,8 +413,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_Resource' %% Description: %%----------------------------------------------------------------- -'CosTransactions_Resource'(doc) -> ["CosTransactions_Resource"]; -'CosTransactions_Resource'(suite) -> []; 'CosTransactions_Resource'(_) -> ?nomatch(undefined, 'CosTransactions_Resource':oe_tc(prepare)), ?nomatch(undefined, 'CosTransactions_Resource':oe_tc(rollback)), @@ -475,8 +433,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_SubtransactionAwareResource' %% Description: %%----------------------------------------------------------------- -'CosTransactions_SubtransactionAwareResource'(doc) -> ["CosTransactions_SubtransactionAwareResource"]; -'CosTransactions_SubtransactionAwareResource'(suite) -> []; 'CosTransactions_SubtransactionAwareResource'(_) -> ?nomatch(undefined, 'CosTransactions_SubtransactionAwareResource':oe_tc(commit_subtransaction)), ?nomatch(undefined, 'CosTransactions_SubtransactionAwareResource':oe_tc(rollback_subtransaction)), @@ -500,8 +456,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_Terminator' %% Description: %%----------------------------------------------------------------- -'CosTransactions_Terminator'(doc) -> ["CosTransactions_Terminator"]; -'CosTransactions_Terminator'(suite) -> []; 'CosTransactions_Terminator'(_) -> ?nomatch(undefined, 'CosTransactions_Terminator':oe_tc(commit)), ?nomatch(undefined, 'CosTransactions_Terminator':oe_tc(rollback)), @@ -519,8 +473,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'CosTransactions_TransactionFactory' %% Description: %%----------------------------------------------------------------- -'CosTransactions_TransactionFactory'(doc) -> ["CosTransactions_TransactionFactory"]; -'CosTransactions_TransactionFactory'(suite) -> []; 'CosTransactions_TransactionFactory'(_) -> ?nomatch(undefined, 'CosTransactions_TransactionFactory':oe_tc(create)), ?nomatch(undefined, 'CosTransactions_TransactionFactory':oe_tc(recreate)), @@ -538,8 +490,6 @@ end_per_testcase(_Case, Config) -> %% Test Case: 'ETraP_Server' %% Description: %%----------------------------------------------------------------- -'ETraP_Server'(doc) -> ["ETraP_Server"]; -'ETraP_Server'(suite) -> []; 'ETraP_Server'(_) -> ?nomatch(undefined, 'ETraP_Server':oe_tc(get_status)), ?nomatch(undefined, 'ETraP_Server':oe_tc(get_parent_status)), diff --git a/lib/cosTransactions/test/transactions_SUITE.erl b/lib/cosTransactions/test/transactions_SUITE.erl index 0d270c1f07..00753a4e6e 100644 --- a/lib/cosTransactions/test/transactions_SUITE.erl +++ b/lib/cosTransactions/test/transactions_SUITE.erl @@ -31,7 +31,7 @@ -include_lib("common_test/include/ct.hrl"). --define(default_timeout, ?t:minutes(20)). +-define(default_timeout, test_server:minutes(20)). %%----------------------------------------------------------------- @@ -63,19 +63,16 @@ end_per_group(_GroupName, Config) -> cases() -> [etrap_api, resource_api, app_test]. - - %%----------------------------------------------------------------- %% Init and cleanup functions. %%----------------------------------------------------------------- - init_per_testcase(_Case, Config) -> Path = code:which(?MODULE), code:add_pathz(filename:join(filename:dirname(Path), "idl_output")), 'oe_CosTransactions':'oe_register'(), 'oe_etrap_test':'oe_register'(), - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. @@ -84,7 +81,7 @@ end_per_testcase(_Case, Config) -> 'oe_CosTransactions':'oe_unregister'(), Path = code:which(?MODULE), code:del_path(filename:join(filename:dirname(Path), "idl_output")), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -110,8 +107,6 @@ end_per_suite(Config) -> %%----------------------------------------------------------------- %% Tests app file %%----------------------------------------------------------------- -app_test(doc) -> []; -app_test(suite) -> []; app_test(_Config) -> ok=test_server:app_test(cosTransactions), ok. @@ -119,12 +114,10 @@ app_test(_Config) -> %%----------------------------------------------------------------- %% API tests %%----------------------------------------------------------------- -etrap_api(doc) -> ["ETraP_Server tests", ""]; -etrap_api(suite) -> []; etrap_api(_Config) -> - ?line ?match(ok, application:start(cosTransactions), + ?match(ok, application:start(cosTransactions), "Starting the cosTransactions application"), - ?line TrFac = cosTransactions:start_factory(), + TrFac = cosTransactions:start_factory(), %% Start a new transaction: %% RootCoord %% / \ @@ -139,28 +132,28 @@ etrap_api(_Config) -> %%------ Test CosTransactions::Coordinator ------ - ?line ?match(true, + ?match(true, 'CosTransactions_Coordinator':is_same_transaction(Coord, Coord), "'CosTransactions_Coordinator':is_same_transaction"), - ?line ?match(false, + ?match(false, 'CosTransactions_Coordinator':is_same_transaction(Coord, SubCoord1), "'CosTransactions_Coordinator':is_same_transaction"), - ?line ?match(true, + ?match(true, 'CosTransactions_Coordinator':is_descendant_transaction(Coord, Coord), "'CosTransactions_Coordinator':is_descendant_transaction"), - ?line ?match(false, + ?match(false, 'CosTransactions_Coordinator':is_descendant_transaction(Coord, SubCoord1), "'CosTransactions_Coordinator':is_descendant_transaction"), - ?line ?match(true, + ?match(true, 'CosTransactions_Coordinator':is_descendant_transaction(SubCoord1, Coord), "'CosTransactions_Coordinator':is_descendant_transaction"), - ?line ?match(false, + ?match(false, 'CosTransactions_Coordinator':is_descendant_transaction(SubCoord1, SubCoord2), "'CosTransactions_Coordinator':is_descendant_transaction"), - ?line ?match(true, + ?match(true, 'CosTransactions_Coordinator':is_top_level_transaction(Coord), "'CosTransactions_Coordinator':is_top_level_transaction"), - ?line ?match(false, + ?match(false, 'CosTransactions_Coordinator':is_top_level_transaction(SubCoord2), "'CosTransactions_Coordinator':is_top_level_transaction"), @@ -169,31 +162,31 @@ etrap_api(_Config) -> RootHash2 = 'CosTransactions_Coordinator':hash_top_level_tran(SubCoord1), RootHash3 = 'CosTransactions_Coordinator':hash_top_level_tran(Coord), _SubHash = 'CosTransactions_Coordinator':hash_transaction(SubCoord2), - ?line ?match(RootHash, RepeatHash, + ?match(RootHash, RepeatHash, "'CosTransactions_Coordinator':hash_transaction"), - ?line ?match(RootHash, RootHash2, + ?match(RootHash, RootHash2, "'CosTransactions_Coordinator':hash_top_level_tran"), - ?line ?match(RootHash, RootHash3, + ?match(RootHash, RootHash3, "'CosTransactions_Coordinator':hash_top_level_tran"), -% ?line ?match_inverse(RootHash, SubHash, +% ?match_inverse(RootHash, SubHash, % "'CosTransactions_Coordinator':hash_transaction"), - ?line ?match('StatusActive', + ?match('StatusActive', 'CosTransactions_Coordinator':get_status(Coord), "'CosTransactions_Coordinator':get_status"), - ?line ?match('StatusActive', + ?match('StatusActive', 'CosTransactions_Coordinator':get_status(SubCoord1), "'CosTransactions_Coordinator':get_status"), - ?line ?match('StatusActive', + ?match('StatusActive', 'CosTransactions_Coordinator':get_parent_status(Coord), "'CosTransactions_Coordinator':get_parent_status"), - ?line ?match('StatusActive', + ?match('StatusActive', 'CosTransactions_Coordinator':get_parent_status(SubCoord1), "'CosTransactions_Coordinator':get_parent_status"), - ?line ?match('StatusActive', + ?match('StatusActive', 'CosTransactions_Coordinator':get_top_level_status(Coord), "'CosTransactions_Coordinator':get_top_level_status"), - ?line ?match('StatusActive', + ?match('StatusActive', 'CosTransactions_Coordinator':get_top_level_status(SubCoord1), "'CosTransactions_Coordinator':get_top_level_status"), @@ -209,21 +202,21 @@ etrap_api(_Config) -> _RC1 = 'CosTransactions_Coordinator':register_resource(SubCoord1, O1), % 'CosTransactions_Coordinator':register_synchronization(SubCoord1, O1), - ?line ?match('VoteCommit', + ?match('VoteCommit', 'CosTransactions_Resource':prepare(SubCoord1), "'CosTransactions_Coordinator':prepare"), %% The Transaction are no longer in 'StatusActive' state. No new %% "members" allowed. - ?line ?match('StatusPrepared', + ?match('StatusPrepared', 'CosTransactions_Coordinator':get_status(SubCoord1), "'CosTransactions_Coordinator':get_status"), -% ?line ?match({'EXCEPTION', ?tr_inactive}, +% ?match({'EXCEPTION', ?tr_inactive}, % 'CosTransactions_Coordinator':register_synchronization(SubCoord1, O1), % "'CosTransactions_Coordinator':register_synchronization"), - ?line ?match({'EXCEPTION', ?tr_inactive}, + ?match({'EXCEPTION', ?tr_inactive}, 'CosTransactions_Coordinator':register_resource(SubCoord1, O1), "'CosTransactions_Coordinator':register_resource"), - ?line ?match({'EXCEPTION', ?tr_inactive}, + ?match({'EXCEPTION', ?tr_inactive}, 'CosTransactions_Coordinator':create_subtransaction(SubCoord1), "'CosTransactions_Coordinator':create_subtransaction"), @@ -236,108 +229,106 @@ etrap_api(_Config) -> catch corba:dispose(Coord), catch corba:dispose(O1), - ?line cosTransactions:stop_factory(TrFac), - ?line application:stop(cosTransactions), + cosTransactions:stop_factory(TrFac), + application:stop(cosTransactions), ok. %%----------------------------------------------------------------- %% API tests %%----------------------------------------------------------------- -resource_api(doc) -> ["cosTransactions API tests", ""]; -resource_api(suite) -> []; resource_api(_Config) -> - ?line ?match(ok, application:start(cosTransactions), + ?match(ok, application:start(cosTransactions), "Starting the cosTransactions application"), - ?line TrFac = cosTransactions:start_factory([{typecheck, true}]), + TrFac = cosTransactions:start_factory([{typecheck, true}]), - ?line ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}}, + ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}}, run(TrFac, 0, {?nop, ?nop, ?nop, ?prepare_rollback}), "TESTCASE #1: Prepare rollback Resource 4"), - ?line ?match({'EXCEPTION', ?tr_mixed}, + ?match({'EXCEPTION', ?tr_mixed}, run(TrFac, 0, {?nop, ?nop, ?commit_mix, ?nop}), "TESTCASE #2: Heuristic Mixed exception Resource 3"), - ?line ?match(ok, + ?match(ok, run(TrFac, 0, {?nop, ?nop, ?nop, ?nop}), "TESTCASE #3: Normal completion. No errors."), - ?line ?match(ok, + ?match(ok, run(TrFac, 0, {?nop, ?nop, ?nop, ?commit_cm}), "TESTCASE #4: Heuristic Commit Exception Resource 4"), - ?line ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}}, + ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}}, run(TrFac, 0, {?nop, ?rollback_rb, ?nop, ?prepare_rollback}), "TESTCASE #5: Heuristic Rollbac Resource 2, Resource 4 reply 'VoteRollback'"), - ?line ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}}, + ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}}, run(TrFac, 0, {?nop, ?nop, ?prepare_rollback, ?rollback_rb}), "TESTCASE #6: Heuristic Rollbac Resource 4, Resource 3 reply 'VoteRollback'"), - ?line ?match(ok, + ?match(ok, run(TrFac, 0, {?nop, ?nop, ?commit_delay, ?nop}), "TESTCASE #7: Resource 3 delay during commit. No timeout."), - ?line ?match(ok, + ?match(ok, run(TrFac, 0, {?nop, ?nop, ?prepare_delay, ?nop}), "TESTCASE #8: Resource 3 delay during prepare. No timeout."), - ?line ?match(ok, + ?match(ok, run(TrFac, ?TIMEOUT, {?nop, ?commit_delay, ?nop, ?nop}), "TESTCASE #9: Resource 3 delay during commit. Timeout."), - ?line ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}}, + ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}}, run(TrFac, ?TIMEOUT, {?nop, ?prepare_delay, ?nop, ?nop}), "TESTCASE #10: Resource 3 delay during prepare. Timeout."), case ?is_debug_compiled of true -> %% Testing the Coordinators (root and sub). - ?line ?match(ok, + ?match(ok, run(TrFac, 0, {?nop, ?nop, ?nop, ?nop, [?nop, ?nop,?crash_transient(commit), ?nop]}), "TESTCASE #11: SubCoord 3 crash transient during commit."), - ?line ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{}}, + ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{}}, run(TrFac, 0, {?nop, ?nop, ?nop, ?nop, [?nop, ?nop,?crash_transient(send_prepare), ?nop]}), "TESTCASE #12: SubCoord 3 crash transient during send prepare."), - ?line ?match({'EXCEPTION', ?tr_hazard}, + ?match({'EXCEPTION', ?tr_hazard}, run(TrFac, 0, {?nop, ?nop, ?nop, ?nop, [?nop, ?nop,?crash_permanent(commit), ?nop]}), "TESTCASE #13: SubCoord 3 crash permanent during commit."), - ?line ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{}}, + ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{}}, run(TrFac, 0, {?nop, ?nop, ?nop, ?nop, [?nop, ?nop,?crash_permanent(send_prepare), ?nop]}), "TESTCASE #14: SubCoord 3 crash permanent during prepare."), - ?line ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{}}, + ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{}}, run(TrFac, 0, {?nop, ?nop, ?nop, ?nop, [?nop, ?crash_transient(send_prepare), ?crash_transient(commit), ?nop]}), "TESTCASE #15: SubCoord 2 crash transient during prepare. SubCoord 3 crash transient during commit"), - ?line ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}}, + ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}}, run(TrFac, 0, {?nop, ?nop, ?nop, ?nop, [?crash_transient(send_prepare), ?nop, ?nop, ?nop]}), "TESTCASE #16: RootCoord crash transient during send prepare."), - ?line ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{}}, + ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{}}, run(TrFac, 0, {?nop, ?nop, ?nop, ?nop, [?nop, ?crash_transient(prepare1), ?nop, ?nop]}), "TESTCASE #17: SubCoord 1 crash transient during prepare1."), - ?line ?match({'EXCEPTION', ?tr_mixed}, + ?match({'EXCEPTION', ?tr_mixed}, run(TrFac, 0, {?nop, ?prepare_mix, ?nop, ?nop, [?nop, ?nop, ?crash_transient(prepare2), ?nop]}), "TESTCASE #18: SubCoord 3 crash transient during prepare2. Resource 2 raise Heuristic Mixed during prepare"), - ?line ?match({'EXCEPTION', ?tr_mixed}, + ?match({'EXCEPTION', ?tr_mixed}, run(TrFac, 0, {?nop, ?commit_mix, ?nop, ?nop, [?nop, ?nop, ?crash_transient(commit2), ?nop]}), "TESTCASE #19: Resource 2 raise Heurist mixed during commit. SubCoord crash transient commit2"), - ?line ?match({'EXCEPTION', ?tr_mixed}, + ?match({'EXCEPTION', ?tr_mixed}, run(TrFac, 0, {?nop, ?rollback_cm, ?nop, ?prepare_rollback, [?nop, ?crash_transient(rollback2), ?nop, ?nop]}), "TESTCASE #20: Resource 2 raise Heuristic Commit during rollback. Resource 4 'VoteRollback'. SubCoord 2 crash transient rollback2."), - ?line ?match({'EXCEPTION', ?tr_mixed}, + ?match({'EXCEPTION', ?tr_mixed}, run(TrFac, 0, {?nop, ?nop, ?nop, ?commit_mix, [?nop, ?nop, ?crash_transient(send_forget1), ?nop]}), "TESTCASE #21: Resource 4 raise Heuristic Mixed during commit. SubCoord 2 crash transient send_forget1."), - ?line ?match({'EXCEPTION', ?tr_mixed}, + ?match({'EXCEPTION', ?tr_mixed}, run(TrFac, 0, {?nop, ?nop, ?nop, ?commit_mix, [?crash_transient(send_forget1), ?nop, ?nop, ?nop]}), "TESTCASE #22: Resource 4 raise Heuristic Mixed during commit. Root Coord crash transient send_forget1."), - ?line ?match({'EXCEPTION', ?tr_mixed}, + ?match({'EXCEPTION', ?tr_mixed}, run(TrFac, 0, {?nop, ?nop, ?nop, ?commit_mix, [?crash_transient(send_forget3), ?nop, ?crash_transient(send_forget1), ?nop]}), "TESTCASE #23: Resource 4 raise Heuristic Mixed during commit. Root Coord crash transient send_forget3. SubCoord 3 crash transient send_forget1."), - ?line ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}}, + ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}}, run(TrFac, ?TIMEOUT, {?nop, ?nop, ?nop, ?nop, [?delay_transient(root_delay, ?TIMEOUT*2), ?nop, ?nop, ?nop]}), "TESTCASE #24: Delay RootCoord. Timeout."), %% Testing the Terminator. - ?line ?match({'EXCEPTION', ?tr_mixed}, + ?match({'EXCEPTION', ?tr_mixed}, run(TrFac, ?TIMEOUT, {?nop, ?prepare_mix, ?nop, ?nop, [?nop, ?nop, ?nop, ?crash_transient(commit_heuristic1)]}), "TESTCASE #25: Terminator crash transient after received and logged Heuristic mix."), - ?line ?match(ok, + ?match(ok, run(TrFac, ?TIMEOUT, {?nop, ?nop, ?nop, ?nop, [?nop, ?nop, ?nop, ?crash_transient(commit_ok2)]}), "TESTCASE #26: Terminator crash transient after received and logged 'ok'."); _ -> ok end, - ?line cosTransactions:stop_factory(TrFac), - ?line application:stop(cosTransactions), + cosTransactions:stop_factory(TrFac), + application:stop(cosTransactions), ok. %%----------------------------------------------------------------- @@ -390,8 +381,6 @@ run(TrFac, Time, Spec) -> catch corba:dispose(O4), Reply. - - start_resources({A1, A2, A3, A4})-> start_resources({A1, A2, A3, A4, ?no_context}); start_resources({A1, A2, A3, A4, Ctx})-> -- cgit v1.2.3