Index: src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java,v retrieving revision 1.56 diff -u -r1.56 AnnotationTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java 13 Dec 2004 05:47:07 -0000 1.56 +++ src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java 14 Dec 2004 22:29:11 -0000 @@ -33,11 +33,11 @@ // Static initializer to specify tests subset using TESTS_* static variables // All specified tests which does not belong to the class are skipped... -// static { + static { // TESTS_NAMES = new String[] { "test000" }; -// TESTS_NUMBERS = new int[] { 99 }; + TESTS_NUMBERS = new int[] { 100, 101 }; // TESTS_RANGE = new int[] { 21, 50 }; -// } + } public static Test suite() { return buildTestSuite(testClass()); } @@ -3050,4 +3050,62 @@ } assertTrue("unexpected bytecode sequence", actualOutput.indexOf(expectedOutput) != -1); } + + // https://bugs.eclipse.org/bugs/show_bug.cgi?id=80964 + public void test100() { + this.runConformTest( + new String[] { + "X.java", + "public class X {\n" + + " @TestAnnotation(testAttribute = \"test\") class A {\n" + + " }\n" + + " public static void main(String[] args) {\n" + + " System.out.print(A.class.isAnnotationPresent(TestAnnotation.class));\n" + + " }\n" + + "}", + "TestAnnotation.java", + "import java.lang.annotation.ElementType;\n" + + "import java.lang.annotation.RetentionPolicy;\n" + + "import java.lang.annotation.Target;\n" + + "import java.lang.annotation.Retention;\n" + + "@Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface\n" + + "TestAnnotation {\n" + + " String testAttribute();\n" + + "}\n" + }, + "true"); + } + + // https://bugs.eclipse.org/bugs/show_bug.cgi?id=80964 + public void test101() { + this.runConformTest( + new String[] { + "TestAnnotation.java", + "import java.lang.annotation.ElementType;\n" + + "import java.lang.annotation.RetentionPolicy;\n" + + "import java.lang.annotation.Target;\n" + + "import java.lang.annotation.Retention;\n" + + "@Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface\n" + + "TestAnnotation {\n" + + " String testAttribute();\n" + + "}\n" + }, + ""); + this.runConformTest( + new String[] { + "X.java", + "public class X {\n" + + " @TestAnnotation(testAttribute = \"test\") class A {\n" + + " }\n" + + " public static void main(String[] args) {\n" + + " System.out.print(A.class.isAnnotationPresent(TestAnnotation.class));\n" + + " }\n" + + "}", + }, + "true", + null, + false, + null); + } + }