r2corba 1.5.5 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (165) hide show
  1. checksums.yaml +4 -4
  2. data/ext/libr2tao/any.cpp +11 -10
  3. data/ext/libr2tao/exception.cpp +6 -8
  4. data/ext/libr2tao/exception.h +1 -1
  5. data/ext/libr2tao/longdouble.cpp +5 -9
  6. data/ext/libr2tao/object.cpp +33 -49
  7. data/ext/libr2tao/orb.cpp +38 -65
  8. data/ext/libr2tao/r2tao_ext.h +8 -7
  9. data/ext/libr2tao/required.cpp +1 -6
  10. data/ext/libr2tao/required.h +9 -23
  11. data/ext/libr2tao/values.cpp +92 -93
  12. data/ext/libr2tao/values.h +28 -30
  13. data/ext/librpoa/iortable.cpp +3 -4
  14. data/ext/librpoa/poa.cpp +22 -25
  15. data/ext/librpoa/servant.cpp +24 -23
  16. data/ext/librpoa/servant.h +10 -10
  17. data/lib/corba.rb +1 -1
  18. data/lib/corba/cbase/ORB.rb +19 -16
  19. data/lib/corba/cbase/Request.rb +3 -3
  20. data/lib/corba/cbase/Values.rb +4 -2
  21. data/lib/corba/cbase/exception.rb +4 -2
  22. data/lib/corba/cbase/poa.rb +1 -1
  23. data/lib/corba/cbase/policies.rb +1 -1
  24. data/lib/corba/cbase/require.rb +8 -1
  25. data/lib/corba/common/Any.rb +2 -1
  26. data/lib/corba/common/IDL.rb +1 -1
  27. data/lib/corba/common/ORB.rb +21 -21
  28. data/lib/corba/common/Object.rb +14 -13
  29. data/lib/corba/common/Servant.rb +4 -4
  30. data/lib/corba/common/Stub.rb +6 -6
  31. data/lib/corba/common/Typecode.rb +35 -8
  32. data/lib/corba/common/Union.rb +5 -0
  33. data/lib/corba/common/Values.rb +1 -0
  34. data/lib/corba/common/const.rb +1 -1
  35. data/lib/corba/common/exception.rb +2 -1
  36. data/lib/corba/common/version.rb +2 -2
  37. data/lib/corba/idl/IDL.rb +1 -1
  38. data/lib/corba/jbase/Any.rb +6 -4
  39. data/lib/corba/jbase/ORB.rb +2 -2
  40. data/lib/corba/jbase/Object.rb +13 -13
  41. data/lib/corba/jbase/Request.rb +3 -3
  42. data/lib/corba/jbase/Streams.rb +64 -0
  43. data/lib/corba/jbase/Typecode.rb +3 -2
  44. data/lib/corba/jbase/Values.rb +2 -0
  45. data/lib/corba/jbase/exception.rb +1 -0
  46. data/lib/corba/jbase/poa.rb +18 -18
  47. data/lib/corba/jbase/policies.rb +29 -29
  48. data/lib/corba/jbase/require.rb +4 -0
  49. data/lib/corba/svcs/ins/cos_naming.rb +10 -1
  50. data/lib/corba/svcs/ins/ins.rb +45 -45
  51. data/lib/corba/svcs/ins/naming_service.rb +6 -6
  52. data/lib/ridlbe/ruby/config.rb +27 -20
  53. data/lib/ridlbe/ruby/walker.rb +276 -253
  54. data/mkrf_conf_srcgem.rb +2 -2
  55. data/rakelib/build.rake +1 -1
  56. data/rakelib/config.rake +1 -1
  57. data/rakelib/config.rb +9 -9
  58. data/rakelib/ext.rake +6 -65
  59. data/rakelib/ext_r2tao.rb +2 -39
  60. data/rakelib/gem.rake +20 -20
  61. data/rakelib/gem.rb +1 -1
  62. data/rakelib/package.rake +1 -1
  63. data/test/BiDirectional/client.rb +16 -16
  64. data/test/BiDirectional/run_test.rb +10 -10
  65. data/test/BiDirectional/server.rb +20 -20
  66. data/test/CORBA_Services/Naming/BindingIterator/client.rb +14 -14
  67. data/test/CORBA_Services/Naming/BindingIterator/run_test.rb +12 -12
  68. data/test/CORBA_Services/Naming/BindingIterator/server.rb +17 -17
  69. data/test/CORBA_Services/Naming/Corbaname/client.rb +14 -14
  70. data/test/CORBA_Services/Naming/Corbaname/run_test.rb +12 -12
  71. data/test/CORBA_Services/Naming/Corbaname/server.rb +20 -20
  72. data/test/CORBA_Services/Naming/Simple/client.rb +14 -14
  73. data/test/CORBA_Services/Naming/Simple/run_test.rb +12 -12
  74. data/test/CORBA_Services/Naming/Simple/server.rb +17 -17
  75. data/test/Collocation/run_test.rb +10 -10
  76. data/test/Collocation/test.rb +26 -19
  77. data/test/Connect_Timeout/client.rb +15 -15
  78. data/test/Connect_Timeout/run_test.rb +10 -10
  79. data/test/DII/client.rb +27 -27
  80. data/test/DII/run_test.rb +10 -10
  81. data/test/DII/server.rb +15 -15
  82. data/test/DSI/client.rb +15 -15
  83. data/test/DSI/run_test.rb +10 -10
  84. data/test/DSI/server.rb +16 -16
  85. data/test/Exceptions/client.rb +19 -19
  86. data/test/Exceptions/run_test.rb +10 -10
  87. data/test/Exceptions/server.rb +15 -15
  88. data/test/Hello/client.rb +15 -15
  89. data/test/Hello/run_test.rb +10 -10
  90. data/test/Hello/server.rb +16 -16
  91. data/test/IDL_Test/client.rb +20 -20
  92. data/test/IDL_Test/run_test.rb +10 -10
  93. data/test/IDL_Test/server.rb +18 -18
  94. data/test/IORMap/client.rb +14 -14
  95. data/test/IORMap/run_test.rb +10 -10
  96. data/test/IORMap/server.rb +22 -22
  97. data/test/IORTable/client.rb +14 -14
  98. data/test/IORTable/run_test.rb +10 -10
  99. data/test/IORTable/server.rb +22 -22
  100. data/test/Implicit_Conversion/client.rb +19 -16
  101. data/test/Implicit_Conversion/run_test.rb +10 -10
  102. data/test/Implicit_Conversion/server.rb +15 -15
  103. data/test/Multi_Threading/Multiple_ORB/client.rb +13 -13
  104. data/test/Multi_Threading/Multiple_ORB/run_test.rb +10 -10
  105. data/test/Multi_Threading/Multiple_ORB/server.rb +16 -16
  106. data/test/Multi_Threading/Simple/client.rb +15 -15
  107. data/test/Multi_Threading/Simple/run_test.rb +10 -10
  108. data/test/Multi_Threading/Simple/server.rb +15 -15
  109. data/test/Multi_Threading/Threads/client.rb +15 -15
  110. data/test/Multi_Threading/Threads/run_test.rb +10 -10
  111. data/test/Multi_Threading/Threads/server.rb +17 -17
  112. data/test/Multi_Threading/Threads/watchdog.rb +15 -15
  113. data/test/Multiple_Servant_Interfaces/client.rb +13 -13
  114. data/test/Multiple_Servant_Interfaces/run_test.rb +10 -10
  115. data/test/Multiple_Servant_Interfaces/server.rb +17 -17
  116. data/test/Nil/run_test.rb +10 -10
  117. data/test/Nil/test.rb +13 -13
  118. data/test/OBV/AbstractInterface/client.rb +13 -13
  119. data/test/OBV/AbstractInterface/run_test.rb +10 -10
  120. data/test/OBV/AbstractInterface/server.rb +19 -18
  121. data/test/OBV/Custom/OBV_impl.rb +2 -0
  122. data/test/OBV/Custom/client.rb +13 -13
  123. data/test/OBV/Custom/run_test.rb +10 -10
  124. data/test/OBV/Custom/server.rb +15 -15
  125. data/test/OBV/Simple/OBV_impl.rb +1 -0
  126. data/test/OBV/Simple/client.rb +13 -13
  127. data/test/OBV/Simple/run_test.rb +10 -10
  128. data/test/OBV/Simple/server.rb +15 -15
  129. data/test/OBV/Simple_Event/Event_impl.rb +1 -0
  130. data/test/OBV/Simple_Event/client.rb +13 -13
  131. data/test/OBV/Simple_Event/run_test.rb +10 -10
  132. data/test/OBV/Simple_Event/server.rb +15 -15
  133. data/test/OBV/Supports/client.rb +18 -18
  134. data/test/OBV/Supports/run_test.rb +10 -10
  135. data/test/OBV/Supports/server.rb +14 -14
  136. data/test/OBV/Supports/supports_impl.rb +3 -0
  137. data/test/OBV/Tree/client.rb +13 -13
  138. data/test/OBV/Tree/run_test.rb +10 -10
  139. data/test/OBV/Tree/server.rb +18 -18
  140. data/test/OBV/Truncatable/client.rb +56 -56
  141. data/test/OBV/Truncatable/run_test.rb +10 -10
  142. data/test/OBV/Truncatable/server.rb +14 -14
  143. data/test/OBV/ValueBox/client.rb +148 -147
  144. data/test/OBV/ValueBox/run_test.rb +10 -10
  145. data/test/OBV/ValueBox/server.rb +15 -15
  146. data/test/Object/client.rb +13 -13
  147. data/test/Object/run_test.rb +10 -10
  148. data/test/Object/server.rb +18 -18
  149. data/test/POA/run_test.rb +10 -10
  150. data/test/POA/test.rb +15 -15
  151. data/test/Param_Test/client.rb +47 -47
  152. data/test/Param_Test/run_test.rb +10 -10
  153. data/test/Param_Test/server.rb +55 -55
  154. data/test/Performance/Simple/client.rb +15 -15
  155. data/test/Performance/Simple/run_test.rb +10 -10
  156. data/test/Performance/Simple/server.rb +15 -15
  157. data/test/Policies/run_test.rb +10 -10
  158. data/test/Policies/test.rb +23 -23
  159. data/test/Timeout/client.rb +17 -17
  160. data/test/Timeout/run_test.rb +10 -10
  161. data/test/Timeout/server.rb +18 -18
  162. data/test/lib/test.rb +13 -7
  163. data/test/test_runner.rb +19 -19
  164. metadata +4 -5
  165. data/ext/extload/extload.c +0 -59
