Kapt+JVM_IR: add IrKotlinKapt3IntegrationTest
This commit is contained in:
committed by
Space Team
parent
1d041b7ef4
commit
5848b2fde6
+2
@@ -26,6 +26,8 @@ import javax.tools.Diagnostic
|
|||||||
|
|
||||||
class KotlinKapt3IntegrationTest(testInfo: TestInfo) : AbstractKotlinKapt3IntegrationTestBase(testInfo, TargetBackend.JVM)
|
class KotlinKapt3IntegrationTest(testInfo: TestInfo) : AbstractKotlinKapt3IntegrationTestBase(testInfo, TargetBackend.JVM)
|
||||||
|
|
||||||
|
class IrKotlinKapt3IntegrationTest(testInfo: TestInfo) : AbstractKotlinKapt3IntegrationTestBase(testInfo, TargetBackend.JVM_IR)
|
||||||
|
|
||||||
abstract class AbstractKotlinKapt3IntegrationTestBase(private val testInfo: TestInfo, private val targetBackend: TargetBackend) {
|
abstract class AbstractKotlinKapt3IntegrationTestBase(private val testInfo: TestInfo, private val targetBackend: TargetBackend) {
|
||||||
private companion object {
|
private companion object {
|
||||||
val TEST_DATA_DIR = File("plugins/kapt3/kapt3-compiler/testData/kotlinRunner")
|
val TEST_DATA_DIR = File("plugins/kapt3/kapt3-compiler/testData/kotlinRunner")
|
||||||
|
|||||||
+42
@@ -0,0 +1,42 @@
|
|||||||
|
package error;
|
||||||
|
|
||||||
|
public final class NonExistentClass {
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////
|
||||||
|
|
||||||
|
package test;
|
||||||
|
|
||||||
|
import java.lang.System;
|
||||||
|
|
||||||
|
@kotlin.Metadata()
|
||||||
|
@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
|
||||||
|
public abstract @interface Anno {
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////
|
||||||
|
|
||||||
|
package test;
|
||||||
|
|
||||||
|
import java.lang.System;
|
||||||
|
|
||||||
|
@kotlin.Metadata()
|
||||||
|
@Anno()
|
||||||
|
public final class User {
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
private final java.lang.String name = "John";
|
||||||
|
|
||||||
|
public User(@org.jetbrains.annotations.NotNull()
|
||||||
|
java.lang.String name, int age) {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
public final java.lang.String getName() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public User() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
package error;
|
||||||
|
|
||||||
|
public final class NonExistentClass {
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////
|
||||||
|
|
||||||
|
package test;
|
||||||
|
|
||||||
|
import java.lang.System;
|
||||||
|
|
||||||
|
@kotlin.Metadata()
|
||||||
|
@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
|
||||||
|
public abstract @interface MyAnnotation {
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////
|
||||||
|
|
||||||
|
package test;
|
||||||
|
|
||||||
|
import java.lang.System;
|
||||||
|
|
||||||
|
@kotlin.Metadata()
|
||||||
|
public final class Simple {
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
public static final test.Simple.Companion Companion = null;
|
||||||
|
|
||||||
|
public Simple() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
@MyAnnotation()
|
||||||
|
public final void myMethod() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata()
|
||||||
|
public static final class Companion {
|
||||||
|
|
||||||
|
private Companion() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata()
|
||||||
|
public static final class NestedClass {
|
||||||
|
|
||||||
|
public NestedClass() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata()
|
||||||
|
public static final class NestedNestedClass {
|
||||||
|
|
||||||
|
public NestedNestedClass() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.Metadata()
|
||||||
|
public final class InnerClass {
|
||||||
|
|
||||||
|
public InnerClass() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package error;
|
||||||
|
|
||||||
|
public final class NonExistentClass {
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////
|
||||||
|
|
||||||
|
package test;
|
||||||
|
|
||||||
|
import java.lang.System;
|
||||||
|
|
||||||
|
@kotlin.Metadata()
|
||||||
|
@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
|
||||||
|
public abstract @interface MyAnnotation {
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////
|
||||||
|
|
||||||
|
package test;
|
||||||
|
|
||||||
|
import java.lang.System;
|
||||||
|
|
||||||
|
@kotlin.Metadata()
|
||||||
|
@MyAnnotation()
|
||||||
|
public final class State {
|
||||||
|
private final int someInt = 0;
|
||||||
|
private final long someLong = 0L;
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
private final java.lang.String someString = null;
|
||||||
|
|
||||||
|
@kotlin.jvm.JvmOverloads()
|
||||||
|
public State(int someInt, long someLong, @org.jetbrains.annotations.NotNull()
|
||||||
|
java.lang.String someString) {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public final int getSomeInt() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final long getSomeLong() {
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
public final java.lang.String getSomeString() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.jvm.JvmOverloads()
|
||||||
|
public State(int someInt, long someLong) {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -36,12 +36,8 @@ package test;
|
|||||||
import java.lang.System;
|
import java.lang.System;
|
||||||
|
|
||||||
@kotlin.Metadata()
|
@kotlin.Metadata()
|
||||||
public enum EnumClass {
|
@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
|
||||||
/*public static final*/ BLACK /* = new BLACK() */,
|
public abstract @interface MyAnnotation {
|
||||||
/*public static final*/ WHITE /* = new WHITE() */;
|
|
||||||
|
|
||||||
EnumClass() {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////
|
////////////////////
|
||||||
@@ -51,8 +47,12 @@ package test;
|
|||||||
import java.lang.System;
|
import java.lang.System;
|
||||||
|
|
||||||
@kotlin.Metadata()
|
@kotlin.Metadata()
|
||||||
@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
|
public enum EnumClass {
|
||||||
public abstract @interface MyAnnotation {
|
/*public static final*/ BLACK /* = new BLACK() */,
|
||||||
|
/*public static final*/ WHITE /* = new WHITE() */;
|
||||||
|
|
||||||
|
EnumClass() {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////
|
////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user