1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Testcase and fix for 162214, line comment after directive

This commit is contained in:
Markus Schorn 2006-11-02 15:00:40 +00:00
parent fe91086213
commit 3541fc9e5a

View file

@ -2425,4 +2425,26 @@ public class Scanner2Test extends BaseScanner2Test
validateIdentifier("C");
validateEOF();
}
public void testBug162214() throws Exception {
StringBuffer buffer = new StringBuffer();
buffer.append("#ifdef xxx // is not defined \n");
buffer.append("A \n");
buffer.append("#endif \n");
buffer.append("B \n");
initializeScanner(buffer.toString());
validateIdentifier("B");
validateEOF();
buffer.setLength(0);
buffer.append("#ifdef xxx //* is not defined \n");
buffer.append("A \n");
buffer.append("#endif \n");
buffer.append("B \n");
initializeScanner(buffer.toString());
validateIdentifier("B");
validateEOF();
}
}