@@ -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("--k IORFILE",
29
- "Set IOR.",
28
+ opts.on('--k IORFILE',
29
+ 'Set IOR.',
30
30
  "Default: 'file://server.ior'") { |v| OPTIONS[:iorfile] = v }
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 }
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("-h", "--help",
41
- "Show this help message.") { puts opts; exit }
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(["-ORBDebugLevel", OPTIONS[:orb_debuglevel]], 'myORB')
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 "Skipping. Value type truncation currently not properly supported by JacORB!"
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 = "A<-tB, truncate B to A"
82
+ desc = 'A<-tB, truncate B to A'
83
83
  STDERR.print "Case 1: #{desc}: "
84
84
 
85
- ov1, odesc = tester.op1("case1", v1, desc)
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' , v1.basic_data == ov1.basic_data
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 = "A<-tB<-tC, truncate C to A"
98
+ desc = 'A<-tB<-tC, truncate C to A'
99
99
  STDERR.print "Case 2: #{desc}: "
100
100
 
101
- ov2, odesc = tester.op1("case2", v2, desc)
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' , v2.basic_data == ov2.basic_data
104
+ assert '\nERROR: tester.op1 - 2 ov FAILED', v2.basic_data == ov2.basic_data
105
105
  STDERR.puts 'passed'
106
106
 
107
- desc = "A<-tB<-tC, truncate C to B"
107
+ desc = 'A<-tB<-tC, truncate C to B'
108
108
  STDERR.print "Case 2b: #{desc}: "
109
109
 
110
- otv1, odesc = tester.op2(v2, "case2b", desc)
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' , v2.basic_data == otv1.basic_data
114
- assert '\nERROR: tester.op2 - 2b otv1 FAILED' , v2.data1 == otv1.data1
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 = "A<-tB, truncatable but no truncation"
122
+ desc = 'A<-tB, truncatable but no truncation'
123
123
  STDERR.print "Case 3: #{desc}: "
124
124
 
125
- otv1b, odesc = tester.op2(itv1b, "case3", desc)
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' , itv1b.basic_data == otv1b.basic_data
129
- assert '\nERROR: tester.op2 - 3 otv1b FAILED' , itv1b.data1 == otv1b.data1
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 = "A<-tB<-C, try truncate C to A, MARSHAL exception"
139
+ desc = 'A<-tB<-C, try truncate C to A, MARSHAL exception'
140
140
  STDERR.print "Case 4: #{desc}: "
141
- ov3, odesc = tester.op1("case4", v3, desc)
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 = "str1"
156
+ v5.str1 = 'str1'
157
157
  v5.data5 = (99 * 5)
158
158
  v5.nv5 = nv
159
- v5.str2 = "str2"
159
+ v5.str2 = 'str2'
160
160
 
161
- desc = "A<-tB<-tC, B & C have nested value type, truncate C to A"
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("case5", v5, desc)
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' , v5.basic_data == ov5.basic_data
166
+ assert '\nERROR: tester.op1 - 5 ov5 FAILED', v5.basic_data == ov5.basic_data
167
167
  STDERR.puts 'passed'
168
168
 
169
- desc = "A<-tB<-tC, B & C have nested value type, truncate C to B"
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("case5b", v5, desc)
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' , 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
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 = "A<-tB, B has no data, truncate B to A"
183
+ desc = 'A<-tB, B has no data, truncate B to A'
184
184
  STDERR.print "Case 6: #{desc}: "
185
- ov, odesc = tester.op1("case6", iv, desc)
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' , iv.basic_data == ov.basic_data
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 = "multiple IN truncatable valuetype parameters" +
214
- " and return truncatable valuetype"
213
+ desc = 'multiple IN truncatable valuetype parameters' +
214
+ ' and return truncatable valuetype'
215
215
  STDERR.print "Case 7: #{desc}: "
216
- ov, odesc = tester.op4("case7", v1, 5, v2, v3, v4, desc)
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' , total == ov.basic_data
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 = "A<-tB, truncate unknown B to A"
230
+ desc = 'A<-tB, truncate unknown B to A'
231
231
  STDERR.print "Case 8: #{desc}: "
232
- ov1, odesc = tester.op2(v1, "case8", desc)
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' , v1.basic_data == ov1.basic_data &&
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 = "A<-tB, known truncatable via Any"
245
+ desc = 'A<-tB, known truncatable via Any'
246
246
  STDERR.print "Case 9: #{desc}: "
247
- ov1, odesc = tester.op5(a, "case9", desc)
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' , v1.basic_data == ov1.basic_data &&
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 = "A<-tB, unknown truncatable via Any"
261
+ desc = 'A<-tB, unknown truncatable via Any'
262
262
  STDERR.print "Case 10: #{desc}: "
263
- ov1, odesc = tester.op5(a, "case10", desc)
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' , v1.basic_data == ov1.basic_data &&
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
 
