1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

fix bug 226121 for LR parsers, support for asm labels

This commit is contained in:
Mike Kucera 2009-01-13 22:51:08 +00:00
parent 07a63ee282
commit abbbe44a24
7 changed files with 496 additions and 500 deletions

View file

@ -10,7 +10,6 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.lrparser.tests; package org.eclipse.cdt.core.lrparser.tests;
import junit.framework.AssertionFailedError;
import junit.framework.TestSuite; import junit.framework.TestSuite;
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit; import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
@ -63,70 +62,70 @@ public class LRCPPTests extends AST2CPPTests {
} }
@Override // @Override
public void testBug87424() throws Exception { // gcc extension // public void testBug87424() throws Exception { // gcc extension
try { // try {
super.testBug87424(); // super.testBug87424();
fail(); // fail();
} catch(AssertionFailedError _) { // } catch(AssertionFailedError _) {
} // }
} // }
//
//
@Override // @Override
public void testBug95757() throws Exception { // gcc extension // public void testBug95757() throws Exception { // gcc extension
try { // try {
super.testBug95757(); // super.testBug95757();
fail(); // fail();
} catch(AssertionFailedError _) { // } catch(AssertionFailedError _) {
} // }
} // }
//
@Override // @Override
public void testBug108202() throws Exception { // gcc attributes not supported // public void testBug108202() throws Exception { // gcc attributes not supported
try { // try {
super.testBug108202(); // super.testBug108202();
fail(); // fail();
} catch(AssertionFailedError _) { // } catch(AssertionFailedError _) {
} // }
} // }
//
//
@Override // @Override
public void testBug195701() throws Exception { // gcc attributes not supported // public void testBug195701() throws Exception { // gcc attributes not supported
try { // try {
super.testBug195701(); // super.testBug195701();
fail(); // fail();
} catch(AssertionFailedError _) { // } catch(AssertionFailedError _) {
} // }
} // }
//
@Override // @Override
public void testBug179712() throws Exception { // gcc attributes not supported // public void testBug179712() throws Exception { // gcc attributes not supported
try { // try {
super.testBug179712(); // super.testBug179712();
fail(); // fail();
} catch(AssertionFailedError _) { // } catch(AssertionFailedError _) {
} // }
} // }
//
@Override // @Override
public void testBug240567() throws Exception { // gcc // public void testBug240567() throws Exception { // gcc
try { // try {
super.testBug240567(); // super.testBug240567();
fail(); // fail();
} catch(AssertionFailedError _) { // } catch(AssertionFailedError _) {
} // }
} // }
//
@Override // @Override
public void testLiteralsViaOverloads_225534() throws Exception { // gcc, I think // public void testLiteralsViaOverloads_225534() throws Exception { // gcc, I think
try { // try {
super.testLiteralsViaOverloads_225534(); // super.testLiteralsViaOverloads_225534();
fail(); // fail();
} catch(AssertionFailedError _) { // } catch(AssertionFailedError _) {
} // }
} // }
@Override @Override

View file

@ -10,7 +10,6 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.lrparser.tests; package org.eclipse.cdt.core.lrparser.tests;
import junit.framework.AssertionFailedError;
import junit.framework.TestSuite; import junit.framework.TestSuite;
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit; import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
@ -84,13 +83,13 @@ public class LRCSpecTests extends AST2CSpecTest {
@Override // @Override
public void test6_7_2_1s17() throws Exception { // what the heck is offsetof // public void test6_7_2_1s17() throws Exception { // what the heck is offsetof
try { // try {
super.test6_7_2_1s17(); // super.test6_7_2_1s17();
fail(); // fail();
} catch(AssertionFailedError _) { } // } catch(AssertionFailedError _) { }
} // }
} }

View file

