From 2b57e6ac898535cf2a190dae44b26c52a121335f Mon Sep 17 00:00:00 2001 From: Andrew Ferguson Date: Thu, 10 May 2007 13:36:56 +0000 Subject: [PATCH] 186337: apply patch on behalf of Emanuel Graf --- .../cdt/core/parser/tests/ast2/CommentTests.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CommentTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CommentTests.java index ba9dee4fc05..cb53e45f9ff 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CommentTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CommentTests.java @@ -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()); + } }