@@ -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("-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] = '' }
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("-h", "--help",
35
- "Show this help message.") { puts opts; exit }
34
+ opts.on('-h', '--help',
35
+ 'Show this help message.') { puts opts; exit }
36
36
 
37
37
  opts.parse!
38
38
  end
@@ -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("--o IORFILE",
27
- "Set IOR filename.",
26
+ opts.on('--o IORFILE',
27
+ 'Set IOR filename.',
28
28
  "Default: 'server.ior'") { |v| OPTIONS[:iorfile] = v }
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 }
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("-h", "--help",
39
- "Show this help message.") { puts opts; exit }
38
+ opts.on('-h', '--help',
39
+ 'Show this help message.') { puts opts; exit }
40
40
 
41
41
  opts.parse!
42
42
  end
@@ -50,7 +50,7 @@ end
50
50
 
51
51
  require 'Truncatable_impl'
52
52
 
53
- orb = CORBA.ORB_init(["-ORBDebugLevel", OPTIONS[:orb_debuglevel]], 'myORB')
53
+ orb = CORBA.ORB_init(['-ORBDebugLevel', OPTIONS[:orb_debuglevel]], 'myORB')
54
54
 
55
55
  # make sure valuetype factories are registered
56
56
  OBV_TruncatableTest::BaseValueFactory.get_factory(orb)
@@ -77,7 +77,7 @@ open(OPTIONS[:iorfile], 'w') { |io|
77
77
  }
78
78
 
79
79
  Signal.trap('INT') do
80
- puts "SIGINT - shutting down ORB..."
80
+ puts 'SIGINT - shutting down ORB...'
81
81
  orb.shutdown()
82
82
  end
83
83
 
@@ -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("--k IORFILE",
29
- "Set IOR.",
28
+ opts.on('--k IORFILE',
29
+ 'Set IOR.',
30
30
  "Default: 'file://server.ior'") { |v| OPTIONS[:iorfile] = v }
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 }
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("-h", "--help",
41
- "Show this help message.") { puts opts; exit }
40
+ opts.on('-h', '--help',
41
+ 'Show this help message.') { puts opts; exit }
42
42
 
43
43
  opts.parse!
44
44
  end
@@ -64,9 +64,9 @@ module Test
64
64
  STDERR.puts '*** basic_op1 (1)'
65
65
  retval, p2_out, p3_out = test.basic_op1(p1, p2)
66
66
 
67
- assert "basic_invocations:1 failed", (p2_out == (53 * 3))
68
- assert "basic_invocations:1 failed", (p3_out == (53 * 5))
69
- assert "basic_invocations:1 failed", (retval == (p1.value * 3))
67
+ assert 'basic_invocations:1 failed', (p2_out == (53 * 3))
68
+ assert 'basic_invocations:1 failed', (p3_out == (53 * 5))
69
+ assert 'basic_invocations:1 failed', (retval == (p1.value * 3))
70
70
 
71
71
  # test boxed value using implicit conversion of Ruby types
72
72
  p1 = 25
@@ -78,9 +78,9 @@ module Test
78
78
  STDERR.puts '*** basic_op1 (2)'
79
79
  retval, p2_out, p3_out = test.basic_op1(p1, p2)
80
80
 
81
- assert "basic_invocations:2 failed", (p2_out == (53 * 3))
82
- assert "basic_invocations:2 failed", (p3_out == (53 * 5))
83
- assert "basic_invocations:2 failed", (retval == (p1 * 3))
81
+ assert 'basic_invocations:2 failed', (p2_out == (53 * 3))
82
+ assert 'basic_invocations:2 failed', (p3_out == (53 * 5))
83
+ assert 'basic_invocations:2 failed', (retval == (p1 * 3))
84
84
 
85
85
  # test boxed value using nil
86
86
  p1 = nil
@@ -92,9 +92,9 @@ module Test
92
92
  STDERR.puts '*** basic_op1 (3)'
93
93
  retval, p2_out, p3_out = test.basic_op1(p1, p2)
94
94
 
95
- assert "basic_invocations:2 failed", (p2_out == (53 * 3))
96
- assert "basic_invocations:2 failed", (p3_out == (53 * 5))
97
- assert "basic_invocations:2 failed", (retval.nil?)
95
+ assert 'basic_invocations:2 failed', (p2_out == (53 * 3))
96
+ assert 'basic_invocations:2 failed', (p3_out == (53 * 5))
97
+ assert 'basic_invocations:2 failed', (retval.nil?)
98
98
 
99
99
  # test boxed value from nested module
100
100
  p1 = Vb_basic::M_VBlong.new(25) # explicit value box
@@ -105,9 +105,9 @@ module Test
105
105
 
106
106
  retval, p2_out, p3_out = test.basic_op2(p1, p2)
107
107
 
108
- assert "basic_invocations:3 failed", (p2_out == (53 * 3))
109
- assert "basic_invocations:3 failed", (p3_out == (53 * 5))
110
- assert "basic_invocations:3 failed", (retval == (p1.value * 3))
108
+ assert 'basic_invocations:3 failed', (p2_out == (53 * 3))
109
+ assert 'basic_invocations:3 failed', (p3_out == (53 * 5))
110
+ assert 'basic_invocations:3 failed', (retval == (p1.value * 3))
111
111
 
112
112
  # test regular Ruby types using values from valueboxes
113
113
  p1 = VBlong.new(25)
@@ -118,71 +118,71 @@ module Test
118
118
 
119
119
  retval, p2_out, p3_out = test.basic_op3(p1.value, p2.value)
120
120
 
121
- assert "basic_invocations:4 failed", (p2_out == (53 * 3))
122
- assert "basic_invocations:4 failed", (p3_out == (53 * 5))
123
- assert "basic_invocations:4 failed", (retval == (p1.value * 3))
121
+ assert 'basic_invocations:4 failed', (p2_out == (53 * 3))
122
+ assert 'basic_invocations:4 failed', (p3_out == (53 * 5))
123
+ assert 'basic_invocations:4 failed', (retval == (p1.value * 3))
124
124
  end
125
125
 
126
126
  def Test.boxed_string_invocations(test)
127
- string1 = "First-string"
128
- string2 = "Second-string"
127
+ string1 = 'First-string'
128
+ string2 = 'Second-string'
129
129
 
130
130
  # Establish that we have data setup correctly...
131
- assert "boxed_string_invocations:0 failed", (string1 < string2)
132
- assert "boxed_string_invocations:0 failed", (string2 > string1)
133
- assert "boxed_string_invocations:0 failed", (string1 == string1)
131
+ assert 'boxed_string_invocations:0 failed', (string1 < string2)
132
+ assert 'boxed_string_invocations:0 failed', (string2 > string1)
133
+ assert 'boxed_string_invocations:0 failed', (string1 == string1)
134
134
 
135
135
  # create valueboxes
136
136
  vbstring1 = VBstring.new(string1.dup)
137
137
  vbstring2 = VBstring.new(string1.dup)
138
138
 
139
139
  # check valuebox correctness
140
- assert "boxed_string_invocations:1 failed", (vbstring1.value == string1)
141
- assert "boxed_string_invocations:1 failed", (vbstring2.value == string1)
140
+ assert 'boxed_string_invocations:1 failed', (vbstring1.value == string1)
141
+ assert 'boxed_string_invocations:1 failed', (vbstring2.value == string1)
142
142
 
143
143
  # test value modifier
144
144
  vbstring2.value = string2.dup
145
- assert "boxed_string_invocations:2 failed", (vbstring2.value == string2)
145
+ assert 'boxed_string_invocations:2 failed', (vbstring2.value == string2)
146
146
 
147
147
  # test invocation with value boxes
148
148
  p1 = VBstring.new('string1')
149
149
  p2 = VBstring.new('string2')
150
- assert "boxed_string_invocations:3 failed", (p1.value == 'string1')
151
- assert "boxed_string_invocations:3 failed", (p2.value == 'string2')
150
+ assert 'boxed_string_invocations:3 failed', (p1.value == 'string1')
151
+ assert 'boxed_string_invocations:3 failed', (p2.value == 'string2')
152
152
 
153
153
  p2_out = nil
154
154
  p3_out = nil
155
155
  retval = nil
156
156
  retval, p2_out, p3_out = test.string_op1(p1, p2)
157
157
 
158
- assert "boxed_string_invocations:4 failed", (p2_out == '2string')
159
- assert "boxed_string_invocations:4 failed", (p3_out == '2string')
160
- assert "boxed_string_invocations:4 failed", (retval == '1string')
158
+ assert 'boxed_string_invocations:4 failed', (p2_out == '2string')
159
+ assert 'boxed_string_invocations:4 failed', (p3_out == '2string')
160
+ assert 'boxed_string_invocations:4 failed', (retval == '1string')
161
161
 
162
162
  # test invocation with Ruby types using valuebox values
163
- assert "boxed_string_invocations:3 failed", (p1.value == 'string1')
164
- assert "boxed_string_invocations:3 failed", (p2.value == 'string2')
163
+ assert 'boxed_string_invocations:3 failed', (p1.value == 'string1')
164
+ assert 'boxed_string_invocations:3 failed', (p2.value == 'string2')
165
165
 
166
166
  p2_out = nil
167
167
  p3_out = nil
168
168
  retval = nil
169
169
  retval, p2_out, p3_out = test.string_op2(p1.value, p2.value)
170
170
 
171
- assert "boxed_string_invocations:4 failed", (p2_out == '2string')
172
- assert "boxed_string_invocations:4 failed", (p3_out == '2string')
173
- assert "boxed_string_invocations:4 failed", (retval == '1string')
171
+ assert 'boxed_string_invocations:4 failed', (p2_out == '2string')
172
+ assert 'boxed_string_invocations:4 failed', (p3_out == '2string')
173
+ assert 'boxed_string_invocations:4 failed', (retval == '1string')
174
174
  end
175
175
 
176
176
  def Test.boxed_sequence_invocations(test)
177
177
  # basic test
178
178
  p1 = VBseqlong.new([101, 202, 303])
179
- assert "boxed_sequence_invocations:0 failed", (p1.value[0] == 101 && p1.value[2] == 303)
179
+ assert 'boxed_sequence_invocations:0 failed', (p1.value[0] == 101 && p1.value[2] == 303)
180
180
 
181
181
  # test invocation with value boxes
182
182
  p1 = VBseqlong.new([10, 9, 8, 7])
183
183
  p2 = VBseqlong.new([100, 99, 98])
184
- assert "boxed_sequence_invocations:1 failed", (p1.value[0] == 10 && p1.value[3] == 7)
185
- assert "boxed_sequence_invocations:1 failed", (p2.value[0] == 100 && p2.value[2] == 98)
184
+ assert 'boxed_sequence_invocations:1 failed', (p1.value[0] == 10 && p1.value[3] == 7)
185
+ assert 'boxed_sequence_invocations:1 failed', (p2.value[0] == 100 && p2.value[2] == 98)
186
186
 
187
187
  p2_out = nil
188
188
  p3_out = nil
@@ -190,13 +190,13 @@ module Test
190
190
  retval, p2_out, p3_out = test.seq_op1(p1, p2)
191
191
 
192
192
  p2.value().each_with_index do |e, i|
193
- assert "boxed_sequence_invocations:2 failed", (p2_out[i] == e * 3)
193
+ assert 'boxed_sequence_invocations:2 failed', (p2_out[i] == e * 3)
194
194
  end
195
195
  p2.value().each_with_index do |e, i|
196
- assert "boxed_sequence_invocations:2 failed", (p3_out[i] == e * 5)
196
+ assert 'boxed_sequence_invocations:2 failed', (p3_out[i] == e * 5)
197
197
  end
198
198
  p1.value().each_with_index do |e, i|
199
- assert "boxed_sequence_invocations:2 failed", (retval[i] == e)
199
+ assert 'boxed_sequence_invocations:2 failed', (retval[i] == e)
200
200
  end
201
201
 
202
202
  # test invocation with Ruby types using valuebox values
@@ -205,10 +205,10 @@ module Test
205
205
  p2_out, p3_out = test.seq_op2(p1.value, p2.value)
206
206
 
207
207
  p2.value().each_with_index do |e, i|
208
- assert "boxed_sequence_invocations:3 failed", (p2_out[i] == e * 3)
208
+ assert 'boxed_sequence_invocations:3 failed', (p2_out[i] == e * 3)
209
209
  end
210
210
  p2.value().each_with_index do |e, i|
211
- assert "boxed_sequence_invocations:3 failed", (p3_out[i] == e * 5)
211
+ assert 'boxed_sequence_invocations:3 failed', (p3_out[i] == e * 5)
212
212
  end
213
213
  end
214
214
 
@@ -218,9 +218,9 @@ module Test
218
218
  Fixed_Struct1.new(29,
219
219
  Fixed_Struct1::Bstruct.new(117, 21)))
