use of de.be4.eventb.core.parser.node.TComment in project probparsers by bendisposto.
the class CommentTest method testMultipleComments1.
@Test
public void testMultipleComments1() throws Exception {
final Start rootNode = parseInput("machine MultipleComments1" + "// line1\n" + "/* line2\nline3*/" + "// line4\n" + "\nend", false);
final AMachineParseUnit parseUnit = (AMachineParseUnit) rootNode.getPParseUnit();
final LinkedList<TComment> comments = parseUnit.getComments();
assertEquals(3, comments.size());
assertEquals("line1", comments.get(0).getText());
assertEquals("line2\nline3", comments.get(1).getText());
assertEquals("line4", comments.get(2).getText());
}
Aggregations