testdata for IDEA-139512

This commit is contained in:
Anna.Kozlova
2016-07-13 11:43:16 +02:00
parent 36d1d1fad1
commit 8e7077bb5b
2 changed files with 22 additions and 0 deletions
@@ -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 {}
@@ -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";