Kapt: Simplify wrapper tests
(cherry picked from commit 1677984)
This commit is contained in:
committed by
Yan Zhulanow
parent
e04f834a0e
commit
238340a143
@@ -0,0 +1,17 @@
|
||||
// FQNAME: EnumClass
|
||||
|
||||
// FILE: EnumClass.java
|
||||
enum EnumClass {
|
||||
RED, GREEN, BLUE;
|
||||
|
||||
void someMethod() {
|
||||
System.out.println("Hello, world!")
|
||||
}
|
||||
|
||||
String getStringRepresentation() {
|
||||
return this.toString();
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Anno.kt
|
||||
annotation class Anno
|
||||
@@ -0,0 +1,11 @@
|
||||
final enum EnumClass {
|
||||
public static final EnumClass RED
|
||||
|
||||
public static final EnumClass GREEN
|
||||
|
||||
public static final EnumClass BLUE
|
||||
|
||||
void someMethod()
|
||||
|
||||
java.lang.String getStringRepresentation()
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// FQNAME: MetaAnnotation
|
||||
|
||||
// FILE: MetaAnnotation.java
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Deprecated
|
||||
@Target({ ElementType.CONSTRUCTOR, ElementType.FIELD })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface MetaAnnotation {
|
||||
String strValue();
|
||||
}
|
||||
|
||||
// FILE: Anno.kt
|
||||
annotation class Anno
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
@java.lang.Deprecated
|
||||
@java.lang.annotation.Target(value = { CONSTRUCTOR, FIELD })
|
||||
@java.lang.annotation.Retention(value = RUNTIME)
|
||||
public abstract @interface MetaAnnotation {
|
||||
public abstract java.lang.String strValue()
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
// FQNAME: Simple
|
||||
|
||||
// FILE: Simple.java
|
||||
@interface Anno {
|
||||
String[] numbers();
|
||||
}
|
||||
|
||||
@interface AnnoValue {
|
||||
String[] value();
|
||||
}
|
||||
|
||||
@KotlinAnnotation(a = "A", b = 5)
|
||||
@Anno(numbers = { "five", "six" })
|
||||
@AnnoValue({ "five", "six" })
|
||||
public abstract class Simple {
|
||||
@Anno(numbers = "seven")
|
||||
@AnnoValue("seven")
|
||||
final String field = "A";
|
||||
|
||||
abstract void voidMethod();
|
||||
|
||||
static {
|
||||
System.out.println("A");
|
||||
}
|
||||
|
||||
{
|
||||
System.out.println("b");
|
||||
}
|
||||
|
||||
protected String strMethod(int param) {
|
||||
return "A";
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: KotlinAnnotation.kt
|
||||
annotation class KotlinAnnotation(val a: String, val b: Int)
|
||||
@@ -0,0 +1,18 @@
|
||||
@KotlinAnnotation(a = "A", b = 5)
|
||||
@Anno(numbers = { "five", "six" })
|
||||
@AnnoValue(value = { "five", "six" })
|
||||
public abstract class Simple {
|
||||
static {}
|
||||
|
||||
{}
|
||||
|
||||
@Anno(numbers = { "seven" })
|
||||
@AnnoValue(value = { "seven" })
|
||||
final java.lang.String field
|
||||
|
||||
abstract void voidMethod()
|
||||
|
||||
protected java.lang.String strMethod(int param)
|
||||
|
||||
public void <init>()
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// FQNAME: WithNested
|
||||
|
||||
// FILE: WithNested.java
|
||||
class WithNested {
|
||||
void myClassFun() {}
|
||||
|
||||
static class NestedClass {
|
||||
void nestedClassFun() {}
|
||||
}
|
||||
|
||||
class InnerClass {
|
||||
void innerClassFun() {}
|
||||
|
||||
class InnerInnerClass {
|
||||
void innerInnerClassFun() {}
|
||||
}
|
||||
}
|
||||
|
||||
interface NestedInterface {
|
||||
void nestedInterfaceFun() {}
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Anno.kt
|
||||
annotation class Anno
|
||||
@@ -0,0 +1,27 @@
|
||||
class WithNested {
|
||||
void myClassFun()
|
||||
|
||||
static class NestedClass {
|
||||
void nestedClassFun()
|
||||
|
||||
void <init>()
|
||||
}
|
||||
|
||||
class InnerClass {
|
||||
void innerClassFun()
|
||||
|
||||
class InnerInnerClass {
|
||||
void innerInnerClassFun()
|
||||
|
||||
void <init>(WithNested.InnerClass $instance)
|
||||
}
|
||||
|
||||
void <init>(WithNested $instance)
|
||||
}
|
||||
|
||||
static abstract interface NestedInterface {
|
||||
public abstract void nestedInterfaceFun()
|
||||
}
|
||||
|
||||
void <init>()
|
||||
}
|
||||
Reference in New Issue
Block a user