Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Camelon2003-06-17 21:38:29 +0000
committerJohn Camelon2003-06-17 21:38:29 +0000
commitb1c1e00a78347dcc957216c5590b0cfa10b1c14b (patch)
tree6ff7283dd5c0d0432902dc4ef7cc37d5cf1bcd89 /core/org.eclipse.cdt.ui.tests/model/org.eclipse.cdt.core.model.tests.resources/IStructure.c
parentd45de32ff5fcec052d8908b93f9c7324897b3185 (diff)
downloadorg.eclipse.cdt-b1c1e00a78347dcc957216c5590b0cfa10b1c14b.tar.gz
org.eclipse.cdt-b1c1e00a78347dcc957216c5590b0cfa10b1c14b.tar.xz
org.eclipse.cdt-b1c1e00a78347dcc957216c5590b0cfa10b1c14b.zip
Patch for Brent Nicolle
Added Interface tests for IStructure.
Diffstat (limited to 'core/org.eclipse.cdt.ui.tests/model/org.eclipse.cdt.core.model.tests.resources/IStructure.c')
-rw-r--r--core/org.eclipse.cdt.ui.tests/model/org.eclipse.cdt.core.model.tests.resources/IStructure.c88
1 files changed, 86 insertions, 2 deletions
diff --git a/core/org.eclipse.cdt.ui.tests/model/org.eclipse.cdt.core.model.tests.resources/IStructure.c b/core/org.eclipse.cdt.ui.tests/model/org.eclipse.cdt.core.model.tests.resources/IStructure.c
index 47b76757194..c46b043df41 100644
--- a/core/org.eclipse.cdt.ui.tests/model/org.eclipse.cdt.core.model.tests.resources/IStructure.c
+++ b/core/org.eclipse.cdt.ui.tests/model/org.eclipse.cdt.core.model.tests.resources/IStructure.c
@@ -1,4 +1,88 @@
// IStructure
-struct foo {
- int bar;
+struct testStruct1 {
+ char m_field1;
+ char* m_field2;
+ unsigned char m_field3;
+ int m_field4;
+ unsigned m_field5;
+ void* m_field6;
+
+ void method1();
+ struct testStruct1 method2( char* in_field2, int in_field4 ) {}
+ // this is very C++:
+ testStruct1( char* in_field2, int in_field4 ) {}
+ ~testStruct1() {}
+};
+
+struct testStruct2 {
+};
+
+struct testStruct3 {
+} aTestStruct3;
+
+// no semicolon, parser should recover
+struct testStruct4NoSemicolon {
+}
+
+// forward declaration
+struct testStruct5;
+
+// variable declaration using predefined struct.
+struct testStruct6 aTestStruct6;
+
+struct {
+ int x;
+} testAnonymousStructObject1;
+
+struct {
+ int x;
+} testAnonymousStructObject2= {1};
+
+// to resync the parser if necessary
+struct testStruct7 {
+};
+
+// an inner struct
+struct testStruct8 {
+ struct testStruct9Inner {
+ int x;
+ };
+ struct testStruct10Inner {
+ int y;
+ struct testStruct11Inner {
+ int z;
+ };
+ };
+};
+
+union testUnion1 {
+ char m_field1;
+ char* m_field2;
+ unsigned char m_field3;
+ int m_field4;
+ unsigned m_field5;
+ void* m_field6;
+};
+
+class testClass1 {
+};
+
+class testClass2NoSemicolon {
+}
+
+class testClass3 {
+};
+
+class testClass4Abstract {
+ void aNonVirtual();
+ virtual void aVirtual();
+ virtual void aPureVirtual()=0;
+};
+
+class testClass5
+: public testClass1, protected testClass3, private testClass4Abstract {
+};
+
+// to resync the parser if necessary
+class testClass6 {
};

Back to the top