mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
testdata for IDEA-159398
This commit is contained in:
+21
@@ -287,6 +287,27 @@ public class AccessCanBeTightenedInspectionTest extends LightInspectionTestCase
|
||||
myFixture.checkHighlighting();
|
||||
}
|
||||
|
||||
public void testNestedEnumWithReferenceByName() {
|
||||
myFixture.allowTreeAccessForAllFiles();
|
||||
addJavaFile("x/Outer.java", "package x;\n" +
|
||||
"public class Outer {\n" +
|
||||
" enum E {A}\n" +
|
||||
" static final E abc = E.A;\n" +
|
||||
"\n" +
|
||||
" public static void main(String[] args) {\n" +
|
||||
" System.out.println(abc.ordinal());\n" +
|
||||
" }\n" +
|
||||
"}\n");
|
||||
addJavaFile("x/Consumer.java", "package x;\n" +
|
||||
"public class Consumer {\n" +
|
||||
" public String foo() {\n" +
|
||||
" return Outer.abc.name();\n" +
|
||||
" }\n" +
|
||||
"}");
|
||||
myFixture.configureByFiles("x/Outer.java", "x/Consumer.java");
|
||||
myFixture.checkHighlighting();
|
||||
}
|
||||
|
||||
public void testSuggestPackagePrivateForTopLevelClassSetting() {
|
||||
myFixture.allowTreeAccessForAllFiles();
|
||||
myVisibilityInspection.SUGGEST_PACKAGE_LOCAL_FOR_TOP_CLASSES = false;
|
||||
|
||||
Reference in New Issue
Block a user