~ubuntu-branches/ubuntu/trusty/erlang/trusty

« back to all changes in this revision

Viewing changes to lib/cosTransactions/test/generated_SUITE.erl

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2011-05-05 15:48:43 UTC
  • mfrom: (3.5.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110505154843-0om6ekzg6m7ugj27
Tags: 1:14.b.2-dfsg-3ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to.
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
  - debian/patches/series: Do what I meant, and enable build-options.patch
    instead.
* Additional changes:
  - Drop erlang-wx from -et
* Dropped Changes:
  - patches/pcre-crash.patch: CVE-2008-2371: outer level option with
    alternatives caused crash. (Applied Upstream)
  - fix for ssl certificate verification in newSSL: 
    ssl_cacertfile_fix.patch (Applied Upstream)
  - debian/patches/series: Enable native.patch again, to get stripped beam
    files and reduce the package size again. (build-options is what
    actually accomplished this)
  - Remove build-options.patch on advice from upstream and because it caused
    odd build failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%%-----------------------------------------------------------------
 
2
%%
 
3
%% %CopyrightBegin%
 
4
%% 
 
5
%% Copyright Ericsson AB 2004-2011. All Rights Reserved.
 
6
%% 
 
7
%% The contents of this file are subject to the Erlang Public License,
 
8
%% Version 1.1, (the "License"); you may not use this file except in
 
9
%% compliance with the License. You should have received a copy of the
 
10
%% Erlang Public License along with this software. If not, it can be
 
11
%% retrieved online at http://www.erlang.org/.
 
12
%% 
 
13
%% Software distributed under the License is distributed on an "AS IS"
 
14
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
15
%% the License for the specific language governing rights and limitations
 
16
%% under the License.
 
17
%% 
 
18
%% %CopyrightEnd%
 
19
%%
 
20
%%
 
21
%%-----------------------------------------------------------------
 
22
%% File    : generated_SUITE.erl
 
23
%% Purpose : 
 
24
%% Created : 27 Jan 2004
 
25
%%-----------------------------------------------------------------
 
26
 
 
27
-module(generated_SUITE).
 
28
 
 
29
-include_lib("test_server/include/test_server.hrl").
 
30
-include_lib("orber/include/corba.hrl").
 
31
 
 
32
-define(default_timeout, ?t:minutes(3)).
 
33
 
 
34
-define(match(ExpectedRes, Expr),
 
35
        fun() ->
 
36
                AcTuAlReS = (catch (Expr)),
 
37
                case AcTuAlReS of
 
38
                    ExpectedRes ->
 
39
                        AcTuAlReS;
 
40
                    _ ->
 
41
                        io:format("###### ERROR ERROR ######~n~p~n",
 
42
                                  [AcTuAlReS]),
 
43
                        ?line exit(AcTuAlReS)
 
44
                end
 
45
        end()).
 
46
 
 
47
-define(nomatch(Not, Expr),
 
48
        fun() ->
 
49
                AcTuAlReS = (catch (Expr)),
 
50
                case AcTuAlReS of
 
51
                    Not ->
 
52
                        io:format("###### ERROR ERROR ######~n~p~n",
 
53
                                  [AcTuAlReS]),
 
54
                        ?line exit(AcTuAlReS);
 
55
                    _ ->
 
56
                        AcTuAlReS
 
57
                end
 
58
        end()).
 
59
 
 
60
 
 
61
-define(checktc(_Op),
 
62
        fun(TC) ->
 
63
                case orber_tc:check_tc(TC) of
 
64
                    false ->
 
65
                        io:format("###### ERROR ERROR ######~n~p - ~p~n", [Op, TC]),
 
66
                        ?line exit(TC);
 
67
                    true ->
 
68
                        true
 
69
                end
 
70
        end).
 
71
 
 
72
%%-----------------------------------------------------------------
 
73
%% External exports
 
74
%%-----------------------------------------------------------------
 
75
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, 
 
76
         init_per_group/2,end_per_group/2]).
 
77
 
 
78
%%-----------------------------------------------------------------
 
79
%% Internal exports
 
80
%%-----------------------------------------------------------------
 
81
-compile(export_all).
 
82
 
 
83
%%-----------------------------------------------------------------
 
84
%% Func: all/1
 
85
%% Args: 
 
86
%% Returns: 
 
87
%%-----------------------------------------------------------------
 
88
suite() -> [{ct_hooks,[ts_install_cth]}].
 
89
 
 
90
all() -> 
 
