mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 22:22:11 +02:00
186337: apply patch on behalf of Emanuel Graf
This commit is contained in:
parent
4576758790
commit
2b57e6ac89
1 changed files with 11 additions and 0 deletions
|
@ -208,4 +208,15 @@ public class CommentTests extends AST2BaseTest {
|
|||
assertEquals("// comment1", new String(comments[0].getComment()));
|
||||
assertEquals("// comment2", new String(comments[1].getComment()));
|
||||
}
|
||||
|
||||
// //comment
|
||||
public void _testCommentLocation_bug186337() throws Exception{
|
||||
StringBuffer code= getContents(1)[0];
|
||||
IASTTranslationUnit tu = parse(code.toString(), ParserLanguage.CPP, false, true, true);
|
||||
IASTComment[] comments = tu.getComments();
|
||||
|
||||
assertEquals(1, comments.length);
|
||||
assertNotNull(comments[0].getFileLocation());
|
||||
assertNotNull(comments[0].getNodeLocations());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue