Do not include kotlin-reflect at runtime by default in codegen tests
Change some tests to either include reflection or to avoid using it
This commit is contained in:
committed by
Alexander Udalov
parent
20e36438e2
commit
2564a2f91f
@@ -1460,6 +1460,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("localFunctionName.kt")
|
||||
public void testLocalFunctionName() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/localFunctionName.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("localLocal.kt")
|
||||
public void testLocalLocal() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/localLocal.kt");
|
||||
|
||||
-6
@@ -2493,12 +2493,6 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("localFunctionName.kt")
|
||||
public void testLocalFunctionName() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/functions/localFunctionName.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("platformName.kt")
|
||||
public void testPlatformName() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/functions/platformName.kt");
|
||||
|
||||
@@ -187,9 +187,9 @@ public abstract class CodegenTestCase extends UsefulTestCase {
|
||||
protected GeneratedClassLoader createClassLoader() {
|
||||
return new GeneratedClassLoader(
|
||||
generateClassesInFile(),
|
||||
configurationKind == ConfigurationKind.NO_KOTLIN_REFLECT ?
|
||||
ForTestCompileRuntime.runtimeJarClassLoader() :
|
||||
ForTestCompileRuntime.runtimeAndReflectJarClassLoader(),
|
||||
configurationKind.getWithReflection()
|
||||
? ForTestCompileRuntime.runtimeAndReflectJarClassLoader()
|
||||
: ForTestCompileRuntime.runtimeJarClassLoader(),
|
||||
getClassPathURLs()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,8 @@ class ReflectionClassLoaderTest : CodegenTestCase() {
|
||||
|
||||
override fun setUp() {
|
||||
super.setUp()
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.ALL)
|
||||
configurationKind = ConfigurationKind.ALL
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(configurationKind)
|
||||
}
|
||||
|
||||
private fun Class<*>.methodByName(name: String) = declaredMethods.single { it.name == name }
|
||||
|
||||
Reference in New Issue
Block a user