use of net.sourceforge.pmd.lang.java.ast.MultiLineComment in project pmd by pmd.
the class AbstractCommentRuleTest method testFilteredCommentIn.
/**
* Blank lines in comments should not raise an exception. See bug #1048.
*/
@Test
public void testFilteredCommentIn() {
Token token = new Token();
token.image = "/* multi line comment with blank lines\n\n\n */";
String filtered = testSubject.filteredCommentIn(new MultiLineComment(token));
assertEquals("multi line comment with blank lines", filtered);
token.image = "/** a formal comment with blank lines\n\n\n */";
filtered = testSubject.filteredCommentIn(new FormalComment(token));
assertEquals("a formal comment with blank lines", filtered);
}
Aggregations