Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2012-04-03 09:56:25 -0400
committerMarkus Schorn2012-04-03 09:56:25 -0400
commitb82f3de2e3bb2e6de7040602a5edba2e22af4310 (patch)
tree9a52468cd8d5ca0dc7d84116d76e15510fa2e028 /core/org.eclipse.cdt.core.tests
parent7bceb81ed58e0c20db41664a09a2630a376f9af7 (diff)
downloadorg.eclipse.cdt-b82f3de2e3bb2e6de7040602a5edba2e22af4310.tar.gz
org.eclipse.cdt-b82f3de2e3bb2e6de7040602a5edba2e22af4310.tar.xz
org.eclipse.cdt-b82f3de2e3bb2e6de7040602a5edba2e22af4310.zip
Bug 375739: #ifdef nested in macro-expansion.
Diffstat (limited to 'core/org.eclipse.cdt.core.tests')
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorBugsTests.java16
1 files changed, 16 insertions, 0 deletions
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 cbc7925b4d..109ebf4a0e 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
@@ -263,6 +263,22 @@ public class PreprocessorBugsTests extends PreprocessorTestsBase {
validateProblemCount(2); // the inclusions
}
+ // #define UNFOLD(v,x) v:x
+ // UNFOLD("A",
+ // #ifdef X
+ // "B")
+ // #else
+ // "C") /* parse error in this line */
+ // #endif
+ public void testDirectiveInExpansion_Bug375739() throws Exception {
+ initializeScanner();
+ validateString("A");
+ validateToken(IToken.tCOLON);
+ validateString("C");
+ validateEOF();
+ validateProblemCount(0);
+ }
+
// #if 0xe000
// ok
// #endif

Back to the top