mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Testcase for 122891, macros in include directive.
This commit is contained in:
parent
7c5ba6e7de
commit
75b8d46572
2 changed files with 37 additions and 0 deletions
|
@ -0,0 +1,36 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2004, 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 - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.parser.tests.scanner;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.parser.IProblem;
|
||||
|
||||
|
||||
/**
|
||||
* Scanner2Tests ported to use the CPreprocessor
|
||||
*/
|
||||
public class PreprocessorBugsTests extends PreprocessorTestsBase {
|
||||
|
||||
public static TestSuite suite() {
|
||||
return suite(PreprocessorBugsTests.class);
|
||||
}
|
||||
|
||||
// #define NOP(x) x
|
||||
// #define CPUINC(cpu) <NOP(reg)NOP(cpu).sfr>
|
||||
// #include CPUINC(xag4)
|
||||
public void testMacroInInclusion_Bug122891() throws Exception {
|
||||
initializeScanner();
|
||||
validateEOF();
|
||||
validateProblem(0, IProblem.PREPROCESSOR_INCLUSION_NOT_FOUND, "regxag4.sfr");
|
||||
}
|
||||
}
|
|
@ -21,6 +21,7 @@ public class ScannerTestSuite extends TestSuite {
|
|||
suite.addTest(LocationMapTests.suite());
|
||||
suite.addTest(PortedScannerTests.suite());
|
||||
suite.addTest(PreprocessorTests.suite());
|
||||
suite.addTest(PreprocessorBugsTests.suite());
|
||||
return suite;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue