Reflection: add test on introspection of local classes
kotlin-reflect works correctly already for Kotlin-generated local classes and anonymous objects, but not for Java ones. This is fixed in a subsequent commit. #KT-41373 In Progress
This commit is contained in:
committed by
Space Team
parent
9fcdc10019
commit
1e031d9fb8
+16
@@ -45305,6 +45305,22 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/reflection/localClasses")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class LocalClasses {
|
||||
@Test
|
||||
public void testAllFilesPresentInLocalClasses() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/localClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localClassesAndAnonymousObjects.kt")
|
||||
public void testLocalClassesAndAnonymousObjects() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/localClasses/localClassesAndAnonymousObjects.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/reflection/mapping")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+16
@@ -45305,6 +45305,22 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/reflection/localClasses")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class LocalClasses {
|
||||
@Test
|
||||
public void testAllFilesPresentInLocalClasses() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/localClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localClassesAndAnonymousObjects.kt")
|
||||
public void testLocalClassesAndAnonymousObjects() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/localClasses/localClassesAndAnonymousObjects.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/reflection/mapping")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
Reference in New Issue
Block a user