220
220
 
221
- assert "boxed_struct_invocations:0 failed", (p1.value.is_a?(Fixed_Struct1))
222
- assert "boxed_struct_invocations:0 failed", (p1.value.l == 29)
223
- assert "boxed_struct_invocations:0 failed", (p1.value.abstruct.s1 == 117 && p1.value.abstruct.s2 == 21)
221
+ assert 'boxed_struct_invocations:0 failed', (p1.value.is_a?(Fixed_Struct1))
222
+ assert 'boxed_struct_invocations:0 failed', (p1.value.l == 29)
223
+ assert 'boxed_struct_invocations:0 failed', (p1.value.abstruct.s1 == 117 && p1.value.abstruct.s2 == 21)
224
224
 
225
225
  # test invocation with valueboxes
226
226
  p2 = VBfixed_struct1.new(
@@ -231,81 +231,81 @@ module Test
231
231
  retval = nil
232
232
  retval, p2_out, p3_out = test.struct_op1(p1, p2)
233
233
 
234
- assert "boxed_struct_invocations:1 failed", (p2_out.is_a?(Fixed_Struct1))
235
- assert "boxed_struct_invocations:1 failed", (p2_out.l == (92 * 3))
236
- assert "boxed_struct_invocations:1 failed", (p2_out.abstruct.s1 == (171 * 3) &&
234
+ assert 'boxed_struct_invocations:1 failed', (p2_out.is_a?(Fixed_Struct1))
235
+ assert 'boxed_struct_invocations:1 failed', (p2_out.l == (92 * 3))
236
+ assert 'boxed_struct_invocations:1 failed', (p2_out.abstruct.s1 == (171 * 3) &&
237
237
  p2_out.abstruct.s2 == (12 * 3))
238
238
 
239
- assert "boxed_struct_invocations:1 failed", (p3_out.is_a?(Fixed_Struct1))
240
- assert "boxed_struct_invocations:1 failed", (p3_out.l == (92 * 5))
241
- assert "boxed_struct_invocations:1 failed", (p3_out.abstruct.s1 == (171 * 5) &&
239
+ assert 'boxed_struct_invocations:1 failed', (p3_out.is_a?(Fixed_Struct1))
240
+ assert 'boxed_struct_invocations:1 failed', (p3_out.l == (92 * 5))
241
+ assert 'boxed_struct_invocations:1 failed', (p3_out.abstruct.s1 == (171 * 5) &&
242
242
  p3_out.abstruct.s2 == (12 * 5))
243
243
 
244
- assert "boxed_struct_invocations:1 failed", (retval.is_a?(Fixed_Struct1))
245
- assert "boxed_struct_invocations:1 failed", (retval.l == p1.value.l)
246
- assert "boxed_struct_invocations:1 failed", (retval.abstruct.s1 == p1.value.abstruct.s1 &&
244
+ assert 'boxed_struct_invocations:1 failed', (retval.is_a?(Fixed_Struct1))
245
+ assert 'boxed_struct_invocations:1 failed', (retval.l == p1.value.l)
246
+ assert 'boxed_struct_invocations:1 failed', (retval.abstruct.s1 == p1.value.abstruct.s1 &&
247
247
  retval.abstruct.s2 == p1.value.abstruct.s2)
248
248
 
249
249
  # test invocation with Ruby types using valuebox values
250
250
  p2_out, p3_out = test.struct_op2(p1.value, p2_out)
251
251
 
252
- assert "boxed_struct_invocations:2 failed", (p2_out.is_a?(Fixed_Struct1))
253
- assert "boxed_struct_invocations:2 failed", (p2_out.l == (92 * 3 * 3))
254
- assert "boxed_struct_invocations:2 failed", (p2_out.abstruct.s1 == (171 * 3 * 3) &&
252
+ assert 'boxed_struct_invocations:2 failed', (p2_out.is_a?(Fixed_Struct1))
253
+ assert 'boxed_struct_invocations:2 failed', (p2_out.l == (92 * 3 * 3))
254
+ assert 'boxed_struct_invocations:2 failed', (p2_out.abstruct.s1 == (171 * 3 * 3) &&
255
255
  p2_out.abstruct.s2 == (12 * 3 * 3))
256
256
 
257
- assert "boxed_struct_invocations:2 failed", (p3_out.is_a?(Fixed_Struct1))
258
- assert "boxed_struct_invocations:2 failed", (p3_out.l == p1.value.l)
259
- assert "boxed_struct_invocations:2 failed", (p3_out.abstruct.s1 == p1.value.abstruct.s1 &&
257
+ assert 'boxed_struct_invocations:2 failed', (p3_out.is_a?(Fixed_Struct1))
258
+ assert 'boxed_struct_invocations:2 failed', (p3_out.l == p1.value.l)
259
+ assert 'boxed_struct_invocations:2 failed', (p3_out.abstruct.s1 == p1.value.abstruct.s1 &&
260
260
  p3_out.abstruct.s2 == p1.value.abstruct.s2)
261
261
 
262
262
  # test invocation with valueboxes
263
263
  p1 = VBvariable_struct1.new(Variable_Struct1.new(29, 'variable1'))
264
264
  p2 = VBvariable_struct1.new(Variable_Struct1.new(37, 'variable2'))
265
265
 
266
- assert "boxed_struct_invocations:3 failed", (p1.value.is_a?(Variable_Struct1))
267
- assert "boxed_struct_invocations:3 failed", (p1.value.l == 29)
268
- assert "boxed_struct_invocations:3 failed", (p1.value.str == 'variable1')
266
+ assert 'boxed_struct_invocations:3 failed', (p1.value.is_a?(Variable_Struct1))
267
+ assert 'boxed_struct_invocations:3 failed', (p1.value.l == 29)
268
+ assert 'boxed_struct_invocations:3 failed', (p1.value.str == 'variable1')
269
269
 
270
270
  p2_out = nil
271
271
  p3_out = nil
272
272
  retval = nil
273
273
  retval, p2_out, p3_out = test.struct_op3(p1, p2)
274
274
 
275
- assert "boxed_struct_invocations:4 failed", (p2_out.is_a?(Variable_Struct1))
276
- assert "boxed_struct_invocations:4 failed", (p2_out.l == (37 * 3))
277
- assert "boxed_struct_invocations:4 failed", (p2_out.str == '2variable')
275
+ assert 'boxed_struct_invocations:4 failed', (p2_out.is_a?(Variable_Struct1))
276
+ assert 'boxed_struct_invocations:4 failed', (p2_out.l == (37 * 3))
277
+ assert 'boxed_struct_invocations:4 failed', (p2_out.str == '2variable')
278
278
 
279
- assert "boxed_struct_invocations:4 failed", (p3_out.is_a?(Variable_Struct1))
280
- assert "boxed_struct_invocations:4 failed", (p3_out.l == (37 * 3))
281
- assert "boxed_struct_invocations:4 failed", (p3_out.str == '2variable')
279
+ assert 'boxed_struct_invocations:4 failed', (p3_out.is_a?(Variable_Struct1))
280
+ assert 'boxed_struct_invocations:4 failed', (p3_out.l == (37 * 3))
281
+ assert 'boxed_struct_invocations:4 failed', (p3_out.str == '2variable')
282
282
 
283
- assert "boxed_struct_invocations:1 failed", (retval.is_a?(Variable_Struct1))
284
- assert "boxed_struct_invocations:1 failed", (retval.l == p1.value.l)
285
- assert "boxed_struct_invocations:1 failed", (retval.str == p1.value.str)
283
+ assert 'boxed_struct_invocations:1 failed', (retval.is_a?(Variable_Struct1))
284
+ assert 'boxed_struct_invocations:1 failed', (retval.l == p1.value.l)
285
+ assert 'boxed_struct_invocations:1 failed', (retval.str == p1.value.str)
286
286
 
287
287
  # test invocation with Ruby types using valuebox values
288
288
  p2_out, p3_out = test.struct_op4(p1.value, p2_out)
289
289
 
290
- assert "boxed_struct_invocations:4 failed", (p2_out.is_a?(Variable_Struct1))
291
- assert "boxed_struct_invocations:4 failed", (p2_out.l == (37 * 3 * 3))
292
- assert "boxed_struct_invocations:4 failed", (p2_out.str == 'e2variabl')
290
+ assert 'boxed_struct_invocations:4 failed', (p2_out.is_a?(Variable_Struct1))
291
+ assert 'boxed_struct_invocations:4 failed', (p2_out.l == (37 * 3 * 3))
292
+ assert 'boxed_struct_invocations:4 failed', (p2_out.str == 'e2variabl')
293
293
 
294
- assert "boxed_struct_invocations:1 failed", (p3_out.is_a?(Variable_Struct1))
295
- assert "boxed_struct_invocations:1 failed", (p3_out.l == p1.value.l)
296
- assert "boxed_struct_invocations:1 failed", (p3_out.str == p1.value.str)
294
+ assert 'boxed_struct_invocations:1 failed', (p3_out.is_a?(Variable_Struct1))
295
+ assert 'boxed_struct_invocations:1 failed', (p3_out.l == p1.value.l)
296
+ assert 'boxed_struct_invocations:1 failed', (p3_out.str == p1.value.str)
297
297
  end
298
298
 
299
299
  def Test.boxed_array_invocations(test)
300
300
  # basic test
301
301
  p1 = VBlongarray.new([101, 202, 303])
302
- assert "boxed_array_invocations:0 failed", (p1.value[0] == 101 && p1.value[2] == 303)
302
+ assert 'boxed_array_invocations:0 failed', (p1.value[0] == 101 && p1.value[2] == 303)
303
303
 
304
304
  # test invocation with value boxes
305
305
  p1 = VBlongarray.new([10, 9, 8])
306
306
  p2 = VBlongarray.new([100, 99, 98])
307
- assert "boxed_array_invocations:1 failed", (p1.value[0] == 10 && p1.value[2] == 8)
308
- assert "boxed_array_invocations:1 failed", (p2.value[0] == 100 && p2.value[2] == 98)
307
+ assert 'boxed_array_invocations:1 failed', (p1.value[0] == 10 && p1.value[2] == 8)
308
+ assert 'boxed_array_invocations:1 failed', (p2.value[0] == 100 && p2.value[2] == 98)
309
309
 
310
310
  p2_out = nil
311
311
  p3_out = nil
@@ -313,13 +313,13 @@ module Test
313
313
  retval, p2_out, p3_out = test.array_op1(p1, p2)
314
314
 
315
315
  p2.value().each_with_index do |e, i|
316
- assert "boxed_array_invocations:2 failed", (p2_out[i] == e * 3)
316
+ assert 'boxed_array_invocations:2 failed', (p2_out[i] == e * 3)
317
317
  end
318
318
  p2.value().each_with_index do |e, i|
319
- assert "boxed_array_invocations:2 failed", (p3_out[i] == e * 3)
319
+ assert 'boxed_array_invocations:2 failed', (p3_out[i] == e * 3)
320
320
  end
321
321
  p1.value().each_with_index do |e, i|
322
- assert "boxed_array_invocations:2 failed", (retval[i] == e)
322
+ assert 'boxed_array_invocations:2 failed', (retval[i] == e)
323
323
  end
324
324
 
325
325
  # test invocation with Ruby types using valuebox values
@@ -328,17 +328,17 @@ module Test
328
328
  p2_out, p3_out = test.array_op2(p1.value, p2.value)
329
329
 
330
330
  p2.value().each_with_index do |e, i|
331
- assert "boxed_array_invocations:3 failed", (p2_out[i] == e * 3)
331
+ assert 'boxed_array_invocations:3 failed', (p2_out[i] == e * 3)
332
332
  end
333
333
  p1.value().each_with_index do |e, i|
334
- assert "boxed_array_invocations:3 failed", (p3_out[i] == e)
334
+ assert 'boxed_array_invocations:3 failed', (p3_out[i] == e)
335
335
  end
336
336
 
337
337
  # test invocation with value boxes
338
338
  p1 = VBstringarray.new(['in string1', 'in string1'])
339
339
  p2 = VBstringarray.new(['inout string1', 'inout string1'])
340
- assert "boxed_array_invocations:4 failed", (p1.value[0] == 'in string1' && p1.value[1] == 'in string1')
341
- assert "boxed_array_invocations:4 failed", (p2.value[0] == 'inout string1' && p2.value[1] == 'inout string1')
340
+ assert 'boxed_array_invocations:4 failed', (p1.value[0] == 'in string1' && p1.value[1] == 'in string1')
341
+ assert 'boxed_array_invocations:4 failed', (p2.value[0] == 'inout string1' && p2.value[1] == 'inout string1')
342
342
 
343
343
  p2_out = nil
344
344
  p3_out = nil
@@ -346,13 +346,13 @@ module Test
346
346
  retval, p2_out, p3_out = test.array_op3(p1, p2)
347
347
 
348
348
  p2.value().each_with_index do |e, i|
349
- assert "boxed_array_invocations:5 failed", (p2_out[i] == '1inout string')
349
+ assert 'boxed_array_invocations:5 failed', (p2_out[i] == '1inout string')
350
350
  end
351
351
  p2.value().each_with_index do |e, i|
352
- assert "boxed_array_invocations:5 failed", (p3_out[i] == '1inout string')
352
+ assert 'boxed_array_invocations:5 failed', (p3_out[i] == '1inout string')
353
353
  end
354
354
  p1.value().each_with_index do |e, i|
355
- assert "boxed_array_invocations:5 failed", (retval[i] == e)
355
+ assert 'boxed_array_invocations:5 failed', (retval[i] == e)
356
356
  end
357
357
 
358
358
  # test invocation with Ruby types using valuebox values
@@ -361,12 +361,13 @@ module Test
361
361
  p2_out, p3_out = test.array_op4(p1.value, p2.value)
362
362
 
363
363
  p2.value().each_with_index do |e, i|
364
- assert "boxed_array_invocations:6 failed", (p2_out[i] == '1inout string')
364
+ assert 'boxed_array_invocations:6 failed', (p2_out[i] == '1inout string')
365
365
  end
366
366
  p1.value().each_with_index do |e, i|
367
- assert "boxed_array_invocations:6 failed", (p3_out[i] == e)
367
+ assert 'boxed_array_invocations:6 failed', (p3_out[i] == e)
368
368
  end
369
369
  end
370
+
370
371
  def Test.boxed_union_invocations(test)
371
372
  # basic test
372
373
  p1 = VBfixed_union1.new(Fixed_Union1.new)
@@ -374,13 +375,13 @@ module Test
374
375
  p2 = VBfixed_union1.new(Fixed_Union1.new)
375
376
  p2.value.m2 = 789
376
377
 
377
- assert "boxed_union_invocations:0 failed", (p1.value.is_a?(Fixed_Union1))
378
- assert "boxed_union_invocations:0 failed", (p1.value._disc == 1)
379
- assert "boxed_union_invocations:0 failed", (p1.value.m1 == 321)
378
+ assert 'boxed_union_invocations:0 failed', (p1.value.is_a?(Fixed_Union1))
379
+ assert 'boxed_union_invocations:0 failed', (p1.value._disc == 1)
380
+ assert 'boxed_union_invocations:0 failed', (p1.value.m1 == 321)
380
381
 
381
- assert "boxed_union_invocations:0 failed", (p2.value.is_a?(Fixed_Union1))
382
- assert "boxed_union_invocations:0 failed", (p2.value._disc == 2)
383
- assert "boxed_union_invocations:0 failed", (p2.value.m1 == 789)
382
+ assert 'boxed_union_invocations:0 failed', (p2.value.is_a?(Fixed_Union1))
383
+ assert 'boxed_union_invocations:0 failed', (p2.value._disc == 2)
384
+ assert 'boxed_union_invocations:0 failed', (p2.value.m1 == 789)
384
385
 
385
386
  # test invocation with valueboxes
386
387
  p2_out = nil
@@ -388,30 +389,30 @@ module Test
388
389
  retval = nil
389
390
  retval, p2_out, p3_out = test.union_op1(p1, p2)
390
391
 
391
- assert "boxed_union_invocations:1 failed", (p2_out.is_a?(Fixed_Union1))
392
- assert "boxed_union_invocations:1 failed", (p2_out._disc == 2)
393
- assert "boxed_union_invocations:1 failed", (p2_out.m2 == 789 * 3)
392
+ assert 'boxed_union_invocations:1 failed', (p2_out.is_a?(Fixed_Union1))
393
+ assert 'boxed_union_invocations:1 failed', (p2_out._disc == 2)
394
+ assert 'boxed_union_invocations:1 failed', (p2_out.m2 == 789 * 3)
394
395
 
395
- assert "boxed_union_invocations:1 failed", (p3_out.is_a?(Fixed_Union1))
396
- assert "boxed_union_invocations:1 failed", (p3_out._disc == 1)
397
- assert "boxed_union_invocations:1 failed", (p3_out.m1 == 321 * 3)
396
+ assert 'boxed_union_invocations:1 failed', (p3_out.is_a?(Fixed_Union1))
397
+ assert 'boxed_union_invocations:1 failed', (p3_out._disc == 1)
398
+ assert 'boxed_union_invocations:1 failed', (p3_out.m1 == 321 * 3)
398
399
 
399
- assert "boxed_union_invocations:1 failed", (retval.is_a?(Fixed_Union1))
400
- assert "boxed_union_invocations:1 failed", (retval._disc == 1)
401
- assert "boxed_union_invocations:1 failed", (retval.m1 == 321 * 3)
400
+ assert 'boxed_union_invocations:1 failed', (retval.is_a?(Fixed_Union1))
401
+ assert 'boxed_union_invocations:1 failed', (retval._disc == 1)
402
+ assert 'boxed_union_invocations:1 failed', (retval.m1 == 321 * 3)
402
403
 
403
404
  # test invocation with Ruby types using valuebox values
404
405
  p2_out = nil
405
406
  p3_out = nil
406
407
  p2_out, p3_out = test.union_op2(p1.value, p2.value)
407
408
 
408
- assert "boxed_union_invocations:1 failed", (p2_out.is_a?(Fixed_Union1))
409
- assert "boxed_union_invocations:1 failed", (p2_out._disc == 2)
410
- assert "boxed_union_invocations:1 failed", (p2_out.m2 == 789 * 3)
409
+ assert 'boxed_union_invocations:1 failed', (p2_out.is_a?(Fixed_Union1))
410
+ assert 'boxed_union_invocations:1 failed', (p2_out._disc == 2)
411
+ assert 'boxed_union_invocations:1 failed', (p2_out.m2 == 789 * 3)
411
412
 
412
- assert "boxed_union_invocations:1 failed", (p3_out.is_a?(Fixed_Union1))
413
- assert "boxed_union_invocations:1 failed", (p3_out._disc == 1)
414
- assert "boxed_union_invocations:1 failed", (p3_out.m1 == 321)
413
+ assert 'boxed_union_invocations:1 failed', (p3_out.is_a?(Fixed_Union1))
414
+ assert 'boxed_union_invocations:1 failed', (p3_out._disc == 1)
415
+ assert 'boxed_union_invocations:1 failed', (p3_out.m1 == 321)
415
416
 
416
417
  # test invocation with valueboxes
417
418
  p1 = VBvariable_union1.new(Variable_Union1.new)
@@ -419,50 +420,50 @@ module Test
419
420
  p2 = VBvariable_union1.new(Variable_Union1.new)
420
421
  p2.value.m2 = 'abracadabra'
421
422
 
422
- assert "boxed_union_invocations:0 failed", (p1.value.is_a?(Variable_Union1))
423
- assert "boxed_union_invocations:0 failed", (p1.value._disc == 1)
424
- assert "boxed_union_invocations:0 failed", (p1.value.m1 == 321)
423
+ assert 'boxed_union_invocations:0 failed', (p1.value.is_a?(Variable_Union1))
424
+ assert 'boxed_union_invocations:0 failed', (p1.value._disc == 1)
425
+ assert 'boxed_union_invocations:0 failed', (p1.value.m1 == 321)
425
426
 
426
- assert "boxed_union_invocations:0 failed", (p2.value.is_a?(Variable_Union1))
427
- assert "boxed_union_invocations:0 failed", (p2.value._disc == 2)
428
- assert "boxed_union_invocations:0 failed", (p2.value.m1 == 'abracadabra')
427
+ assert 'boxed_union_invocations:0 failed', (p2.value.is_a?(Variable_Union1))
428
+ assert 'boxed_union_invocations:0 failed', (p2.value._disc == 2)
429
+ assert 'boxed_union_invocations:0 failed', (p2.value.m1 == 'abracadabra')
429
430
 
430
431
  p2_out = nil
431
432
  p3_out = nil
432
433
  retval = nil
433
434
  retval, p2_out, p3_out = test.union_op3(p1, p2)
434
435
 
435
- assert "boxed_union_invocations:1 failed", (p2_out.is_a?(Variable_Union1))
436
- assert "boxed_union_invocations:1 failed", (p2_out._disc == 2)
437
- assert "boxed_union_invocations:1 failed", (p2_out.m2 == 'aabracadabr')
436
+ assert 'boxed_union_invocations:1 failed', (p2_out.is_a?(Variable_Union1))
437
+ assert 'boxed_union_invocations:1 failed', (p2_out._disc == 2)
438
+ assert 'boxed_union_invocations:1 failed', (p2_out.m2 == 'aabracadabr')
438
439
 
439
- assert "boxed_union_invocations:1 failed", (p3_out.is_a?(Variable_Union1))
440
- assert "boxed_union_invocations:1 failed", (p3_out._disc == 1)
441
- assert "boxed_union_invocations:1 failed", (p3_out.m1 == 321)
440
+ assert 'boxed_union_invocations:1 failed', (p3_out.is_a?(Variable_Union1))
441
+ assert 'boxed_union_invocations:1 failed', (p3_out._disc == 1)
442
+ assert 'boxed_union_invocations:1 failed', (p3_out.m1 == 321)
442
443
 
443
- assert "boxed_union_invocations:1 failed", (retval.is_a?(Variable_Union1))
444
- assert "boxed_union_invocations:1 failed", (retval._disc == 1)
445
- assert "boxed_union_invocations:1 failed", (retval.m1 == 321)
444
+ assert 'boxed_union_invocations:1 failed', (retval.is_a?(Variable_Union1))
445
+ assert 'boxed_union_invocations:1 failed', (retval._disc == 1)
446
+ assert 'boxed_union_invocations:1 failed', (retval.m1 == 321)
446
447
 
447
448
  # test invocation with Ruby types using valuebox values
448
449
  p2_out = nil
449
450
  p3_out = nil
450
451
  p2_out, p3_out = test.union_op4(p1.value, p2.value)
451
452
 
452
- assert "boxed_union_invocations:1 failed", (p2_out.is_a?(Variable_Union1))
453
- assert "boxed_union_invocations:1 failed", (p2_out._disc == 2)
454
- assert "boxed_union_invocations:1 failed", (p2_out.m2 == 'aabracadabr')
453
+ assert 'boxed_union_invocations:1 failed', (p2_out.is_a?(Variable_Union1))
454
+ assert 'boxed_union_invocations:1 failed', (p2_out._disc == 2)
455
+ assert 'boxed_union_invocations:1 failed', (p2_out.m2 == 'aabracadabr')
455
456
 
456
- assert "boxed_union_invocations:1 failed", (p3_out.is_a?(Variable_Union1))
457
- assert "boxed_union_invocations:1 failed", (p3_out._disc == 1)
458
- assert "boxed_union_invocations:1 failed", (p3_out.m1 == 321)
457
+ assert 'boxed_union_invocations:1 failed', (p3_out.is_a?(Variable_Union1))
458
+ assert 'boxed_union_invocations:1 failed', (p3_out._disc == 1)
459
+ assert 'boxed_union_invocations:1 failed', (p3_out.m1 == 321)
459
460
 
460
461
  end
461
462
  end
462
463
 
463
464
  ##
464
465
 
465
- orb = CORBA.ORB_init(["-ORBDebugLevel", OPTIONS[:orb_debuglevel]], 'myORB')
466
+ orb = CORBA.ORB_init(['-ORBDebugLevel', OPTIONS[:orb_debuglevel]], 'myORB')
466
467
 
467
468
  begin
468
469
  obj = orb.string_to_object(OPTIONS[:iorfile])