diff options
Diffstat (limited to 'TAO/tests/IDL_Test/including.idl')
-rw-r--r-- | TAO/tests/IDL_Test/including.idl | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/TAO/tests/IDL_Test/including.idl b/TAO/tests/IDL_Test/including.idl new file mode 100644 index 00000000000..431f8903c9c --- /dev/null +++ b/TAO/tests/IDL_Test/including.idl @@ -0,0 +1,72 @@ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// TAO/tests/IDL_Test +// +// = FILENAME +// including.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. +// +// ============================================================================ + +#ifndef IDL_TEST_INCLUDING_IDL +#define IDL_TEST_INCLUDING_IDL + +#include "included.idl" + +enum choice +{ + dog +}; + +union myUnion switch (choice) +{ + // Typedef is in included file + case dog: Aok::Seq1Type cat; +}; + +// Enum discriminator is in included file +union Bog switch (Agog) +{ + case Agog1: long bog1; + case Agog2: long bog2; + case Agog3: long bog3; +}; + +// We had a name clash with Me and ME, but the +// rule that requires type defined in a scope +// which is defined in an interface to be +// added to the referenced types in the interface's +// scope doesn't apply here, because Me is not +// defined in the struct, only referenced. +interface iface +{ + enum postal + { + ME, + TAO_FE // FE is #defined on HP-UX 10.20, so I prefix it with TAO + }; + + struct using_incl + { + Aok::Me field1; + }; +}; + +module VT_Test +{ + typedef sequence<VT_Def::VT> VTSeq; +}; + +#endif /* IDL_TEST_INCLUDING_IDL */ + |