91
    ['CosTransactions_Control',
 
92
     'CosTransactions_Coordinator',
 
93
     'CosTransactions_HeuristicCommit',
 
94
     'CosTransactions_HeuristicHazard',
 
95
     'CosTransactions_HeuristicMixed',
 
96
     'CosTransactions_HeuristicRollback',
 
97
     'CosTransactions_Inactive',
 
98
     'CosTransactions_InvalidControl',
 
99
     'CosTransactions_NoTransaction',
 
100
     'CosTransactions_NotPrepared',
 
101
     'CosTransactions_NotSubtransaction',
 
102
     'CosTransactions_RecoveryCoordinator',
 
103
     'CosTransactions_Resource',
 
104
     'CosTransactions_SubtransactionAwareResource',
 
105
     'CosTransactions_SubtransactionsUnavailable',
 
106
     'CosTransactions_Terminator',
 
107
     'CosTransactions_TransactionFactory',
 
108
     'CosTransactions_Unavailable',
 
109
     'CosTransactions_SynchronizationUnavailable',
 
110
     'CosTransactions_TransIdentity',
 
111
     'CosTransactions_PropagationContext',
 
112
     'CosTransactions_otid_t',
 
113
     'CosTransactions_WrongTransaction', 'ETraP_Server'].
 
114
 
 
115
groups() -> 
 
116
    [].
 
117
 
 
118
init_per_suite(Config) ->
 
119
    Config.
 
120
 
 
121
end_per_suite(_Config) ->
 
122
    ok.
 
123
 
 
124
init_per_group(_GroupName, Config) ->
 
125
    Config.
 
126
 
 
127
end_per_group(_GroupName, Config) ->
 
128
    Config.
 
129
 
 
130
 
 
131
%%-----------------------------------------------------------------
 
132
%% Init and cleanup functions.
 
133
%%-----------------------------------------------------------------
 
134
init_per_testcase(_Case, Config) ->
 
135
    ?line Dog=test_server:timetrap(?default_timeout),
 
136
    [{watchdog, Dog}|Config].
 
137
 
 
138
 
 
139
end_per_testcase(_Case, Config) ->
 
140
    Dog = ?config(watchdog, Config),
 
141
    test_server:timetrap_cancel(Dog),
 
142
    ok.
 
143
 
 
144
 
 
145
%%-----------------------------------------------------------------
 
146
%% Test Case: 'CosTransactions_HeuristicCommit'
 
147
%% Description: 
 
148
%%-----------------------------------------------------------------
 
149
'CosTransactions_HeuristicCommit'(doc) -> ["CosTransactions_HeuristicCommit"];
 
150
'CosTransactions_HeuristicCommit'(suite) -> [];
 
151
'CosTransactions_HeuristicCommit'(_) ->
 
152
    ?match(true, orber_tc:check_tc('CosTransactions_HeuristicCommit':tc())),
 
153
    ?match("IDL:omg.org/CosTransactions/HeuristicCommit:1.0", 
 
154
           'CosTransactions_HeuristicCommit':id()),
 
155
    ?match("CosTransactions_HeuristicCommit", 
 
156
           'CosTransactions_HeuristicCommit':name()),
 
157
    ok.
 
158
 
 
159
 
 
160
%%-----------------------------------------------------------------
 
161
%% Test Case: 'CosTransactions_HeuristicHazard'
 
162
%% Description: 
 
163
%%-----------------------------------------------------------------
 
164
'CosTransactions_HeuristicHazard'(doc) -> ["CosTransactions_HeuristicHazard"];
 
165
'CosTransactions_HeuristicHazard'(suite) -> [];
 
166
'CosTransactions_HeuristicHazard'(_) ->
 
167
    ?match(true, orber_tc:check_tc('CosTransactions_HeuristicHazard':tc())),
 
168
    ?match("IDL:omg.org/CosTransactions/HeuristicHazard:1.0", 
 
169
           'CosTransactions_HeuristicHazard':id()),
 
170
    ?match("CosTransactions_HeuristicHazard", 
 
171
           'CosTransactions_HeuristicHazard':name()),
 
172
    ok.
 
173
 
 
174
 
 
175
%%-----------------------------------------------------------------
 
176
%% Test Case: 'CosTransactions_HeuristicMixed'
 
177
%% Description: 
 
178
%%-----------------------------------------------------------------
 
179
'CosTransactions_HeuristicMixed'(doc) -> ["CosTransactions_HeuristicMixed"];
 
180
'CosTransactions_HeuristicMixed'(suite) -> [];
 
181
'CosTransactions_HeuristicMixed'(_) ->
 
182
    ?match(true, orber_tc:check_tc('CosTransactions_HeuristicMixed':tc())),
 
183
    ?match("IDL:omg.org/CosTransactions/HeuristicMixed:1.0", 
 
184
           'CosTransactions_HeuristicMixed':id()),
 
185
    ?match("CosTransactions_HeuristicMixed", 
 
186
           'CosTransactions_HeuristicMixed':name()),
 
187
    ok.
 
188
 
 
189
 
 
190
%%-----------------------------------------------------------------
 
191
%% Test Case: 'CosTransactions_HeuristicRollback'
 
192
%% Description: 
 
193
%%-----------------------------------------------------------------
 
194
'CosTransactions_HeuristicRollback'(doc) -> ["CosTransactions_HeuristicRollback"];
 
195
'CosTransactions_HeuristicRollback'(suite) -> [];
 
196
'CosTransactions_HeuristicRollback'(_) ->
 
197
    ?match(true, orber_tc:check_tc('CosTransactions_HeuristicRollback':tc())),
 
198
    ?match("IDL:omg.org/CosTransactions/HeuristicRollback:1.0", 
 
199
           'CosTransactions_HeuristicRollback':id()),
 
200
    ?match("CosTransactions_HeuristicRollback", 
 
201
           'CosTransactions_HeuristicRollback':name()),
 
202
    ok.
 
203
 
 
204
 
 
205
%%-----------------------------------------------------------------
 
206
%% Test Case: 'CosTransactions_Inactive'
 
207
%% Description: 
 
208
%%-----------------------------------------------------------------
 
209
'CosTransactions_Inactive'(doc) -> ["CosTransactions_Inactive"];
 
210
'CosTransactions_Inactive'(suite) -> [];
 
211
'CosTransactions_Inactive'(_) ->
 
212
    ?match(true, orber_tc:check_tc('CosTransactions_Inactive':tc())),
 
213
    ?match("IDL:omg.org/CosTransactions/Inactive:1.0", 
 
214
           'CosTransactions_Inactive':id()),
 
215
    ?match("CosTransactions_Inactive", 
 
216
           'CosTransactions_Inactive':name()),
 
217
    ok.
 
218
 
 
219
 
 
220
%%-----------------------------------------------------------------
 
221
%% Test Case: 'CosTransactions_InvalidControl'
 
222
%% Description: 
 
223
%%-----------------------------------------------------------------
 
224
'CosTransactions_InvalidControl'(doc) -> ["CosTransactions_InvalidControl"];
 
225
'CosTransactions_InvalidControl'(suite) -> [];
 
226
'CosTransactions_InvalidControl'(_) ->
 
227
    ?match(true, orber_tc:check_tc('CosTransactions_InvalidControl':tc())),
 
228
    ?match("IDL:omg.org/CosTransactions/InvalidControl:1.0", 
 
229
           'CosTransactions_InvalidControl':id()),
 
230
    ?match("CosTransactions_InvalidControl", 
 
231
           'CosTransactions_InvalidControl':name()),
 
232
    ok.
 
233
 
 
234
 
 
235
%%-----------------------------------------------------------------
 
236
%% Test Case: 'CosTransactions_NoTransaction'
 
237
%% Description: 
 
238
%%-----------------------------------------------------------------
 
239
'CosTransactions_NoTransaction'(doc) -> ["CosTransactions_NoTransaction"];
 
240
'CosTransactions_NoTransaction'(suite) -> [];
 
241
'CosTransactions_NoTransaction'(_) ->
 
242
    ?match(true, orber_tc:check_tc('CosTransactions_NoTransaction':tc())),
 
243
    ?match("IDL:omg.org/CosTransactions/NoTransaction:1.0", 
 
244
           'CosTransactions_NoTransaction':id()),
 
245
    ?match("CosTransactions_NoTransaction", 
 
246
           'CosTransactions_NoTransaction':name()),
 
247
    ok.
 
248
 
 
249
 
 
250
%%-----------------------------------------------------------------
 
251
%% Test Case: 'CosTransactions_NotPrepared'
 
252
%% Description: 
 
253
%%-----------------------------------------------------------------
 
254
'CosTransactions_NotPrepared'(doc) -> ["CosTransactions_NotPrepared"];
 
255
'CosTransactions_NotPrepared'(suite) -> [];
 
256
'CosTransactions_NotPrepared'(_) ->
 
257
    ?match(true, orber_tc:check_tc('CosTransactions_NotPrepared':tc())),
 
258
    ?match("IDL:omg.org/CosTransactions/NotPrepared:1.0", 
 
259
           'CosTransactions_NotPrepared':id()),
 
260
    ?match("CosTransactions_NotPrepared", 
 
261
           'CosTransactions_NotPrepared':name()),
 
262
    ok.
 
263
 
 
264
 
 
265
%%-----------------------------------------------------------------
 
266
%% Test Case: 'CosTransactions_NotSubtransaction'
 
267
%% Description: 
 
268
%%-----------------------------------------------------------------
 
269
'CosTransactions_NotSubtransaction'(doc) -> ["CosTransactions_NotSubtransaction"];
 
