Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/upc
diff options
context:
space:
mode:
authorMike Kucera2007-06-12 15:26:54 -0400
committerMike Kucera2007-06-12 15:26:54 -0400
commita694c8157e7f5b2e046db019f8f7f3ba2dfebfe0 (patch)
treecc94a0ee577efe9597727d3abc1735aa36d69fff /upc
parentad08e66295d9d445c771709f5cf9b827d80a1458 (diff)
downloadorg.eclipse.cdt-a694c8157e7f5b2e046db019f8f7f3ba2dfebfe0.tar.gz
org.eclipse.cdt-a694c8157e7f5b2e046db019f8f7f3ba2dfebfe0.tar.xz
org.eclipse.cdt-a694c8157e7f5b2e046db019f8f7f3ba2dfebfe0.zip
cleaned up c99 parser test suites a bit, added C99GCCTests
Diffstat (limited to 'upc')
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/AutomatedIntegrationSuite.java1
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CommentTests.java10
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CompletionBasicTest.java12
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CompletionParseTest.java13
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationInclusionTests.java9
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationMacroTests.java6
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationTests.java6
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMPreprocessorInformationTest.java11
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DigraphTrigraphTests.java15
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99GCCTests.java30
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99KnRTests.java6
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99SelectionParseTest.java6
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99SpecTests.java6
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99Tests.java8
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCLanguageExtensionTests.java27
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/UPCLanguage.java14
16 files changed, 114 insertions, 66 deletions
diff --git a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/AutomatedIntegrationSuite.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/AutomatedIntegrationSuite.java
index da9a15b0938..2c01f3b465a 100644
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/AutomatedIntegrationSuite.java
+++ b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/AutomatedIntegrationSuite.java
@@ -31,6 +31,7 @@ public class AutomatedIntegrationSuite extends TestSuite {
suite.addTestSuite(UPCC99Tests.class);
suite.addTestSuite(UPCLanguageExtensionTests.class);
suite.addTestSuite(UPCC99DigraphTrigraphTests.class);
+ suite.addTestSuite(UPCC99GCCTests.class);
return suite;
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CommentTests.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CommentTests.java
index deddb9ecab8..0a2805b8daf 100644
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CommentTests.java
+++ b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CommentTests.java
@@ -10,15 +10,13 @@
*******************************************************************************/
package org.eclipse.cdt.core.parser.upc.tests;
-import org.eclipse.cdt.core.dom.c99.C99Language;
+import org.eclipse.cdt.core.dom.c99.BaseExtensibleLanguage;
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
import org.eclipse.cdt.core.parser.c99.tests.C99CommentTests;
public class UPCC99CommentTests extends C99CommentTests {
-
- protected C99Language getC99Language() {
- return new UPCLanguage();
- }
-
+ protected BaseExtensibleLanguage getLanguage() {
+ return UPCLanguage.getDefault();
+ }
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CompletionBasicTest.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CompletionBasicTest.java
index 679fbf0535d..c05247bab9a 100644
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CompletionBasicTest.java
+++ b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CompletionBasicTest.java
@@ -10,18 +10,16 @@
*******************************************************************************/
package org.eclipse.cdt.core.parser.upc.tests;
+import org.eclipse.cdt.core.dom.c99.BaseExtensibleLanguage;
import org.eclipse.cdt.core.dom.c99.C99Language;
-import org.eclipse.cdt.core.dom.upc.UPCLanguage;
import org.eclipse.cdt.core.parser.c99.tests.C99CompletionBasicTest;
public class UPCC99CompletionBasicTest extends C99CompletionBasicTest {
- public UPCC99CompletionBasicTest() {
- }
+ public UPCC99CompletionBasicTest() { }
- protected C99Language getC99Language() {
- return new UPCLanguage();
+ protected BaseExtensibleLanguage getLanguage() {
+ return C99Language.getDefault();
}
-
-}
+} \ No newline at end of file
diff --git a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CompletionParseTest.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CompletionParseTest.java
index 6e6c6fe5a62..f704f9647f8 100644
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CompletionParseTest.java
+++ b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CompletionParseTest.java
@@ -10,18 +10,17 @@
*******************************************************************************/
package org.eclipse.cdt.core.parser.upc.tests;
-import org.eclipse.cdt.core.dom.c99.C99Language;
+import org.eclipse.cdt.core.dom.c99.BaseExtensibleLanguage;
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
import org.eclipse.cdt.core.parser.c99.tests.C99CompletionParseTest;
public class UPCC99CompletionParseTest extends C99CompletionParseTest {
- public UPCC99CompletionParseTest(String name) {
- super(name);
- }
-
+ public UPCC99CompletionParseTest() { }
+ public UPCC99CompletionParseTest(String name) { super(name); }
+
- protected C99Language getLanguage() {
- return new UPCLanguage();
+ protected BaseExtensibleLanguage getLanguage() {
+ return UPCLanguage.getDefault();
}
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationInclusionTests.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationInclusionTests.java
index 3010aeec06c..4214d2d3be9 100644
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationInclusionTests.java
+++ b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationInclusionTests.java
@@ -10,16 +10,12 @@
*******************************************************************************/
package org.eclipse.cdt.core.parser.upc.tests;
-import org.eclipse.cdt.core.dom.c99.C99Language;
+import org.eclipse.cdt.core.dom.c99.BaseExtensibleLanguage;
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
import org.eclipse.cdt.core.parser.c99.tests.C99DOMLocationInclusionTests;
public class UPCC99DOMLocationInclusionTests extends C99DOMLocationInclusionTests {
- protected C99Language getLanguage() {
- return new UPCLanguage();
- }
-
public UPCC99DOMLocationInclusionTests() {
}
@@ -31,4 +27,7 @@ public class UPCC99DOMLocationInclusionTests extends C99DOMLocationInclusionTest
super(name);
}
+ protected BaseExtensibleLanguage getLanguage() {
+ return UPCLanguage.getDefault();
+ }
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationMacroTests.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationMacroTests.java
index 7a8ef7d6ebc..b8eb51ea06a 100644
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationMacroTests.java
+++ b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationMacroTests.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.cdt.core.parser.upc.tests;
-import org.eclipse.cdt.core.dom.c99.C99Language;
+import org.eclipse.cdt.core.dom.c99.BaseExtensibleLanguage;
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
import org.eclipse.cdt.core.parser.c99.tests.C99DOMLocationMacroTests;
@@ -19,7 +19,7 @@ public class UPCC99DOMLocationMacroTests extends C99DOMLocationMacroTests {
public UPCC99DOMLocationMacroTests() {
}
- protected C99Language getLanguage() {
- return new UPCLanguage();
+ protected BaseExtensibleLanguage getLanguage() {
+ return UPCLanguage.getDefault();
}
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationTests.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationTests.java
index ce7f704adf4..38417ae403e 100644
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationTests.java
+++ b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationTests.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.cdt.core.parser.upc.tests;
-import org.eclipse.cdt.core.dom.c99.C99Language;
+import org.eclipse.cdt.core.dom.c99.BaseExtensibleLanguage;
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
import org.eclipse.cdt.core.parser.c99.tests.C99DOMLocationTests;
@@ -23,7 +23,7 @@ public class UPCC99DOMLocationTests extends C99DOMLocationTests {
super(name);
}
- protected C99Language getC99Language() {
- return new UPCLanguage();
+ protected BaseExtensibleLanguage getLanguage() {
+ return UPCLanguage.getDefault();
}
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMPreprocessorInformationTest.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMPreprocessorInformationTest.java
index b349f80af0d..b367fad8387 100644
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMPreprocessorInformationTest.java
+++ b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMPreprocessorInformationTest.java
@@ -10,15 +10,14 @@
*******************************************************************************/
package org.eclipse.cdt.core.parser.upc.tests;
-import org.eclipse.cdt.core.dom.c99.C99Language;
+import org.eclipse.cdt.core.dom.c99.BaseExtensibleLanguage;
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
import org.eclipse.cdt.core.parser.c99.tests.C99DOMPreprocessorInformationTest;
-public class UPCC99DOMPreprocessorInformationTest extends
- C99DOMPreprocessorInformationTest {
+public class UPCC99DOMPreprocessorInformationTest extends C99DOMPreprocessorInformationTest {
- protected C99Language getC99Language() {
- return new UPCLanguage();
- }
+ protected BaseExtensibleLanguage getLanguage() {
+ return UPCLanguage.getDefault();
+ }
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DigraphTrigraphTests.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DigraphTrigraphTests.java
index 51131147658..fad52a79592 100644
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DigraphTrigraphTests.java
+++ b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DigraphTrigraphTests.java
@@ -10,22 +10,17 @@
*******************************************************************************/
package org.eclipse.cdt.core.parser.upc.tests;
-import org.eclipse.cdt.core.dom.c99.C99Language;
+import org.eclipse.cdt.core.dom.c99.BaseExtensibleLanguage;
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
import org.eclipse.cdt.core.parser.c99.tests.C99DigraphTrigraphTests;
public class UPCC99DigraphTrigraphTests extends C99DigraphTrigraphTests {
- public UPCC99DigraphTrigraphTests() {
- super();
- }
-
- public UPCC99DigraphTrigraphTests(String name) {
- super(name);
- }
+ public UPCC99DigraphTrigraphTests() { }
+ public UPCC99DigraphTrigraphTests(String name) { super(name); }
- protected C99Language getC99Language() {
- return new UPCLanguage();
+ protected BaseExtensibleLanguage getLanguage() {
+ return UPCLanguage.getDefault();
}
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99GCCTests.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99GCCTests.java
new file mode 100644
index 00000000000..713ec1a80ae
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99GCCTests.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.upc.tests;
+
+import org.eclipse.cdt.core.dom.c99.BaseExtensibleLanguage;
+import org.eclipse.cdt.core.dom.upc.UPCLanguage;
+import org.eclipse.cdt.core.parser.c99.tests.C99GCCTests;
+
+public class UPCC99GCCTests extends C99GCCTests {
+
+ public UPCC99GCCTests() {
+ }
+
+ public UPCC99GCCTests(String message) {
+ super(message);
+ }
+
+ protected BaseExtensibleLanguage getLanguage() {
+ return UPCLanguage.getDefault();
+ }
+
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99KnRTests.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99KnRTests.java
index bf44178dceb..3bd637ca4a4 100644
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99KnRTests.java
+++ b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99KnRTests.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.cdt.core.parser.upc.tests;
-import org.eclipse.cdt.core.dom.c99.C99Language;
+import org.eclipse.cdt.core.dom.c99.BaseExtensibleLanguage;
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
import org.eclipse.cdt.core.parser.c99.tests.C99KnRTests;
@@ -19,8 +19,8 @@ public class UPCC99KnRTests extends C99KnRTests {
public UPCC99KnRTests() {
}
- protected C99Language getLanguage() {
- return new UPCLanguage();
+ protected BaseExtensibleLanguage getLanguage() {
+ return UPCLanguage.getDefault();
}
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99SelectionParseTest.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99SelectionParseTest.java
index 009e4c7ade4..5df62c990ad 100644
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99SelectionParseTest.java
+++ b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99SelectionParseTest.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.cdt.core.parser.upc.tests;
-import org.eclipse.cdt.core.dom.c99.C99Language;
+import org.eclipse.cdt.core.dom.c99.BaseExtensibleLanguage;
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
import org.eclipse.cdt.core.parser.c99.tests.C99SelectionParseTest;
@@ -27,8 +27,8 @@ public class UPCC99SelectionParseTest extends C99SelectionParseTest {
super(name);
}
- protected C99Language getLanguage() {
- return new UPCLanguage();
+ protected BaseExtensibleLanguage getLanguage() {
+ return UPCLanguage.getDefault();
}
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99SpecTests.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99SpecTests.java
index 8f9ed3d3f02..0649e3c6bdc 100644
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99SpecTests.java
+++ b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99SpecTests.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.cdt.core.parser.upc.tests;
-import org.eclipse.cdt.core.dom.c99.C99Language;
+import org.eclipse.cdt.core.dom.c99.BaseExtensibleLanguage;
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
import org.eclipse.cdt.core.parser.c99.tests.C99SpecTests;
@@ -23,8 +23,8 @@ public class UPCC99SpecTests extends C99SpecTests {
super(name);
}
- protected C99Language getLanguage() {
- return new UPCLanguage();
+ protected BaseExtensibleLanguage getLanguage() {
+ return UPCLanguage.getDefault();
}
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99Tests.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99Tests.java
index bfae72d3a59..98e9874c8b5 100644
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99Tests.java
+++ b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99Tests.java
@@ -10,9 +10,9 @@
*******************************************************************************/
package org.eclipse.cdt.core.parser.upc.tests;
-import org.eclipse.cdt.core.parser.c99.tests.C99Tests;
-import org.eclipse.cdt.core.dom.c99.C99Language;
+import org.eclipse.cdt.core.dom.c99.BaseExtensibleLanguage;
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
+import org.eclipse.cdt.core.parser.c99.tests.C99Tests;
/**
* Run the C99 tests against the UPC parser
*
@@ -23,8 +23,8 @@ public class UPCC99Tests extends C99Tests {
super(name);
}
- protected C99Language getC99Language() {
- return new UPCLanguage();
+ protected BaseExtensibleLanguage getC99Language() {
+ return UPCLanguage.getDefault();
}
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCLanguageExtensionTests.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCLanguageExtensionTests.java
index 5485e3ed6b2..249e948c817 100644
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCLanguageExtensionTests.java
+++ b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCLanguageExtensionTests.java
@@ -12,8 +12,27 @@ package org.eclipse.cdt.core.parser.upc.tests;
import junit.framework.TestCase;
-import org.eclipse.cdt.core.dom.ast.*;
-import org.eclipse.cdt.core.dom.c99.C99Language;
+import org.eclipse.cdt.core.dom.ast.IASTArrayDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTArrayModifier;
+import org.eclipse.cdt.core.dom.ast.IASTArraySubscriptExpression;
+import org.eclipse.cdt.core.dom.ast.IASTBinaryExpression;
+import org.eclipse.cdt.core.dom.ast.IASTCompoundStatement;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarationStatement;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTExpressionStatement;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTIdExpression;
+import org.eclipse.cdt.core.dom.ast.IASTLiteralExpression;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTStatement;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
+import org.eclipse.cdt.core.dom.ast.IScope;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.dom.c99.BaseExtensibleLanguage;
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
import org.eclipse.cdt.core.dom.upc.ast.IUPCASTDeclSpecifier;
import org.eclipse.cdt.core.dom.upc.ast.IUPCASTForallStatement;
@@ -34,8 +53,8 @@ public class UPCLanguageExtensionTests extends TestCase {
}
- protected C99Language getLanguage() {
- return new UPCLanguage();
+ protected BaseExtensibleLanguage getLanguage() {
+ return UPCLanguage.getDefault();
}
// test problem-free parsing of UPC constructs (maily declarations)
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/UPCLanguage.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/UPCLanguage.java
index 17b751ca622..556612475aa 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/UPCLanguage.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/UPCLanguage.java
@@ -10,10 +10,13 @@
*******************************************************************************/
package org.eclipse.cdt.core.dom.upc;
+import org.eclipse.cdt.core.dom.c99.BaseExtensibleLanguage;
import org.eclipse.cdt.core.dom.c99.C99Language;
import org.eclipse.cdt.core.dom.c99.IKeywordMap;
import org.eclipse.cdt.core.dom.c99.IParser;
+import org.eclipse.cdt.core.dom.c99.IPreprocessorExtensionConfiguration;
import org.eclipse.cdt.core.dom.parser.c99.C99KeywordMap;
+import org.eclipse.cdt.core.dom.parser.c99.GCCPreprocessorExtensionConfiguration;
import org.eclipse.cdt.core.dom.parser.upc.UPCKeywordMap;
import org.eclipse.cdt.internal.core.dom.parser.upc.UPCParser;
@@ -25,7 +28,10 @@ import org.eclipse.cdt.internal.core.dom.parser.upc.UPCParser;
*
* @author Mike Kucera
*/
-public class UPCLanguage extends C99Language {
+public class UPCLanguage extends BaseExtensibleLanguage {
+
+ protected static final IPreprocessorExtensionConfiguration
+ GCC_PREPROCESSOR_EXTENSION = new GCCPreprocessorExtensionConfiguration();
// TODO: this should probably go somewhere else
public static final String PLUGIN_ID = "org.eclipse.cdt.core.parser.upc"; //$NON-NLS-1$
@@ -35,7 +41,7 @@ public class UPCLanguage extends C99Language {
private static final UPCLanguage myDefault = new UPCLanguage();
- public static C99Language getDefault() {
+ public static UPCLanguage getDefault() {
return myDefault;
}
@@ -57,4 +63,8 @@ public class UPCLanguage extends C99Language {
return keywordMap;
}
+ protected IPreprocessorExtensionConfiguration getPreprocessorExtensionConfiguration() {
+ return GCC_PREPROCESSOR_EXTENSION;
+ }
+
}

Back to the top