mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
extract JavaFoldingTest."test don't inline array methods"
This commit is contained in:
@@ -578,15 +578,21 @@ class Test {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}"""
|
||||
PsiClass fooClass = JavaPsiFacade.getInstance(project).findClass('Foo', GlobalSearchScope.allScope(project))
|
||||
def regions = myFixture.editor.foldingModel.allFoldRegions.sort { it.startOffset }
|
||||
assert regions.size() == 3
|
||||
checkAccessorFolding(regions[0], regions[1], fooClass.methods[0])
|
||||
}
|
||||
|
||||
public void "test don't inline array methods"() {
|
||||
configure """class Foo {
|
||||
int arrayMethod(int param)[] {
|
||||
return new int[];
|
||||
}
|
||||
|
||||
}"""
|
||||
PsiClass fooClass = JavaPsiFacade.getInstance(project).findClass('Foo', GlobalSearchScope.allScope(project))
|
||||
def regions = myFixture.editor.foldingModel.allFoldRegions.sort { it.startOffset }
|
||||
assert regions.size() == 4
|
||||
checkAccessorFolding(regions[0], regions[1], fooClass.methods[0])
|
||||
assert myFixture.editor.foldingModel.allFoldRegions.size() == 1
|
||||
}
|
||||
|
||||
public void "test don't inline very long one-line methods"() {
|
||||
|
||||
Reference in New Issue
Block a user