@ -52,17 +52,17 @@ public class LRCompleteParser2Tests extends CompleteParser2Tests {
// Tests that are failing at this point // Tests that are failing at this point
@Override // @Override
public void testBug39676_tough() { // is this C99? // public void testBug39676_tough() { // is this C99?
try { // try {
super.testBug39676_tough(); // super.testBug39676_tough();
} catch(AssertionFailedError _) { // } catch(AssertionFailedError _) {
return; // return;
} catch(Exception _) { // } catch(Exception _) {
return; // return;
} // }
fail(); // fail();
} // }
// public void testPredefinedSymbol_bug70928_infinite_loop_test1() throws Exception { // gcc extension // public void testPredefinedSymbol_bug70928_infinite_loop_test1() throws Exception { // gcc extension
// try { // try {
@ -87,37 +87,37 @@ public class LRCompleteParser2Tests extends CompleteParser2Tests {
// } catch(AssertionFailedError _) { } // } catch(AssertionFailedError _) { }
// } // }
@Override // @Override
public void test158192_declspec_in_declarator() throws Exception { // public void test158192_declspec_in_declarator() throws Exception {
try { // try {
super.test158192_declspec_in_declarator(); // super.test158192_declspec_in_declarator();
fail(); // fail();
} catch(AssertionFailedError _) { } // } catch(AssertionFailedError _) { }
} // }
//
@Override // @Override
public void test158192_declspec_on_class() throws Exception { // public void test158192_declspec_on_class() throws Exception {
try { // try {
super.test158192_declspec_on_class(); // super.test158192_declspec_on_class();
fail(); // fail();
} catch(AssertionFailedError _) { } // } catch(AssertionFailedError _) { }
} // }
//
@Override // @Override
public void test158192_declspec_on_variable() throws Exception { // public void test158192_declspec_on_variable() throws Exception {
try { // try {
super.test158192_declspec_on_variable(); // super.test158192_declspec_on_variable();
fail(); // fail();
} catch(AssertionFailedError _) { } // } catch(AssertionFailedError _) { }
} // }
//
@Override // @Override
public void testPredefinedSymbol_bug70928() throws Exception { // public void testPredefinedSymbol_bug70928() throws Exception {
try { // try {
super.testPredefinedSymbol_bug70928(); // super.testPredefinedSymbol_bug70928();
fail(); // fail();
} catch(AssertionFailedError _) { } // } catch(AssertionFailedError _) { }
} // }
@Override @Override
public void testBug64010() throws Exception { // 10000 else-ifs, busts LPG's stack public void testBug64010() throws Exception { // 10000 else-ifs, busts LPG's stack
@ -127,26 +127,26 @@ public class LRCompleteParser2Tests extends CompleteParser2Tests {
} catch(AssertionFailedError _) { } } catch(AssertionFailedError _) { }
} }
//
@Override // @Override
public void testGNUASMExtension() throws Exception { // public void testGNUASMExtension() throws Exception {
try { // try {
super.testGNUASMExtension(); // super.testGNUASMExtension();
fail(); // fail();
} catch(AssertionFailedError _) { // } catch(AssertionFailedError _) {
} catch(AssertionError _) { // } catch(AssertionError _) {
} // }
} // }
//
@Override // @Override
public void testBug39551B() throws Exception { // public void testBug39551B() throws Exception {
try { // try {
super.testBug39551B(); // super.testBug39551B();
fail(); // fail();
} catch(AssertionFailedError _) { } // } catch(AssertionFailedError _) { }
} // }
//
//
//
} }

View file

@ -53,13 +53,13 @@ public class LRDOMLocationMacroTests extends DOMLocationMacroTests {
* Tests GCC specific stuff, not applicable at this point * Tests GCC specific stuff, not applicable at this point
*/ */
@Override // @Override
public void testStdioBug() throws ParserException { // public void testStdioBug() throws ParserException {
try { // try {
super.testStdioBug(); // super.testStdioBug();
fail(); // fail();
} // }
catch(Throwable e) { } // catch(Throwable e) { }
} // }
} }

View file

@ -59,33 +59,33 @@ public class LRDOMLocationTests extends DOMLocationTests {
catch(AssertionFailedError e) {} catch(AssertionFailedError e) {}
} }
//
@Override // @Override
public void test162180_3() throws Exception { // public void test162180_3() throws Exception {
try { // try {
super.test162180_3(); // super.test162180_3();
fail(); // fail();
} // }
catch(AssertionFailedError e) {} // catch(AssertionFailedError e) {}
} // }
//
@Override // @Override
public void testBug86698_2() throws Exception { // I don't think C++ supports nested functions // public void testBug86698_2() throws Exception { // I don't think C++ supports nested functions
try { // try {
super.testBug86698_2(); // super.testBug86698_2();
fail(); // fail();
} // }
catch(AssertionFailedError e) {} // catch(AssertionFailedError e) {}
} // }
//
//
@Override // @Override
public void testBug120607() throws Exception { // #assert and #unassert are gcc extensions // public void testBug120607() throws Exception { // #assert and #unassert are gcc extensions
try { // try {
super.testBug120607(); // super.testBug120607();
fail(); // fail();
} // }
catch(AssertionFailedError e) {} // catch(AssertionFailedError e) {}
} // }
} }

View file

@ -8,8 +8,6 @@
******************************************************************************/ ******************************************************************************/
package org.eclipse.cdt.core.lrparser.tests; package org.eclipse.cdt.core.lrparser.tests;
import junit.framework.AssertionFailedError;
import org.eclipse.cdt.core.dom.lrparser.gcc.GCCLanguage; import org.eclipse.cdt.core.dom.lrparser.gcc.GCCLanguage;
import org.eclipse.cdt.core.dom.lrparser.gpp.GPPLanguage; import org.eclipse.cdt.core.dom.lrparser.gpp.GPPLanguage;
import org.eclipse.cdt.core.model.ILanguage; import org.eclipse.cdt.core.model.ILanguage;
@ -49,133 +47,133 @@ public class LRQuickParser2Tests extends QuickParser2Tests {
// just ignore this test // just ignore this test
} }
@Override // @Override
public void testBug39695() throws Exception { // no support for __alignof__ // public void testBug39695() throws Exception { // no support for __alignof__
try { // try {
super.testBug39695(); // super.testBug39695();
fail(); // fail();
} catch(AssertionFailedError _) { } // } catch(AssertionFailedError _) { }
} // }
//
@Override // @Override
public void testBug39684() throws Exception { // typeof is gcc extension // public void testBug39684() throws Exception { // typeof is gcc extension
try { // try {
super.testBug39684(); // super.testBug39684();
fail(); // fail();
} catch(AssertionFailedError _) { } // } catch(AssertionFailedError _) { }
} // }
//
@Override // @Override
public void testBug39698A() throws Exception { // gcc extension // public void testBug39698A() throws Exception { // gcc extension
try { // try {
super.testBug39698A(); // super.testBug39698A();
fail(); // fail();
} catch(AssertionFailedError _) { } // } catch(AssertionFailedError _) { }
} // }
//
@Override // @Override
public void testBug39698B() throws Exception { // gcc extension // public void testBug39698B() throws Exception { // gcc extension
try { // try {
super.testBug39698B(); // super.testBug39698B();
fail(); // fail();
} catch(AssertionFailedError _) { } // } catch(AssertionFailedError _) { }
} // }
//
@Override // @Override
public void testBug39704B() throws Exception { // gcc extension // public void testBug39704B() throws Exception { // gcc extension
try { // try {
super.testBug39704B(); // super.testBug39704B();
fail(); // fail();
} catch(AssertionFailedError _) { } // } catch(AssertionFailedError _) { }
} // }
//
@Override // @Override
public void testBug39704C() throws Exception { // gcc extension // public void testBug39704C() throws Exception { // gcc extension
try { // try {
super.testBug39704C(); // super.testBug39704C();
fail(); // fail();
} catch(AssertionFailedError _) { } // } catch(AssertionFailedError _) { }
} // }
//
@Override // @Override
public void testBug39677() throws Exception { // gcc extension // public void testBug39677() throws Exception { // gcc extension
try { // try {
super.testBug39677(); // super.testBug39677();
fail(); // fail();
} catch(AssertionFailedError _) { } // } catch(AssertionFailedError _) { }
} // }
//
//
@Override // @Override
public void testBug57652() throws Exception { // gcc extension // public void testBug57652() throws Exception { // gcc extension
try { // try {
super.testBug57652(); // super.testBug57652();
fail(); // fail();
} catch(AssertionFailedError _) { } // } catch(AssertionFailedError _) { }
} // }
//
//
@Override // @Override
public void testBug39701A() throws Exception { // gcc extension // public void testBug39701A() throws Exception { // gcc extension
try { // try {
super.testBug39701A(); // super.testBug39701A();
fail(); // fail();
} catch(AssertionFailedError _) { } // } catch(AssertionFailedError _) { }
} // }
//
@Override // @Override
public void testBug39701B() throws Exception { // gcc extension // public void testBug39701B() throws Exception { // gcc extension
try { // try {
super.testBug39701B(); // super.testBug39701B();
fail(); // fail();
} catch(AssertionFailedError _) { } // } catch(AssertionFailedError _) { }
} // }
//
@Override // @Override
public void testBug39701C() throws Exception { // gcc extension // public void testBug39701C() throws Exception { // gcc extension
try { // try {
super.testBug39701C(); // super.testBug39701C();
fail(); // fail();
} catch(AssertionFailedError _) { } // } catch(AssertionFailedError _) { }
} // }
//
//
@Override // @Override
public void testBug40007() throws Exception { // gcc extension // public void testBug40007() throws Exception { // gcc extension
try { // try {
super.testBug40007(); // super.testBug40007();
fail(); // fail();
} catch(AssertionFailedError _) { // } catch(AssertionFailedError _) {
} catch(AssertionError _) { // } catch(AssertionError _) {
} // }
//
} // }
//
@Override // @Override
public void testBug39703() throws Exception { // gcc extension // public void testBug39703() throws Exception { // gcc extension
try { // try {
super.testBug39703(); // super.testBug39703();
fail(); // fail();
} catch(AssertionFailedError _) { } // } catch(AssertionFailedError _) { }
} // }
//
//
@Override // @Override
public void testBug39554() throws Exception { // gcc extension // public void testBug39554() throws Exception { // gcc extension
try { // try {
super.testBug39554(); // super.testBug39554();
fail(); // fail();
} catch(AssertionFailedError _) { } // } catch(AssertionFailedError _) { }
} // }
//
//
@Override // @Override
public void testBug39686() throws Exception { // gcc extension // public void testBug39686() throws Exception { // gcc extension
try { // try {
super.testBug39686(); // super.testBug39686();
fail(); // fail();
} catch(AssertionFailedError _) { } // } catch(AssertionFailedError _) { }
} // }
} }

View file

@ -111,204 +111,204 @@ public class LRTests extends AST2Tests {
@Override // @Override
public void testBug93980() { // some wierd gcc extension I think // public void testBug93980() { // some wierd gcc extension I think
try { // try {
super.testBug93980(); // super.testBug93980();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
//
@Override // @Override
public void testBug95866() { // gcc extension // public void testBug95866() { // gcc extension
try { // try {
super.testBug95866(); // super.testBug95866();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
//
@Override // @Override
public void testBug80171() throws Exception { // implicit int not supported // public void testBug80171() throws Exception { // implicit int not supported
try { // try {
super.testBug80171(); // super.testBug80171();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
//
@Override // @Override
public void testBug196468_emptyArrayInitializer() { // empty array initializer is a gcc extension // public void testBug196468_emptyArrayInitializer() { // empty array initializer is a gcc extension
try { // try {
super.testBug196468_emptyArrayInitializer(); // super.testBug196468_emptyArrayInitializer();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
//
@Override // @Override
public void testBug75340() { // not legal c99 // public void testBug75340() { // not legal c99
try { // try {
super.testBug75340(); // super.testBug75340();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
//
@Override // @Override
public void test92791() { // I think the test is wrong, the second code snippet contains a redeclaration // public void test92791() { // I think the test is wrong, the second code snippet contains a redeclaration
try { // try {
super.test92791(); // super.test92791();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
//
//
@Override // @Override
public void testBug192165() { // gcc extension: typeof // public void testBug192165() { // gcc extension: typeof
try { // try {
super.testBug192165(); // super.testBug192165();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
//
//
@Override // @Override
public void testBug191450_attributesInBetweenPointers() { // gcc extension: attributes // public void testBug191450_attributesInBetweenPointers() { // gcc extension: attributes
try { // try {
super.testBug191450_attributesInBetweenPointers(); // super.testBug191450_attributesInBetweenPointers();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
@Override // @Override
public void testOmittedPositiveExpression_Bug212905() throws Exception { // public void testOmittedPositiveExpression_Bug212905() throws Exception {
try { // try {
super.testOmittedPositiveExpression_Bug212905(); // super.testOmittedPositiveExpression_Bug212905();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
@Override // @Override
public void testRedefinedGCCKeywords_Bug226112() throws Exception { // public void testRedefinedGCCKeywords_Bug226112() throws Exception {
try { // try {
super.testRedefinedGCCKeywords_Bug226112(); // super.testRedefinedGCCKeywords_Bug226112();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
@Override // @Override
public void testASMLabels_Bug226121() throws Exception { // public void testASMLabels_Bug226121() throws Exception {
try { // try {
super.testASMLabels_Bug226121(); // super.testASMLabels_Bug226121();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
@Override // @Override
public void testCompoundStatementExpression_Bug226274() throws Exception { // public void testCompoundStatementExpression_Bug226274() throws Exception {
try { // try {
super.testCompoundStatementExpression_Bug226274(); // super.testCompoundStatementExpression_Bug226274();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
//
//
// GCC extensions // // GCC extensions
@Override // @Override
public void testTypeofUnaryExpression_Bug226492() throws Exception { // public void testTypeofUnaryExpression_Bug226492() throws Exception {
try { // try {
super.testTypeofUnaryExpression_Bug226492(); // super.testTypeofUnaryExpression_Bug226492();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
@Override // @Override
public void testTypeofExpression_Bug226492() throws Exception { // public void testTypeofExpression_Bug226492() throws Exception {
try { // try {
super.testTypeofExpression_Bug226492(); // super.testTypeofExpression_Bug226492();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
@Override // @Override
public void testTypeofExpressionWithAttribute_Bug226492() throws Exception { // public void testTypeofExpressionWithAttribute_Bug226492() throws Exception {
try { // try {
super.testTypeofExpressionWithAttribute_Bug226492(); // super.testTypeofExpressionWithAttribute_Bug226492();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
@Override // @Override
public void testCaseRange_Bug211882() throws Exception { // public void testCaseRange_Bug211882() throws Exception {
try { // try {
super.testCaseRange_Bug211882(); // super.testCaseRange_Bug211882();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
@Override // @Override
public void testAttributeInElaboratedTypeSpecifier_Bug227085() throws Exception { // public void testAttributeInElaboratedTypeSpecifier_Bug227085() throws Exception {
try { // try {
super.testAttributeInElaboratedTypeSpecifier_Bug227085(); // super.testAttributeInElaboratedTypeSpecifier_Bug227085();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
@Override // @Override
public void testRestrictReference_Bug227110() throws Exception { // public void testRestrictReference_Bug227110() throws Exception {
try { // try {
super.testRestrictReference_Bug227110(); // super.testRestrictReference_Bug227110();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
@Override // @Override
public void testRedefinePtrdiff_Bug230895() throws Exception { // public void testRedefinePtrdiff_Bug230895() throws Exception {
try { // try {
super.testRedefinePtrdiff_Bug230895(); // super.testRedefinePtrdiff_Bug230895();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
//
@Override // @Override
public void testReturnTypeOfBuiltin_Bug234309() throws Exception { // public void testReturnTypeOfBuiltin_Bug234309() throws Exception {
try { // try {
super.testReturnTypeOfBuiltin_Bug234309(); // super.testReturnTypeOfBuiltin_Bug234309();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
@Override // @Override
public void testScalabilityOfLargeTrivialInitializer_Bug253690() { // public void testScalabilityOfLargeTrivialInitializer_Bug253690() {
// LPG holds on to all the tokens as you parse, so I don't think // // LPG holds on to all the tokens as you parse, so I don't think
// it would be easy to fix this bug. // // it would be easy to fix this bug.
try { // try {
super.testScalabilityOfLargeTrivialInitializer_Bug253690(); // super.testScalabilityOfLargeTrivialInitializer_Bug253690();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
//
@Override // @Override
public void testCompoundLiterals_Bug258496() { // GCC extension // public void testCompoundLiterals_Bug258496() { // GCC extension
try { // try {
super.testCompoundLiterals_Bug258496(); // super.testCompoundLiterals_Bug258496();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
//
@Override // @Override
public void testThreadLocalVariables_Bug260387() { // GCC extension // public void testThreadLocalVariables_Bug260387() { // GCC extension
try { // try {
super.testThreadLocalVariables_Bug260387(); // super.testThreadLocalVariables_Bug260387();
fail(); // fail();
} catch(Throwable _) { } // } catch(Throwable _) { }
} // }
} }