270
'CosTransactions_NotSubtransaction'(suite) -> [];
 
271
'CosTransactions_NotSubtransaction'(_) ->
 
272
    ?match(true, orber_tc:check_tc('CosTransactions_NotSubtransaction':tc())),
 
273
    ?match("IDL:omg.org/CosTransactions/NotSubtransaction:1.0", 
 
274
           'CosTransactions_NotSubtransaction':id()),
 
275
    ?match("CosTransactions_NotSubtransaction", 
 
276
           'CosTransactions_NotSubtransaction':name()),
 
277
    ok.
 
278
 
 
279
 
 
280
%%-----------------------------------------------------------------
 
281
%% Test Case: 'CosTransactions_SubtransactionsUnavailable'
 
282
%% Description: 
 
283
%%-----------------------------------------------------------------
 
284
'CosTransactions_SubtransactionsUnavailable'(doc) -> ["CosTransactions_SubtransactionsUnavailable"];
 
285
'CosTransactions_SubtransactionsUnavailable'(suite) -> [];
 
286
'CosTransactions_SubtransactionsUnavailable'(_) ->
 
287
    ?match(true, orber_tc:check_tc('CosTransactions_SubtransactionsUnavailable':tc())),
 
288
    ?match("IDL:omg.org/CosTransactions/SubtransactionsUnavailable:1.0", 
 
289
           'CosTransactions_SubtransactionsUnavailable':id()),
 
290
    ?match("CosTransactions_SubtransactionsUnavailable", 
 
291
           'CosTransactions_SubtransactionsUnavailable':name()),
 
292
    ok.
 
293
 
 
294
 
 
295
%%-----------------------------------------------------------------
 
296
%% Test Case: 'CosTransactions_Unavailable'
 
297
%% Description: 
 
298
%%-----------------------------------------------------------------
 
299
'CosTransactions_Unavailable'(doc) -> ["CosTransactions_Unavailable"];
 
300
'CosTransactions_Unavailable'(suite) -> [];
 
301
'CosTransactions_Unavailable'(_) ->
 
302
    ?match(true, orber_tc:check_tc('CosTransactions_Unavailable':tc())),
 
303
    ?match("IDL:omg.org/CosTransactions/Unavailable:1.0", 
 
304
           'CosTransactions_Unavailable':id()),
 
305
    ?match("CosTransactions_Unavailable", 
 
306
           'CosTransactions_Unavailable':name()),
 
307
    ok.
 
308
 
 
309
 
 
310
%%-----------------------------------------------------------------
 
311
%% Test Case: 'CosTransactions_SynchronizationUnavailable'
 
312
%% Description: 
 
313
%%-----------------------------------------------------------------
 
314
'CosTransactions_SynchronizationUnavailable'(doc) -> ["CosTransactions_SynchronizationUnavailable"];
 
315
'CosTransactions_SynchronizationUnavailable'(suite) -> [];
 
316
'CosTransactions_SynchronizationUnavailable'(_) ->
 
317
    ?match(true, orber_tc:check_tc('CosTransactions_SynchronizationUnavailable':tc())),
 
318
    ?match("IDL:omg.org/CosTransactions/SynchronizationUnavailable:1.0", 
 
319
           'CosTransactions_SynchronizationUnavailable':id()),
 
320
    ?match("CosTransactions_SynchronizationUnavailable", 
 
321
           'CosTransactions_SynchronizationUnavailable':name()),
 
322
    ok.
 
323
 
 
324
%%-----------------------------------------------------------------
 
325
%% Test Case: 'CosTransactions_TransIdentity'
 
326
%% Description: 
 
327
%%-----------------------------------------------------------------
 
328
'CosTransactions_TransIdentity'(doc) -> ["CosTransactions_TransIdentity"];
 
329
'CosTransactions_TransIdentity'(suite) -> [];
 
330
'CosTransactions_TransIdentity'(_) ->
 
331
    ?match(true, orber_tc:check_tc('CosTransactions_TransIdentity':tc())),
 
332
    ?match("IDL:omg.org/CosTransactions/TransIdentity:1.0", 
 
333
           'CosTransactions_TransIdentity':id()),
 
334
    ?match("CosTransactions_TransIdentity", 
 
335
           'CosTransactions_TransIdentity':name()),
 
336
    ok.
 
337
 
 
338
%%-----------------------------------------------------------------
 
339
%% Test Case: 'CosTransactions_PropagationContext'
 
340
%% Description: 
 
341
%%-----------------------------------------------------------------
 
342
'CosTransactions_PropagationContext'(doc) -> ["CosTransactions_PropagationContext"];
 
343
'CosTransactions_PropagationContext'(suite) -> [];
 
344
'CosTransactions_PropagationContext'(_) ->
 
