mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
[273347] [XLC Parser] improve testing
This commit is contained in:
parent
45f40abd23
commit
c1b63e8085
45 changed files with 3705 additions and 2717 deletions
|
@ -13,7 +13,6 @@ package org.eclipse.cdt.core.lrparser.tests;
|
|||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.lrparser.gnu.GCCLanguage;
|
||||
import org.eclipse.cdt.core.dom.lrparser.gnu.GPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
@ -56,11 +55,11 @@ public class LRCPPSpecFailingTest extends AST2CPPSpecFailingTest {
|
|||
}
|
||||
|
||||
|
||||
protected BaseExtensibleLanguage getCLanguage() {
|
||||
protected ILanguage getCLanguage() {
|
||||
return GCCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected BaseExtensibleLanguage getCPPLanguage() {
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return GPPLanguage.getDefault();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ package org.eclipse.cdt.core.lrparser.tests;
|
|||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.lrparser.gnu.GCCLanguage;
|
||||
import org.eclipse.cdt.core.dom.lrparser.gnu.GPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
@ -77,11 +76,11 @@ public class LRCPPSpecTest extends AST2CPPSpecTest {
|
|||
|
||||
|
||||
|
||||
protected BaseExtensibleLanguage getCLanguage() {
|
||||
protected ILanguage getCLanguage() {
|
||||
return GCCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected BaseExtensibleLanguage getCPPLanguage() {
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return GPPLanguage.getDefault();
|
||||
}
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ public class GPPBuildASTParserAction extends CPPBuildASTParserAction {
|
|||
for(Object o : tokens) {
|
||||
if(o instanceof IToken) {
|
||||
IToken token = (IToken)o;
|
||||
switch(token.getKind()) {
|
||||
switch(gppTokenMap.mapKind(token.getKind())) {
|
||||
case GPPParsersym.TK__Complex: isComplex = true; break;
|
||||
case GPPParsersym.TK__Imaginary: isImaginary = true; break;
|
||||
case GPPParsersym.TK_long : numLong++; break;
|
||||
|
|
|
@ -10,4 +10,5 @@ Require-Bundle: org.junit,
|
|||
org.eclipse.cdt.core.tests;bundle-version="5.1.0",
|
||||
org.eclipse.cdt.core;bundle-version="5.1.0",
|
||||
org.eclipse.cdt.core.lrparser.tests;bundle-version="5.1.0",
|
||||
org.eclipse.core.runtime;bundle-version="3.5.0"
|
||||
org.eclipse.core.runtime;bundle-version="3.5.0",
|
||||
org.eclipse.core.resources;bundle-version="3.5.0"
|
||||
|
|
|
@ -22,7 +22,7 @@ import org.eclipse.cdt.core.dom.ast.IASTStatement;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
|
||||
|
||||
public class VectorExtensionsTest extends XLCTestBase {
|
||||
public class VectorExtensionsTest extends XlcTestBase {
|
||||
|
||||
public VectorExtensionsTest() {
|
||||
}
|
||||
|
|
|
@ -14,12 +14,12 @@ import org.eclipse.cdt.core.lrparser.xlc.preferences.XlcLanguagePreferences;
|
|||
import org.eclipse.cdt.core.lrparser.xlc.preferences.XlcPref;
|
||||
|
||||
|
||||
public class XLCExtensionsTest extends XLCTestBase {
|
||||
public class XlcExtensionsTest extends XlcTestBase {
|
||||
|
||||
public XLCExtensionsTest() {
|
||||
public XlcExtensionsTest() {
|
||||
}
|
||||
|
||||
public XLCExtensionsTest(String name) {
|
||||
public XlcExtensionsTest(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
|
@ -13,13 +13,12 @@ package org.eclipse.cdt.core.parser.xlc.tests;
|
|||
import junit.framework.Test;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
public class XLCParserTestSuite {
|
||||
|
||||
public class XlcExtensionsTestSuite extends TestSuite {
|
||||
|
||||
public static Test suite() {
|
||||
return new TestSuite() {{
|
||||
addTestSuite(VectorExtensionsTest.class);
|
||||
addTestSuite(XLCExtensionsTest.class);
|
||||
addTestSuite(XlcExtensionsTest.class);
|
||||
}};
|
||||
}
|
||||
}
|
|
@ -18,12 +18,12 @@ import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
|||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XLCTestBase extends TestCase {
|
||||
public class XlcTestBase extends TestCase {
|
||||
|
||||
public XLCTestBase() {
|
||||
public XlcTestBase() {
|
||||
}
|
||||
|
||||
public XLCTestBase(String name) {
|
||||
public XlcTestBase(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRCPPImplicitNameTests;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRCPPImplicitNameTests extends LRCPPImplicitNameTests {
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRCPPImplicitNameTests.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRCPPSpecFailingTest;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRCPPSpecFailingTest extends LRCPPSpecFailingTest {
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRCPPSpecFailingTest.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRCPPSpecTest;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRCPPSpecTest extends LRCPPSpecTest {
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRCPPSpecTest.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRCPPTests;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRCPPTests extends LRCPPTests {
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRCPPTests.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRCSpecTests;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRCSpecTests extends LRCSpecTests {
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRCSpecTests.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRCommentTests;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRCommentTests extends LRCommentTests {
|
||||
|
||||
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRCommentTests.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRCompleteParser2Tests;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRCompleteParser2Tests extends LRCompleteParser2Tests {
|
||||
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRCompleteParser2Tests.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRCompletionBasicTest;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRCompletionBasicTest extends LRCompletionBasicTest {
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRCompletionBasicTest.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRCompletionParseTest;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRCompletionParseTest extends LRCompletionParseTest {
|
||||
public static TestSuite suite() {
|
||||
return new TestSuite(XlcLRCompletionParseTest.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRDOMLocationInclusionTests;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRDOMLocationInclusionTests extends LRDOMLocationInclusionTests {
|
||||
|
||||
public XlcLRDOMLocationInclusionTests() {
|
||||
super();
|
||||
}
|
||||
|
||||
public XlcLRDOMLocationInclusionTests(String name, Class<Object> className) {
|
||||
super(name, className);
|
||||
}
|
||||
|
||||
public XlcLRDOMLocationInclusionTests(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
public static TestSuite suite() {
|
||||
return new TestSuite(XlcLRDOMLocationInclusionTests.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRDOMLocationMacroTests;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRDOMLocationMacroTests extends LRDOMLocationMacroTests {
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRDOMLocationMacroTests.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRDOMLocationTests;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRDOMLocationTests extends LRDOMLocationTests {
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRDOMLocationTests.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRDOMPreprocessorInformationTest;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRDOMPreprocessorInformationTest extends LRDOMPreprocessorInformationTest {
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRDOMPreprocessorInformationTest.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRDigraphTrigraphTests;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRDigraphTrigraphTests extends LRDigraphTrigraphTests {
|
||||
|
||||
public static TestSuite suite() {
|
||||
return new TestSuite(XlcLRDigraphTrigraphTests.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRGCCCompleteParseExtensionsTest;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRGCCCompleteParseExtensionsTest extends LRGCCCompleteParseExtensionsTest {
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRGCCCompleteParseExtensionsTest.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRGCCTests;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRGCCTests extends LRGCCTests {
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRGCCTests.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRImageLocationTests;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRImageLocationTests extends LRImageLocationTests {
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRImageLocationTests.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRInactiveCodeTests;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRInactiveCodeTests extends LRInactiveCodeTests {
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRInactiveCodeTests.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRKnRTests;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRKnRTests extends LRKnRTests {
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRKnRTests.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRNodeSelectorTest;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRNodeSelectorTest extends LRNodeSelectorTest {
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRNodeSelectorTest.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
public class XlcLRParserTestSuite extends TestSuite {
|
||||
|
||||
// TODO: the following test are not being reused
|
||||
//
|
||||
// DOMGCCSelectionParseExtensionsTest
|
||||
// DOMSelectionParseTest
|
||||
// GCCCompleteParseExtensionsTest
|
||||
// QuickParser2Tests
|
||||
//
|
||||
// and perhaps others
|
||||
|
||||
public static Test suite() {
|
||||
return new TestSuite() {{
|
||||
|
||||
addTest(XlcLRCommentTests.suite());
|
||||
addTest(XlcLRCompleteParser2Tests.suite());
|
||||
addTest(XlcLRCompletionBasicTest.suite());
|
||||
addTest(XlcLRCompletionParseTest.suite());
|
||||
addTest(XlcLRCPPSpecFailingTest.suite());
|
||||
addTest(XlcLRCPPSpecTest.suite());
|
||||
addTest(XlcLRCPPTests.suite());
|
||||
addTest(XlcLRCSpecTests.suite()); // a couple of failures
|
||||
addTest(XlcLRDigraphTrigraphTests.suite());
|
||||
addTest(XlcLRDOMLocationInclusionTests.suite());
|
||||
addTest(XlcLRDOMLocationMacroTests.suite());
|
||||
addTest(XlcLRDOMLocationTests.suite());
|
||||
addTest(XlcLRDOMPreprocessorInformationTest.suite());
|
||||
addTest(XlcLRGCCTests.suite());
|
||||
addTest(XlcLRGCCCompleteParseExtensionsTest.suite());
|
||||
addTest(XlcLRImageLocationTests.suite());
|
||||
addTest(XlcLRKnRTests.suite()); // mostly fail due to ambiguities
|
||||
addTest(XlcLRNodeSelectorTest.suite());
|
||||
addTest(XlcLRQuickParser2Tests.suite());
|
||||
addTest(XlcLRSelectionParseTest.suite()); // this one still has a lot of failing tests though
|
||||
addTest(XlcLRSemanticsTests.suite());
|
||||
addTest(XlcLRTaskParserTest.suite());
|
||||
addTest(XlcLRTemplateTests.suite());
|
||||
addTest(XlcLRTests.suite()); // has some tests that do fail
|
||||
addTest(XlcLRUtilOldTests.suite());
|
||||
addTest(XlcLRUtilTests.suite());
|
||||
addTest(XlcLRCPPImplicitNameTests.suite());
|
||||
//addTest(LRInactiveCodeTests.suite());
|
||||
|
||||
}};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRQuickParser2Tests;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRQuickParser2Tests extends LRQuickParser2Tests {
|
||||
public static TestSuite suite() {
|
||||
return new TestSuite(XlcLRQuickParser2Tests.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRSelectionParseTest;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRSelectionParseTest extends LRSelectionParseTest {
|
||||
|
||||
public XlcLRSelectionParseTest() {
|
||||
}
|
||||
|
||||
public XlcLRSelectionParseTest(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
public static TestSuite suite() {
|
||||
return new TestSuite(XlcLRSelectionParseTest.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRSemanticsTests;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRSemanticsTests extends LRSemanticsTests {
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRSemanticsTests.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRTaskParserTest;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRTaskParserTest extends LRTaskParserTest {
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRTaskParserTest.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRTemplateTests;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRTemplateTests extends LRTemplateTests {
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRTemplateTests.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRTests;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRTests extends LRTests {
|
||||
|
||||
public XlcLRTests(String name) {
|
||||
super(name);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRTests.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRUtilOldTests;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRUtilOldTests extends LRUtilOldTests {
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRUtilOldTests.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.base;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRUtilTests;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class XlcLRUtilTests extends LRUtilTests {
|
||||
public static TestSuite suite() {
|
||||
return suite(XlcLRUtilTests.class);
|
||||
}
|
||||
|
||||
protected ILanguage getCLanguage() {
|
||||
return XlcCLanguage.getDefault();
|
||||
}
|
||||
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return XlcCPPLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 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.xlc.tests.suite;
|
||||
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.parser.xlc.tests.XlcExtensionsTestSuite;
|
||||
import org.eclipse.cdt.core.parser.xlc.tests.base.XlcLRParserTestSuite;
|
||||
|
||||
public class XlcTestSuite extends TestSuite {
|
||||
|
||||
public static Test suite() {
|
||||
return new TestSuite() {{
|
||||
addTest(XlcExtensionsTestSuite.suite());
|
||||
addTest(XlcLRParserTestSuite.suite());
|
||||
}};
|
||||
}
|
||||
}
|
|
@ -42,7 +42,6 @@ $End
|
|||
|
||||
$Terminals
|
||||
|
||||
_Complex
|
||||
restrict
|
||||
|
||||
$End
|
||||
|
@ -55,8 +54,6 @@ $End
|
|||
|
||||
$Rules
|
||||
|
||||
simple_type_specifier_token
|
||||
::= '_Complex'
|
||||
|
||||
cv_qualifier
|
||||
::= 'restrict'
|
||||
|
|
|
@ -46,7 +46,6 @@ public class XlcCPPLanguage extends GPPLanguage {
|
|||
|
||||
static IProject getProject(Map<String,String> properties) {
|
||||
String path = properties.get(LRParserProperties.TRANSLATION_UNIT_PATH);
|
||||
System.out.println("path: " + path);
|
||||
IFile[] file = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(new Path(path));
|
||||
|
||||
IProject project = null;
|
||||
|
|
|
@ -43,6 +43,7 @@ public class XlcCPPTokenMap implements IDOMTokenMap {
|
|||
public int mapKind(IToken token) {
|
||||
|
||||
switch(token.getType()) {
|
||||
case t__Complex :
|
||||
case tIDENTIFIER :
|
||||
Integer keywordKind = keywordMap.getTokenKind(token.getCharImage());
|
||||
return keywordKind == null ? TK_identifier : keywordKind;
|
||||
|
@ -184,7 +185,7 @@ public class XlcCPPTokenMap implements IDOMTokenMap {
|
|||
case IGCCToken.t__declspec : return TK___declspec;
|
||||
|
||||
// GNU supports these but they are not in the C++ spec
|
||||
case t__Complex : return TK__Complex;
|
||||
|
||||
case t__Imaginary : return TK__Imaginary;
|
||||
case t_restrict : return TK_restrict;
|
||||
|
||||
|
|
|
@ -2074,51 +2074,51 @@ private GNUBuildASTParserAction gnuAction;
|
|||
}
|
||||
|
||||
//
|
||||
// Rule 643: specifier_qualifier ::= typedef
|
||||
// Rule 642: specifier_qualifier ::= typedef
|
||||
//
|
||||
case 643: { action. consumeToken(); break;
|
||||
case 642: { action. consumeToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 644: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
|
||||
// Rule 643: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
|
||||
//
|
||||
case 644: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
|
||||
case 643: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 645: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
// Rule 644: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
//
|
||||
case 645: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
|
||||
case 644: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 646: array_modifier ::= [ static assignment_expression ]
|
||||
// Rule 645: array_modifier ::= [ static assignment_expression ]
|
||||
//
|
||||
case 646: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
|
||||
case 645: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 647: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
// Rule 646: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
//
|
||||
case 646: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 647: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
|
||||
//
|
||||
case 647: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 648: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
|
||||
// Rule 648: array_modifier ::= [ * ]
|
||||
//
|
||||
case 648: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
case 648: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 649: array_modifier ::= [ * ]
|
||||
// Rule 649: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
|
||||
//
|
||||
case 649: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 650: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
|
||||
//
|
||||
case 650: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
|
||||
case 649: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
|
||||
}
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -52,9 +52,9 @@ public interface XlcCPPParsersym {
|
|||
TK_namespace = 73,
|
||||
TK_new = 81,
|
||||
TK_operator = 11,
|
||||
TK_private = 130,
|
||||
TK_protected = 131,
|
||||
TK_public = 132,
|
||||
TK_private = 129,
|
||||
TK_protected = 130,
|
||||
TK_public = 131,
|
||||
TK_register = 44,
|
||||
TK_reinterpret_cast = 56,
|
||||
TK_return = 97,
|
||||
|
@ -72,9 +72,9 @@ public interface XlcCPPParsersym {
|
|||
TK_true = 60,
|
||||
TK_typedef = 45,
|
||||
TK_typeid = 61,
|
||||
TK_typename = 23,
|
||||
TK_typename = 22,
|
||||
TK_union = 70,
|
||||
TK_unsigned = 22,
|
||||
TK_unsigned = 23,
|
||||
TK_using = 75,
|
||||
TK_virtual = 37,
|
||||
TK_void = 27,
|
||||
|
@ -84,14 +84,14 @@ public interface XlcCPPParsersym {
|
|||
TK_integer = 62,
|
||||
TK_floating = 63,
|
||||
TK_charconst = 64,
|
||||
TK_stringlit = 48,
|
||||
TK_stringlit = 46,
|
||||
TK_identifier = 1,
|
||||
TK_Completion = 4,
|
||||
TK_EndOfCompletion = 12,
|
||||
TK_Invalid = 136,
|
||||
TK_LeftBracket = 76,
|
||||
TK_LeftBracket = 77,
|
||||
TK_LeftParen = 5,
|
||||
TK_Dot = 129,
|
||||
TK_Dot = 132,
|
||||
TK_DotStar = 104,
|
||||
TK_Arrow = 117,
|
||||
TK_ArrowStar = 102,
|
||||
|
@ -99,8 +99,8 @@ public interface XlcCPPParsersym {
|
|||
TK_MinusMinus = 50,
|
||||
TK_And = 14,
|
||||
TK_Star = 13,
|
||||
TK_Plus = 46,
|
||||
TK_Minus = 47,
|
||||
TK_Plus = 47,
|
||||
TK_Minus = 48,
|
||||
TK_Tilde = 10,
|
||||
TK_Bang = 52,
|
||||
TK_Slash = 105,
|
||||
|
@ -134,7 +134,7 @@ public interface XlcCPPParsersym {
|
|||
TK_OrAssign = 128,
|
||||
TK_Comma = 79,
|
||||
TK_RightBracket = 103,
|
||||
TK_RightParen = 77,
|
||||
TK_RightParen = 78,
|
||||
TK_RightBrace = 86,
|
||||
TK_SemiColon = 51,
|
||||
TK_LeftBrace = 72,
|
||||
|
@ -149,7 +149,7 @@ public interface XlcCPPParsersym {
|
|||
TK__Decimal32 = 29,
|
||||
TK__Decimal64 = 30,
|
||||
TK__Decimal128 = 31,
|
||||
TK_ERROR_TOKEN = 78,
|
||||
TK_ERROR_TOKEN = 76,
|
||||
TK_EOF_TOKEN = 134;
|
||||
|
||||
public final static String orderedTerminalSymbols[] = {
|
||||
|
@ -175,8 +175,8 @@ public interface XlcCPPParsersym {
|
|||
"long",
|
||||
"short",
|
||||
"signed",
|
||||
"unsigned",
|
||||
"typename",
|
||||
"unsigned",
|
||||
"_Complex",
|
||||
"_Imaginary",
|
||||
"double",
|
||||
|
@ -199,9 +199,9 @@ public interface XlcCPPParsersym {
|
|||
"mutable",
|
||||
"register",
|
||||
"typedef",
|
||||
"stringlit",
|
||||
"Plus",
|
||||
"Minus",
|
||||
"stringlit",
|
||||
"PlusPlus",
|
||||
"MinusMinus",
|
||||
"SemiColon",
|
||||
|
@ -229,9 +229,9 @@ public interface XlcCPPParsersym {
|
|||
"namespace",
|
||||
"throw",
|
||||
"using",
|
||||
"ERROR_TOKEN",
|
||||
"LeftBracket",
|
||||
"RightParen",
|
||||
"ERROR_TOKEN",
|
||||
"Comma",
|
||||
"delete",
|
||||
"new",
|
||||
|
@ -282,10 +282,10 @@ public interface XlcCPPParsersym {
|
|||
"AndAssign",
|
||||
"CaretAssign",
|
||||
"OrAssign",
|
||||
"Dot",
|
||||
"private",
|
||||
"protected",
|
||||
"public",
|
||||
"Dot",
|
||||
"catch",
|
||||
"EOF_TOKEN",
|
||||
"else",
|
||||
|
|
|
@ -43,7 +43,7 @@ public class XlcLanguageOptionsPreferencePage extends PreferencePage implements
|
|||
private void initializeCheckboxes(Composite group) {
|
||||
XlcPref[] prefs = XlcPref.values();
|
||||
int n = prefs.length;
|
||||
PrefCheckbox[] checkboxes = new PrefCheckbox[n];
|
||||
checkboxes = new PrefCheckbox[n];
|
||||
IProject project = getProject(); // null for preference page
|
||||
|
||||
for(int i = 0; i < n; i++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue