From a9bd224f49ce5a83129fc8a065cae29c0110ad37 Mon Sep 17 00:00:00 2001 From: Markus Schorn Date: Fri, 23 Nov 2007 13:55:12 +0000 Subject: [PATCH] Test case for include with macro, bug 145270. --- .../tests/scanner/PreprocessorBugsTests.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorBugsTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorBugsTests.java index 8286b240987..0d0c2688800 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorBugsTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorBugsTests.java @@ -50,4 +50,20 @@ public class PreprocessorBugsTests extends PreprocessorTestsBase { validateEOF(); validateProblemCount(0); } + + // #ifndef PREFIX + // #define PREFIX + // #endif + // #define STRING(x) #x + // #define CONCAT(x,y) STRING(x##y) + // #define EXPAND(x,y) CONCAT(x,y) + // #define PREFIXED(x) EXPAND(PREFIX,x) + // #include PREFIXED(bar.h) + public void testEmptyStringInMacroInInclusion_Bug145270() throws Exception { + initializeScanner(); + validateEOF(); + validateProblem(0, IProblem.PREPROCESSOR_INCLUSION_NOT_FOUND, "bar.h"); + validateProblemCount(1); + } + }