345
    ?match(true, orber_tc:check_tc('CosTransactions_PropagationContext':tc())),
 
346
    ?match("IDL:omg.org/CosTransactions/PropagationContext:1.0", 
 
347
           'CosTransactions_PropagationContext':id()),
 
348
    ?match("CosTransactions_PropagationContext", 
 
349
           'CosTransactions_PropagationContext':name()),
 
350
    ok.
 
351
 
 
352
%%-----------------------------------------------------------------
 
353
%% Test Case: 'CosTransactions_otid_t'
 
354
%% Description: 
 
355
%%-----------------------------------------------------------------
 
356
'CosTransactions_otid_t'(doc) -> ["CosTransactions_otid_t"];
 
357
'CosTransactions_otid_t'(suite) -> [];
 
358
'CosTransactions_otid_t'(_) ->
 
359
    ?match(true, orber_tc:check_tc('CosTransactions_otid_t':tc())),
 
360
    ?match("IDL:omg.org/CosTransactions/otid_t:1.0", 
 
361
           'CosTransactions_otid_t':id()),
 
362
    ?match("CosTransactions_otid_t", 
 
363
           'CosTransactions_otid_t':name()),
 
364
    ok.
 
365
 
 
366
%%-----------------------------------------------------------------
 
367
%% Test Case: 'CosTransactions_WrongTransaction'
 
368
%% Description: 
 
369
%%-----------------------------------------------------------------
 
370
'CosTransactions_WrongTransaction'(doc) -> ["CosTransactions_WrongTransaction"];
 
371
'CosTransactions_WrongTransaction'(suite) -> [];
 
372
'CosTransactions_WrongTransaction'(_) ->
 
373
    ?match(true, orber_tc:check_tc('CosTransactions_WrongTransaction':tc())),
 
374
    ?match("IDL:omg.org/CosTransactions/WrongTransaction:1.0", 
 
375
           'CosTransactions_WrongTransaction':id()),
 
376
    ?match("CosTransactions_WrongTransaction", 
 
377
           'CosTransactions_WrongTransaction':name()),
 
378
    ok.
 
379
 
 
380
 
 
381
%%-----------------------------------------------------------------
 
382
%% Test Case: 'CosTransactions_Control'
 
383
%% Description: 
 
384
%%-----------------------------------------------------------------
 
385
'CosTransactions_Control'(doc) -> ["CosTransactions_Control"];
 
386
'CosTransactions_Control'(suite) -> [];
 
387
'CosTransactions_Control'(_) ->
 
388
    ?nomatch(undefined, 'CosTransactions_Control':oe_tc(get_terminator)),
 
389
    ?nomatch(undefined, 'CosTransactions_Control':oe_tc(get_coordinator)),
 
390
    ?match(undefined, 'CosTransactions_Control':oe_tc(undefined)),
 
391
    ?match([_|_], 'CosTransactions_Control':oe_get_interface()),
 
392
    ?match("IDL:omg.org/CosTransactions/Control:1.0", 
 
393
           'CosTransactions_Control':typeID()),
 
394
    check_tc('CosTransactions_Control':oe_get_interface()),
 
395
    ?match(true, 'CosTransactions_Control':oe_is_a('CosTransactions_Control':typeID())),
 
396
    ?match(false, 'CosTransactions_Control':oe_is_a("wrong")),
 
397
    ok.
 
398
 
 
399
 
 
400
%%-----------------------------------------------------------------
 
401
%% Test Case: 'CosTransactions_Coordinator'
 
402
%% Description: 
 
403
%%-----------------------------------------------------------------
 
404
'CosTransactions_Coordinator'(doc) -> ["CosTransactions_Coordinator"];
 
405
'CosTransactions_Coordinator'(suite) -> [];
 
406
'CosTransactions_Coordinator'(_) ->
 
407
    ?nomatch(undefined, 'CosTransactions_Coordinator':oe_tc(get_status)),
 
408
    ?nomatch(undefined, 'CosTransactions_Coordinator':oe_tc(get_parent_status)),
 
409
    ?nomatch(undefined, 'CosTransactions_Coordinator':oe_tc(get_top_level_status)),
 
410
    ?nomatch(undefined, 'CosTransactions_Coordinator':oe_tc(is_same_transaction)),
 
411
    ?nomatch(undefined, 'CosTransactions_Coordinator':oe_tc(is_related_transaction)),
 
412
    ?nomatch(undefined, 'CosTransactions_Coordinator':oe_tc(is_ancestor_transaction)),
 
413
    ?nomatch(undefined, 'CosTransactions_Coordinator':oe_tc(is_descendant_transaction)),
 
414
    ?nomatch(undefined, 'CosTransactions_Coordinator':oe_tc(is_top_level_transaction)),
 
