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:
parent
fe91086213
commit
3541fc9e5a
1 changed files with 22 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue