diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2006-03-13 19:50:56 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2006-03-13 19:50:56 +0000 |
commit | ff40bf0dd1bb8c7bd0dba969d21edacc5af1812a (patch) | |
tree | 97c0b355d29b8cb10a52322601efd8b614a2b350 /TAO | |
parent | 810983e51bbf395599c7c5e5b924e1ae19a697e7 (diff) | |
download | ATCD-ff40bf0dd1bb8c7bd0dba969d21edacc5af1812a.tar.gz |
ChangeLogTag: Mon Mar 13 19:35:12 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/tests/Any/Recursive/Test.idl | 13 | ||||
-rw-r--r-- | TAO/tests/Any/Recursive/client.cpp | 15 |
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, |