mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-30 21:55:31 +02:00
renamed a lot of the LR parser tests
This commit is contained in:
parent
4b12c3a302
commit
6890b6b24e
47 changed files with 379 additions and 523 deletions
|
@ -3,16 +3,13 @@ Bundle-ManifestVersion: 2
|
|||
Bundle-Name: %Bundle-Name.0
|
||||
Bundle-SymbolicName: org.eclipse.cdt.core.lrparser.tests
|
||||
Bundle-Version: 4.0.0.qualifier
|
||||
Bundle-Activator: org.eclipse.cdt.core.lrparser.tests.c99.Activator
|
||||
Require-Bundle: org.eclipse.core.runtime,
|
||||
org.junit,
|
||||
org.eclipse.cdt.core.tests,
|
||||
org.eclipse.cdt.core,
|
||||
org.eclipse.core.resources,
|
||||
org.eclipse.cdt.core.lrparser;bundle-version="4.0.1"
|
||||
Export-Package: org.eclipse.cdt.core.lrparser.tests,
|
||||
org.eclipse.cdt.core.lrparser.tests.c99,
|
||||
org.eclipse.cdt.core.lrparser.tests.cpp
|
||||
Export-Package: org.eclipse.cdt.core.lrparser.tests
|
||||
Bundle-Vendor: %Bundle-Vendor.0
|
||||
Bundle-Localization: plugin
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
||||
|
|
|
@ -1,20 +1,19 @@
|
|||
package org.eclipse.cdt.core.lrparser.tests.cpp;
|
||||
package org.eclipse.cdt.core.lrparser.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.lrparser.c99.C99Language;
|
||||
import org.eclipse.cdt.core.dom.lrparser.cpp.ISOCPPLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.ParseHelper;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
import org.eclipse.cdt.core.parser.ParserLanguage;
|
||||
import org.eclipse.cdt.core.parser.tests.ast2.AST2CPPSpecTest;
|
||||
import org.eclipse.cdt.internal.core.parser.ParserException;
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
public class ISOCPPSpecTest extends AST2CPPSpecTest {
|
||||
public class LRCPPSpecTest extends AST2CPPSpecTest {
|
||||
|
||||
public ISOCPPSpecTest() { }
|
||||
public ISOCPPSpecTest(String name) { super(name); }
|
||||
public LRCPPSpecTest() { }
|
||||
public LRCPPSpecTest(String name) { super(name); }
|
||||
|
||||
|
||||
@Override
|
|
@ -1,4 +1,4 @@
|
|||
package org.eclipse.cdt.core.lrparser.tests.cpp;
|
||||
package org.eclipse.cdt.core.lrparser.tests;
|
||||
|
||||
import junit.framework.AssertionFailedError;
|
||||
import junit.framework.TestSuite;
|
||||
|
@ -6,25 +6,24 @@ import junit.framework.TestSuite;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.lrparser.c99.C99Language;
|
||||
import org.eclipse.cdt.core.dom.lrparser.cpp.ISOCPPLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.ParseHelper;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
import org.eclipse.cdt.core.parser.ParserLanguage;
|
||||
import org.eclipse.cdt.core.parser.tests.ast2.AST2CPPTests;
|
||||
import org.eclipse.cdt.internal.core.parser.ParserException;
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
public class ISOCPPTests extends AST2CPPTests {
|
||||
public class LRCPPTests extends AST2CPPTests {
|
||||
|
||||
|
||||
public static TestSuite suite() {
|
||||
return suite(ISOCPPTests.class);
|
||||
return suite(LRCPPTests.class);
|
||||
}
|
||||
|
||||
public ISOCPPTests() {
|
||||
public LRCPPTests() {
|
||||
|
||||
}
|
||||
|
||||
public ISOCPPTests(String name) {
|
||||
public LRCPPTests(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
|
@ -8,25 +8,23 @@
|
|||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.lrparser.tests.c99;
|
||||
package org.eclipse.cdt.core.lrparser.tests;
|
||||
|
||||
import junit.framework.AssertionFailedError;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.lrparser.c99.C99Language;
|
||||
import org.eclipse.cdt.core.dom.lrparser.cpp.ISOCPPLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.ParseHelper;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
import org.eclipse.cdt.core.parser.ParserLanguage;
|
||||
import org.eclipse.cdt.core.parser.tests.ast2.AST2CSpecTest;
|
||||
import org.eclipse.cdt.internal.core.parser.ParserException;
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
public class C99SpecTests extends AST2CSpecTest {
|
||||
public class LRCSpecTests extends AST2CSpecTest {
|
||||
|
||||
public C99SpecTests() { }
|
||||
public C99SpecTests(String name) { super(name); }
|
||||
public LRCSpecTests() { }
|
||||
public LRCSpecTests(String name) { super(name); }
|
||||
|
||||
|
||||
@Override
|
||||
|
@ -41,11 +39,11 @@ public class C99SpecTests extends AST2CSpecTest {
|
|||
return ParseHelper.parse(code, language, true, checkBindings, expectedProblemBindings );
|
||||
}
|
||||
|
||||
protected BaseExtensibleLanguage getCLanguage() {
|
||||
protected ILanguage getCLanguage() {
|
||||
return C99Language.getDefault();
|
||||
}
|
||||
|
||||
protected BaseExtensibleLanguage getCPPLanguage() {
|
||||
protected ILanguage getCPPLanguage() {
|
||||
return ISOCPPLanguage.getDefault();
|
||||
}
|
||||
|
|
@ -8,21 +8,20 @@
|
|||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.lrparser.tests.c99;
|
||||
package org.eclipse.cdt.core.lrparser.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTComment;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.lrparser.c99.C99Language;
|
||||
import org.eclipse.cdt.core.dom.lrparser.cpp.ISOCPPLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.ParseHelper;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
import org.eclipse.cdt.core.parser.ParserLanguage;
|
||||
import org.eclipse.cdt.core.parser.tests.ast2.CommentTests;
|
||||
import org.eclipse.cdt.internal.core.parser.ParserException;
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
public class C99CommentTests extends CommentTests {
|
||||
public class LRCommentTests extends CommentTests {
|
||||
|
||||
|
||||
@Override
|
|
@ -8,19 +8,18 @@
|
|||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.lrparser.tests.c99;
|
||||
package org.eclipse.cdt.core.lrparser.tests;
|
||||
|
||||
import junit.framework.AssertionFailedError;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.lrparser.c99.C99Language;
|
||||
import org.eclipse.cdt.core.dom.lrparser.cpp.ISOCPPLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.ParseHelper;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
import org.eclipse.cdt.core.parser.ParserLanguage;
|
||||
import org.eclipse.cdt.core.parser.tests.ast2.CompleteParser2Tests;
|
||||
|
||||
public class C99CompleteParser2Tests extends CompleteParser2Tests {
|
||||
public class LRCompleteParser2Tests extends CompleteParser2Tests {
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unused")
|
|
@ -8,7 +8,7 @@
|
|||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.lrparser.tests.c99;
|
||||
package org.eclipse.cdt.core.lrparser.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTCompletionNode;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
|
@ -17,16 +17,15 @@ import org.eclipse.cdt.core.dom.ast.IFunction;
|
|||
import org.eclipse.cdt.core.dom.ast.ITypedef;
|
||||
import org.eclipse.cdt.core.dom.lrparser.c99.C99Language;
|
||||
import org.eclipse.cdt.core.dom.lrparser.cpp.ISOCPPLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.ParseHelper;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
import org.eclipse.cdt.core.parser.ParserLanguage;
|
||||
import org.eclipse.cdt.core.parser.tests.prefix.BasicCompletionTest;
|
||||
import org.eclipse.cdt.internal.core.parser.ParserException;
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
public class C99CompletionBasicTest extends BasicCompletionTest {
|
||||
public class LRCompletionBasicTest extends BasicCompletionTest {
|
||||
|
||||
public C99CompletionBasicTest() { }
|
||||
public LRCompletionBasicTest() { }
|
||||
|
||||
|
||||
@Override
|
|
@ -8,7 +8,7 @@
|
|||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.lrparser.tests.c99;
|
||||
package org.eclipse.cdt.core.lrparser.tests;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
@ -24,19 +24,18 @@ import org.eclipse.cdt.core.dom.ast.IEnumerator;
|
|||
import org.eclipse.cdt.core.dom.ast.IField;
|
||||
import org.eclipse.cdt.core.dom.ast.ITypedef;
|
||||
import org.eclipse.cdt.core.dom.ast.IVariable;
|
||||
import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.lrparser.c99.C99Language;
|
||||
import org.eclipse.cdt.core.lrparser.tests.ParseHelper;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
|
||||
/**
|
||||
* Reuse the completion parse tests from the old parser for now.
|
||||
*/
|
||||
@SuppressWarnings("nls")
|
||||
public class C99CompletionParseTest extends TestCase {
|
||||
public class LRCompletionParseTest extends TestCase {
|
||||
|
||||
public C99CompletionParseTest() { }
|
||||
public C99CompletionParseTest(String name) { super(name); }
|
||||
public LRCompletionParseTest() { }
|
||||
public LRCompletionParseTest(String name) { super(name); }
|
||||
|
||||
|
||||
protected IASTCompletionNode parse(String code, int offset) throws Exception {
|
||||
|
@ -63,7 +62,7 @@ public class C99CompletionParseTest extends TestCase {
|
|||
}
|
||||
|
||||
|
||||
protected BaseExtensibleLanguage getC99Language() {
|
||||
protected ILanguage getC99Language() {
|
||||
return C99Language.getDefault();
|
||||
}
|
||||
|
||||
|
@ -288,11 +287,10 @@ public class C99CompletionParseTest extends TestCase {
|
|||
|
||||
|
||||
public void testCompletionStructPointer() throws Exception {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(" struct Temp { char * total; };" );
|
||||
sb.append(" int f(struct Temp * t) {" );
|
||||
sb.append(" t->t[5] = t->" );
|
||||
String code = sb.toString();
|
||||
String code =
|
||||
" struct Temp { char * total; };" +
|
||||
" int f(struct Temp * t) {" +
|
||||
" t->t[5] = t->";
|
||||
|
||||
int index = code.indexOf("= t->");
|
||||
|
||||
|
@ -310,19 +308,18 @@ public class C99CompletionParseTest extends TestCase {
|
|||
|
||||
|
||||
public void testCompletionEnum() throws Exception {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append( "typedef int DWORD;\n" ); //$NON-NLS-1$
|
||||
sb.append( "typedef char BYTE;\n"); //$NON-NLS-1$
|
||||
sb.append( "#define MAKEFOURCC(ch0, ch1, ch2, ch3) \\\n"); //$NON-NLS-1$
|
||||
sb.append( "((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \\\n"); //$NON-NLS-1$
|
||||
sb.append( "((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))\n"); //$NON-NLS-1$
|
||||
sb.append( "enum e {\n"); //$NON-NLS-1$
|
||||
sb.append( "blah1 = 5,\n"); //$NON-NLS-1$
|
||||
sb.append( "blah2 = MAKEFOURCC('a', 'b', 'c', 'd'),\n"); //$NON-NLS-1$
|
||||
sb.append( "blah3\n"); //$NON-NLS-1$
|
||||
sb.append( "};\n"); //$NON-NLS-1$
|
||||
sb.append( "e mye = bl\n"); //$NON-NLS-1$
|
||||
String code = sb.toString();
|
||||
String code =
|
||||
"typedef int DWORD;\n" +
|
||||
"typedef char BYTE;\n" +
|
||||
"#define MAKEFOURCC(ch0, ch1, ch2, ch3) \\\n" +
|
||||
"((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \\\n" +
|
||||
"((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))\n" +
|
||||
"enum e {\n" +
|
||||
"blah1 = 5,\n" +
|
||||
"blah2 = MAKEFOURCC('a', 'b', 'c', 'd'),\n" +
|
||||
"blah3\n" +
|
||||
"};\n" +
|
||||
"e mye = bl\n";
|
||||
|
||||
int index = code.indexOf("= bl");
|
||||
|
||||
|
@ -342,12 +339,11 @@ public class C99CompletionParseTest extends TestCase {
|
|||
|
||||
|
||||
public void testCompletionStructArray() throws Exception {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append( "struct packet { int a; int b; };\n" ); //$NON-NLS-1$
|
||||
sb.append( "struct packet buffer[5];\n" ); //$NON-NLS-1$
|
||||
sb.append( "int main(int argc, char **argv) {\n" ); //$NON-NLS-1$
|
||||
sb.append( " buffer[2]." ); //$NON-NLS-1$
|
||||
String code = sb.toString();
|
||||
String code =
|
||||
"struct packet { int a; int b; };\n" +
|
||||
"struct packet buffer[5];\n" +
|
||||
"int main(int argc, char **argv) {\n" +
|
||||
" buffer[2].";
|
||||
|
||||
int index = code.indexOf("[2].");
|
||||
|
||||
|
@ -376,12 +372,11 @@ public class C99CompletionParseTest extends TestCase {
|
|||
}
|
||||
|
||||
public void testCompletionPreprocessorMacro() throws Exception {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append( "#define AMACRO 99 \n");
|
||||
sb.append( "int main() { \n");
|
||||
sb.append( " int AVAR; \n");
|
||||
sb.append( " int x = A \n");
|
||||
String code = sb.toString();
|
||||
String code =
|
||||
"#define AMACRO 99 \n" +
|
||||
"int main() { \n" +
|
||||
" int AVAR; \n" +
|
||||
" int x = A \n";
|
||||
|
||||
int index = code.indexOf("= A");
|
||||
|
||||
|
@ -394,13 +389,11 @@ public class C99CompletionParseTest extends TestCase {
|
|||
}
|
||||
|
||||
|
||||
|
||||
public void testCompletionInsidePreprocessorDirective() throws Exception {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append( "#define MAC1 99 \n");
|
||||
sb.append( "#define MAC2 99 \n");
|
||||
sb.append( "#ifdef MA");
|
||||
String code = sb.toString();
|
||||
String code =
|
||||
"#define MAC1 99 \n" +
|
||||
"#define MAC2 99 \n" +
|
||||
"#ifdef MA";
|
||||
|
||||
int index = code.length();
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.lrparser.tests.c99;
|
||||
package org.eclipse.cdt.core.lrparser.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.lrparser.c99.C99Language;
|
||||
|
@ -23,16 +23,16 @@ import org.eclipse.cdt.internal.core.dom.SavedCodeReaderFactory;
|
|||
import org.eclipse.core.resources.IFile;
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
public class C99DOMLocationInclusionTests extends DOMLocationInclusionTests {
|
||||
public class LRDOMLocationInclusionTests extends DOMLocationInclusionTests {
|
||||
|
||||
public C99DOMLocationInclusionTests() {
|
||||
public LRDOMLocationInclusionTests() {
|
||||
}
|
||||
|
||||
public C99DOMLocationInclusionTests(String name, Class<Object> className) {
|
||||
public LRDOMLocationInclusionTests(String name, Class<Object> className) {
|
||||
super(name, className);
|
||||
}
|
||||
|
||||
public C99DOMLocationInclusionTests(String name) {
|
||||
public LRDOMLocationInclusionTests(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
|
@ -8,27 +8,26 @@
|
|||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.lrparser.tests.c99;
|
||||
package org.eclipse.cdt.core.lrparser.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.lrparser.c99.C99Language;
|
||||
import org.eclipse.cdt.core.dom.lrparser.cpp.ISOCPPLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.ParseHelper;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
import org.eclipse.cdt.core.parser.ParserLanguage;
|
||||
import org.eclipse.cdt.core.parser.tests.ast2.DOMLocationMacroTests;
|
||||
import org.eclipse.cdt.internal.core.parser.ParserException;
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
public class C99DOMLocationMacroTests extends DOMLocationMacroTests {
|
||||
public class LRDOMLocationMacroTests extends DOMLocationMacroTests {
|
||||
|
||||
|
||||
public C99DOMLocationMacroTests() {
|
||||
public LRDOMLocationMacroTests() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
public C99DOMLocationMacroTests(String name) {
|
||||
public LRDOMLocationMacroTests(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
|
@ -8,24 +8,23 @@
|
|||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.lrparser.tests.c99;
|
||||
package org.eclipse.cdt.core.lrparser.tests;
|
||||
|
||||
import junit.framework.AssertionFailedError;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.lrparser.c99.C99Language;
|
||||
import org.eclipse.cdt.core.dom.lrparser.cpp.ISOCPPLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.ParseHelper;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
import org.eclipse.cdt.core.parser.ParserLanguage;
|
||||
import org.eclipse.cdt.core.parser.tests.ast2.DOMLocationTests;
|
||||
import org.eclipse.cdt.internal.core.parser.ParserException;
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
public class C99DOMLocationTests extends DOMLocationTests {
|
||||
public class LRDOMLocationTests extends DOMLocationTests {
|
||||
|
||||
public C99DOMLocationTests() { }
|
||||
public C99DOMLocationTests(String name) { super(name); }
|
||||
public LRDOMLocationTests() { }
|
||||
public LRDOMLocationTests(String name) { super(name); }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unused")
|
|
@ -8,19 +8,18 @@
|
|||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.lrparser.tests.c99;
|
||||
package org.eclipse.cdt.core.lrparser.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.lrparser.c99.C99Language;
|
||||
import org.eclipse.cdt.core.dom.lrparser.cpp.ISOCPPLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.ParseHelper;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
import org.eclipse.cdt.core.parser.ParserLanguage;
|
||||
import org.eclipse.cdt.core.parser.tests.ast2.DOMPreprocessorInformationTest;
|
||||
import org.eclipse.cdt.internal.core.parser.ParserException;
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
public class C99DOMPreprocessorInformationTest extends DOMPreprocessorInformationTest {
|
||||
public class LRDOMPreprocessorInformationTest extends DOMPreprocessorInformationTest {
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unused")
|
|
@ -8,7 +8,7 @@
|
|||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.lrparser.tests.c99;
|
||||
package org.eclipse.cdt.core.lrparser.tests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
|
@ -31,38 +31,40 @@ import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTStatement;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
|
||||
import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.lrparser.c99.C99Language;
|
||||
import org.eclipse.cdt.core.lrparser.tests.ParseHelper;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
|
||||
/**
|
||||
* TODO these tests can be moved into the core
|
||||
*/
|
||||
@SuppressWarnings("nls")
|
||||
public class C99DigraphTrigraphTests extends TestCase {
|
||||
public class LRDigraphTrigraphTests extends TestCase {
|
||||
|
||||
|
||||
public C99DigraphTrigraphTests() { }
|
||||
public C99DigraphTrigraphTests(String name) { super(name); }
|
||||
public LRDigraphTrigraphTests() { }
|
||||
public LRDigraphTrigraphTests(String name) { super(name); }
|
||||
|
||||
|
||||
protected IASTTranslationUnit parse(String code) {
|
||||
return ParseHelper.parse(code, getLanguage(), true);
|
||||
return ParseHelper.parse(code, getCLanguage(), true);
|
||||
}
|
||||
|
||||
|
||||
protected BaseExtensibleLanguage getLanguage() {
|
||||
protected ILanguage getCLanguage() {
|
||||
return C99Language.getDefault();
|
||||
}
|
||||
|
||||
|
||||
public void testTrigraphSequences() {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append("??=define SIZE ??/ \n"); // trigraph used as backslash to ignore newline
|
||||
sb.append("99 \n");
|
||||
sb.append("int main(void)??< \n");
|
||||
sb.append(" int arr??(SIZE??); \n");
|
||||
sb.append(" arr??(4??) = '0' - (??-0 ??' 1 ??! 2); \n");
|
||||
sb.append(" printf(\"%c??/n\", arr??(4??)); \n");
|
||||
sb.append("??> \n");
|
||||
String code = sb.toString();
|
||||
String code =
|
||||
"??=define SIZE ??/ \n" + // trigraph used as backslash to ignore newline
|
||||
"99 \n" +
|
||||
"int main(void)??< \n" +
|
||||
" int arr??(SIZE??); \n" +
|
||||
" arr??(4??) = '0' - (??-0 ??' 1 ??! 2); \n" +
|
||||
" printf(\"%c??/n\", arr??(4??)); \n" +
|
||||
"??> \n";
|
||||
|
||||
IASTTranslationUnit tu = parse(code);
|
||||
assertNotNull(tu);
|
||||
|
@ -107,23 +109,22 @@ public class C99DigraphTrigraphTests extends TestCase {
|
|||
|
||||
public void testTrigraphEscapeSequences() {
|
||||
// a ??/ trigraph should act just like a backslash in a string literal
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append("int main(void)??< \n");
|
||||
sb.append(" char str[] = \"??/\"??/n\"; \n");
|
||||
sb.append(" char c = '??/u0000'; \n");
|
||||
sb.append("??> \n");
|
||||
String code = sb.toString();
|
||||
String code =
|
||||
"int main(void)??< \n" +
|
||||
" char str[] = \"??/\"??/n\"; \n" +
|
||||
" char c = '??/u0000'; \n" +
|
||||
"??> \n";
|
||||
|
||||
parse(code); // will throw an exception if there are parse errors
|
||||
}
|
||||
|
||||
|
||||
public void testDigraphSequences() {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append("%:define join(a, b) a %:%: b \n");
|
||||
sb.append("int main() <% \n");
|
||||
sb.append(" int arr<:5:>; \n");
|
||||
sb.append("%> \n");
|
||||
String code = sb.toString();
|
||||
String code =
|
||||
"%:define join(a, b) a %:%: b \n" +
|
||||
"int main() <% \n" +
|
||||
" int arr<:5:>; \n" +
|
||||
"%> \n";
|
||||
|
||||
IASTTranslationUnit tu = parse(code); // will throw an exception if there are parse errors
|
||||
|
||||
|
@ -143,16 +144,15 @@ public class C99DigraphTrigraphTests extends TestCase {
|
|||
|
||||
|
||||
public void testTrigraphAndDigraphSequecesInPreprocessorDirectives() {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append("%:define join1(a, b) a %:%: b \n");
|
||||
sb.append("%:define str1(a) %: a \n");
|
||||
sb.append("??=define join2(a, b) a ??=??= b \n");
|
||||
sb.append("??=define str2(a) ??= a \n");
|
||||
sb.append("int main() <% \n");
|
||||
sb.append(" int join1(x, y) = str1(its all good); \n");
|
||||
sb.append(" int join2(a, b) = str2(its still good); \n");
|
||||
sb.append("%> \n");
|
||||
String code = sb.toString();
|
||||
String code =
|
||||
"%:define join1(a, b) a %:%: b \n" +
|
||||
"%:define str1(a) %: a \n" +
|
||||
"??=define join2(a, b) a ??=??= b \n" +
|
||||
"??=define str2(a) ??= a \n" +
|
||||
"int main() <% \n" +
|
||||
" int join1(x, y) = str1(its all good); \n" +
|
||||
" int join2(a, b) = str2(its still good); \n" +
|
||||
"%> \n";
|
||||
|
||||
IASTTranslationUnit tu = parse(code); // will throw an exception if there are parse errors
|
||||
|
|
@ -8,22 +8,21 @@
|
|||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.lrparser.tests.c99;
|
||||
package org.eclipse.cdt.core.lrparser.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.lrparser.c99.C99Language;
|
||||
import org.eclipse.cdt.core.dom.lrparser.cpp.ISOCPPLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.ParseHelper;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
import org.eclipse.cdt.core.parser.ParserLanguage;
|
||||
import org.eclipse.cdt.core.parser.tests.ast2.GCCTests;
|
||||
import org.eclipse.cdt.internal.core.parser.ParserException;
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
public class C99GCCTests extends GCCTests {
|
||||
public class LRGCCTests extends GCCTests {
|
||||
|
||||
public C99GCCTests() {}
|
||||
public C99GCCTests(String name) { super(name); }
|
||||
public LRGCCTests() {}
|
||||
public LRGCCTests(String name) { super(name); }
|
||||
|
||||
|
||||
@Override
|
|
@ -8,12 +8,11 @@
|
|||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.lrparser.tests.c99;
|
||||
package org.eclipse.cdt.core.lrparser.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.lrparser.c99.C99Language;
|
||||
import org.eclipse.cdt.core.dom.lrparser.cpp.ISOCPPLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.ParseHelper;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
import org.eclipse.cdt.core.parser.ParserLanguage;
|
||||
import org.eclipse.cdt.core.parser.tests.ast2.AST2KnRTests;
|
||||
|
@ -23,7 +22,7 @@ import org.eclipse.cdt.internal.core.parser.ParserException;
|
|||
* @author Mike Kucera
|
||||
*/
|
||||
@SuppressWarnings("restriction")
|
||||
public class C99KnRTests extends AST2KnRTests {
|
||||
public class LRKnRTests extends AST2KnRTests {
|
||||
|
||||
|
||||
@Override
|
|
@ -10,8 +10,7 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.lrparser.tests;
|
||||
|
||||
import org.eclipse.cdt.core.lrparser.tests.c99.*;
|
||||
import org.eclipse.cdt.core.lrparser.tests.cpp.ISOCPPParserTestSuite;
|
||||
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestSuite;
|
||||
|
@ -28,12 +27,35 @@ public class LRParserTestSuite extends TestSuite {
|
|||
// and perhaps others
|
||||
|
||||
public static Test suite() {
|
||||
TestSuite suite = new TestSuite();
|
||||
return new TestSuite() {{
|
||||
|
||||
suite.addTest(C99ParserTestSuite.suite());
|
||||
suite.addTest(ISOCPPParserTestSuite.suite());
|
||||
addTestSuite(LRTests.class); // has some tests that do fail
|
||||
|
||||
return suite;
|
||||
addTestSuite(LRCSpecTests.class); // a couple of failures
|
||||
addTestSuite(LRKnRTests.class); // mostly fail due to ambiguities
|
||||
|
||||
// The majority of the content assist test are in the ui tests plugin
|
||||
addTestSuite(LRCompletionBasicTest.class);
|
||||
addTestSuite(LRCompletionParseTest.class);
|
||||
// this one still has a lot of failing tests though
|
||||
addTestSuite(LRSelectionParseTest.class);
|
||||
|
||||
addTestSuite(LRDOMLocationInclusionTests.class);
|
||||
addTestSuite(LRDOMLocationTests.class);
|
||||
addTestSuite(LRDOMLocationMacroTests.class);
|
||||
addTestSuite(LRDOMPreprocessorInformationTest.class);
|
||||
addTestSuite(LRCommentTests.class);
|
||||
addTestSuite(LRDigraphTrigraphTests.class);
|
||||
addTestSuite(LRGCCTests.class);
|
||||
addTestSuite(LRUtilOldTests.class);
|
||||
addTestSuite(LRUtilTests.class);
|
||||
addTestSuite(LRCompleteParser2Tests.class);
|
||||
addTestSuite(LRTaskParserTest.class);
|
||||
|
||||
addTestSuite(LRCPPSpecTest.class);
|
||||
addTestSuite(LRCPPTests.class);
|
||||
|
||||
}};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,14 +8,13 @@
|
|||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.lrparser.tests.c99;
|
||||
package org.eclipse.cdt.core.lrparser.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ICodeReaderFactory;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTNode;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.lrparser.c99.C99Language;
|
||||
import org.eclipse.cdt.core.dom.lrparser.cpp.ISOCPPLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.ParseHelper;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
import org.eclipse.cdt.core.parser.CodeReader;
|
||||
import org.eclipse.cdt.core.parser.IScannerInfo;
|
||||
|
@ -27,10 +26,10 @@ import org.eclipse.cdt.internal.core.parser.ParserException;
|
|||
import org.eclipse.core.resources.IFile;
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
public class C99SelectionParseTest extends AST2SelectionParseTest {
|
||||
public class LRSelectionParseTest extends AST2SelectionParseTest {
|
||||
|
||||
public C99SelectionParseTest() {}
|
||||
public C99SelectionParseTest(String name) { super(name); }
|
||||
public LRSelectionParseTest() {}
|
||||
public LRSelectionParseTest(String name) { super(name); }
|
||||
|
||||
@Override
|
||||
protected IASTNode parse(String code, ParserLanguage lang, int offset, int length) throws ParserException {
|
|
@ -8,19 +8,18 @@
|
|||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.lrparser.tests.c99;
|
||||
package org.eclipse.cdt.core.lrparser.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.lrparser.c99.C99Language;
|
||||
import org.eclipse.cdt.core.dom.lrparser.cpp.ISOCPPLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.ParseHelper;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
import org.eclipse.cdt.core.parser.ParserLanguage;
|
||||
import org.eclipse.cdt.core.parser.tests.ast2.TaskParserTest;
|
||||
import org.eclipse.cdt.internal.core.parser.ParserException;
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
public class C99TaskParserTest extends TaskParserTest {
|
||||
public class LRTaskParserTest extends TaskParserTest {
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unused")
|
|
@ -8,7 +8,7 @@
|
|||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.lrparser.tests.c99;
|
||||
package org.eclipse.cdt.core.lrparser.tests;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
|
@ -18,7 +18,6 @@ import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
|||
import org.eclipse.cdt.core.dom.ast.c.ICASTSimpleDeclSpecifier;
|
||||
import org.eclipse.cdt.core.dom.lrparser.c99.C99Language;
|
||||
import org.eclipse.cdt.core.dom.lrparser.cpp.ISOCPPLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.ParseHelper;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
import org.eclipse.cdt.core.parser.ParserLanguage;
|
||||
import org.eclipse.cdt.core.parser.tests.ast2.AST2Tests;
|
||||
|
@ -31,13 +30,13 @@ import org.eclipse.cdt.internal.core.parser.ParserException;
|
|||
*
|
||||
*/
|
||||
@SuppressWarnings({ "nls", "restriction" })
|
||||
public class C99Tests extends AST2Tests {
|
||||
public class LRTests extends AST2Tests {
|
||||
|
||||
public static TestSuite suite() {
|
||||
return suite(C99Tests.class);
|
||||
return suite(LRTests.class);
|
||||
}
|
||||
|
||||
public C99Tests(String name) {
|
||||
public LRTests(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
|
@ -8,21 +8,20 @@
|
|||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.lrparser.tests.c99;
|
||||
package org.eclipse.cdt.core.lrparser.tests;
|
||||
|
||||
import junit.framework.AssertionFailedError;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.lrparser.c99.C99Language;
|
||||
import org.eclipse.cdt.core.dom.lrparser.cpp.ISOCPPLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.ParseHelper;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
import org.eclipse.cdt.core.parser.ParserLanguage;
|
||||
import org.eclipse.cdt.core.parser.tests.ast2.AST2UtilOldTests;
|
||||
import org.eclipse.cdt.internal.core.parser.ParserException;
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
public class C99UtilOldTests extends AST2UtilOldTests {
|
||||
public class LRUtilOldTests extends AST2UtilOldTests {
|
||||
|
||||
|
||||
@Override
|
|
@ -8,19 +8,18 @@
|
|||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.lrparser.tests.c99;
|
||||
package org.eclipse.cdt.core.lrparser.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.lrparser.c99.C99Language;
|
||||
import org.eclipse.cdt.core.dom.lrparser.cpp.ISOCPPLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.ParseHelper;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
import org.eclipse.cdt.core.parser.ParserLanguage;
|
||||
import org.eclipse.cdt.core.parser.tests.ast2.AST2UtilTests;
|
||||
import org.eclipse.cdt.internal.core.parser.ParserException;
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
public class C99UtilTests extends AST2UtilTests {
|
||||
public class LRUtilTests extends AST2UtilTests {
|
||||
|
||||
@Override
|
||||
protected IASTTranslationUnit parse( String code, ParserLanguage lang ) throws ParserException {
|
|
@ -1,54 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 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.lrparser.tests.c99;
|
||||
|
||||
import org.eclipse.core.runtime.Plugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
/**
|
||||
* The activator class controls the plug-in life cycle
|
||||
*/
|
||||
public class Activator extends Plugin {
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "org.eclipse.cdt.core.parser.c99.tests"; //$NON-NLS-1$
|
||||
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
public Activator() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
plugin = this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
plugin = null;
|
||||
super.stop(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shared instance
|
||||
*
|
||||
* @return the shared instance
|
||||
*/
|
||||
public static Activator getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 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.lrparser.tests.c99;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
public class C99ParserTestSuite extends TestSuite {
|
||||
|
||||
// TODO: the following test are not being reused
|
||||
//
|
||||
// DOMGCCSelectionParseExtensionsTest
|
||||
// DOMSelectionParseTest
|
||||
// GCCCompleteParseExtensionsTest
|
||||
// QuickParser2Tests
|
||||
//
|
||||
// and perhaps others
|
||||
|
||||
public static Test suite() {
|
||||
TestSuite suite = new TestSuite();
|
||||
|
||||
suite.addTestSuite(C99Tests.class); // has some tests that do fail
|
||||
|
||||
suite.addTestSuite(C99SpecTests.class); // a couple of failures
|
||||
suite.addTestSuite(C99KnRTests.class); // mostly fail due to ambiguities
|
||||
|
||||
// The majority of the content assist test are in the ui tests plugin
|
||||
suite.addTestSuite(C99CompletionBasicTest.class);
|
||||
suite.addTestSuite(C99CompletionParseTest.class);
|
||||
// this one still has a lot of failing tests though
|
||||
suite.addTestSuite(C99SelectionParseTest.class);
|
||||
|
||||
suite.addTestSuite(C99DOMLocationInclusionTests.class);
|
||||
suite.addTestSuite(C99DOMLocationTests.class);
|
||||
suite.addTestSuite(C99DOMLocationMacroTests.class);
|
||||
suite.addTestSuite(C99DOMPreprocessorInformationTest.class);
|
||||
suite.addTestSuite(C99CommentTests.class);
|
||||
suite.addTestSuite(C99DigraphTrigraphTests.class);
|
||||
suite.addTestSuite(C99GCCTests.class);
|
||||
suite.addTestSuite(C99UtilOldTests.class);
|
||||
suite.addTestSuite(C99UtilTests.class);
|
||||
suite.addTestSuite(C99CompleteParser2Tests.class);
|
||||
suite.addTestSuite(C99TaskParserTest.class);
|
||||
|
||||
|
||||
return suite;
|
||||
}
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 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.lrparser.tests.cpp;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
public class ISOCPPParserTestSuite extends TestSuite {
|
||||
|
||||
|
||||
public static Test suite() {
|
||||
TestSuite suite = new TestSuite();
|
||||
|
||||
suite.addTestSuite(ISOCPPSpecTest.class);
|
||||
suite.addTestSuite(ISOCPPTests.class);
|
||||
|
||||
return suite;
|
||||
}
|
||||
}
|
|
@ -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.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.c99.C99CompletionParseTest;
|
||||
|
||||
public class UPCC99CompletionParseTest extends C99CompletionParseTest {
|
||||
|
||||
public UPCC99CompletionParseTest() { }
|
||||
public UPCC99CompletionParseTest(String name) { super(name); }
|
||||
|
||||
@Override
|
||||
protected BaseExtensibleLanguage getC99Language() {
|
||||
return UPCLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -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.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.c99.C99DOMLocationInclusionTests;
|
||||
|
||||
public class UPCC99DOMLocationInclusionTests extends C99DOMLocationInclusionTests {
|
||||
|
||||
public UPCC99DOMLocationInclusionTests() {
|
||||
}
|
||||
|
||||
public UPCC99DOMLocationInclusionTests(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BaseExtensibleLanguage getC99Language() {
|
||||
return UPCLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -1,27 +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.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.c99.C99DigraphTrigraphTests;
|
||||
|
||||
|
||||
public class UPCC99DigraphTrigraphTests extends C99DigraphTrigraphTests {
|
||||
|
||||
public UPCC99DigraphTrigraphTests() { }
|
||||
public UPCC99DigraphTrigraphTests(String name) { super(name); }
|
||||
|
||||
@Override
|
||||
protected BaseExtensibleLanguage getLanguage() {
|
||||
return UPCLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -1,27 +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.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.c99.C99SelectionParseTest;
|
||||
|
||||
public class UPCC99SelectionParseTest extends C99SelectionParseTest {
|
||||
|
||||
public UPCC99SelectionParseTest() { }
|
||||
public UPCC99SelectionParseTest(String name) { super(name); }
|
||||
|
||||
|
||||
@Override
|
||||
protected BaseExtensibleLanguage getC99Language() {
|
||||
return UPCLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2008 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
|
||||
|
@ -10,17 +10,21 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.parser.upc.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.c99.C99KnRTests;
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRCSpecTests;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class UPCC99KnRTests extends C99KnRTests {
|
||||
public class UPCCSpecTests extends LRCSpecTests {
|
||||
|
||||
public UPCC99KnRTests() {
|
||||
public UPCCSpecTests() {
|
||||
}
|
||||
|
||||
public UPCCSpecTests(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BaseExtensibleLanguage getC99Language() {
|
||||
protected ILanguage getCLanguage() {
|
||||
return UPCLanguage.getDefault();
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2008 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
|
||||
|
@ -10,14 +10,14 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.parser.upc.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.c99.C99CommentTests;
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRCommentTests;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class UPCC99CommentTests extends C99CommentTests {
|
||||
public class UPCCommentTests extends LRCommentTests {
|
||||
|
||||
@Override
|
||||
protected BaseExtensibleLanguage getC99Language() {
|
||||
protected ILanguage getC99Language() {
|
||||
return UPCLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2008 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
|
||||
|
@ -10,14 +10,14 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.parser.upc.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.c99.C99UtilOldTests;
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRCompleteParser2Tests;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class UPCC99UtilOldTests extends C99UtilOldTests {
|
||||
public class UPCCompleteParser2Tests extends LRCompleteParser2Tests {
|
||||
|
||||
@Override
|
||||
protected BaseExtensibleLanguage getC99Language() {
|
||||
protected ILanguage getC99Language() {
|
||||
return UPCLanguage.getDefault();
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2008 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
|
||||
|
@ -10,16 +10,16 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.parser.upc.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.lrparser.c99.C99Language;
|
||||
import org.eclipse.cdt.core.lrparser.tests.c99.C99CompletionBasicTest;
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRCompletionBasicTest;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class UPCC99CompletionBasicTest extends C99CompletionBasicTest {
|
||||
public class UPCCompletionBasicTest extends LRCompletionBasicTest {
|
||||
|
||||
public UPCC99CompletionBasicTest() { }
|
||||
public UPCCompletionBasicTest() { }
|
||||
|
||||
@Override
|
||||
protected BaseExtensibleLanguage getC99Language() {
|
||||
protected ILanguage getC99Language() {
|
||||
return C99Language.getDefault();
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 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.upc.UPCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRCompletionParseTest;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class UPCCompletionParseTest extends LRCompletionParseTest {
|
||||
|
||||
public UPCCompletionParseTest() { }
|
||||
public UPCCompletionParseTest(String name) { super(name); }
|
||||
|
||||
@Override
|
||||
protected ILanguage getC99Language() {
|
||||
return UPCLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2008 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
|
||||
|
@ -10,22 +10,21 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.parser.upc.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.c99.C99GCCTests;
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRDOMLocationInclusionTests;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class UPCC99GCCTests extends C99GCCTests {
|
||||
public class UPCDOMLocationInclusionTests extends LRDOMLocationInclusionTests {
|
||||
|
||||
public UPCC99GCCTests() {
|
||||
public UPCDOMLocationInclusionTests() {
|
||||
}
|
||||
|
||||
public UPCC99GCCTests(String message) {
|
||||
super(message);
|
||||
public UPCDOMLocationInclusionTests(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BaseExtensibleLanguage getC99Language() {
|
||||
protected ILanguage getC99Language() {
|
||||
return UPCLanguage.getDefault();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2008 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
|
||||
|
@ -10,15 +10,17 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.parser.upc.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.c99.C99DOMPreprocessorInformationTest;
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRDOMLocationMacroTests;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class UPCC99DOMPreprocessorInformationTest extends C99DOMPreprocessorInformationTest {
|
||||
public class UPCDOMLocationMacroTests extends LRDOMLocationMacroTests {
|
||||
|
||||
@Override
|
||||
protected BaseExtensibleLanguage getC99Language() {
|
||||
return UPCLanguage.getDefault();
|
||||
public UPCDOMLocationMacroTests() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ILanguage getC99Language() {
|
||||
return UPCLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2008 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
|
||||
|
@ -10,21 +10,21 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.parser.upc.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.c99.C99DOMLocationTests;
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRDOMLocationTests;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class UPCC99DOMLocationTests extends C99DOMLocationTests {
|
||||
public class UPCDOMLocationTests extends LRDOMLocationTests {
|
||||
|
||||
public UPCC99DOMLocationTests() {
|
||||
public UPCDOMLocationTests() {
|
||||
}
|
||||
|
||||
public UPCC99DOMLocationTests(String name) {
|
||||
public UPCDOMLocationTests(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BaseExtensibleLanguage getC99Language() {
|
||||
protected ILanguage getC99Language() {
|
||||
return UPCLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2008 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
|
||||
|
@ -10,17 +10,15 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.parser.upc.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.c99.C99DOMLocationMacroTests;
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRDOMPreprocessorInformationTest;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class UPCC99DOMLocationMacroTests extends C99DOMLocationMacroTests {
|
||||
|
||||
public UPCC99DOMLocationMacroTests() {
|
||||
}
|
||||
public class UPCDOMPreprocessorInformationTest extends LRDOMPreprocessorInformationTest {
|
||||
|
||||
@Override
|
||||
protected BaseExtensibleLanguage getC99Language() {
|
||||
protected ILanguage getC99Language() {
|
||||
return UPCLanguage.getDefault();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2008 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
|
||||
|
@ -10,22 +10,18 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.parser.upc.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.c99.C99SpecTests;
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRDigraphTrigraphTests;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class UPCC99SpecTests extends C99SpecTests {
|
||||
|
||||
public UPCC99SpecTests() {
|
||||
}
|
||||
public class UPCDigraphTrigraphTests extends LRDigraphTrigraphTests {
|
||||
|
||||
public UPCC99SpecTests(String name) {
|
||||
super(name);
|
||||
}
|
||||
public UPCDigraphTrigraphTests() { }
|
||||
public UPCDigraphTrigraphTests(String name) { super(name); }
|
||||
|
||||
@Override
|
||||
protected BaseExtensibleLanguage getCLanguage() {
|
||||
protected ILanguage getCLanguage() {
|
||||
return UPCLanguage.getDefault();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2008 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
|
||||
|
@ -10,14 +10,21 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.parser.upc.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.c99.C99CompleteParser2Tests;
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRGCCTests;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class UPCC99CompleteParser2Tests extends C99CompleteParser2Tests {
|
||||
public class UPCGCCTests extends LRGCCTests {
|
||||
|
||||
public UPCGCCTests() {
|
||||
}
|
||||
|
||||
public UPCGCCTests(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BaseExtensibleLanguage getC99Language() {
|
||||
protected ILanguage getC99Language() {
|
||||
return UPCLanguage.getDefault();
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2008 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
|
||||
|
@ -10,14 +10,17 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.parser.upc.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.c99.C99UtilTests;
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRKnRTests;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class UPCC99UtilTests extends C99UtilTests {
|
||||
public class UPCKnRTests extends LRKnRTests {
|
||||
|
||||
public UPCKnRTests() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BaseExtensibleLanguage getC99Language() {
|
||||
protected ILanguage getC99Language() {
|
||||
return UPCLanguage.getDefault();
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2008 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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2008 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
|
||||
|
@ -16,27 +16,25 @@ import junit.framework.TestSuite;
|
|||
public class UPCParserTestSuite 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;
|
||||
return new TestSuite() {{
|
||||
addTestSuite(UPCCommentTests.class);
|
||||
addTestSuite(UPCCompletionBasicTest.class);
|
||||
addTestSuite(UPCCompletionParseTest.class);
|
||||
addTestSuite(UPCDOMLocationInclusionTests.class);
|
||||
addTestSuite(UPCDOMLocationMacroTests.class);
|
||||
addTestSuite(UPCDOMLocationTests.class);
|
||||
addTestSuite(UPCDOMPreprocessorInformationTest.class);
|
||||
addTestSuite(UPCKnRTests.class);
|
||||
addTestSuite(UPCSelectionParseTest.class);
|
||||
addTestSuite(UPCCSpecTests.class);
|
||||
addTestSuite(UPCTests.class);
|
||||
addTestSuite(UPCLanguageExtensionTests.class);
|
||||
addTestSuite(UPCDigraphTrigraphTests.class);
|
||||
addTestSuite(UPCGCCTests.class);
|
||||
addTestSuite(UPCUtilOldTests.class);
|
||||
addTestSuite(UPCUtilTests.class);
|
||||
addTestSuite(UPCCompleteParser2Tests.class);
|
||||
addTestSuite(UPCTaskParserTest.class);
|
||||
}};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 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.upc.UPCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRSelectionParseTest;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class UPCSelectionParseTest extends LRSelectionParseTest {
|
||||
|
||||
public UPCSelectionParseTest() { }
|
||||
public UPCSelectionParseTest(String name) { super(name); }
|
||||
|
||||
|
||||
@Override
|
||||
protected ILanguage getC99Language() {
|
||||
return UPCLanguage.getDefault();
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2008 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
|
||||
|
@ -10,14 +10,14 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.parser.upc.tests;
|
||||
|
||||
import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.c99.C99TaskParserTest;
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRTaskParserTest;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class UPCC99TaskParserTest extends C99TaskParserTest {
|
||||
public class UPCTaskParserTest extends LRTaskParserTest {
|
||||
|
||||
@Override
|
||||
protected BaseExtensibleLanguage getC99Language() {
|
||||
protected ILanguage getC99Language() {
|
||||
return UPCLanguage.getDefault();
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2008 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
|
||||
|
@ -12,25 +12,25 @@ package org.eclipse.cdt.core.parser.upc.tests;
|
|||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
|
||||
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.c99.C99Tests;
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRTests;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
/**
|
||||
* Run the C99 tests against the UPC parser
|
||||
*
|
||||
*/
|
||||
public class UPCC99Tests extends C99Tests {
|
||||
public class UPCTests extends LRTests {
|
||||
|
||||
public static TestSuite suite() {
|
||||
return suite(UPCC99Tests.class);
|
||||
return suite(UPCTests.class);
|
||||
}
|
||||
|
||||
public UPCC99Tests(String name) {
|
||||
public UPCTests(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BaseExtensibleLanguage getC99Language() {
|
||||
protected ILanguage getC99Language() {
|
||||
return UPCLanguage.getDefault();
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 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.upc.UPCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRUtilOldTests;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class UPCUtilOldTests extends LRUtilOldTests {
|
||||
|
||||
@Override
|
||||
protected ILanguage getC99Language() {
|
||||
return UPCLanguage.getDefault();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 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.upc.UPCLanguage;
|
||||
import org.eclipse.cdt.core.lrparser.tests.LRUtilTests;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
|
||||
public class UPCUtilTests extends LRUtilTests {
|
||||
|
||||
@Override
|
||||
protected ILanguage getC99Language() {
|
||||
return UPCLanguage.getDefault();
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue