r2corba 1.5.5-universal-java → 1.6.0-universal-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/corba.rb +1 -1
- data/lib/corba/cbase/ORB.rb +19 -16
- data/lib/corba/cbase/Request.rb +3 -3
- data/lib/corba/cbase/Values.rb +4 -2
- data/lib/corba/cbase/exception.rb +4 -2
- data/lib/corba/cbase/poa.rb +1 -1
- data/lib/corba/cbase/policies.rb +1 -1
- data/lib/corba/cbase/require.rb +8 -1
- data/lib/corba/common/Any.rb +2 -1
- data/lib/corba/common/IDL.rb +1 -1
- data/lib/corba/common/ORB.rb +21 -21
- data/lib/corba/common/Object.rb +14 -13
- data/lib/corba/common/Servant.rb +4 -4
- data/lib/corba/common/Stub.rb +6 -6
- data/lib/corba/common/Typecode.rb +35 -8
- data/lib/corba/common/Union.rb +5 -0
- data/lib/corba/common/Values.rb +1 -0
- data/lib/corba/common/const.rb +1 -1
- data/lib/corba/common/exception.rb +2 -1
- data/lib/corba/common/version.rb +2 -2
- data/lib/corba/idl/IDL.rb +1 -1
- data/lib/corba/jbase/Any.rb +6 -4
- data/lib/corba/jbase/ORB.rb +2 -2
- data/lib/corba/jbase/Object.rb +13 -13
- data/lib/corba/jbase/Request.rb +3 -3
- data/lib/corba/jbase/Streams.rb +64 -0
- data/lib/corba/jbase/Typecode.rb +3 -2
- data/lib/corba/jbase/Values.rb +2 -0
- data/lib/corba/jbase/exception.rb +1 -0
- data/lib/corba/jbase/poa.rb +18 -18
- data/lib/corba/jbase/policies.rb +29 -29
- data/lib/corba/jbase/require.rb +4 -0
- data/lib/corba/svcs/ins/cos_naming.rb +10 -1
- data/lib/corba/svcs/ins/ins.rb +45 -45
- data/lib/corba/svcs/ins/naming_service.rb +6 -6
- data/lib/ridlbe/ruby/config.rb +27 -20
- data/lib/ridlbe/ruby/walker.rb +276 -253
- data/mkrf_conf_bingem.rb +4 -4
- data/rakelib/build.rake +1 -1
- data/rakelib/config.rake +1 -1
- data/rakelib/config.rb +9 -9
- data/rakelib/gem.rake +20 -20
- data/rakelib/gem.rb +1 -1
- data/rakelib/package.rake +1 -1
- data/test/BiDirectional/client.rb +16 -16
- data/test/BiDirectional/run_test.rb +10 -10
- data/test/BiDirectional/server.rb +20 -20
- data/test/CORBA_Services/Naming/BindingIterator/client.rb +14 -14
- data/test/CORBA_Services/Naming/BindingIterator/run_test.rb +12 -12
- data/test/CORBA_Services/Naming/BindingIterator/server.rb +17 -17
- data/test/CORBA_Services/Naming/Corbaname/client.rb +14 -14
- data/test/CORBA_Services/Naming/Corbaname/run_test.rb +12 -12
- data/test/CORBA_Services/Naming/Corbaname/server.rb +20 -20
- data/test/CORBA_Services/Naming/Simple/client.rb +14 -14
- data/test/CORBA_Services/Naming/Simple/run_test.rb +12 -12
- data/test/CORBA_Services/Naming/Simple/server.rb +17 -17
- data/test/Collocation/run_test.rb +10 -10
- data/test/Collocation/test.rb +26 -19
- data/test/Connect_Timeout/client.rb +15 -15
- data/test/Connect_Timeout/run_test.rb +10 -10
- data/test/DII/client.rb +27 -27
- data/test/DII/run_test.rb +10 -10
- data/test/DII/server.rb +15 -15
- data/test/DSI/client.rb +15 -15
- data/test/DSI/run_test.rb +10 -10
- data/test/DSI/server.rb +16 -16
- data/test/Exceptions/client.rb +19 -19
- data/test/Exceptions/run_test.rb +10 -10
- data/test/Exceptions/server.rb +15 -15
- data/test/Hello/client.rb +15 -15
- data/test/Hello/run_test.rb +10 -10
- data/test/Hello/server.rb +16 -16
- data/test/IDL_Test/client.rb +20 -20
- data/test/IDL_Test/run_test.rb +10 -10
- data/test/IDL_Test/server.rb +18 -18
- data/test/IORMap/client.rb +14 -14
- data/test/IORMap/run_test.rb +10 -10
- data/test/IORMap/server.rb +22 -22
- data/test/IORTable/client.rb +14 -14
- data/test/IORTable/run_test.rb +10 -10
- data/test/IORTable/server.rb +22 -22
- data/test/Implicit_Conversion/client.rb +19 -16
- data/test/Implicit_Conversion/run_test.rb +10 -10
- data/test/Implicit_Conversion/server.rb +15 -15
- data/test/Multi_Threading/Multiple_ORB/client.rb +13 -13
- data/test/Multi_Threading/Multiple_ORB/run_test.rb +10 -10
- data/test/Multi_Threading/Multiple_ORB/server.rb +16 -16
- data/test/Multi_Threading/Simple/client.rb +15 -15
- data/test/Multi_Threading/Simple/run_test.rb +10 -10
- data/test/Multi_Threading/Simple/server.rb +15 -15
- data/test/Multi_Threading/Threads/client.rb +15 -15
- data/test/Multi_Threading/Threads/run_test.rb +10 -10
- data/test/Multi_Threading/Threads/server.rb +17 -17
- data/test/Multi_Threading/Threads/watchdog.rb +15 -15
- data/test/Multiple_Servant_Interfaces/client.rb +13 -13
- data/test/Multiple_Servant_Interfaces/run_test.rb +10 -10
- data/test/Multiple_Servant_Interfaces/server.rb +17 -17
- data/test/Nil/run_test.rb +10 -10
- data/test/Nil/test.rb +13 -13
- data/test/OBV/AbstractInterface/client.rb +13 -13
- data/test/OBV/AbstractInterface/run_test.rb +10 -10
- data/test/OBV/AbstractInterface/server.rb +19 -18
- data/test/OBV/Custom/OBV_impl.rb +2 -0
- data/test/OBV/Custom/client.rb +13 -13
- data/test/OBV/Custom/run_test.rb +10 -10
- data/test/OBV/Custom/server.rb +15 -15
- data/test/OBV/Simple/OBV_impl.rb +1 -0
- data/test/OBV/Simple/client.rb +13 -13
- data/test/OBV/Simple/run_test.rb +10 -10
- data/test/OBV/Simple/server.rb +15 -15
- data/test/OBV/Simple_Event/Event_impl.rb +1 -0
- data/test/OBV/Simple_Event/client.rb +13 -13
- data/test/OBV/Simple_Event/run_test.rb +10 -10
- data/test/OBV/Simple_Event/server.rb +15 -15
- data/test/OBV/Supports/client.rb +18 -18
- data/test/OBV/Supports/run_test.rb +10 -10
- data/test/OBV/Supports/server.rb +14 -14
- data/test/OBV/Supports/supports_impl.rb +3 -0
- data/test/OBV/Tree/client.rb +13 -13
- data/test/OBV/Tree/run_test.rb +10 -10
- data/test/OBV/Tree/server.rb +18 -18
- data/test/OBV/Truncatable/client.rb +56 -56
- data/test/OBV/Truncatable/run_test.rb +10 -10
- data/test/OBV/Truncatable/server.rb +14 -14
- data/test/OBV/ValueBox/client.rb +148 -147
- data/test/OBV/ValueBox/run_test.rb +10 -10
- data/test/OBV/ValueBox/server.rb +15 -15
- data/test/Object/client.rb +13 -13
- data/test/Object/run_test.rb +10 -10
- data/test/Object/server.rb +18 -18
- data/test/POA/run_test.rb +10 -10
- data/test/POA/test.rb +15 -15
- data/test/Param_Test/client.rb +47 -47
- data/test/Param_Test/run_test.rb +10 -10
- data/test/Param_Test/server.rb +55 -55
- data/test/Performance/Simple/client.rb +15 -15
- data/test/Performance/Simple/run_test.rb +10 -10
- data/test/Performance/Simple/server.rb +15 -15
- data/test/Policies/run_test.rb +10 -10
- data/test/Policies/test.rb +23 -23
- data/test/Timeout/client.rb +17 -17
- data/test/Timeout/run_test.rb +10 -10
- data/test/Timeout/server.rb +18 -18
- data/test/lib/test.rb +13 -7
- data/test/test_runner.rb +19 -19
- metadata +6 -6
@@ -20,19 +20,19 @@ ARGV.options do |opts|
|
|
20
20
|
script_name = File.basename($0)
|
21
21
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
22
22
|
|
23
|
-
opts.separator
|
23
|
+
opts.separator ''
|
24
24
|
|
25
|
-
opts.on(
|
26
|
-
|
27
|
-
|
28
|
-
opts.on(
|
29
|
-
|
30
|
-
|
25
|
+
opts.on('-d',
|
26
|
+
'Run with debugging output.',
|
27
|
+
'Default: false') { OPTIONS[:debug_opt] = '--d 10' }
|
28
|
+
opts.on('--use-stubs',
|
29
|
+
'Use stubs generated by RIDL.',
|
30
|
+
'Default: false (uses embedded IDL)') { OPTIONS[:use_implement] = '' }
|
31
31
|
|
32
|
-
opts.separator
|
32
|
+
opts.separator ''
|
33
33
|
|
34
|
-
opts.on(
|
35
|
-
|
34
|
+
opts.on('-h', '--help',
|
35
|
+
'Show this help message.') { puts opts; exit }
|
36
36
|
|
37
37
|
opts.parse!
|
38
38
|
end
|
data/test/OBV/Supports/server.rb
CHANGED
@@ -21,22 +21,22 @@ ARGV.options do |opts|
|
|
21
21
|
script_name = File.basename($0)
|
22
22
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
23
23
|
|
24
|
-
opts.separator
|
24
|
+
opts.separator ''
|
25
25
|
|
26
|
-
opts.on(
|
27
|
-
|
26
|
+
opts.on('--o IORFILE',
|
27
|
+
'Set IOR filename.',
|
28
28
|
"Default: 'server.ior'") { |v| OPTIONS[:iorfile] = v }
|
29
|
-
opts.on(
|
30
|
-
|
31
|
-
|
32
|
-
opts.on(
|
33
|
-
|
34
|
-
|
29
|
+
opts.on('--d LVL',
|
30
|
+
'Set ORBDebugLevel value.',
|
31
|
+
'Default: 0') { |v| OPTIONS[:orb_debuglevel] = v }
|
32
|
+
opts.on('--use-implement',
|
33
|
+
'Load IDL through CORBA.implement() instead of precompiled code.',
|
34
|
+
'Default: off') { |v| OPTIONS[:use_implement] = v }
|
35
35
|
|
36
|
-
opts.separator
|
36
|
+
opts.separator ''
|
37
37
|
|
38
|
-
opts.on(
|
39
|
-
|
38
|
+
opts.on('-h', '--help',
|
39
|
+
'Show this help message.') { puts opts; exit }
|
40
40
|
|
41
41
|
opts.parse!
|
42
42
|
end
|
@@ -67,7 +67,7 @@ class BalancedAccount_i < POA::BalancedAccount
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
-
orb = CORBA.ORB_init([
|
70
|
+
orb = CORBA.ORB_init(['-ORBDebugLevel', OPTIONS[:orb_debuglevel]], 'myORB')
|
71
71
|
|
72
72
|
# make sure valuetype factory is registered
|
73
73
|
BalancedAccount_factory.get_factory(orb)
|
@@ -91,7 +91,7 @@ open(OPTIONS[:iorfile], 'w') { |io|
|
|
91
91
|
}
|
92
92
|
|
93
93
|
Signal.trap('INT') do
|
94
|
-
puts
|
94
|
+
puts 'SIGINT - shutting down ORB...'
|
95
95
|
orb.shutdown()
|
96
96
|
end
|
97
97
|
|
@@ -18,14 +18,17 @@ module BalancedAccount_support
|
|
18
18
|
self.total_withdrawn = 0.0
|
19
19
|
super()
|
20
20
|
end
|
21
|
+
|
21
22
|
def deposit(amount)
|
22
23
|
self.amount += amount
|
23
24
|
self.total_deposited += amount
|
24
25
|
end
|
26
|
+
|
25
27
|
def withdraw(amount)
|
26
28
|
self.amount -= amount
|
27
29
|
self.total_withdrawn += amount
|
28
30
|
end
|
31
|
+
|
29
32
|
def get_balance
|
30
33
|
self
|
31
34
|
end
|
data/test/OBV/Tree/client.rb
CHANGED
@@ -23,22 +23,22 @@ ARGV.options do |opts|
|
|
23
23
|
script_name = File.basename($0)
|
24
24
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
25
25
|
|
26
|
-
opts.separator
|
26
|
+
opts.separator ''
|
27
27
|
|
28
|
-
opts.on(
|
29
|
-
|
28
|
+
opts.on('--k IORFILE',
|
29
|
+
'Set IOR.',
|
30
30
|
"Default: 'file://server.ior'") { |v| OPTIONS[:iorfile] = v }
|
31
|
-
opts.on(
|
32
|
-
|
33
|
-
|
34
|
-
opts.on(
|
35
|
-
|
36
|
-
|
31
|
+
opts.on('--d LVL',
|
32
|
+
'Set ORBDebugLevel value.',
|
33
|
+
'Default: 0') { |v| OPTIONS[:orb_debuglevel] = v }
|
34
|
+
opts.on('--use-implement',
|
35
|
+
'Load IDL through CORBA.implement() instead of precompiled code.',
|
36
|
+
'Default: off') { |v| OPTIONS[:use_implement] = v }
|
37
37
|
|
38
|
-
opts.separator
|
38
|
+
opts.separator ''
|
39
39
|
|
40
|
-
opts.on(
|
41
|
-
|
40
|
+
opts.on('-h', '--help',
|
41
|
+
'Show this help message.') { puts opts; exit }
|
42
42
|
|
43
43
|
opts.parse!
|
44
44
|
end
|
@@ -84,7 +84,7 @@ def test_state(abs)
|
|
84
84
|
dump_tree(abs)
|
85
85
|
end
|
86
86
|
|
87
|
-
orb = CORBA.ORB_init([
|
87
|
+
orb = CORBA.ORB_init(['-ORBDebugLevel', OPTIONS[:orb_debuglevel]], 'myORB')
|
88
88
|
|
89
89
|
begin
|
90
90
|
obj = orb.string_to_object(OPTIONS[:iorfile])
|
data/test/OBV/Tree/run_test.rb
CHANGED
@@ -20,19 +20,19 @@ ARGV.options do |opts|
|
|
20
20
|
script_name = File.basename($0)
|
21
21
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
22
22
|
|
23
|
-
opts.separator
|
23
|
+
opts.separator ''
|
24
24
|
|
25
|
-
opts.on(
|
26
|
-
|
27
|
-
|
28
|
-
opts.on(
|
29
|
-
|
30
|
-
|
25
|
+
opts.on('-d',
|
26
|
+
'Run with debugging output.',
|
27
|
+
'Default: false') { OPTIONS[:debug_opt] = '--d 10' }
|
28
|
+
opts.on('--use-stubs',
|
29
|
+
'Use stubs generated by RIDL.',
|
30
|
+
'Default: false (uses embedded IDL)') { OPTIONS[:use_implement] = '' }
|
31
31
|
|
32
|
-
opts.separator
|
32
|
+
opts.separator ''
|
33
33
|
|
34
|
-
opts.on(
|
35
|
-
|
34
|
+
opts.on('-h', '--help',
|
35
|
+
'Show this help message.') { puts opts; exit }
|
36
36
|
|
37
37
|
opts.parse!
|
38
38
|
end
|
data/test/OBV/Tree/server.rb
CHANGED
@@ -21,22 +21,22 @@ ARGV.options do |opts|
|
|
21
21
|
script_name = File.basename($0)
|
22
22
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
23
23
|
|
24
|
-
opts.separator
|
24
|
+
opts.separator ''
|
25
25
|
|
26
|
-
opts.on(
|
27
|
-
|
26
|
+
opts.on('--o IORFILE',
|
27
|
+
'Set IOR filename.',
|
28
28
|
"Default: 'server.ior'") { |v| OPTIONS[:iorfile] = v }
|
29
|
-
opts.on(
|
30
|
-
|
31
|
-
|
32
|
-
opts.on(
|
33
|
-
|
34
|
-
|
29
|
+
opts.on('--d LVL',
|
30
|
+
'Set ORBDebugLevel value.',
|
31
|
+
'Default: 0') { |v| OPTIONS[:orb_debuglevel] = v }
|
32
|
+
opts.on('--use-implement',
|
33
|
+
'Load IDL through CORBA.implement() instead of precompiled code.',
|
34
|
+
'Default: off') { |v| OPTIONS[:use_implement] = v }
|
35
35
|
|
36
|
-
opts.separator
|
36
|
+
opts.separator ''
|
37
37
|
|
38
|
-
opts.on(
|
39
|
-
|
38
|
+
opts.on('-h', '--help',
|
39
|
+
'Show this help message.') { puts opts; exit }
|
40
40
|
|
41
41
|
opts.parse!
|
42
42
|
end
|
@@ -58,17 +58,17 @@ class Passer_i < POA::Passer
|
|
58
58
|
|
59
59
|
# Create the root node.
|
60
60
|
sn = StringNode.new
|
61
|
-
sn.name =
|
61
|
+
sn.name = 'RootNode'
|
62
62
|
tc.root = sn
|
63
63
|
|
64
64
|
# Create the left leaf.
|
65
65
|
l_dummy = StringNode.new
|
66
|
-
l_dummy.name =
|
66
|
+
l_dummy.name = 'LeftNode'
|
67
67
|
sn.left = l_dummy
|
68
68
|
|
69
69
|
# Create the right leaf.
|
70
70
|
r_dummy = StringNode.new
|
71
|
-
r_dummy.name =
|
71
|
+
r_dummy.name = 'RightNode'
|
72
72
|
sn.right = r_dummy
|
73
73
|
|
74
74
|
[tc]
|
@@ -77,9 +77,9 @@ class Passer_i < POA::Passer
|
|
77
77
|
def shutdown ()
|
78
78
|
@orb.shutdown()
|
79
79
|
end
|
80
|
-
end #of servant Passer_i
|
80
|
+
end # of servant Passer_i
|
81
81
|
|
82
|
-
orb = CORBA.ORB_init([
|
82
|
+
orb = CORBA.ORB_init(['-ORBDebugLevel', OPTIONS[:orb_debuglevel]], 'myORB')
|
83
83
|
|
84
84
|
# make sure valuetype factories are registered
|
85
85
|
BaseNodeFactory.get_factory(orb)
|
@@ -105,7 +105,7 @@ open(OPTIONS[:iorfile], 'w') { |io|
|
|
105
105
|
}
|
106
106
|
|
107
107
|
Signal.trap('INT') do
|
108
|
-
puts
|
108
|
+
puts 'SIGINT - shutting down ORB...'
|
109
109
|
orb.shutdown()
|
110
110
|
end
|
111
111
|
|
@@ -23,22 +23,22 @@ ARGV.options do |opts|
|
|
23
23
|
script_name = File.basename($0)
|
24
24
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
25
25
|
|
26
|
-
opts.separator
|
26
|
+
opts.separator ''
|
27
27
|
|
28
|
-
opts.on(
|
29
|
-
|
28
|
+
opts.on('--k IORFILE',
|
29
|
+
'Set IOR.',
|
30
30
|
"Default: 'file://server.ior'") { |v| OPTIONS[:iorfile] = v }
|
31
|
-
opts.on(
|
32
|
-
|
33
|
-
|
34
|
-
opts.on(
|
35
|
-
|
36
|
-
|
31
|
+
opts.on('--d LVL',
|
32
|
+
'Set ORBDebugLevel value.',
|
33
|
+
'Default: 0') { |v| OPTIONS[:orb_debuglevel] = v }
|
34
|
+
opts.on('--use-implement',
|
35
|
+
'Load IDL through CORBA.implement() instead of precompiled code.',
|
36
|
+
'Default: off') { |v| OPTIONS[:use_implement] = v }
|
37
37
|
|
38
|
-
opts.separator
|
38
|
+
opts.separator ''
|
39
39
|
|
40
|
-
opts.on(
|
41
|
-
|
40
|
+
opts.on('-h', '--help',
|
41
|
+
'Show this help message.') { puts opts; exit }
|
42
42
|
|
43
43
|
opts.parse!
|
44
44
|
end
|
@@ -50,7 +50,7 @@ else
|
|
50
50
|
require 'ExtraC'
|
51
51
|
end
|
52
52
|
|
53
|
-
orb = CORBA.ORB_init([
|
53
|
+
orb = CORBA.ORB_init(['-ORBDebugLevel', OPTIONS[:orb_debuglevel]], 'myORB')
|
54
54
|
|
55
55
|
begin
|
56
56
|
# make sure valuetype factories are registered
|
@@ -69,7 +69,7 @@ begin
|
|
69
69
|
assert_not 'Object reference is nil.', CORBA::is_nil(tester)
|
70
70
|
|
71
71
|
if defined?(JRUBY_VERSION)
|
72
|
-
STDERR.puts
|
72
|
+
STDERR.puts 'Skipping. Value type truncation currently not properly supported by JacORB!'
|
73
73
|
tester.shutdown
|
74
74
|
exit 0
|
75
75
|
end
|
@@ -79,13 +79,13 @@ begin
|
|
79
79
|
v1.basic_data = 9
|
80
80
|
v1.data1 = 99
|
81
81
|
|
82
|
-
desc =
|
82
|
+
desc = 'A<-tB, truncate B to A'
|
83
83
|
STDERR.print "Case 1: #{desc}: "
|
84
84
|
|
85
|
-
ov1, odesc = tester.op1(
|
85
|
+
ov1, odesc = tester.op1('case1', v1, desc)
|
86
86
|
|
87
87
|
assert '\nERROR: tester.op1 desc FAILED', odesc == "case1: #{desc}"
|
88
|
-
assert '\nERROR: tester.op1 ov FAILED'
|
88
|
+
assert '\nERROR: tester.op1 ov FAILED', v1.basic_data == ov1.basic_data
|
89
89
|
|
90
90
|
STDERR.puts 'passed'
|
91
91
|
|
@@ -95,23 +95,23 @@ begin
|
|
95
95
|
v2.data1 = 99
|
96
96
|
v2.data2 = 99 * 2
|
97
97
|
|
98
|
-
desc =
|
98
|
+
desc = 'A<-tB<-tC, truncate C to A'
|
99
99
|
STDERR.print "Case 2: #{desc}: "
|
100
100
|
|
101
|
-
ov2, odesc = tester.op1(
|
101
|
+
ov2, odesc = tester.op1('case2', v2, desc)
|
102
102
|
|
103
103
|
assert '\nERROR: tester.op1 - 2 desc FAILED', odesc == "case2: #{desc}"
|
104
|
-
assert '\nERROR: tester.op1 - 2 ov FAILED'
|
104
|
+
assert '\nERROR: tester.op1 - 2 ov FAILED', v2.basic_data == ov2.basic_data
|
105
105
|
STDERR.puts 'passed'
|
106
106
|
|
107
|
-
desc =
|
107
|
+
desc = 'A<-tB<-tC, truncate C to B'
|
108
108
|
STDERR.print "Case 2b: #{desc}: "
|
109
109
|
|
110
|
-
otv1, odesc = tester.op2(v2,
|
110
|
+
otv1, odesc = tester.op2(v2, 'case2b', desc)
|
111
111
|
|
112
112
|
assert '\nERROR: tester.op2 - 2b desc FAILED', odesc == "case2b: #{desc}"
|
113
|
-
assert '\nERROR: tester.op2 - 2b otv1 FAILED'
|
114
|
-
assert '\nERROR: tester.op2 - 2b otv1 FAILED'
|
113
|
+
assert '\nERROR: tester.op2 - 2b otv1 FAILED', v2.basic_data == otv1.basic_data
|
114
|
+
assert '\nERROR: tester.op2 - 2b otv1 FAILED', v2.data1 == otv1.data1
|
115
115
|
STDERR.puts 'passed'
|
116
116
|
|
117
117
|
# 3.
|
@@ -119,14 +119,14 @@ begin
|
|
119
119
|
itv1b.basic_data = 7
|
120
120
|
itv1b.data1 = 8
|
121
121
|
|
122
|
-
desc =
|
122
|
+
desc = 'A<-tB, truncatable but no truncation'
|
123
123
|
STDERR.print "Case 3: #{desc}: "
|
124
124
|
|
125
|
-
otv1b, odesc = tester.op2(itv1b,
|
125
|
+
otv1b, odesc = tester.op2(itv1b, 'case3', desc)
|
126
126
|
|
127
127
|
assert '\nERROR: tester.op2 - 3 desc FAILED', odesc == "case3: #{desc}"
|
128
|
-
assert '\nERROR: tester.op2 - 3 otv1b FAILED'
|
129
|
-
assert '\nERROR: tester.op2 - 3 otv1b FAILED'
|
128
|
+
assert '\nERROR: tester.op2 - 3 otv1b FAILED', itv1b.basic_data == otv1b.basic_data
|
129
|
+
assert '\nERROR: tester.op2 - 3 otv1b FAILED', itv1b.data1 == otv1b.data1
|
130
130
|
STDERR.puts 'passed'
|
131
131
|
|
132
132
|
# 4.
|
@@ -136,9 +136,9 @@ begin
|
|
136
136
|
v3.data3 = (99 * 3)
|
137
137
|
|
138
138
|
begin
|
139
|
-
desc =
|
139
|
+
desc = 'A<-tB<-C, try truncate C to A, MARSHAL exception'
|
140
140
|
STDERR.print "Case 4: #{desc}: "
|
141
|
-
ov3, odesc = tester.op1(
|
141
|
+
ov3, odesc = tester.op1('case4', v3, desc)
|
142
142
|
STDERR.puts 'failed'
|
143
143
|
rescue CORBA::MARSHAL
|
144
144
|
STDERR.puts 'passed'
|
@@ -153,39 +153,39 @@ begin
|
|
153
153
|
v5.basic_data = 9
|
154
154
|
v5.nv4 = nv
|
155
155
|
v5.data4 = (99 * 4)
|
156
|
-
v5.str1 =
|
156
|
+
v5.str1 = 'str1'
|
157
157
|
v5.data5 = (99 * 5)
|
158
158
|
v5.nv5 = nv
|
159
|
-
v5.str2 =
|
159
|
+
v5.str2 = 'str2'
|
160
160
|
|
161
|
-
desc =
|
161
|
+
desc = 'A<-tB<-tC, B & C have nested value type, truncate C to A'
|
162
162
|
STDERR.print "Case 5: #{desc}: "
|
163
|
-
ov5, odesc = tester.op1(
|
163
|
+
ov5, odesc = tester.op1('case5', v5, desc)
|
164
164
|
|
165
165
|
assert '\nERROR: tester.op1 - 5 desc FAILED', odesc == "case5: #{desc}"
|
166
|
-
assert '\nERROR: tester.op1 - 5 ov5 FAILED'
|
166
|
+
assert '\nERROR: tester.op1 - 5 ov5 FAILED', v5.basic_data == ov5.basic_data
|
167
167
|
STDERR.puts 'passed'
|
168
168
|
|
169
|
-
desc =
|
169
|
+
desc = 'A<-tB<-tC, B & C have nested value type, truncate C to B'
|
170
170
|
STDERR.print "Case 5b: #{desc}: "
|
171
|
-
otv4, odesc = tester.op3(
|
171
|
+
otv4, odesc = tester.op3('case5b', v5, desc)
|
172
172
|
|
173
173
|
assert '\nERROR: tester.op3 - 5b desc FAILED', odesc == "case5b: #{desc}"
|
174
|
-
assert '\nERROR: tester.op3 - 5b otv4 FAILED'
|
175
|
-
assert '\nERROR: tester.op3 - 5b otv4.nv4 FAILED'
|
176
|
-
assert '\nERROR: tester.op3 - 5b otv4.data4 FAILED'
|
174
|
+
assert '\nERROR: tester.op3 - 5b otv4 FAILED', v5.basic_data == otv4.basic_data
|
175
|
+
assert '\nERROR: tester.op3 - 5b otv4.nv4 FAILED', v5.nv4.data == otv4.nv4.data
|
176
|
+
assert '\nERROR: tester.op3 - 5b otv4.data4 FAILED', v5.data4 == otv4.data4
|
177
177
|
STDERR.puts 'passed'
|
178
178
|
|
179
179
|
# 6.
|
180
180
|
iv = OBV_TruncatableTest::TValue6.new
|
181
181
|
iv.basic_data = 9
|
182
182
|
|
183
|
-
desc =
|
183
|
+
desc = 'A<-tB, B has no data, truncate B to A'
|
184
184
|
STDERR.print "Case 6: #{desc}: "
|
185
|
-
ov, odesc = tester.op1(
|
185
|
+
ov, odesc = tester.op1('case6', iv, desc)
|
186
186
|
|
187
187
|
assert '\nERROR: tester.op1 - 6 desc FAILED', odesc == "case6: #{desc}"
|
188
|
-
assert '\nERROR: tester.op1 - 6 ov FAILED'
|
188
|
+
assert '\nERROR: tester.op1 - 6 ov FAILED', iv.basic_data == ov.basic_data
|
189
189
|
STDERR.puts 'passed'
|
190
190
|
|
191
191
|
# 7.
|
@@ -210,15 +210,15 @@ begin
|
|
210
210
|
v3.nv4 = nv
|
211
211
|
v3.data4 = 66
|
212
212
|
|
213
|
-
desc =
|
214
|
-
|
213
|
+
desc = 'multiple IN truncatable valuetype parameters' +
|
214
|
+
' and return truncatable valuetype'
|
215
215
|
STDERR.print "Case 7: #{desc}: "
|
216
|
-
ov, odesc = tester.op4(
|
216
|
+
ov, odesc = tester.op4('case7', v1, 5, v2, v3, v4, desc)
|
217
217
|
|
218
218
|
assert '\nERROR: tester.op4 - 7 desc FAILED', odesc == "case7: #{desc}"
|
219
219
|
total = 5 * (v1.basic_data + v2.basic_data +
|
220
220
|
v3.basic_data + v4.basic_data)
|
221
|
-
assert '\nERROR: tester.op4 - 7 ov FAILED'
|
221
|
+
assert '\nERROR: tester.op4 - 7 ov FAILED', total == ov.basic_data
|
222
222
|
STDERR.puts 'passed'
|
223
223
|
|
224
224
|
# 8.
|
@@ -227,12 +227,12 @@ begin
|
|
227
227
|
v1.data1 = 99
|
228
228
|
v1.edata1 = 1234
|
229
229
|
|
230
|
-
desc =
|
230
|
+
desc = 'A<-tB, truncate unknown B to A'
|
231
231
|
STDERR.print "Case 8: #{desc}: "
|
232
|
-
ov1, odesc = tester.op2(v1,
|
232
|
+
ov1, odesc = tester.op2(v1, 'case8', desc)
|
233
233
|
|
234
234
|
assert '\nERROR: tester.op2 - 8 desc FAILED', odesc == "case8: #{desc}"
|
235
|
-
assert '\nERROR: tester.op2 - 8 ov1 FAILED'
|
235
|
+
assert '\nERROR: tester.op2 - 8 ov1 FAILED', v1.basic_data == ov1.basic_data &&
|
236
236
|
v1.data1 == ov1.data1
|
237
237
|
STDERR.puts 'passed'
|
238
238
|
|
@@ -242,12 +242,12 @@ begin
|
|
242
242
|
v1.data1 = 99
|
243
243
|
|
244
244
|
a = CORBA::Any.to_any(v1)
|
245
|
-
desc =
|
245
|
+
desc = 'A<-tB, known truncatable via Any'
|
246
246
|
STDERR.print "Case 9: #{desc}: "
|
247
|
-
ov1, odesc = tester.op5(a,
|
247
|
+
ov1, odesc = tester.op5(a, 'case9', desc)
|
248
248
|
|
249
249
|
assert '\nERROR: tester.op5 - 9 desc FAILED', odesc == "case9: #{desc}"
|
250
|
-
assert '\nERROR: tester.op5 - 9 ov1 FAILED'
|
250
|
+
assert '\nERROR: tester.op5 - 9 ov1 FAILED', v1.basic_data == ov1.basic_data &&
|
251
251
|
v1.data1 == ov1.data1
|
252
252
|
STDERR.puts 'passed'
|
253
253
|
|
@@ -258,12 +258,12 @@ begin
|
|
258
258
|
v1.edata1 = 1234
|
259
259
|
|
260
260
|
a = CORBA::Any.to_any(v1)
|
261
|
-
desc =
|
261
|
+
desc = 'A<-tB, unknown truncatable via Any'
|
262
262
|
STDERR.print "Case 10: #{desc}: "
|
263
|
-
ov1, odesc = tester.op5(a,
|
263
|
+
ov1, odesc = tester.op5(a, 'case10', desc)
|
264
264
|
|
265
265
|
assert '\nERROR: tester.op5 - 10 desc FAILED', odesc == "case10: #{desc}"
|
266
|
-
assert '\nERROR: tester.op5 - 10 ov1 FAILED'
|
266
|
+
assert '\nERROR: tester.op5 - 10 ov1 FAILED', v1.basic_data == ov1.basic_data &&
|
267
267
|
v1.data1 == ov1.data1
|
268
268
|
STDERR.puts 'passed'
|
269
269
|
|