diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-07-22 22:28:28 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-07-22 22:28:28 +0000 |
commit | 57368ce48d7378aa333b9df705ba89c1df2bf0e4 (patch) | |
tree | 95b54052f4394257c7f46607247c5129bf47649b /TAO/tests/IDL_Test | |
parent | daeea59f4d5813c0a957968bae431250c186d7f2 (diff) | |
download | ATCD-57368ce48d7378aa333b9df705ba89c1df2bf0e4.tar.gz |
ChangeLogTag: Mon Jul 22 17:20:41 2002 Jeff Parsons <parsons@cs.wustl.edu>
Diffstat (limited to 'TAO/tests/IDL_Test')
-rw-r--r-- | TAO/tests/IDL_Test/enum_in_struct.idl | 41 | ||||
-rw-r--r-- | TAO/tests/IDL_Test/union.idl | 33 |
2 files changed, 74 insertions, 0 deletions
diff --git a/TAO/tests/IDL_Test/enum_in_struct.idl b/TAO/tests/IDL_Test/enum_in_struct.idl index 07e309fe5b7..a8c98468f30 100644 --- a/TAO/tests/IDL_Test/enum_in_struct.idl +++ b/TAO/tests/IDL_Test/enum_in_struct.idl @@ -41,3 +41,44 @@ struct HoldsEnum UnNamed unnamed_enum; }; +// Test for anonymous arrays of member declarations + +struct decl_heavy_struct +{ + enum en + { + a, + b, + c + } m_en[10]; + + struct st + { + long a; + char b; + } m_st[10]; + + union un switch (long) + { + case 1: long a; + case 2: char b; + } m_un[10]; +}; + +// Similar case for exception included here - no sense +// in making a separte file for exceptions, which are +// almost the same as structs. + +exception ErrorException +{ + enum ReasonCode + { + RESOURCE, + COMMUNICATION, + ASSERTION, + STATE, + ALREADY, + OTHER + } reason; +}; + diff --git a/TAO/tests/IDL_Test/union.idl b/TAO/tests/IDL_Test/union.idl index f2e88ae05c6..30064ac3360 100644 --- a/TAO/tests/IDL_Test/union.idl +++ b/TAO/tests/IDL_Test/union.idl @@ -236,3 +236,36 @@ union TestUnion switch (short) case 2: TestTwoEnum twoEnum; }; +// Test for various kinds of declarations inside a union, +// similar to the example in enum_in_struct.idl. + +union decl_heavy_union switch (short) +{ + case 1: + enum which + { + ZERO, + ONE, + TWO + } m_which; + case 2: + enum en + { + a, + b, + c + } m_en_arr[10]; + case 3: + struct st + { + long a; + char b; + } m_st_arr[10]; + case 4: + union un switch (long) + { + case 1: long a; + case 2: char b; + } m_un_arr[10]; +}; + |