emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] scratch/merge-cedet-tests 3739238 086/316: Move tests in c


From: Edward John Steere
Subject: [Emacs-diffs] scratch/merge-cedet-tests 3739238 086/316: Move tests in cedet/semantic
Date: Sat, 28 Jan 2017 09:09:50 +0000 (UTC)

branch: scratch/merge-cedet-tests
commit 37392386caadf23c81654a3ce876ead507ad028c
Author: xscript <address@hidden>
Commit: Edward John Steere <address@hidden>

    Move tests in cedet/semantic
---
 .../cedet/cedet/semantic/tests/testsppcomplete.c   |   29 ++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/test/manual/cedet/cedet/semantic/tests/testsppcomplete.c 
b/test/manual/cedet/cedet/semantic/tests/testsppcomplete.c
new file mode 100644
index 0000000..4a37e88
--- /dev/null
+++ b/test/manual/cedet/cedet/semantic/tests/testsppcomplete.c
@@ -0,0 +1,29 @@
+/* Example provided by Hannes Janetzek */
+
+struct Test { int test; };
+
+#define BLA(_type) \
+  _type *bla = (_type*) malloc(sizeof(_type));
+
+#define BLUB(_type)                            \
+  (_type*)malloc(sizeof(_type));
+
+#define FOO(_type)                             \
+  _type *foo = BLUB(_type);
+
+#define BAR(_type)                             \
+  _type *bar = (*_type)BLUB(_type);
+
+int main(int argc, char *argv[]) {
+  BLA(Test);
+  bla->// -1-
+    ; // #1# ( "test" )
+
+  FOO(Test);
+  foo->// -2-
+    ; // #2# ( "test" )
+
+  BAR(Test);
+  bar->// -3-
+    ; // #3# ( "test" )
+}



reply via email to

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