use of org.sonar.plugins.java.api.tree.EmptyStatementTree in project sonar-java by SonarSource.
the class JavaTreeModelTest method empty_statement.
/**
* 14.6. The Empty Statement
*/
@Test
public void empty_statement() {
EmptyStatementTree tree = (EmptyStatementTree) firstMethodFirstStatement("class T { void m() { ; } }");
assertThat(tree.is(Tree.Kind.EMPTY_STATEMENT)).isTrue();
assertThat(tree.semicolonToken().text()).isEqualTo(";");
assertThatChildrenIteratorHasSize(tree, 1);
}
Aggregations