use of com.intellij.lang.folding.FoldingDescriptor in project intellij by bazelbuild.
the class BuildFileFoldingBuilderTest method testFuncDefStatementsFolded.
@Test
public void testFuncDefStatementsFolded() {
BuildFile file = createBuildFile(new WorkspacePath("java/com/google/BUILD"), "# multi-line comment, not folded", "# second line of comment", "def function(arg1, arg2):", " stmt1", " stmt2", "", "variable = 1");
FoldingDescriptor[] foldingRegions = getFoldingRegions(file);
assertThat(foldingRegions).hasLength(1);
assertThat(foldingRegions[0].getElement().getPsi()).isEqualTo(file.findFunctionInScope("function"));
}
Aggregations