summaryrefslogtreecommitdiff
path: root/TAO/tests
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2006-03-13 19:50:56 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2006-03-13 19:50:56 +0000
commit3335409885d3b37314fa39e0e2867ca8347bcc39 (patch)
tree97c0b355d29b8cb10a52322601efd8b614a2b350 /TAO/tests
parent2a7a7996eb3dbe60a5e7002bfe13971988856801 (diff)
downloadATCD-3335409885d3b37314fa39e0e2867ca8347bcc39.tar.gz
ChangeLogTag: Mon Mar 13 19:35:12 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/tests')
-rw-r--r--TAO/tests/Any/Recursive/Test.idl13
-rw-r--r--TAO/tests/Any/Recursive/client.cpp15
2 files changed, 24 insertions, 4 deletions
diff --git a/TAO/tests/Any/Recursive/Test.idl b/TAO/tests/Any/Recursive/Test.idl
index 08a33a2346c..d1d5e447c36 100644
--- a/TAO/tests/Any/Recursive/Test.idl
+++ b/TAO/tests/Any/Recursive/Test.idl
@@ -55,7 +55,8 @@ module Test
enum VSort {
UNKNOWN_TYPE,
RECURSIVE_TYPE,
- LONG_STYPE
+ LONG_STYPE,
+ BOOL_STYPE
};
union VSortRecursiveUnion;
@@ -70,6 +71,16 @@ module Test
// --------------------------
+ union EnumUnion switch (VSort)
+ {
+ case BOOL_STYPE:
+ boolean a;
+ case LONG_STYPE:
+ long i;
+ };
+
+ // --------------------------
+
valuetype IndirectlyRecursiveValuetype;
typedef sequence<IndirectlyRecursiveValuetype>
IndirectlyRecursiveValuetypeSeq;
diff --git a/TAO/tests/Any/Recursive/client.cpp b/TAO/tests/Any/Recursive/client.cpp
index 41179ed0456..6bb78f5ed62 100644
--- a/TAO/tests/Any/Recursive/client.cpp
+++ b/TAO/tests/Any/Recursive/client.cpp
@@ -168,13 +168,22 @@ recursive_union_test (CORBA::ORB_ptr /* orb */,
"Executing recursive union test\n"));
Test::RecursiveUnion foo;
-
- // Non-recursive member case.
+ Test::EnumUnion foo_enum;
static CORBA::Long const test_long = 238901;
+ CORBA::Any the_any;
+
+ // First simple case, just an union with an enum as discriminator
+ foo_enum.i (test_long);
+ the_any <<= foo_enum;
+ ::perform_invocation<Test::EnumUnion> (hello,
+ the_any
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // Non-recursive member case.
foo.i (test_long);
- CORBA::Any the_any;
the_any <<= foo;
::perform_invocation<Test::RecursiveUnion> (hello,