mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
testdata for IDEA-139512
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
import a.A;
|
||||
|
||||
@A.<error descr="'a.A.Test' has protected access in 'a.A'">Test</error> ()
|
||||
class B extends A {}
|
||||
|
||||
@A.<error descr="'a.A.Test' has protected access in 'a.A'">Test</error> ()
|
||||
class C {}
|
||||
+15
@@ -77,6 +77,21 @@ public class LightAdvHighlightingFixtureTest extends LightCodeInsightFixtureTest
|
||||
|
||||
}
|
||||
|
||||
public void testUsageOfProtectedAnnotationOutsideAPackage() throws Exception {
|
||||
myFixture.addClass("package a;\n" +
|
||||
"import java.lang.annotation.ElementType;\n" +
|
||||
"import java.lang.annotation.Target;\n" +
|
||||
"\n" +
|
||||
"public class A {\n" +
|
||||
" @Target( { ElementType.METHOD, ElementType.TYPE } )\n" +
|
||||
" protected @interface Test{\n" +
|
||||
" }\n" +
|
||||
"}");
|
||||
|
||||
myFixture.configureByFile(getTestName(false) + ".java");
|
||||
myFixture.checkHighlighting();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return JavaTestUtil.getRelativeJavaTestDataPath() + "/codeInsight/daemonCodeAnalyzer/advFixture";
|
||||
|
||||
Reference in New Issue
Block a user