aboutsummaryrefslogtreecommitdiffstats
path: root/lib/orber/test/iop_ior_12_SUITE.erl
diff options
context:
space:
mode:
authorLars Thorsen <[email protected]>2016-06-15 13:18:21 +0200
committerLars Thorsen <[email protected]>2016-06-17 07:51:01 +0200
commitaee581679e2a61e819950e793d3977b340dec70b (patch)
tree227c0627090b5404dad1c04d34b3deb458c08803 /lib/orber/test/iop_ior_12_SUITE.erl
parentd29526af250bb33a702556bb91cda136324b5b8c (diff)
downloadotp-aee581679e2a61e819950e793d3977b340dec70b.tar.gz
otp-aee581679e2a61e819950e793d3977b340dec70b.tar.bz2
otp-aee581679e2a61e819950e793d3977b340dec70b.zip
[orber] Update the test suites to follow the new style
Diffstat (limited to 'lib/orber/test/iop_ior_12_SUITE.erl')
-rw-r--r--lib/orber/test/iop_ior_12_SUITE.erl80
1 files changed, 38 insertions, 42 deletions
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.
%%-----------------------------------------------------------------