Moved all but one test cases from AnnotationJDRTest to loadJava.

This commit is contained in:
Evgeny Gerashchenko
2013-03-11 16:28:48 +04:00
parent b8abd0eb94
commit 0f5de451ec
11 changed files with 74 additions and 142 deletions
@@ -0,0 +1,35 @@
package test;
@interface MyAnnotationWithParam {
MyAnnotation value();
}
@interface MyAnnotation {
String value();
}
@MyAnnotationWithParam(@MyAnnotation("test"))
class A {}
@interface MyAnnotation2 {
String[] value();
}
@interface MyAnnotationWithParam2 {
MyAnnotation2 value();
}
@MyAnnotationWithParam2(@MyAnnotation2({"test", "test2"}))
class B {}
@interface MyAnnotation3 {
String first();
String second();
}
@interface MyAnnotationWithParam3 {
MyAnnotation3 value();
}
@MyAnnotationWithParam3(@MyAnnotation3(first = "f", second = "s"))
class C {}
@@ -0,0 +1,9 @@
package test;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
@Target({ElementType.FIELD, ElementType.CONSTRUCTOR})
@interface targetAnnotation {
String value();
}
@@ -0,0 +1,14 @@
package test;
import java.lang.String;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
@interface MyAnnotation {
String[] value();
}
@MyAnnotation({"a", "b", "c"})
class A {
}
@@ -0,0 +1,14 @@
package test;
import java.lang.String;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
@interface MyAnnotation {
String[] value();
}
@MyAnnotation({})
class A {
}
@@ -0,0 +1,9 @@
package test;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME)
@interface retentionAnnotation {
String value();
}
@@ -0,0 +1,12 @@
package test;
@MyAnnotation(MyEnum.ONE)
class MyTest {}
@interface MyAnnotation {
MyEnum value();
}
enum MyEnum {
ONE
}
@@ -0,0 +1,10 @@
package test;
@MyAnnotation(first = "f", second = "s")
class MyTest {}
@interface MyAnnotation {
String first();
String second() default("s");
}
@@ -0,0 +1,11 @@
package test;
@B(@A("test"))
@interface A {
String value();
}
@B(@A("test"))
@interface B {
A value();
}
@@ -0,0 +1,10 @@
package test;
@interface A {
B value();
}
@A(@B("test"))
@interface B {
String value();
}