summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-02-18 01:05:23 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-02-18 01:05:23 +0000
commitfae9d226badf0511fd49902caf4184fc299d1495 (patch)
tree01afb4822b8cdb91463d99641b9b332cbd4fe393
parent0b6f484b0e8158023d89741be9faafc88f5e1bd6 (diff)
downloadATCD-fae9d226badf0511fd49902caf4184fc299d1495.tar.gz
Removed new example from reopened_modules.idl and added the example
plus many similar ones for various data types to new file nested_scope.idl.
-rw-r--r--TAO/tests/IDL_Test/Makefile1
-rw-r--r--TAO/tests/IDL_Test/idl_test.dsp41
-rw-r--r--TAO/tests/IDL_Test/nested_scope.idl127
-rw-r--r--TAO/tests/IDL_Test/reopened_modules.idl11
4 files changed, 169 insertions, 11 deletions
diff --git a/TAO/tests/IDL_Test/Makefile b/TAO/tests/IDL_Test/Makefile
index 1035fe68cf8..eebbc829e4c 100644
--- a/TAO/tests/IDL_Test/Makefile
+++ b/TAO/tests/IDL_Test/Makefile
@@ -24,6 +24,7 @@ IDL_ALWAYS = anonymous \
including \
interface \
keywords \
+ nested_scope \
params \
pragma \
sequence \
diff --git a/TAO/tests/IDL_Test/idl_test.dsp b/TAO/tests/IDL_Test/idl_test.dsp
index b5057b2632e..db76fc6da3c 100644
--- a/TAO/tests/IDL_Test/idl_test.dsp
+++ b/TAO/tests/IDL_Test/idl_test.dsp
@@ -162,6 +162,14 @@ SOURCE=.\main.cpp
# End Source File
# Begin Source File
+SOURCE=.\nested_scopeC.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\nested_scopeS.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\paramsC.cpp
# End Source File
# Begin Source File
@@ -286,6 +294,14 @@ SOURCE=.\keywordsS.h
# End Source File
# Begin Source File
+SOURCE=.\nested_scopeC.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\nested_scopeS.h
+# End Source File
+# Begin Source File
+
SOURCE=.\paramsC.h
# End Source File
# Begin Source File
@@ -374,6 +390,10 @@ SOURCE=.\keywordsC.i
# End Source File
# Begin Source File
+SOURCE=.\nested_scopeC.i
+# End Source File
+# Begin Source File
+
SOURCE=.\paramsC.i
# End Source File
# Begin Source File
@@ -1167,6 +1187,27 @@ BuildCmds= \
# End Source File
# Begin Source File
+SOURCE=.\nested_scope.idl
+
+!IF "$(CFG)" == "idl_test - Win32 Release"
+
+!ELSEIF "$(CFG)" == "idl_test - Win32 Debug"
+
+USERDEP__NESTE="..\..\..\bin\tao_idl.exe"
+# Begin Custom Build - Invoking TAO IDL Compiler on $(InputName).idl
+InputPath=.\nested_scope.idl
+InputName=nested_scope
+
+"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ ..\..\..\bin\tao_idl -Ge 1 $(InputName).idl
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
SOURCE=.\params.idl
!IF "$(CFG)" == "idl_test - Win32 Release"
diff --git a/TAO/tests/IDL_Test/nested_scope.idl b/TAO/tests/IDL_Test/nested_scope.idl
new file mode 100644
index 00000000000..4617025ec5c
--- /dev/null
+++ b/TAO/tests/IDL_Test/nested_scope.idl
@@ -0,0 +1,127 @@
+// $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 foo {};
+
+module obj_u_skip
+{
+ module obj_u_hump
+ {
+ typedef sequence<foo> obj_u_skip;
+ };
+};
+
+module obj_b_skip
+{
+ module obj_b_hump
+ {
+ typedef sequence<foo> obj_b_skip;
+ };
+};
+
+
+
diff --git a/TAO/tests/IDL_Test/reopened_modules.idl b/TAO/tests/IDL_Test/reopened_modules.idl
index 2f27ceb7d77..b1c420017d2 100644
--- a/TAO/tests/IDL_Test/reopened_modules.idl
+++ b/TAO/tests/IDL_Test/reopened_modules.idl
@@ -119,14 +119,3 @@ module com
};
};
-// Not a reopened module per se, but a test to ensure that
-// the prevention of the redefinition of a module
-// immediately within itself does not reach any further in
-// than that.
-module skip
-{
- module hump
- {
- interface skip {};
- };
-};