emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/merge-cedet-tests 323ca78 196/316: New test file f


From: Edward John Steere
Subject: [Emacs-diffs] scratch/merge-cedet-tests 323ca78 196/316: New test file for unions.
Date: Sat, 28 Jan 2017 09:10:01 +0000 (UTC)

branch: scratch/merge-cedet-tests
commit 323ca78604063b06c511d4661789526d1425a551
Author: Eric Ludlam <address@hidden>
Commit: Edward John Steere <address@hidden>

    New test file for unions.
---
 .../cedet/cedet/semantic/tests/testunion.cpp       |   28 ++++++++++++++++++++
 1 file changed, 28 insertions(+)

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 0000000..8e2d944
--- /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" )
+
+}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]