summaryrefslogtreecommitdiff
path: root/TAO/tests/IDL_Test/fwd.idl
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/IDL_Test/fwd.idl')
-rw-r--r--TAO/tests/IDL_Test/fwd.idl77
1 files changed, 77 insertions, 0 deletions
diff --git a/TAO/tests/IDL_Test/fwd.idl b/TAO/tests/IDL_Test/fwd.idl
new file mode 100644
index 00000000000..519d5489f6e
--- /dev/null
+++ b/TAO/tests/IDL_Test/fwd.idl
@@ -0,0 +1,77 @@
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO/tests/IDL_Test
+//
+// = FILENAME
+// fwd.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.
+//
+// ============================================================================
+
+// This file, along with its companion full.idl, test the
+// handling of forward interface declarations that are
+// not defined in the same IDL file. The two files have
+// mutually dependent interfaces. It is no longer necessary
+// for such ILD files to include each other, as long as
+// they are part of the same build.
+
+module scope_test
+{
+ interface i_scope_test;
+};
+
+module mod2
+{
+ struct scope_struct
+ {
+ scope_test::i_scope_test ss_member;
+ };
+
+ interface fwd;
+
+ exception exp
+ {
+ fwd fwd_mem;
+ };
+
+ typedef fwd td_fwd;
+
+ interface full
+ {
+ fwd op (in fwd inarg,
+ inout fwd inoutarg,
+ out fwd outarg);
+ };
+
+ typedef sequence<full, 5> full_seq2;
+
+ interface fwd;
+};
+
+// Tests a bug where code generation for an interface
+// which was forward declared, then fully defined with
+// both concrete and abstract parents caused the IDL
+// compiler to crash.
+module fwd_mixed_intf
+{
+ interface mixed_parents;
+
+ interface concrete_parent {};
+
+ abstract interface abstract_parent {};
+
+ interface mixed_abs_first : abstract_parent, concrete_parent {};
+ interface mixed_conc_first : concrete_parent, abstract_parent {};
+};
+