415
    ?nomatch(undefined, 'CosTransactions_Coordinator':oe_tc(hash_transaction)),
 
416
    ?nomatch(undefined, 'CosTransactions_Coordinator':oe_tc(hash_top_level_tran)),
 
417
    ?nomatch(undefined, 'CosTransactions_Coordinator':oe_tc(register_resource)),
 
418
    ?nomatch(undefined, 'CosTransactions_Coordinator':oe_tc(register_subtran_aware)),
 
419
    ?nomatch(undefined, 'CosTransactions_Coordinator':oe_tc(rollback_only)),
 
420
    ?nomatch(undefined, 'CosTransactions_Coordinator':oe_tc(get_transaction_name)),
 
421
    ?nomatch(undefined, 'CosTransactions_Coordinator':oe_tc(create_subtransaction)),
 
422
    ?nomatch(undefined, 'CosTransactions_Coordinator':oe_tc(get_txcontext)),
 
423
    ?match(undefined, 'CosTransactions_Coordinator':oe_tc(undefined)),
 
424
    ?match([_|_], 'CosTransactions_Coordinator':oe_get_interface()),
 
425
    ?match("IDL:omg.org/CosTransactions/Coordinator:1.0", 
 
426
           'CosTransactions_Coordinator':typeID()),
 
427
    check_tc('CosTransactions_Coordinator':oe_get_interface()),
 
428
    ?match(true, 'CosTransactions_Coordinator':oe_is_a('CosTransactions_Coordinator':typeID())),
 
429
    ?match(false, 'CosTransactions_Coordinator':oe_is_a("wrong")),
 
430
    ok.
 
431
 
 
432
 
 
433
%%-----------------------------------------------------------------
 
434
%% Test Case: 'CosTransactions_RecoveryCoordinator'
 
435
%% Description: 
 
436
%%-----------------------------------------------------------------
 
437
'CosTransactions_RecoveryCoordinator'(doc) -> ["CosTransactions_RecoveryCoordinator"];
 
438
'CosTransactions_RecoveryCoordinator'(suite) -> [];
 
439
'CosTransactions_RecoveryCoordinator'(_) ->
 
440
    ?nomatch(undefined, 'CosTransactions_RecoveryCoordinator':oe_tc(replay_completion)),
 
441
    ?match(undefined, 'CosTransactions_RecoveryCoordinator':oe_tc(undefined)),
 
442
    ?match([_|_], 'CosTransactions_RecoveryCoordinator':oe_get_interface()),
 
443
    ?match("IDL:omg.org/CosTransactions/RecoveryCoordinator:1.0", 
 
444
           'CosTransactions_RecoveryCoordinator':typeID()),
 
445
    check_tc('CosTransactions_RecoveryCoordinator':oe_get_interface()),
 
446
    ?match(true, 'CosTransactions_RecoveryCoordinator':oe_is_a('CosTransactions_RecoveryCoordinator':typeID())),
 
447
    ?match(false, 'CosTransactions_RecoveryCoordinator':oe_is_a("wrong")),
 
448
    ok.
 
449
 
 
450
 
 
451
%%-----------------------------------------------------------------
 
452
%% Test Case: 'CosTransactions_Resource'
 
453
%% Description: 
 
454
%%-----------------------------------------------------------------
 
455
'CosTransactions_Resource'(doc) -> ["CosTransactions_Resource"];
 
456
'CosTransactions_Resource'(suite) -> [];
 
457
'CosTransactions_Resource'(_) ->
 
458
    ?nomatch(undefined, 'CosTransactions_Resource':oe_tc(prepare)),
 
459
    ?nomatch(undefined, 'CosTransactions_Resource':oe_tc(rollback)),
 
460
    ?nomatch(undefined, 'CosTransactions_Resource':oe_tc(commit)),
 
461
    ?nomatch(undefined, 'CosTransactions_Resource':oe_tc(commit_one_phase)),
 
462
    ?nomatch(undefined, 'CosTransactions_Resource':oe_tc(forget)),
 
463
    ?match(undefined, 'CosTransactions_Resource':oe_tc(undefined)),
 
464
    ?match([_|_], 'CosTransactions_Resource':oe_get_interface()),
 
465
    ?match("IDL:omg.org/CosTransactions/Resource:1.0", 
 
466
           'CosTransactions_Resource':typeID()),
 
467
    check_tc('CosTransactions_Resource':oe_get_interface()),
 
468
    ?match(true, 'CosTransactions_Resource':oe_is_a('CosTransactions_Resource':typeID())),
 
469
    ?match(false, 'CosTransactions_Resource':oe_is_a("wrong")),
 
470
    ok.
 
471
 
 
472
 
 
473
%%-----------------------------------------------------------------
 
