Minor, move tests on JvmField into subdirectory
This commit is contained in:
+1
-2
@@ -1,6 +1,5 @@
|
|||||||
// !LANGUAGE: +JvmFieldInInterface +NestedClassesInAnnotations
|
// !LANGUAGE: +JvmFieldInInterface +NestedClassesInAnnotations
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_REFLECT
|
// WITH_REFLECT
|
||||||
|
|
||||||
import kotlin.reflect.full.declaredMemberProperties
|
import kotlin.reflect.full.declaredMemberProperties
|
||||||
@@ -19,4 +18,4 @@ annotation class Foo {
|
|||||||
fun box(): String {
|
fun box(): String {
|
||||||
val field = Foo.Companion::class.declaredMemberProperties.single()
|
val field = Foo.Companion::class.declaredMemberProperties.single()
|
||||||
return (field.annotations.single() as Ann).value + (field.get(Foo.Companion) as Bar).value
|
return (field.annotations.single() as Ann).value + (field.get(Foo.Companion) as Bar).value
|
||||||
}
|
}
|
||||||
+1
-1
@@ -2,8 +2,8 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// IGNORE_BACKEND: JS
|
// IGNORE_BACKEND: JS
|
||||||
// IGNORE_BACKEND: JS_IR
|
// IGNORE_BACKEND: JS_IR
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_REFLECT
|
// WITH_REFLECT
|
||||||
|
|
||||||
import kotlin.reflect.KProperty1
|
import kotlin.reflect.KProperty1
|
||||||
import kotlin.reflect.full.memberProperties
|
import kotlin.reflect.full.memberProperties
|
||||||
import kotlin.reflect.full.companionObject
|
import kotlin.reflect.full.companionObject
|
||||||
+1
-2
@@ -1,6 +1,5 @@
|
|||||||
// !LANGUAGE: +JvmFieldInInterface
|
// !LANGUAGE: +JvmFieldInInterface
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// WITH_RUNTIME
|
|
||||||
// WITH_REFLECT
|
// WITH_REFLECT
|
||||||
|
|
||||||
import kotlin.reflect.full.declaredMemberProperties
|
import kotlin.reflect.full.declaredMemberProperties
|
||||||
@@ -19,4 +18,4 @@ interface Foo {
|
|||||||
fun box(): String {
|
fun box(): String {
|
||||||
val field = Foo.Companion::class.declaredMemberProperties.single()
|
val field = Foo.Companion::class.declaredMemberProperties.single()
|
||||||
return (field.annotations.single() as Ann).value + (field.get(Foo.Companion) as Bar).value
|
return (field.annotations.single() as Ann).value + (field.get(Foo.Companion) as Bar).value
|
||||||
}
|
}
|
||||||
Generated
+28
-15
@@ -18368,21 +18368,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/reflection/properties/javaStaticField.kt");
|
runTest("compiler/testData/codegen/box/reflection/properties/javaStaticField.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("jvmFieldInAnnotationCompanionWithAnnotation.kt")
|
|
||||||
public void testJvmFieldInAnnotationCompanionWithAnnotation() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/reflection/properties/jvmFieldInAnnotationCompanionWithAnnotation.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("jvmFieldInInterfaceCompanion.kt")
|
|
||||||
public void testJvmFieldInInterfaceCompanion() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/reflection/properties/jvmFieldInInterfaceCompanion.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("jvmFieldInInterfaceCompanionWithAnnotation.kt")
|
|
||||||
public void testJvmFieldInInterfaceCompanionWithAnnotation() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/reflection/properties/jvmFieldInInterfaceCompanionWithAnnotation.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kotlinPropertyInheritedInJava.kt")
|
@TestMetadata("kotlinPropertyInheritedInJava.kt")
|
||||||
public void testKotlinPropertyInheritedInJava() throws Exception {
|
public void testKotlinPropertyInheritedInJava() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/reflection/properties/kotlinPropertyInheritedInJava.kt");
|
runTest("compiler/testData/codegen/box/reflection/properties/kotlinPropertyInheritedInJava.kt");
|
||||||
@@ -18594,6 +18579,34 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/reflection/properties/jvmField")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class JvmField extends AbstractIrBlackBoxCodegenTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInJvmField() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/jvmField"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("annotationCompanionWithAnnotation.kt")
|
||||||
|
public void testAnnotationCompanionWithAnnotation() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/reflection/properties/jvmField/annotationCompanionWithAnnotation.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("interfaceCompanion.kt")
|
||||||
|
public void testInterfaceCompanion() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/reflection/properties/jvmField/interfaceCompanion.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("interfaceCompanionWithAnnotation.kt")
|
||||||
|
public void testInterfaceCompanionWithAnnotation() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/reflection/properties/jvmField/interfaceCompanionWithAnnotation.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated")
|
@TestMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
+28
-15
@@ -18368,21 +18368,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
runTest("compiler/testData/codegen/box/reflection/properties/javaStaticField.kt");
|
runTest("compiler/testData/codegen/box/reflection/properties/javaStaticField.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("jvmFieldInAnnotationCompanionWithAnnotation.kt")
|
|
||||||
public void testJvmFieldInAnnotationCompanionWithAnnotation() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/reflection/properties/jvmFieldInAnnotationCompanionWithAnnotation.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("jvmFieldInInterfaceCompanion.kt")
|
|
||||||
public void testJvmFieldInInterfaceCompanion() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/reflection/properties/jvmFieldInInterfaceCompanion.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("jvmFieldInInterfaceCompanionWithAnnotation.kt")
|
|
||||||
public void testJvmFieldInInterfaceCompanionWithAnnotation() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/reflection/properties/jvmFieldInInterfaceCompanionWithAnnotation.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kotlinPropertyInheritedInJava.kt")
|
@TestMetadata("kotlinPropertyInheritedInJava.kt")
|
||||||
public void testKotlinPropertyInheritedInJava() throws Exception {
|
public void testKotlinPropertyInheritedInJava() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/reflection/properties/kotlinPropertyInheritedInJava.kt");
|
runTest("compiler/testData/codegen/box/reflection/properties/kotlinPropertyInheritedInJava.kt");
|
||||||
@@ -18594,6 +18579,34 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/reflection/properties/jvmField")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class JvmField extends AbstractBlackBoxCodegenTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInJvmField() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/jvmField"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("annotationCompanionWithAnnotation.kt")
|
||||||
|
public void testAnnotationCompanionWithAnnotation() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/reflection/properties/jvmField/annotationCompanionWithAnnotation.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("interfaceCompanion.kt")
|
||||||
|
public void testInterfaceCompanion() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/reflection/properties/jvmField/interfaceCompanion.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("interfaceCompanionWithAnnotation.kt")
|
||||||
|
public void testInterfaceCompanionWithAnnotation() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/reflection/properties/jvmField/interfaceCompanionWithAnnotation.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated")
|
@TestMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
+28
-15
@@ -18368,21 +18368,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/reflection/properties/javaStaticField.kt");
|
runTest("compiler/testData/codegen/box/reflection/properties/javaStaticField.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("jvmFieldInAnnotationCompanionWithAnnotation.kt")
|
|
||||||
public void testJvmFieldInAnnotationCompanionWithAnnotation() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/reflection/properties/jvmFieldInAnnotationCompanionWithAnnotation.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("jvmFieldInInterfaceCompanion.kt")
|
|
||||||
public void testJvmFieldInInterfaceCompanion() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/reflection/properties/jvmFieldInInterfaceCompanion.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("jvmFieldInInterfaceCompanionWithAnnotation.kt")
|
|
||||||
public void testJvmFieldInInterfaceCompanionWithAnnotation() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/reflection/properties/jvmFieldInInterfaceCompanionWithAnnotation.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kotlinPropertyInheritedInJava.kt")
|
@TestMetadata("kotlinPropertyInheritedInJava.kt")
|
||||||
public void testKotlinPropertyInheritedInJava() throws Exception {
|
public void testKotlinPropertyInheritedInJava() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/reflection/properties/kotlinPropertyInheritedInJava.kt");
|
runTest("compiler/testData/codegen/box/reflection/properties/kotlinPropertyInheritedInJava.kt");
|
||||||
@@ -18594,6 +18579,34 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/reflection/properties/jvmField")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class JvmField extends AbstractLightAnalysisModeTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInJvmField() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/jvmField"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("annotationCompanionWithAnnotation.kt")
|
||||||
|
public void testAnnotationCompanionWithAnnotation() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/reflection/properties/jvmField/annotationCompanionWithAnnotation.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("interfaceCompanion.kt")
|
||||||
|
public void testInterfaceCompanion() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/reflection/properties/jvmField/interfaceCompanion.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("interfaceCompanionWithAnnotation.kt")
|
||||||
|
public void testInterfaceCompanionWithAnnotation() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/reflection/properties/jvmField/interfaceCompanionWithAnnotation.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated")
|
@TestMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
+13
@@ -16804,6 +16804,19 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/reflection/properties/jvmField")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class JvmField extends AbstractIrJsCodegenBoxTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInJvmField() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/jvmField"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated")
|
@TestMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
+13
@@ -17809,6 +17809,19 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/reflection/properties/jvmField")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class JvmField extends AbstractJsCodegenBoxTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInJvmField() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/jvmField"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated")
|
@TestMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
Reference in New Issue
Block a user