Skip to main content
summaryrefslogtreecommitdiffstats
path: root/upc
diff options
context:
space:
mode:
Diffstat (limited to 'upc')
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/.classpath7
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/.project28
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/META-INF/MANIFEST.MF16
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/about.html24
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/build.properties16
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/plugin.properties15
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/AutomatedIntegrationSuite.java42
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CommentTests.java22
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CompleteParser2Tests.java23
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CompletionBasicTest.java25
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CompletionParseTest.java26
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationInclusionTests.java33
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationMacroTests.java25
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationTests.java29
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMPreprocessorInformationTest.java23
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DigraphTrigraphTests.java26
-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.java26
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99SelectionParseTest.java26
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99SpecTests.java30
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99TaskParserTest.java23
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99Tests.java36
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99UtilOldTests.java23
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99UtilTests.java23
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCLanguageExtensionTests.java517
25 files changed, 0 insertions, 1114 deletions
diff --git a/upc/org.eclipse.cdt.core.parser.upc.tests/.classpath b/upc/org.eclipse.cdt.core.parser.upc.tests/.classpath
deleted file mode 100644
index 751c8f2e504..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/upc/org.eclipse.cdt.core.parser.upc.tests/.project b/upc/org.eclipse.cdt.core.parser.upc.tests/.project
deleted file mode 100644
index 5ccd5d6305e..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.cdt.core.parser.upc.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/upc/org.eclipse.cdt.core.parser.upc.tests/META-INF/MANIFEST.MF b/upc/org.eclipse.cdt.core.parser.upc.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 08c8d4ec5a2..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.eclipse.cdt.core.parser.upc.tests
-Bundle-Version: 4.0.0.qualifier
-Require-Bundle: org.eclipse.core.runtime,
- org.junit,
- org.eclipse.cdt.core.parser.c99,
- org.eclipse.cdt.core.tests,
- org.eclipse.cdt.core,
- org.eclipse.core.resources,
- org.eclipse.cdt.core.parser.c99.tests,
- org.eclipse.cdt.core.parser.upc
-Eclipse-LazyStart: false
-Bundle-Vendor: %Bundle-Vendor.0
-Bundle-Localization: plugin
diff --git a/upc/org.eclipse.cdt.core.parser.upc.tests/about.html b/upc/org.eclipse.cdt.core.parser.upc.tests/about.html
deleted file mode 100644
index 9b669c2fd0c..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/about.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>About</title></head>
-
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>February 8, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body></html> \ No newline at end of file
diff --git a/upc/org.eclipse.cdt.core.parser.upc.tests/build.properties b/upc/org.eclipse.cdt.core.parser.upc.tests/build.properties
deleted file mode 100644
index 185a840ec69..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
diff --git a/upc/org.eclipse.cdt.core.parser.upc.tests/plugin.properties b/upc/org.eclipse.cdt.core.parser.upc.tests/plugin.properties
deleted file mode 100644
index 73788c4a0c7..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/plugin.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# Copyright (c) 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
-###############################################################################
-# properties file for org.eclipse.cdt.core.parser.c99.tests
-Bundle-Vendor.0 = Eclipse.org
-Bundle-Name.0 = C99 Parser Tests Plug-in
-
-upcSourceName=UPC Source File \ 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/AutomatedIntegrationSuite.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/AutomatedIntegrationSuite.java
deleted file mode 100644
index eb8a7ec788e..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/AutomatedIntegrationSuite.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * 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 junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AutomatedIntegrationSuite extends TestSuite {
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
-
- suite.addTestSuite(UPCC99CommentTests.class);
- suite.addTestSuite(UPCC99CompletionBasicTest.class);
- suite.addTestSuite(UPCC99CompletionParseTest.class);
- suite.addTestSuite(UPCC99DOMLocationInclusionTests.class);
- suite.addTestSuite(UPCC99DOMLocationMacroTests.class);
- suite.addTestSuite(UPCC99DOMLocationTests.class);
- suite.addTestSuite(UPCC99DOMPreprocessorInformationTest.class);
- suite.addTestSuite(UPCC99KnRTests.class);
- suite.addTestSuite(UPCC99SelectionParseTest.class);
- suite.addTestSuite(UPCC99SpecTests.class);
- suite.addTestSuite(UPCC99Tests.class);
- suite.addTestSuite(UPCLanguageExtensionTests.class);
- suite.addTestSuite(UPCC99DigraphTrigraphTests.class);
- suite.addTestSuite(UPCC99GCCTests.class);
- suite.addTestSuite(UPCC99UtilOldTests.class);
- suite.addTestSuite(UPCC99UtilTests.class);
- suite.addTestSuite(UPCC99CompleteParser2Tests.class);
- suite.addTestSuite(UPCC99TaskParserTest.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
deleted file mode 100644
index 0a2805b8daf..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CommentTests.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * 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.C99CommentTests;
-
-public class UPCC99CommentTests extends C99CommentTests {
-
- 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/UPCC99CompleteParser2Tests.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CompleteParser2Tests.java
deleted file mode 100644
index ac2577df7cc..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CompleteParser2Tests.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * 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.C99CompleteParser2Tests;
-
-public class UPCC99CompleteParser2Tests extends C99CompleteParser2Tests {
-
- 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
deleted file mode 100644
index c05247bab9a..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CompletionBasicTest.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * 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.c99.C99Language;
-import org.eclipse.cdt.core.parser.c99.tests.C99CompletionBasicTest;
-
-public class UPCC99CompletionBasicTest extends C99CompletionBasicTest {
-
- public UPCC99CompletionBasicTest() { }
-
- 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
deleted file mode 100644
index f704f9647f8..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99CompletionParseTest.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * 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.C99CompletionParseTest;
-
-public class UPCC99CompletionParseTest extends C99CompletionParseTest {
-
- public UPCC99CompletionParseTest() { }
- public UPCC99CompletionParseTest(String name) { 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/UPCC99DOMLocationInclusionTests.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationInclusionTests.java
deleted file mode 100644
index 4214d2d3be9..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationInclusionTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * 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.C99DOMLocationInclusionTests;
-
-public class UPCC99DOMLocationInclusionTests extends C99DOMLocationInclusionTests {
-
- public UPCC99DOMLocationInclusionTests() {
- }
-
- public UPCC99DOMLocationInclusionTests(String name, Class className) {
- super(name, className);
- }
-
- public UPCC99DOMLocationInclusionTests(String name) {
- 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
deleted file mode 100644
index b8eb51ea06a..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationMacroTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * 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.C99DOMLocationMacroTests;
-
-public class UPCC99DOMLocationMacroTests extends C99DOMLocationMacroTests {
-
- public UPCC99DOMLocationMacroTests() {
- }
-
- 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
deleted file mode 100644
index 38417ae403e..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMLocationTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * 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.C99DOMLocationTests;
-
-public class UPCC99DOMLocationTests extends C99DOMLocationTests {
-
- public UPCC99DOMLocationTests() {
- }
-
- public UPCC99DOMLocationTests(String name) {
- 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/UPCC99DOMPreprocessorInformationTest.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMPreprocessorInformationTest.java
deleted file mode 100644
index b367fad8387..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DOMPreprocessorInformationTest.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * 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.C99DOMPreprocessorInformationTest;
-
-public class UPCC99DOMPreprocessorInformationTest extends C99DOMPreprocessorInformationTest {
-
- 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
deleted file mode 100644
index fad52a79592..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99DigraphTrigraphTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * 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.C99DigraphTrigraphTests;
-
-
-public class UPCC99DigraphTrigraphTests extends C99DigraphTrigraphTests {
-
- public UPCC99DigraphTrigraphTests() { }
- public UPCC99DigraphTrigraphTests(String name) { 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/UPCC99GCCTests.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99GCCTests.java
deleted file mode 100644
index 713ec1a80ae..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99GCCTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * 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
deleted file mode 100644
index 3bd637ca4a4..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99KnRTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * 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.C99KnRTests;
-
-public class UPCC99KnRTests extends C99KnRTests {
-
- public UPCC99KnRTests() {
- }
-
- 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
deleted file mode 100644
index 829ed9c1bff..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99SelectionParseTest.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * 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.C99SelectionParseTest;
-
-public class UPCC99SelectionParseTest extends C99SelectionParseTest {
-
- public UPCC99SelectionParseTest() { }
- public UPCC99SelectionParseTest(String name) { 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/UPCC99SpecTests.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99SpecTests.java
deleted file mode 100644
index 0649e3c6bdc..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99SpecTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * 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.C99SpecTests;
-
-public class UPCC99SpecTests extends C99SpecTests {
-
- public UPCC99SpecTests() {
- }
-
- public UPCC99SpecTests(String name) {
- 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/UPCC99TaskParserTest.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99TaskParserTest.java
deleted file mode 100644
index bce6d652516..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99TaskParserTest.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * 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.C99TaskParserTest;
-
-public class UPCC99TaskParserTest extends C99TaskParserTest {
-
- 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
deleted file mode 100644
index 6869ea78f50..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99Tests.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * 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 junit.framework.TestSuite;
-
-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
- *
- */
-public class UPCC99Tests extends C99Tests {
-
- public static TestSuite suite() {
- return suite(UPCC99Tests.class);
- }
-
- public UPCC99Tests(String name) {
- 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/UPCC99UtilOldTests.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99UtilOldTests.java
deleted file mode 100644
index f4f9a9bbc68..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99UtilOldTests.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * 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.C99UtilOldTests;
-
-public class UPCC99UtilOldTests extends C99UtilOldTests {
-
- 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/UPCC99UtilTests.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99UtilTests.java
deleted file mode 100644
index ac174646d32..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCC99UtilTests.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * 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.C99UtilTests;
-
-public class UPCC99UtilTests extends C99UtilTests {
-
- 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/UPCLanguageExtensionTests.java b/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCLanguageExtensionTests.java
deleted file mode 100644
index e8f94745354..00000000000
--- a/upc/org.eclipse.cdt.core.parser.upc.tests/src/org/eclipse/cdt/core/parser/upc/tests/UPCLanguageExtensionTests.java
+++ /dev/null
@@ -1,517 +0,0 @@
-/*******************************************************************************
- * 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 junit.framework.TestCase;
-
-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.IASTTypeIdExpression;
-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;
-import org.eclipse.cdt.core.dom.upc.ast.IUPCASTKeywordExpression;
-import org.eclipse.cdt.core.dom.upc.ast.IUPCASTSimpleDeclSpecifier;
-import org.eclipse.cdt.core.dom.upc.ast.IUPCASTSizeofExpression;
-import org.eclipse.cdt.core.dom.upc.ast.IUPCASTSynchronizationStatement;
-import org.eclipse.cdt.core.parser.c99.tests.ParseHelper;
-import org.eclipse.cdt.internal.core.parser.ParserException;
-
-public class UPCLanguageExtensionTests extends TestCase {
-
- public UPCLanguageExtensionTests() {
- }
-
- public UPCLanguageExtensionTests(String name) {
- super(name);
- }
-
-
- protected BaseExtensibleLanguage getLanguage() {
- return UPCLanguage.getDefault();
- }
-
- // test problem-free parsing of UPC constructs (maily declarations)
- // test the AST is correct
- // test that binding resolution works
-
- private IASTTranslationUnit parseAndCheckBindings(String code) throws ParserException {
- return ParseHelper.parse(code, getLanguage(), true, true, 0 );
- }
-
-
- private IASTTranslationUnit parse(String code) throws ParserException {
- return ParseHelper.parse(code, getLanguage(), true, false, 0 );
- }
-
-
- public void testUPCSharedDeclarations1() throws Exception {
- StringBuffer sb = new StringBuffer();
- sb.append("shared int a [100+THREADS];\n");//$NON-NLS-1$
- sb.append("shared [] int b [THREADS];\n");//$NON-NLS-1$
- sb.append("shared [90] int c [10];\n");//$NON-NLS-1$
- sb.append("shared [*] int d [];\n");//$NON-NLS-1$
- sb.append("relaxed int x;");//$NON-NLS-1$
- sb.append("strict int y;");//$NON-NLS-1$
- String code = sb.toString();
-
- IASTTranslationUnit tu = parseAndCheckBindings(code);
- IScope globalScope = tu.getScope();
- assertNotNull(globalScope);
-
- IASTDeclaration[] declarations = tu.getDeclarations();
- assertNotNull(declarations);
- assertEquals(6, declarations.length);
-
- // shared int a [100+THREADS];
- IASTSimpleDeclaration decl_a = (IASTSimpleDeclaration) declarations[0];
- IUPCASTSimpleDeclSpecifier declspec_a = (IUPCASTSimpleDeclSpecifier) decl_a.getDeclSpecifier();
- assertEquals(IUPCASTDeclSpecifier.rt_unspecified, declspec_a.getReferenceType());
- assertEquals(IUPCASTDeclSpecifier.sh_shared_default_block_size, declspec_a.getSharedQualifier());
- assertEquals(IASTSimpleDeclSpecifier.t_int, declspec_a.getType());
- assertNull(declspec_a.getBlockSizeExpression());
- IASTDeclarator[] declarators = decl_a.getDeclarators();
- assertNotNull(declarators);
- assertEquals(1, declarators.length);
- IASTArrayDeclarator declarator_a = (IASTArrayDeclarator) declarators[0];
- IASTName name_a = declarator_a.getName();
- assertEquals("a", name_a.toString());//$NON-NLS-1$
- IASTArrayModifier[] array_modifiers = declarator_a.getArrayModifiers();
- assertNotNull(array_modifiers);
- assertEquals(1, array_modifiers.length);
- IASTBinaryExpression expr = (IASTBinaryExpression) array_modifiers[0].getConstantExpression();
- IUPCASTKeywordExpression threads = (IUPCASTKeywordExpression) expr.getOperand2();
- assertEquals(IUPCASTKeywordExpression.kw_threads, threads.getKeywordKind());
-
- // shared [] int b [THREADS];
- IASTSimpleDeclaration decl_b = (IASTSimpleDeclaration) declarations[1];
- IUPCASTSimpleDeclSpecifier declspec_b = (IUPCASTSimpleDeclSpecifier) decl_b.getDeclSpecifier();
- assertEquals(IUPCASTDeclSpecifier.rt_unspecified, declspec_b.getReferenceType());
- assertEquals(IUPCASTDeclSpecifier.sh_shared_indefinite_allocation, declspec_b.getSharedQualifier());
- assertEquals(IASTSimpleDeclSpecifier.t_int, declspec_b.getType());
- assertNull(declspec_b.getBlockSizeExpression());
- declarators = decl_b.getDeclarators();
- assertNotNull(declarators);
- assertEquals(1, declarators.length);
- IASTArrayDeclarator declarator_b = (IASTArrayDeclarator) declarators[0];
- IASTName name_b = declarator_b.getName();
- assertEquals("b", name_b.toString());//$NON-NLS-1$
- array_modifiers = declarator_b.getArrayModifiers();
- assertNotNull(array_modifiers);
- assertEquals(1, array_modifiers.length);
- threads = (IUPCASTKeywordExpression) array_modifiers[0].getConstantExpression();
- assertEquals(IUPCASTKeywordExpression.kw_threads, threads.getKeywordKind());
-
- // shared [90] int c [10];
- IASTSimpleDeclaration decl_c = (IASTSimpleDeclaration) declarations[2];
- IUPCASTSimpleDeclSpecifier declspec_c = (IUPCASTSimpleDeclSpecifier) decl_c.getDeclSpecifier();
- assertEquals(IUPCASTDeclSpecifier.rt_unspecified, declspec_c.getReferenceType());
- assertEquals(IUPCASTDeclSpecifier.sh_shared_constant_expression, declspec_c.getSharedQualifier());
- assertEquals(IASTSimpleDeclSpecifier.t_int, declspec_c.getType());
- IASTLiteralExpression literalExpr = (IASTLiteralExpression) declspec_c.getBlockSizeExpression();
- declarators = decl_c.getDeclarators();
- assertNotNull(declarators);
- assertEquals(1, declarators.length);
- IASTArrayDeclarator declarator_c = (IASTArrayDeclarator) declarators[0];
- IASTName name_c = declarator_c.getName();
- assertEquals("c", name_c.toString());//$NON-NLS-1$
- array_modifiers = declarator_c.getArrayModifiers();
- assertNotNull(array_modifiers);
- assertEquals(1, array_modifiers.length);
- assertNotNull(array_modifiers[0].getConstantExpression());
-
- // shared [*] int d [];
- IASTSimpleDeclaration decl_d = (IASTSimpleDeclaration) declarations[3];
- IUPCASTSimpleDeclSpecifier declspec_d = (IUPCASTSimpleDeclSpecifier) decl_d.getDeclSpecifier();
- assertEquals(IUPCASTDeclSpecifier.rt_unspecified, declspec_d.getReferenceType());
- assertEquals(IUPCASTDeclSpecifier.sh_shared_pure_allocation, declspec_d.getSharedQualifier());
- assertEquals(IASTSimpleDeclSpecifier.t_int, declspec_d.getType());
- assertNull(declspec_d.getBlockSizeExpression());
- declarators = decl_d.getDeclarators();
- assertNotNull(declarators);
- assertEquals(1, declarators.length);
- IASTArrayDeclarator declarator_d = (IASTArrayDeclarator) declarators[0];
- IASTName name_d = declarator_d.getName();
- assertEquals("d", name_d.toString());//$NON-NLS-1$
- array_modifiers = declarator_d.getArrayModifiers();
- assertNotNull(array_modifiers);
- assertEquals(1, array_modifiers.length);
- assertNull(array_modifiers[0].getConstantExpression());
-
- IASTSimpleDeclaration decl_x = (IASTSimpleDeclaration) declarations[4];
- IUPCASTSimpleDeclSpecifier declspec_x = (IUPCASTSimpleDeclSpecifier) decl_x.getDeclSpecifier();
- assertEquals(IUPCASTSimpleDeclSpecifier.rt_relaxed, declspec_x.getReferenceType());
-
- IASTSimpleDeclaration decl_y = (IASTSimpleDeclaration) declarations[5];
- IUPCASTSimpleDeclSpecifier declspec_y = (IUPCASTSimpleDeclSpecifier) decl_y.getDeclSpecifier();
- assertEquals(IUPCASTSimpleDeclSpecifier.rt_strict, declspec_y.getReferenceType());
-
-
- IVariable binding_a = (IVariable) name_a.resolveBinding();
- assertNotNull(binding_a);
- assertEquals(globalScope, binding_a.getScope());
-
- IVariable binding_b = (IVariable) name_a.resolveBinding();
- assertNotNull(binding_b);
- assertEquals(globalScope, binding_b.getScope());
-
- IVariable binding_c = (IVariable) name_a.resolveBinding();
- assertNotNull(binding_c);
- assertEquals(globalScope, binding_c.getScope());
-
- IVariable binding_d = (IVariable) name_a.resolveBinding();
- assertNotNull(binding_d);
- assertEquals(globalScope, binding_d.getScope());
-
- }
-
-
-
- public void testUPCSharedDeclarations2() throws Exception {
- StringBuffer sb = new StringBuffer();
- sb.append("int x = 10;");//$NON-NLS-1$
- sb.append("shared [x] int a [];\n");//$NON-NLS-1$
- String code = sb.toString();
-
- IASTTranslationUnit tu = parseAndCheckBindings(code);
- IScope globalScope = tu.getScope();
- assertNotNull(globalScope);
-
- IASTDeclaration[] declarations = tu.getDeclarations();
- assertNotNull(declarations);
- assertEquals(2, declarations.length);
-
- IASTSimpleDeclaration decl_x = (IASTSimpleDeclaration) declarations[0];
-
- // shared [x] int a [];
- IASTSimpleDeclaration decl_a = (IASTSimpleDeclaration) declarations[1];
- IUPCASTSimpleDeclSpecifier declspec_a = (IUPCASTSimpleDeclSpecifier) decl_a.getDeclSpecifier();
- assertEquals(IUPCASTDeclSpecifier.rt_unspecified, declspec_a.getReferenceType());
- assertEquals(IUPCASTDeclSpecifier.sh_shared_constant_expression, declspec_a.getSharedQualifier());
- assertEquals(IASTSimpleDeclSpecifier.t_int, declspec_a.getType());
- IASTIdExpression expr_x = (IASTIdExpression) declspec_a.getBlockSizeExpression();
-
- IASTName name_x = expr_x.getName();
- IVariable binding_x = (IVariable) name_x.resolveBinding();
- assertNotNull(binding_x);
- assertEquals(decl_x.getDeclarators()[0].getName().resolveBinding(), binding_x);
- }
-
-
-
- public void testUPCForall1() throws Exception {
- StringBuffer sb = new StringBuffer();
- sb.append("int main() {\n");//$NON-NLS-1$
- sb.append(" int i;\n");//$NON-NLS-1$
- sb.append(" shared float *a;\n");//$NON-NLS-1$
- sb.append(" upc_forall(i=0; i<N; i++; &a[i]) { \n");//$NON-NLS-1$
- sb.append(" a[i] = 99; \n");//$NON-NLS-1$
- sb.append(" } \n");//$NON-NLS-1$
- sb.append("}\n");//$NON-NLS-1$
- String code = sb.toString();
-
- IASTTranslationUnit tu = parse(code);
-
- IScope globalScope = tu.getScope();
- assertNotNull(globalScope);
-
- IASTDeclaration[] declarations = tu.getDeclarations();
- assertNotNull(declarations);
- assertEquals(1, declarations.length);
-
- IASTFunctionDefinition main = (IASTFunctionDefinition) declarations[0];
- IASTStatement[] body = ((IASTCompoundStatement)main.getBody()).getStatements();
- assertEquals(3, body.length);
-
- IASTSimpleDeclaration decl_i = (IASTSimpleDeclaration)((IASTDeclarationStatement)body[0]).getDeclaration();
- IVariable binding_i = (IVariable) decl_i.getDeclarators()[0].getName().resolveBinding();
-
- IASTSimpleDeclaration decl_a = (IASTSimpleDeclaration)((IASTDeclarationStatement)body[1]).getDeclaration();
- IVariable binding_a = (IVariable) decl_a.getDeclarators()[0].getName().resolveBinding();
-
- IUPCASTForallStatement forall = (IUPCASTForallStatement) body[2];
-
- IASTBinaryExpression expr1 = (IASTBinaryExpression)((IASTExpressionStatement)forall.getInitializerStatement()).getExpression();
- IASTName name_i_1 = ((IASTIdExpression)expr1.getOperand1()).getName();
-
- IASTBinaryExpression expr2 = (IASTBinaryExpression)forall.getConditionExpression();
- IASTName name_i_2 = ((IASTIdExpression)expr2.getOperand1()).getName();
-
- IASTUnaryExpression expr3 = (IASTUnaryExpression)forall.getIterationExpression();
- IASTName name_i_3 = ((IASTIdExpression)expr3.getOperand()).getName();
-
- IASTUnaryExpression expr4 = (IASTUnaryExpression)forall.getAffinityExpresiion();
- IASTName name_i_4 = ((IASTIdExpression)((IASTArraySubscriptExpression)expr4.getOperand()).getSubscriptExpression()).getName();
- IASTName name_a_1 = ((IASTIdExpression)((IASTArraySubscriptExpression)expr4.getOperand()).getArrayExpression()).getName();
-
- IASTBinaryExpression expr5 = (IASTBinaryExpression)((IASTExpressionStatement)((IASTCompoundStatement)forall.getBody()).getStatements()[0]).getExpression();
- IASTName name_i_5 = ((IASTIdExpression)((IASTArraySubscriptExpression)expr5.getOperand1()).getSubscriptExpression()).getName();
- IASTName name_a_2 = ((IASTIdExpression)((IASTArraySubscriptExpression)expr5.getOperand1()).getArrayExpression()).getName();
-
- // test binding resolution
- IVariable binding_i_1 = (IVariable) name_i_1.resolveBinding();
- assertNotNull(binding_i_1);
- assertEquals(binding_i, binding_i_1);
-
- IVariable binding_i_2 = (IVariable) name_i_2.resolveBinding();
- assertNotNull(binding_i_2);
- assertEquals(binding_i, binding_i_2);
-
- IVariable binding_i_3 = (IVariable) name_i_3.resolveBinding();
- assertNotNull(binding_i_3);
- assertEquals(binding_i, binding_i_3);
-
- IVariable binding_i_4 = (IVariable) name_i_4.resolveBinding();
- assertNotNull(binding_i_4);
- assertEquals(binding_i, binding_i_4);
-
- IVariable binding_i_5 = (IVariable) name_i_5.resolveBinding();
- assertNotNull(binding_i_5);
- assertEquals(binding_i, binding_i_5);
-
- IVariable binding_a_1 = (IVariable) name_a_1.resolveBinding();
- assertNotNull(binding_a_1);
- assertEquals(binding_a, binding_a_1);
-
- IVariable binding_a_2 = (IVariable) name_a_2.resolveBinding();
- assertNotNull(binding_a_2);
- assertEquals(binding_a, binding_a_2);
- }
-
-
- /**
- * Test a declaration inside a upc_forall definition.
- */
- public void testUPCForall2() throws Exception {
- StringBuffer sb = new StringBuffer();
- sb.append("int main() {\n");//$NON-NLS-1$
- sb.append(" shared float *a;\n");//$NON-NLS-1$
- sb.append(" upc_forall(int i=0; i<N; i++; &a[i]) { \n");//$NON-NLS-1$
- sb.append(" a[i] = 99; \n");//$NON-NLS-1$
- sb.append(" } \n");//$NON-NLS-1$
- sb.append("}\n");//$NON-NLS-1$
- String code = sb.toString();
-
- IASTTranslationUnit tu = parse(code);
-
- IScope globalScope = tu.getScope();
- assertNotNull(globalScope);
-
- IASTDeclaration[] declarations = tu.getDeclarations();
- assertNotNull(declarations);
- assertEquals(1, declarations.length);
-
- IASTFunctionDefinition main = (IASTFunctionDefinition) declarations[0];
- IASTStatement[] body = ((IASTCompoundStatement)main.getBody()).getStatements();
- assertEquals(2, body.length);
-
- IASTSimpleDeclaration decl_a = (IASTSimpleDeclaration)((IASTDeclarationStatement)body[0]).getDeclaration();
- IVariable binding_a = (IVariable) decl_a.getDeclarators()[0].getName().resolveBinding();
-
- IUPCASTForallStatement forall = (IUPCASTForallStatement) body[1];
-
- IASTSimpleDeclaration decl_i = (IASTSimpleDeclaration)((IASTDeclarationStatement)forall.getInitializerStatement()).getDeclaration();
- IVariable binding_i = (IVariable) decl_i.getDeclarators()[0].getName().resolveBinding();
-
- IASTBinaryExpression expr2 = (IASTBinaryExpression)forall.getConditionExpression();
- IASTName name_i_2 = ((IASTIdExpression)expr2.getOperand1()).getName();
-
- IASTUnaryExpression expr3 = (IASTUnaryExpression)forall.getIterationExpression();
- IASTName name_i_3 = ((IASTIdExpression)expr3.getOperand()).getName();
-
- IASTUnaryExpression expr4 = (IASTUnaryExpression)forall.getAffinityExpresiion();
- IASTName name_i_4 = ((IASTIdExpression)((IASTArraySubscriptExpression)expr4.getOperand()).getSubscriptExpression()).getName();
- IASTName name_a_1 = ((IASTIdExpression)((IASTArraySubscriptExpression)expr4.getOperand()).getArrayExpression()).getName();
-
- IASTBinaryExpression expr5 = (IASTBinaryExpression)((IASTExpressionStatement)((IASTCompoundStatement)forall.getBody()).getStatements()[0]).getExpression();
- IASTName name_i_5 = ((IASTIdExpression)((IASTArraySubscriptExpression)expr5.getOperand1()).getSubscriptExpression()).getName();
- IASTName name_a_2 = ((IASTIdExpression)((IASTArraySubscriptExpression)expr5.getOperand1()).getArrayExpression()).getName();
-
- // test binding resolution
- IVariable binding_i_2 = (IVariable) name_i_2.resolveBinding();
- assertNotNull(binding_i_2);
- assertEquals(binding_i, binding_i_2);
-
- IVariable binding_i_3 = (IVariable) name_i_3.resolveBinding();
- assertNotNull(binding_i_3);
- assertEquals(binding_i, binding_i_3);
-
- IVariable binding_i_4 = (IVariable) name_i_4.resolveBinding();
- assertNotNull(binding_i_4);
- assertEquals(binding_i, binding_i_4);
-
- IVariable binding_i_5 = (IVariable) name_i_5.resolveBinding();
- assertNotNull(binding_i_5);
- assertEquals(binding_i, binding_i_5);
-
- IVariable binding_a_1 = (IVariable) name_a_1.resolveBinding();
- assertNotNull(binding_a_1);
- assertEquals(binding_a, binding_a_1);
-
- IVariable binding_a_2 = (IVariable) name_a_2.resolveBinding();
- assertNotNull(binding_a_2);
- assertEquals(binding_a, binding_a_2);
- }
-
- /**
- * Test 'continue' inside upc_forall
- */
- public void testUPCForall3() throws Exception {
- StringBuffer sb = new StringBuffer();
- sb.append("int main() {\n");//$NON-NLS-1$
- sb.append(" upc_forall(int i=0; i<N; i++; continue) { \n");//$NON-NLS-1$
- sb.append(" } \n");//$NON-NLS-1$
- sb.append("}\n");//$NON-NLS-1$
- String code = sb.toString();
-
- IASTTranslationUnit tu = parse(code);
-
- IASTDeclaration[] declarations = tu.getDeclarations();
- assertNotNull(declarations);
- assertEquals(1, declarations.length);
-
- IASTFunctionDefinition main = (IASTFunctionDefinition) declarations[0];
- IASTStatement[] body = ((IASTCompoundStatement)main.getBody()).getStatements();
- assertEquals(1, body.length);
-
-
- IUPCASTForallStatement forall = (IUPCASTForallStatement) body[0];
-
- assertTrue(forall.isAffinityContinue());
- assertNull(forall.getAffinityExpresiion());
- }
-
-
- public void testUPCSynchronizationStatment() throws Exception {
- StringBuffer sb = new StringBuffer();
- sb.append("int main() {\n");//$NON-NLS-1$
- sb.append(" upc_notify 1;\n");//$NON-NLS-1$
- sb.append(" upc_notify;\n");//$NON-NLS-1$
- sb.append(" upc_wait 1;\n");//$NON-NLS-1$
- sb.append(" upc_wait;\n");//$NON-NLS-1$
- sb.append(" upc_barrier 1;\n");//$NON-NLS-1$
- sb.append(" upc_barrier;\n");//$NON-NLS-1$
- sb.append(" upc_fence;\n");//$NON-NLS-1$
- sb.append("}\n");//$NON-NLS-1$
- String code = sb.toString();
-
- IASTTranslationUnit tu = parse(code);
-
- IASTDeclaration[] declarations = tu.getDeclarations();
- assertNotNull(declarations);
- assertEquals(1, declarations.length);
-
- IASTFunctionDefinition main = (IASTFunctionDefinition) declarations[0];
- IASTStatement[] body = ((IASTCompoundStatement)main.getBody()).getStatements();
- assertEquals(7, body.length);
-
- IUPCASTSynchronizationStatement stat;
-
- stat = (IUPCASTSynchronizationStatement) body[0];
- assertEquals(stat.getStatementKind(), IUPCASTSynchronizationStatement.st_upc_notify);
- assertNotNull(stat.getBarrierExpression());
-
- stat = (IUPCASTSynchronizationStatement) body[1];
- assertEquals(stat.getStatementKind(), IUPCASTSynchronizationStatement.st_upc_notify);
- assertNull(stat.getBarrierExpression());
-
- stat = (IUPCASTSynchronizationStatement) body[2];
- assertEquals(stat.getStatementKind(), IUPCASTSynchronizationStatement.st_upc_wait);
- assertNotNull(stat.getBarrierExpression());
-
- stat = (IUPCASTSynchronizationStatement) body[3];
- assertEquals(stat.getStatementKind(), IUPCASTSynchronizationStatement.st_upc_wait);
- assertNull(stat.getBarrierExpression());
-
- stat = (IUPCASTSynchronizationStatement) body[4];
- assertEquals(stat.getStatementKind(), IUPCASTSynchronizationStatement.st_upc_barrier);
- assertNotNull(stat.getBarrierExpression());
-
- stat = (IUPCASTSynchronizationStatement) body[5];
- assertEquals(stat.getStatementKind(), IUPCASTSynchronizationStatement.st_upc_barrier);
- assertNull(stat.getBarrierExpression());
-
- stat = (IUPCASTSynchronizationStatement) body[6];
- assertEquals(stat.getStatementKind(), IUPCASTSynchronizationStatement.st_upc_fence);
- assertNull(stat.getBarrierExpression());
- }
-
- public void testUPCSizeofExpressions() throws Exception {
- StringBuffer sb = new StringBuffer();
- sb.append("int main() {\n");//$NON-NLS-1$
- sb.append(" sizeof(int); \n");//$NON-NLS-1$
- sb.append(" sizeof x; \n");//$NON-NLS-1$
- sb.append(" upc_localsizeof(int); \n");//$NON-NLS-1$
- sb.append(" upc_localsizeof x; \n");//$NON-NLS-1$
- sb.append(" upc_blocksizeof(int); \n");//$NON-NLS-1$
- sb.append(" upc_blocksizeof x; \n");//$NON-NLS-1$
- sb.append(" upc_elemsizeof(int); \n");//$NON-NLS-1$
- sb.append(" upc_elemsizeof x; \n");//$NON-NLS-1$
- sb.append("}\n");//$NON-NLS-1$
- String code = sb.toString();
-
- IASTTranslationUnit tu = parse(code);
-
- IASTDeclaration[] declarations = tu.getDeclarations();
- assertNotNull(declarations);
- assertEquals(1, declarations.length);
-
- IASTFunctionDefinition main = (IASTFunctionDefinition) declarations[0];
- IASTStatement[] body = ((IASTCompoundStatement)main.getBody()).getStatements();
- assertEquals(8, body.length);
-
-
-
- IASTTypeIdExpression idexpr = (IASTTypeIdExpression)((IASTExpressionStatement)body[0]).getExpression();
-
- IASTUnaryExpression cexpr = (IASTUnaryExpression)((IASTExpressionStatement)body[1]).getExpression();
- assertEquals(IASTUnaryExpression.op_sizeof, cexpr.getOperator());
-
- IUPCASTSizeofExpression expr;
-
- expr = (IUPCASTSizeofExpression)((IASTExpressionStatement)body[2]).getExpression();
- assertEquals(IUPCASTSizeofExpression.op_upc_localsizeof, expr.getUPCSizeofOperator());
-
- expr = (IUPCASTSizeofExpression)((IASTExpressionStatement)body[3]).getExpression();
- assertEquals(IUPCASTSizeofExpression.op_upc_localsizeof, expr.getUPCSizeofOperator());
-
- expr = (IUPCASTSizeofExpression)((IASTExpressionStatement)body[4]).getExpression();
- assertEquals(IUPCASTSizeofExpression.op_upc_blocksizeof, expr.getUPCSizeofOperator());
-
- expr = (IUPCASTSizeofExpression)((IASTExpressionStatement)body[5]).getExpression();
- assertEquals(IUPCASTSizeofExpression.op_upc_blocksizeof, expr.getUPCSizeofOperator());
-
- expr = (IUPCASTSizeofExpression)((IASTExpressionStatement)body[6]).getExpression();
- assertEquals(IUPCASTSizeofExpression.op_upc_elemsizeof, expr.getUPCSizeofOperator());
-
- expr = (IUPCASTSizeofExpression)((IASTExpressionStatement)body[7]).getExpression();
- assertEquals(IUPCASTSizeofExpression.op_upc_elemsizeof, expr.getUPCSizeofOperator());
- }
-}

Back to the top