474
%% Test Case: 'CosTransactions_SubtransactionAwareResource'
 
475
%% Description: 
 
476
%%-----------------------------------------------------------------
 
477
'CosTransactions_SubtransactionAwareResource'(doc) -> ["CosTransactions_SubtransactionAwareResource"];
 
478
'CosTransactions_SubtransactionAwareResource'(suite) -> [];
 
479
'CosTransactions_SubtransactionAwareResource'(_) ->
 
480
    ?nomatch(undefined, 'CosTransactions_SubtransactionAwareResource':oe_tc(commit_subtransaction)),
 
481
    ?nomatch(undefined, 'CosTransactions_SubtransactionAwareResource':oe_tc(rollback_subtransaction)),
 
482
    ?nomatch(undefined, 'CosTransactions_SubtransactionAwareResource':oe_tc(prepare)),
 
483
    ?nomatch(undefined, 'CosTransactions_SubtransactionAwareResource':oe_tc(rollback)),
 
484
    ?nomatch(undefined, 'CosTransactions_SubtransactionAwareResource':oe_tc(commit)),
 
485
    ?nomatch(undefined, 'CosTransactions_SubtransactionAwareResource':oe_tc(commit_one_phase)),
 
486
    ?nomatch(undefined, 'CosTransactions_SubtransactionAwareResource':oe_tc(forget)),
 
487
    ?match(undefined, 'CosTransactions_SubtransactionAwareResource':oe_tc(undefined)),
 
488
    ?match([_|_], 'CosTransactions_SubtransactionAwareResource':oe_get_interface()),
 
489
    ?match("IDL:omg.org/CosTransactions/SubtransactionAwareResource:1.0", 
 
490
           'CosTransactions_SubtransactionAwareResource':typeID()),
 
491
    check_tc('CosTransactions_SubtransactionAwareResource':oe_get_interface()),
 
492
    ?match(true, 'CosTransactions_SubtransactionAwareResource':oe_is_a('CosTransactions_SubtransactionAwareResource':typeID())),
 
493
    ?match(true, 'CosTransactions_SubtransactionAwareResource':oe_is_a('CosTransactions_Resource':typeID())),
 
494
    ?match(false, 'CosTransactions_SubtransactionAwareResource':oe_is_a("wrong")),
 
495
    ok.
 
496
 
 
497
 
 
498
%%-----------------------------------------------------------------
 
499
%% Test Case: 'CosTransactions_Terminator'
 
500
%% Description: 
 
501
%%-----------------------------------------------------------------
 
502
'CosTransactions_Terminator'(doc) -> ["CosTransactions_Terminator"];
 
503
'CosTransactions_Terminator'(suite) -> [];
 
504
'CosTransactions_Terminator'(_) ->
 
505
    ?nomatch(undefined, 'CosTransactions_Terminator':oe_tc(commit)),
 
506
    ?nomatch(undefined, 'CosTransactions_Terminator':oe_tc(rollback)),
 
507
    ?match(undefined, 'CosTransactions_Terminator':oe_tc(undefined)),
 
508
    ?match([_|_], 'CosTransactions_Terminator':oe_get_interface()),
 
509
    ?match("IDL:omg.org/CosTransactions/Terminator:1.0", 
 
510
           'CosTransactions_Terminator':typeID()),
 
511
    check_tc('CosTransactions_Terminator':oe_get_interface()),
 
512
    ?match(true, 'CosTransactions_Terminator':oe_is_a('CosTransactions_Terminator':typeID())),
 
513
    ?match(false, 'CosTransactions_Terminator':oe_is_a("wrong")),
 
514
    ok.
 
515
 
 
516
 
 
517
%%-----------------------------------------------------------------
 
518
%% Test Case: 'CosTransactions_TransactionFactory'
 
519
%% Description: 
 
520
%%-----------------------------------------------------------------
 
521
'CosTransactions_TransactionFactory'(doc) -> ["CosTransactions_TransactionFactory"];
 
522
'CosTransactions_TransactionFactory'(suite) -> [];
 
523
'CosTransactions_TransactionFactory'(_) ->
 
524
    ?nomatch(undefined, 'CosTransactions_TransactionFactory':oe_tc(create)),
 
525
    ?nomatch(undefined, 'CosTransactions_TransactionFactory':oe_tc(recreate)),
 
526
    ?match(undefined, 'CosTransactions_TransactionFactory':oe_tc(undefined)),
 
527
    ?match([_|_], 'CosTransactions_TransactionFactory':oe_get_interface()),
 
528
    ?match("IDL:omg.org/CosTransactions/TransactionFactory:1.0", 
 
529
           'CosTransactions_TransactionFactory':typeID()),
 
530
    check_tc('CosTransactions_TransactionFactory':oe_get_interface()),
 
