diff options
Diffstat (limited to 'TAO/tests/IDL_Test/nested_scope.idl')
-rw-r--r-- | TAO/tests/IDL_Test/nested_scope.idl | 194 |
1 files changed, 194 insertions, 0 deletions
diff --git a/TAO/tests/IDL_Test/nested_scope.idl b/TAO/tests/IDL_Test/nested_scope.idl new file mode 100644 index 00000000000..b36ce32cdb1 --- /dev/null +++ b/TAO/tests/IDL_Test/nested_scope.idl @@ -0,0 +1,194 @@ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// TAO/tests/IDL_Test +// +// = FILENAME +// nested_scope.idl +// +// = DESCRIPTION +// This file contains examples of IDL code that has +// caused problems in the past for the TAO IDL +// compiler. This test is to make sure the problems +// stay fixed. +// +// = AUTHORS +// Jeff Parsons <parsons@cs.wustl.edu> and TAO users. +// +// ============================================================================ + +// Tests all the problem datatypes for repeating a scope +// name after skipping one nesting level. + +module skip +{ + module hump + { + struct skip {short s;}; + }; +}; + +module u_skip +{ + module u_hump + { + union u_skip switch (short) + { + case 0: short s; + }; + }; +}; + +module e_skip +{ + module e_hump + { + exception e_skip {}; + }; +}; + +module i_skip +{ + module i_hump + { + interface i_skip {}; + }; +}; + +module pre_u_skip +{ + module pre_u_hump + { + typedef sequence<long> pre_u_skip; + }; +}; + +module pre_b_skip +{ + module pre_b_hump + { + typedef sequence<long, 3> pre_b_skip; + }; +}; + +module str_u_skip +{ + module str_u_hump + { + typedef sequence<string> str_u_skip; + }; +}; + +module str_b_skip +{ + module str_b_hump + { + typedef sequence<string, 3> str_b_skip; + }; +}; + +module wstr_u_skip +{ + module wstr_u_hump + { + typedef sequence<wstring> wstr_u_skip; + }; +}; + +module wstr_b_skip +{ + module wstr_b_hump + { + typedef sequence<wstring, 3> wstr_b_skip; + }; +}; + +interface bloo {}; + +module obj_u_skip +{ + module obj_u_hump + { + typedef sequence<bloo> obj_u_skip; + }; +}; + +module obj_b_skip +{ + module obj_b_hump + { + typedef sequence<bloo> obj_b_skip; + }; +}; + +module bug_1985_a +{ + module b + { + interface something {}; + }; +}; + +module bug_1985_c +{ + module d + { + interface something : bug_1985_a::b::something {}; + }; +}; + +// This one caused several problems - in the stub declaration of +// the operation, and in the skeleton body's allocation of return type. +module Negotiator +{ + interface UAV_Negotiator {}; + + interface UAV_Negotiator_Factory : ::Negotiator::UAV_Negotiator + { + ::Negotiator::UAV_Negotiator make_negotiator (in string bitrate_sc); + }; +}; + +// Caught some generation of arg helper template parameters not using +// the qualifying '::' on scoped names. + +module bug_2125 +{ + module Bar + { + enum Stuff {ONE, TWO}; + }; +}; + +module Wow +{ + module bug_2125 + { + interface MyInterface + { + void op1 (in bug_2125::Bar::Stuff fbs); + void op2 (in ::bug_2125::Bar::Stuff fbs); + }; + }; +}; + +// This will ensure that we always put the '::' +// before the 'CORBA' on predefined types. +module Company +{ + module CORBA + { + typedef unsigned long LongU; + + module Inner + { + struct Foo + { + boolean x; + }; + }; + }; +}; + |