1
0
Fork 0
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:
Andrew Ferguson 2007-05-10 13:36:56 +00:00
parent 4576758790
commit 2b57e6ac89

View file

@ -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());
}
}