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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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