aboutsummaryrefslogtreecommitdiffstats
path: root/lib/orber
diff options
context:
space:
mode:
Diffstat (limited to 'lib/orber')
-rw-r--r--lib/orber/test/cdrcoding_10_SUITE.erl237
-rw-r--r--lib/orber/test/cdrcoding_11_SUITE.erl236
-rw-r--r--lib/orber/test/cdrcoding_12_SUITE.erl236
-rw-r--r--lib/orber/test/cdrlib_SUITE.erl182
-rw-r--r--lib/orber/test/corba_SUITE.erl454
-rw-r--r--lib/orber/test/csiv2_SUITE.erl103
-rw-r--r--lib/orber/test/data_types_SUITE.erl16
-rw-r--r--lib/orber/test/generated_SUITE.erl48
-rw-r--r--lib/orber/test/interceptors_SUITE.erl18
-rw-r--r--lib/orber/test/iop_ior_10_SUITE.erl70
-rw-r--r--lib/orber/test/iop_ior_11_SUITE.erl70
-rw-r--r--lib/orber/test/iop_ior_12_SUITE.erl80
-rw-r--r--lib/orber/test/ip_v4v6_interop_SUITE.erl9
-rw-r--r--lib/orber/test/lname_SUITE.erl76
-rw-r--r--lib/orber/test/multi_ORB_SUITE.erl294
-rw-r--r--lib/orber/test/naming_context_SUITE.erl111
-rw-r--r--lib/orber/test/orber_SUITE.erl22
-rw-r--r--lib/orber/test/orber_acl_SUITE.erl42
-rw-r--r--lib/orber/test/orber_firewall_ipv4_in_SUITE.erl47
-rw-r--r--lib/orber/test/orber_firewall_ipv4_out_SUITE.erl43
-rw-r--r--lib/orber/test/orber_firewall_ipv6_in_SUITE.erl47
-rw-r--r--lib/orber/test/orber_firewall_ipv6_out_SUITE.erl43
-rw-r--r--lib/orber/test/orber_nat_SUITE.erl42
-rw-r--r--lib/orber/test/orber_web_SUITE.erl32
-rw-r--r--lib/orber/test/tc_SUITE.erl346
25 files changed, 1171 insertions, 1733 deletions
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="\\<id1\\>", 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.
%%-----------------------------------------------------------------