From: Eric Ludlam Date: Thu, 23 Apr 2015 00:58:59 +0000 (-0400) Subject: New test file for unions. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=323ca78604063b06c511d4661789526d1425a551;p=emacs.git New test file for unions. --- diff --git a/test/manual/cedet/cedet/semantic/tests/testunion.cpp b/test/manual/cedet/cedet/semantic/tests/testunion.cpp new file mode 100644 index 00000000000..8e2d944b049 --- /dev/null +++ b/test/manual/cedet/cedet/semantic/tests/testunion.cpp @@ -0,0 +1,28 @@ +// Test unions and completion. + +struct myStruct { + int base1; + int base2; + + union { // Named + char *named_str; + void *named_ptr; + } allocated; + + union { // Anonymous + char *anon_str; + void *anon_ptr; + }; + +}; + +int main() { + struct myStruct S; + + S.//-1- + ; // #1# ( "allocated" "base1" "base2" "anon_str" "anon_ptr" ) + + S.allocated.//-2- + ; // #2# ( "named_str" "named_ptr" ) + +}