531
    ?match(true, 'CosTransactions_TransactionFactory':oe_is_a('CosTransactions_TransactionFactory':typeID())),
 
532
    ?match(false, 'CosTransactions_TransactionFactory':oe_is_a("wrong")),
 
533
    ok.
 
534
 
 
535
 
 
536
%%-----------------------------------------------------------------
 
537
%% Test Case: 'ETraP_Server'
 
538
%% Description: 
 
539
%%-----------------------------------------------------------------
 
540
'ETraP_Server'(doc) -> ["ETraP_Server"];
 
541
'ETraP_Server'(suite) -> [];
 
542
'ETraP_Server'(_) ->
 
543
    ?nomatch(undefined, 'ETraP_Server':oe_tc(get_status)),
 
544
    ?nomatch(undefined, 'ETraP_Server':oe_tc(get_parent_status)),
 
545
    ?nomatch(undefined, 'ETraP_Server':oe_tc(get_top_level_status)),
 
546
    ?nomatch(undefined, 'ETraP_Server':oe_tc(is_same_transaction)),
 
547
    ?nomatch(undefined, 'ETraP_Server':oe_tc(is_related_transaction)),
 
548
    ?nomatch(undefined, 'ETraP_Server':oe_tc(is_ancestor_transaction)),
 
549
    ?nomatch(undefined, 'ETraP_Server':oe_tc(is_descendant_transaction)),
 
550
    ?nomatch(undefined, 'ETraP_Server':oe_tc(is_top_level_transaction)),
 
551
    ?nomatch(undefined, 'ETraP_Server':oe_tc(hash_transaction)),
 
552
    ?nomatch(undefined, 'ETraP_Server':oe_tc(hash_top_level_tran)),
 
553
    ?nomatch(undefined, 'ETraP_Server':oe_tc(register_resource)),
 
554
    ?nomatch(undefined, 'ETraP_Server':oe_tc(register_subtran_aware)),
 
555
    ?nomatch(undefined, 'ETraP_Server':oe_tc(rollback_only)),
 
556
    ?nomatch(undefined, 'ETraP_Server':oe_tc(get_transaction_name)),
 
557
    ?nomatch(undefined, 'ETraP_Server':oe_tc(create_subtransaction)),
 
558
    ?nomatch(undefined, 'ETraP_Server':oe_tc(get_txcontext)),
 
559
    ?nomatch(undefined, 'ETraP_Server':oe_tc(prepare)),
 
560
    ?nomatch(undefined, 'ETraP_Server':oe_tc(rollback)),
 
561
    ?nomatch(undefined, 'ETraP_Server':oe_tc(commit)),
 
562
    ?nomatch(undefined, 'ETraP_Server':oe_tc(commit_one_phase)),
 
563
    ?nomatch(undefined, 'ETraP_Server':oe_tc(forget)),
 
564
    ?nomatch(undefined, 'ETraP_Server':oe_tc(replay_completion)),
 
565
    ?nomatch(undefined, 'ETraP_Server':oe_tc(get_terminator)),
 
566
    ?nomatch(undefined, 'ETraP_Server':oe_tc(get_coordinator)),
 
567
    ?match(undefined, 'ETraP_Server':oe_tc(undefined)),
 
568
    ?match([_|_], 'ETraP_Server':oe_get_interface()),
 
569
    ?match("IDL:omg.org/ETraP/Server:1.0", 
 
570
           'ETraP_Server':typeID()),
 
571
    check_tc('ETraP_Server':oe_get_interface()),
 
572
    ?match(true, 'ETraP_Server':oe_is_a('ETraP_Server':typeID())),
 
573
    ?match(true, 'ETraP_Server':oe_is_a('CosTransactions_Coordinator':typeID())),
 
574
    ?match(true, 'ETraP_Server':oe_is_a('CosTransactions_Resource':typeID())),
 
575
    ?match(true, 'ETraP_Server':oe_is_a('CosTransactions_RecoveryCoordinator':typeID())),
 
576
    ?match(true, 'ETraP_Server':oe_is_a('CosTransactions_Control':typeID())),
 
577
    ?match(false, 'ETraP_Server':oe_is_a("wrong")),
 
578
    ok.
 
579
 
 
580
 
 
581
%%-----------------------------------------------------------------
 
582
%% MISC functions
 
583
%%-----------------------------------------------------------------
 
584
check_tc([]) ->
 
585
    ok;
 
586
check_tc([{Op, {RetType, InParameters, OutParameters}}|T]) ->
 
587
    io:format("checked - ~s~n", [Op]),
 
588
    lists:all(?checktc(Op), [RetType|InParameters]),
 
589
    lists:all(?checktc(Op), OutParameters),
 
590
    check_tc(T).
 
591
    
 
592