diff --git a/compiler/testData/codegen/boxWithJava/reflection/defaultImplsGenericSignature.kt b/compiler/testData/codegen/box/reflection/defaultImplsGenericSignature.kt similarity index 99% rename from compiler/testData/codegen/boxWithJava/reflection/defaultImplsGenericSignature.kt rename to compiler/testData/codegen/box/reflection/defaultImplsGenericSignature.kt index b8e2bbdcfe3..45aae604385 100644 --- a/compiler/testData/codegen/boxWithJava/reflection/defaultImplsGenericSignature.kt +++ b/compiler/testData/codegen/box/reflection/defaultImplsGenericSignature.kt @@ -41,4 +41,4 @@ fun box(): String { val test2: X> = J.test2() as X> return test2.p1 + test2.p2.value -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/javaClass.kt b/compiler/testData/codegen/box/reflection/noKotlinReflect/javaClass.kt similarity index 97% rename from compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/javaClass.kt rename to compiler/testData/codegen/box/reflection/noKotlinReflect/javaClass.kt index f120be87f62..5ef83125dcb 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/javaClass.kt +++ b/compiler/testData/codegen/box/reflection/noKotlinReflect/javaClass.kt @@ -1,4 +1,4 @@ -// NO_KOTLIN_REFLECT +// WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/methodsFromAny/callableReferences.kt b/compiler/testData/codegen/box/reflection/noKotlinReflect/methodsFromAny/callableReferences.kt similarity index 96% rename from compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/methodsFromAny/callableReferences.kt rename to compiler/testData/codegen/box/reflection/noKotlinReflect/methodsFromAny/callableReferences.kt index 87a17ca3bd0..b620b931893 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/methodsFromAny/callableReferences.kt +++ b/compiler/testData/codegen/box/reflection/noKotlinReflect/methodsFromAny/callableReferences.kt @@ -1,4 +1,4 @@ -// NO_KOTLIN_REFLECT +// WITH_RUNTIME import kotlin.reflect.KCallable import kotlin.test.* diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/methodsFromAny/classReference.kt b/compiler/testData/codegen/box/reflection/noKotlinReflect/methodsFromAny/classReference.kt similarity index 95% rename from compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/methodsFromAny/classReference.kt rename to compiler/testData/codegen/box/reflection/noKotlinReflect/methodsFromAny/classReference.kt index cb99eb8129d..7046257bca3 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/methodsFromAny/classReference.kt +++ b/compiler/testData/codegen/box/reflection/noKotlinReflect/methodsFromAny/classReference.kt @@ -1,4 +1,4 @@ -// NO_KOTLIN_REFLECT +// WITH_RUNTIME import kotlin.reflect.KClass import kotlin.test.* diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/primitiveJavaClass.kt b/compiler/testData/codegen/box/reflection/noKotlinReflect/primitiveJavaClass.kt similarity index 95% rename from compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/primitiveJavaClass.kt rename to compiler/testData/codegen/box/reflection/noKotlinReflect/primitiveJavaClass.kt index a21e54b4287..22d1afefa3a 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/primitiveJavaClass.kt +++ b/compiler/testData/codegen/box/reflection/noKotlinReflect/primitiveJavaClass.kt @@ -1,4 +1,4 @@ -// NO_KOTLIN_REFLECT +// WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/propertyGetSetName.kt b/compiler/testData/codegen/box/reflection/noKotlinReflect/propertyGetSetName.kt similarity index 94% rename from compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/propertyGetSetName.kt rename to compiler/testData/codegen/box/reflection/noKotlinReflect/propertyGetSetName.kt index 2f989b02118..f485e0554fe 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/propertyGetSetName.kt +++ b/compiler/testData/codegen/box/reflection/noKotlinReflect/propertyGetSetName.kt @@ -1,4 +1,4 @@ -// NO_KOTLIN_REFLECT +// WITH_RUNTIME import kotlin.reflect.* diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/propertyInstanceof.kt b/compiler/testData/codegen/box/reflection/noKotlinReflect/propertyInstanceof.kt similarity index 98% rename from compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/propertyInstanceof.kt rename to compiler/testData/codegen/box/reflection/noKotlinReflect/propertyInstanceof.kt index c9133e2ec24..bbd34af42b9 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/propertyInstanceof.kt +++ b/compiler/testData/codegen/box/reflection/noKotlinReflect/propertyInstanceof.kt @@ -1,4 +1,4 @@ -// NO_KOTLIN_REFLECT +// WITH_RUNTIME import kotlin.reflect.* import kotlin.test.assertTrue diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/reifiedTypeJavaClass.kt b/compiler/testData/codegen/box/reflection/noKotlinReflect/reifiedTypeJavaClass.kt similarity index 95% rename from compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/reifiedTypeJavaClass.kt rename to compiler/testData/codegen/box/reflection/noKotlinReflect/reifiedTypeJavaClass.kt index 3f5912a3ab3..806258b3048 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/reifiedTypeJavaClass.kt +++ b/compiler/testData/codegen/box/reflection/noKotlinReflect/reifiedTypeJavaClass.kt @@ -1,4 +1,4 @@ -// NO_KOTLIN_REFLECT +// WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/simpleClassLiterals.kt b/compiler/testData/codegen/box/reflection/noKotlinReflect/simpleClassLiterals.kt similarity index 91% rename from compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/simpleClassLiterals.kt rename to compiler/testData/codegen/box/reflection/noKotlinReflect/simpleClassLiterals.kt index 48a845d11bd..a082834ed02 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/simpleClassLiterals.kt +++ b/compiler/testData/codegen/box/reflection/noKotlinReflect/simpleClassLiterals.kt @@ -1,4 +1,4 @@ -// NO_KOTLIN_REFLECT +// WITH_RUNTIME import kotlin.test.assertNotNull diff --git a/compiler/testData/codegen/boxMultiFile/accessorForProtectedInvokeVirtual.kt b/compiler/testData/codegen/boxMultiFile/accessorForProtectedInvokeVirtual.kt index 14960a71ce7..f68dda4d4b1 100644 --- a/compiler/testData/codegen/boxMultiFile/accessorForProtectedInvokeVirtual.kt +++ b/compiler/testData/codegen/boxMultiFile/accessorForProtectedInvokeVirtual.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: 1.kt import test.A diff --git a/compiler/testData/codegen/boxMultiFile/callMultifileClassMemberFromOtherPackage.kt b/compiler/testData/codegen/boxMultiFile/callMultifileClassMemberFromOtherPackage.kt index 07b1bd2799a..2915070b4c5 100644 --- a/compiler/testData/codegen/boxMultiFile/callMultifileClassMemberFromOtherPackage.kt +++ b/compiler/testData/codegen/boxMultiFile/callMultifileClassMemberFromOtherPackage.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: box.kt package test diff --git a/compiler/testData/codegen/boxMultiFile/callsToMultifileClassFromOtherPackage.kt b/compiler/testData/codegen/boxMultiFile/callsToMultifileClassFromOtherPackage.kt index f89f5ec7516..7f782c4f080 100644 --- a/compiler/testData/codegen/boxMultiFile/callsToMultifileClassFromOtherPackage.kt +++ b/compiler/testData/codegen/boxMultiFile/callsToMultifileClassFromOtherPackage.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: 1.kt import a.* diff --git a/compiler/testData/codegen/boxMultiFile/constPropertyReferenceFromMultifileClass.kt b/compiler/testData/codegen/boxMultiFile/constPropertyReferenceFromMultifileClass.kt index adaa0963a20..369756176b4 100644 --- a/compiler/testData/codegen/boxMultiFile/constPropertyReferenceFromMultifileClass.kt +++ b/compiler/testData/codegen/boxMultiFile/constPropertyReferenceFromMultifileClass.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: 1.kt import a.OK diff --git a/compiler/testData/codegen/boxMultiFile/inlineMultifileClassMemberFromOtherPackage.kt b/compiler/testData/codegen/boxMultiFile/inlineMultifileClassMemberFromOtherPackage.kt index 8bc0417184e..efdebe900ac 100644 --- a/compiler/testData/codegen/boxMultiFile/inlineMultifileClassMemberFromOtherPackage.kt +++ b/compiler/testData/codegen/boxMultiFile/inlineMultifileClassMemberFromOtherPackage.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: box.kt package test diff --git a/compiler/testData/codegen/boxMultiFile/kt1515.kt b/compiler/testData/codegen/boxMultiFile/kt1515.kt index 7cd77d0374c..90dfc5624f7 100644 --- a/compiler/testData/codegen/boxMultiFile/kt1515.kt +++ b/compiler/testData/codegen/boxMultiFile/kt1515.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: 1.kt package thispackage diff --git a/compiler/testData/codegen/boxMultiFile/kt5445.kt b/compiler/testData/codegen/boxMultiFile/kt5445.kt index 7b342adab2e..b8eb1bd4a78 100644 --- a/compiler/testData/codegen/boxMultiFile/kt5445.kt +++ b/compiler/testData/codegen/boxMultiFile/kt5445.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: 1.kt package test2 diff --git a/compiler/testData/codegen/boxMultiFile/kt5445_2.kt b/compiler/testData/codegen/boxMultiFile/kt5445_2.kt index 62def12b07f..6d0bf0391a7 100644 --- a/compiler/testData/codegen/boxMultiFile/kt5445_2.kt +++ b/compiler/testData/codegen/boxMultiFile/kt5445_2.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: 1.kt package test2 diff --git a/compiler/testData/codegen/boxMultiFile/mainInFiles.kt b/compiler/testData/codegen/boxMultiFile/mainInFiles.kt index c488f31116f..229de1362cf 100644 --- a/compiler/testData/codegen/boxMultiFile/mainInFiles.kt +++ b/compiler/testData/codegen/boxMultiFile/mainInFiles.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: 1.kt package test diff --git a/compiler/testData/codegen/boxMultiFile/multifileClassPartsInitialization.kt b/compiler/testData/codegen/boxMultiFile/multifileClassPartsInitialization.kt index 9030317f1a5..33b98e5aaf5 100644 --- a/compiler/testData/codegen/boxMultiFile/multifileClassPartsInitialization.kt +++ b/compiler/testData/codegen/boxMultiFile/multifileClassPartsInitialization.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: box.kt import a.* diff --git a/compiler/testData/codegen/boxMultiFile/samWrappersDifferentFiles.kt b/compiler/testData/codegen/boxMultiFile/samWrappersDifferentFiles.kt index 74bca491a4c..461b35bccb4 100644 --- a/compiler/testData/codegen/boxMultiFile/samWrappersDifferentFiles.kt +++ b/compiler/testData/codegen/boxMultiFile/samWrappersDifferentFiles.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: 1/wrapped.kt fun getWrapped1(): Runnable { diff --git a/compiler/testData/codegen/boxMultiFile/samePartNameDifferentFacades.kt b/compiler/testData/codegen/boxMultiFile/samePartNameDifferentFacades.kt index f149e681988..0ce5c61c0b5 100644 --- a/compiler/testData/codegen/boxMultiFile/samePartNameDifferentFacades.kt +++ b/compiler/testData/codegen/boxMultiFile/samePartNameDifferentFacades.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: 1/part.kt @file:JvmName("Foo") diff --git a/compiler/testData/codegen/boxWithJava/allWildcardsOnClass.kt b/compiler/testData/codegen/boxWithJava/allWildcardsOnClass.kt index 93f3efb9788..2d0bc40ed34 100644 --- a/compiler/testData/codegen/boxWithJava/allWildcardsOnClass.kt +++ b/compiler/testData/codegen/boxWithJava/allWildcardsOnClass.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: JavaClass.java public class JavaClass { diff --git a/compiler/testData/codegen/boxWithJava/annotatedSamFunExpression.kt b/compiler/testData/codegen/boxWithJava/annotatedSamFunExpression.kt index 032a68a65a1..21514c2a694 100644 --- a/compiler/testData/codegen/boxWithJava/annotatedSamFunExpression.kt +++ b/compiler/testData/codegen/boxWithJava/annotatedSamFunExpression.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: Test.java class Test { diff --git a/compiler/testData/codegen/boxWithJava/annotatedSamLambda.kt b/compiler/testData/codegen/boxWithJava/annotatedSamLambda.kt index 8dbebfd91ba..9566ff0d9ec 100644 --- a/compiler/testData/codegen/boxWithJava/annotatedSamLambda.kt +++ b/compiler/testData/codegen/boxWithJava/annotatedSamLambda.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: Test.java class Test { diff --git a/compiler/testData/codegen/boxWithJava/annotationsWithKClass/array.kt b/compiler/testData/codegen/boxWithJava/annotationsWithKClass/array.kt index 38ceb8c7902..ada2a274c2f 100644 --- a/compiler/testData/codegen/boxWithJava/annotationsWithKClass/array.kt +++ b/compiler/testData/codegen/boxWithJava/annotationsWithKClass/array.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: Test.java class O {} @@ -16,7 +17,7 @@ annotation class Ann(val args: Array>) fun box(): String { val args = Test::class.java.getAnnotation(Ann::class.java).args - val argName1 = args[0].simpleName ?: "fail 1" - val argName2 = args[1].simpleName ?: "fail 2" + val argName1 = args[0].java.simpleName ?: "fail 1" + val argName2 = args[1].java.simpleName ?: "fail 2" return argName1 + argName2 } diff --git a/compiler/testData/codegen/boxWithJava/annotationsWithKClass/basic.kt b/compiler/testData/codegen/boxWithJava/annotationsWithKClass/basic.kt index ba5d272def4..e8bbfe3c99a 100644 --- a/compiler/testData/codegen/boxWithJava/annotationsWithKClass/basic.kt +++ b/compiler/testData/codegen/boxWithJava/annotationsWithKClass/basic.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: Test.java class OK {} @@ -14,6 +15,6 @@ import kotlin.reflect.KClass annotation class Ann(val arg: KClass<*>) fun box(): String { - val argName = Test::class.java.getAnnotation(Ann::class.java).arg.simpleName ?: "fail 1" + val argName = Test::class.java.getAnnotation(Ann::class.java).arg.java.simpleName ?: "fail 1" return argName } diff --git a/compiler/testData/codegen/boxWithJava/annotationsWithKClass/vararg.kt b/compiler/testData/codegen/boxWithJava/annotationsWithKClass/vararg.kt index e12a7817fcf..15d218db5c0 100644 --- a/compiler/testData/codegen/boxWithJava/annotationsWithKClass/vararg.kt +++ b/compiler/testData/codegen/boxWithJava/annotationsWithKClass/vararg.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: Test.java class O {} @@ -16,7 +17,7 @@ annotation class Ann(vararg val args: KClass<*>) fun box(): String { val args = Test::class.java.getAnnotation(Ann::class.java).args - val argName1 = args[0].simpleName ?: "fail 1" - val argName2 = args[1].simpleName ?: "fail 2" + val argName1 = args[0].java.simpleName ?: "fail 1" + val argName2 = args[1].java.simpleName ?: "fail 2" return argName1 + argName2 } diff --git a/compiler/testData/codegen/boxWithJava/collections/irrelevantImplMutableListKotlin.kt b/compiler/testData/codegen/boxWithJava/collections/irrelevantImplMutableListKotlin.kt index f7ccb51249c..a05f02ea645 100644 --- a/compiler/testData/codegen/boxWithJava/collections/irrelevantImplMutableListKotlin.kt +++ b/compiler/testData/codegen/boxWithJava/collections/irrelevantImplMutableListKotlin.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: A.java public class A extends AImpl implements java.util.List { diff --git a/compiler/testData/codegen/boxWithJava/covariantOverrideWithDeclarationSiteProjection.kt b/compiler/testData/codegen/boxWithJava/covariantOverrideWithDeclarationSiteProjection.kt index fac871fb05d..69f8ff0a32f 100644 --- a/compiler/testData/codegen/boxWithJava/covariantOverrideWithDeclarationSiteProjection.kt +++ b/compiler/testData/codegen/boxWithJava/covariantOverrideWithDeclarationSiteProjection.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: JavaClass.java public class JavaClass { diff --git a/compiler/testData/codegen/boxWithJava/fileClasses/differentFiles.kt b/compiler/testData/codegen/boxWithJava/fileClasses/differentFiles.kt index 887a1af5cc5..e1bd46360aa 100644 --- a/compiler/testData/codegen/boxWithJava/fileClasses/differentFiles.kt +++ b/compiler/testData/codegen/boxWithJava/fileClasses/differentFiles.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: Baz.java public class Baz { diff --git a/compiler/testData/codegen/boxWithJava/fileClasses/javaAnnotationOnFileFacade.kt b/compiler/testData/codegen/boxWithJava/fileClasses/javaAnnotationOnFileFacade.kt index d4db0df8d60..f13f8a93d6b 100644 --- a/compiler/testData/codegen/boxWithJava/fileClasses/javaAnnotationOnFileFacade.kt +++ b/compiler/testData/codegen/boxWithJava/fileClasses/javaAnnotationOnFileFacade.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: StringHolder.java import java.lang.annotation.ElementType; diff --git a/compiler/testData/codegen/boxWithJava/fileClasses/multifileClassWith2Files.kt b/compiler/testData/codegen/boxWithJava/fileClasses/multifileClassWith2Files.kt index fc240cd9899..240fccccd56 100644 --- a/compiler/testData/codegen/boxWithJava/fileClasses/multifileClassWith2Files.kt +++ b/compiler/testData/codegen/boxWithJava/fileClasses/multifileClassWith2Files.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: Baz.java public class Baz { diff --git a/compiler/testData/codegen/boxWithJava/fileClasses/multifileClassWithCrossCall.kt b/compiler/testData/codegen/boxWithJava/fileClasses/multifileClassWithCrossCall.kt index 0a2e8bd496d..4186b62d558 100644 --- a/compiler/testData/codegen/boxWithJava/fileClasses/multifileClassWithCrossCall.kt +++ b/compiler/testData/codegen/boxWithJava/fileClasses/multifileClassWithCrossCall.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: Baz.java public class Baz { diff --git a/compiler/testData/codegen/boxWithJava/fileClasses/multifileClassWithPrivate.kt b/compiler/testData/codegen/boxWithJava/fileClasses/multifileClassWithPrivate.kt index 3227619a9cc..bc2c3db2f55 100644 --- a/compiler/testData/codegen/boxWithJava/fileClasses/multifileClassWithPrivate.kt +++ b/compiler/testData/codegen/boxWithJava/fileClasses/multifileClassWithPrivate.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: Baz.java public class Baz { diff --git a/compiler/testData/codegen/boxWithJava/fileClasses/simple.kt b/compiler/testData/codegen/boxWithJava/fileClasses/simple.kt index fd2feb7393a..66b6bd33286 100644 --- a/compiler/testData/codegen/boxWithJava/fileClasses/simple.kt +++ b/compiler/testData/codegen/boxWithJava/fileClasses/simple.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: Bar.java public class Bar { diff --git a/compiler/testData/codegen/boxWithJava/interfaceCompanion.kt b/compiler/testData/codegen/boxWithJava/interfaceCompanion.kt index b2b9353b3df..58bdad5fe98 100644 --- a/compiler/testData/codegen/boxWithJava/interfaceCompanion.kt +++ b/compiler/testData/codegen/boxWithJava/interfaceCompanion.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: CompanionInitialization.java public class CompanionInitialization { diff --git a/compiler/testData/codegen/boxWithJava/jvmField/constructorProperty.kt b/compiler/testData/codegen/boxWithJava/jvmField/constructorProperty.kt index ea0ed56d726..250f764b41f 100644 --- a/compiler/testData/codegen/boxWithJava/jvmField/constructorProperty.kt +++ b/compiler/testData/codegen/boxWithJava/jvmField/constructorProperty.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: Test.java public class Test { diff --git a/compiler/testData/codegen/boxWithJava/jvmField/simple.kt b/compiler/testData/codegen/boxWithJava/jvmField/simple.kt index 4112b0f189b..f89b81c2fc2 100644 --- a/compiler/testData/codegen/boxWithJava/jvmField/simple.kt +++ b/compiler/testData/codegen/boxWithJava/jvmField/simple.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: Test.java public class Test { diff --git a/compiler/testData/codegen/boxWithJava/jvmOverloads/generics.kt b/compiler/testData/codegen/boxWithJava/jvmOverloads/generics.kt index b63fe927dcd..498a8b306de 100644 --- a/compiler/testData/codegen/boxWithJava/jvmOverloads/generics.kt +++ b/compiler/testData/codegen/boxWithJava/jvmOverloads/generics.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: Test.java public class Test { diff --git a/compiler/testData/codegen/boxWithJava/jvmOverloads/simple.kt b/compiler/testData/codegen/boxWithJava/jvmOverloads/simple.kt index a0303197512..9fff7ca10bb 100644 --- a/compiler/testData/codegen/boxWithJava/jvmOverloads/simple.kt +++ b/compiler/testData/codegen/boxWithJava/jvmOverloads/simple.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: Test.java public class Test { diff --git a/compiler/testData/codegen/boxWithJava/jvmStatic/annotations.kt b/compiler/testData/codegen/boxWithJava/jvmStatic/annotations.kt index dfbfe670231..dd1d45bb97d 100644 --- a/compiler/testData/codegen/boxWithJava/jvmStatic/annotations.kt +++ b/compiler/testData/codegen/boxWithJava/jvmStatic/annotations.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: Test.java import java.lang.annotation.Annotation; diff --git a/compiler/testData/codegen/boxWithJava/jvmStatic/companionObject.kt b/compiler/testData/codegen/boxWithJava/jvmStatic/companionObject.kt index 13d937d9b4b..e6aa00a607e 100644 --- a/compiler/testData/codegen/boxWithJava/jvmStatic/companionObject.kt +++ b/compiler/testData/codegen/boxWithJava/jvmStatic/companionObject.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: Test.java class Test { diff --git a/compiler/testData/codegen/boxWithJava/jvmStatic/enumCompanion.kt b/compiler/testData/codegen/boxWithJava/jvmStatic/enumCompanion.kt index b25091ee2ed..b11acbd3d0f 100644 --- a/compiler/testData/codegen/boxWithJava/jvmStatic/enumCompanion.kt +++ b/compiler/testData/codegen/boxWithJava/jvmStatic/enumCompanion.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: Test.java class Test { diff --git a/compiler/testData/codegen/boxWithJava/jvmStatic/object.kt b/compiler/testData/codegen/boxWithJava/jvmStatic/object.kt index b4b84c3e15c..97d071d557d 100644 --- a/compiler/testData/codegen/boxWithJava/jvmStatic/object.kt +++ b/compiler/testData/codegen/boxWithJava/jvmStatic/object.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: Test.java class Test { diff --git a/compiler/testData/codegen/boxWithJava/properties/annotationWithKotlinProperty.kt b/compiler/testData/codegen/boxWithJava/properties/annotationWithKotlinProperty.kt index 12e90aca638..b1f09f9ea95 100644 --- a/compiler/testData/codegen/boxWithJava/properties/annotationWithKotlinProperty.kt +++ b/compiler/testData/codegen/boxWithJava/properties/annotationWithKotlinProperty.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: JavaClass.java import java.lang.annotation.Retention; diff --git a/compiler/testData/codegen/boxWithJava/properties/companionObjectProperties.kt b/compiler/testData/codegen/boxWithJava/properties/companionObjectProperties.kt index 385f8a0896f..035da13ca80 100644 --- a/compiler/testData/codegen/boxWithJava/properties/companionObjectProperties.kt +++ b/compiler/testData/codegen/boxWithJava/properties/companionObjectProperties.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: Test.java class Test { diff --git a/compiler/testData/codegen/boxWithJava/properties/protectedJavaProperty.kt b/compiler/testData/codegen/boxWithJava/properties/protectedJavaProperty.kt index c6c0a16780a..a8cc18a55ff 100644 --- a/compiler/testData/codegen/boxWithJava/properties/protectedJavaProperty.kt +++ b/compiler/testData/codegen/boxWithJava/properties/protectedJavaProperty.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: JavaBaseClass.java public class JavaBaseClass { diff --git a/compiler/testData/codegen/boxWithJava/properties/protectedJavaPropertyInCompanion.kt b/compiler/testData/codegen/boxWithJava/properties/protectedJavaPropertyInCompanion.kt index 99d6f8e15f3..6aff71b3d79 100644 --- a/compiler/testData/codegen/boxWithJava/properties/protectedJavaPropertyInCompanion.kt +++ b/compiler/testData/codegen/boxWithJava/properties/protectedJavaPropertyInCompanion.kt @@ -1,3 +1,4 @@ +// WITH_RUNTIME // FILE: JavaBaseClass.java public class JavaBaseClass { diff --git a/compiler/testData/codegen/boxWithJava/reflection/annotationsOnJavaMembers.kt b/compiler/testData/codegen/boxWithJava/reflection/annotationsOnJavaMembers.kt index 4947956755a..1ea9f687be4 100644 --- a/compiler/testData/codegen/boxWithJava/reflection/annotationsOnJavaMembers.kt +++ b/compiler/testData/codegen/boxWithJava/reflection/annotationsOnJavaMembers.kt @@ -1,3 +1,4 @@ +// WITH_REFLECT // FILE: J.java @Anno("J") diff --git a/compiler/testData/codegen/boxWithJava/reflection/callInstanceJavaMethod.kt b/compiler/testData/codegen/boxWithJava/reflection/callInstanceJavaMethod.kt index b02cf4892eb..35f527ffa02 100644 --- a/compiler/testData/codegen/boxWithJava/reflection/callInstanceJavaMethod.kt +++ b/compiler/testData/codegen/boxWithJava/reflection/callInstanceJavaMethod.kt @@ -1,3 +1,4 @@ +// WITH_REFLECT // FILE: J.java public class J { diff --git a/compiler/testData/codegen/boxWithJava/reflection/callPrivateJavaMethod.kt b/compiler/testData/codegen/boxWithJava/reflection/callPrivateJavaMethod.kt index 5ce51bff71a..4a28a0f9aa9 100644 --- a/compiler/testData/codegen/boxWithJava/reflection/callPrivateJavaMethod.kt +++ b/compiler/testData/codegen/boxWithJava/reflection/callPrivateJavaMethod.kt @@ -1,3 +1,4 @@ +// WITH_REFLECT // FILE: J.java public class J { diff --git a/compiler/testData/codegen/boxWithJava/reflection/callStaticJavaMethod.kt b/compiler/testData/codegen/boxWithJava/reflection/callStaticJavaMethod.kt index 9121ae15c50..13de918f628 100644 --- a/compiler/testData/codegen/boxWithJava/reflection/callStaticJavaMethod.kt +++ b/compiler/testData/codegen/boxWithJava/reflection/callStaticJavaMethod.kt @@ -1,3 +1,4 @@ +// WITH_REFLECT // FILE: J.java public class J { diff --git a/compiler/testData/codegen/boxWithJava/reflection/declaredVsInheritedFunctions.kt b/compiler/testData/codegen/boxWithJava/reflection/declaredVsInheritedFunctions.kt index 2260351e564..f1c2d8bdf42 100644 --- a/compiler/testData/codegen/boxWithJava/reflection/declaredVsInheritedFunctions.kt +++ b/compiler/testData/codegen/boxWithJava/reflection/declaredVsInheritedFunctions.kt @@ -1,3 +1,4 @@ +// WITH_REFLECT // FILE: J.java public class J { diff --git a/compiler/testData/codegen/boxWithJava/reflection/declaredVsInheritedProperties.kt b/compiler/testData/codegen/boxWithJava/reflection/declaredVsInheritedProperties.kt index 1a21b4b0cd9..c1880a4c918 100644 --- a/compiler/testData/codegen/boxWithJava/reflection/declaredVsInheritedProperties.kt +++ b/compiler/testData/codegen/boxWithJava/reflection/declaredVsInheritedProperties.kt @@ -1,3 +1,4 @@ +// WITH_REFLECT // FILE: J.java public class J { diff --git a/compiler/testData/codegen/boxWithJava/reflection/functionReferenceErasedToKFunction.kt b/compiler/testData/codegen/boxWithJava/reflection/functionReferenceErasedToKFunction.kt index d7096212f86..2843bacbab6 100644 --- a/compiler/testData/codegen/boxWithJava/reflection/functionReferenceErasedToKFunction.kt +++ b/compiler/testData/codegen/boxWithJava/reflection/functionReferenceErasedToKFunction.kt @@ -1,3 +1,4 @@ +// WITH_REFLECT // FILE: J.java import kotlin.jvm.functions.Function2; diff --git a/compiler/testData/codegen/boxWithJava/reflection/javaClassGetFunctions.kt b/compiler/testData/codegen/boxWithJava/reflection/javaClassGetFunctions.kt index 8b06ce6459e..7dffd907ee1 100644 --- a/compiler/testData/codegen/boxWithJava/reflection/javaClassGetFunctions.kt +++ b/compiler/testData/codegen/boxWithJava/reflection/javaClassGetFunctions.kt @@ -1,3 +1,4 @@ +// WITH_REFLECT // FILE: J.java public class J { diff --git a/compiler/testData/codegen/boxWithJava/reflection/javaStaticField.kt b/compiler/testData/codegen/boxWithJava/reflection/javaStaticField.kt index 1f40ab18c87..d1ef881b878 100644 --- a/compiler/testData/codegen/boxWithJava/reflection/javaStaticField.kt +++ b/compiler/testData/codegen/boxWithJava/reflection/javaStaticField.kt @@ -1,3 +1,4 @@ +// WITH_REFLECT // FILE: J.java public class J { diff --git a/compiler/testData/codegen/boxWithJava/reflection/kotlinPropertyInheritedInJava.kt b/compiler/testData/codegen/boxWithJava/reflection/kotlinPropertyInheritedInJava.kt index 8a08b664ab5..f71764acfc3 100644 --- a/compiler/testData/codegen/boxWithJava/reflection/kotlinPropertyInheritedInJava.kt +++ b/compiler/testData/codegen/boxWithJava/reflection/kotlinPropertyInheritedInJava.kt @@ -1,3 +1,4 @@ +// WITH_REFLECT // FILE: J.java public class J extends K { diff --git a/compiler/testData/codegen/boxWithJava/reflection/mutatePrivateJavaInstanceField.kt b/compiler/testData/codegen/boxWithJava/reflection/mutatePrivateJavaInstanceField.kt index 16030d194a5..8cbbf6c6cf6 100644 --- a/compiler/testData/codegen/boxWithJava/reflection/mutatePrivateJavaInstanceField.kt +++ b/compiler/testData/codegen/boxWithJava/reflection/mutatePrivateJavaInstanceField.kt @@ -1,3 +1,4 @@ +// WITH_REFLECT // FILE: J.java public class J { diff --git a/compiler/testData/codegen/boxWithJava/reflection/mutatePrivateJavaStaticField.kt b/compiler/testData/codegen/boxWithJava/reflection/mutatePrivateJavaStaticField.kt index 3d853c18d6a..9887e442c79 100644 --- a/compiler/testData/codegen/boxWithJava/reflection/mutatePrivateJavaStaticField.kt +++ b/compiler/testData/codegen/boxWithJava/reflection/mutatePrivateJavaStaticField.kt @@ -1,3 +1,4 @@ +// WITH_REFLECT // FILE: J.java public class J { diff --git a/compiler/testData/codegen/boxWithJava/reflection/nestedClasses.kt b/compiler/testData/codegen/boxWithJava/reflection/nestedClasses.kt index 4ccd0f612ec..21a31878f02 100644 --- a/compiler/testData/codegen/boxWithJava/reflection/nestedClasses.kt +++ b/compiler/testData/codegen/boxWithJava/reflection/nestedClasses.kt @@ -1,3 +1,4 @@ +// WITH_REFLECT // FILE: J.java public class J { diff --git a/compiler/testData/codegen/boxWithJava/reflection/noConflictOnKotlinGetterAndJavaField.kt b/compiler/testData/codegen/boxWithJava/reflection/noConflictOnKotlinGetterAndJavaField.kt index ffd0b270986..7bde34e271d 100644 --- a/compiler/testData/codegen/boxWithJava/reflection/noConflictOnKotlinGetterAndJavaField.kt +++ b/compiler/testData/codegen/boxWithJava/reflection/noConflictOnKotlinGetterAndJavaField.kt @@ -1,3 +1,4 @@ +// WITH_REFLECT // FILE: J.java public class J { diff --git a/compiler/testData/codegen/boxWithJava/reflection/parametersHaveNoNames.kt b/compiler/testData/codegen/boxWithJava/reflection/parametersHaveNoNames.kt index 930dde99cb3..6defc2359f7 100644 --- a/compiler/testData/codegen/boxWithJava/reflection/parametersHaveNoNames.kt +++ b/compiler/testData/codegen/boxWithJava/reflection/parametersHaveNoNames.kt @@ -1,3 +1,4 @@ +// WITH_REFLECT // FILE: J.java public class J { diff --git a/compiler/testData/codegen/boxWithJava/reflection/platformTypeNotEqualToKotlinType.kt b/compiler/testData/codegen/boxWithJava/reflection/platformTypeNotEqualToKotlinType.kt index 8980cd4d7ab..2699bf83e0f 100644 --- a/compiler/testData/codegen/boxWithJava/reflection/platformTypeNotEqualToKotlinType.kt +++ b/compiler/testData/codegen/boxWithJava/reflection/platformTypeNotEqualToKotlinType.kt @@ -1,3 +1,4 @@ +// WITH_REFLECT // FILE: J.java public class J { diff --git a/compiler/testData/codegen/boxWithJava/reflection/platformTypeToString.kt b/compiler/testData/codegen/boxWithJava/reflection/platformTypeToString.kt index 89a5ab0403c..f43a98c50f4 100644 --- a/compiler/testData/codegen/boxWithJava/reflection/platformTypeToString.kt +++ b/compiler/testData/codegen/boxWithJava/reflection/platformTypeToString.kt @@ -1,3 +1,4 @@ +// WITH_REFLECT // FILE: J.java import java.util.List; diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/AbstractBlackBoxCodegenTest.java b/compiler/tests/org/jetbrains/kotlin/codegen/AbstractBlackBoxCodegenTest.java index b3c7b2f0cef..1857c048e69 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/AbstractBlackBoxCodegenTest.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/AbstractBlackBoxCodegenTest.java @@ -51,6 +51,9 @@ import static org.jetbrains.kotlin.test.KotlinTestUtils.compilerConfigurationFor import static org.jetbrains.kotlin.test.KotlinTestUtils.getAnnotationsJar; public abstract class AbstractBlackBoxCodegenTest extends CodegenTestCase { + private boolean addRuntime = false; + private boolean addReflect = false; + @Override protected void doMultiFileTest(@NotNull File wholeFile, @NotNull List files, @Nullable File javaFilesDir) throws Exception { TestJdkKind jdkKind = TestJdkKind.MOCK_JDK; @@ -59,18 +62,26 @@ public abstract class AbstractBlackBoxCodegenTest extends CodegenTestCase { if (InTextDirectivesUtils.isDirectiveDefined(file.content, "FULL_JDK")) { jdkKind = TestJdkKind.FULL_JDK; } - if (InTextDirectivesUtils.isDirectiveDefined(file.content, "NO_KOTLIN_REFLECT")) { - configurationKind = ConfigurationKind.NO_KOTLIN_REFLECT; + if (InTextDirectivesUtils.isDirectiveDefined(file.content, "WITH_RUNTIME")) { + addRuntime = true; + } + if (InTextDirectivesUtils.isDirectiveDefined(file.content, "WITH_REFLECT")) { + addReflect = true; } javacOptions.addAll(InTextDirectivesUtils.findListWithPrefixes(file.content, "// JAVAC_OPTIONS:")); } + configurationKind = + addReflect ? ConfigurationKind.ALL : + addRuntime ? ConfigurationKind.NO_KOTLIN_REFLECT : + ConfigurationKind.JDK_ONLY; + compileAndRun(files, javaFilesDir, jdkKind, javacOptions); } protected void doTestWithStdlib(@NotNull String filename) throws Exception { - configurationKind = ConfigurationKind.ALL; + addReflect = true; doTest(filename); } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index 076092aadcc..4d1fc5d6392 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -7030,11 +7030,83 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection"), Pattern.compile("^(.+)\\.kt$"), true); } + @TestMetadata("defaultImplsGenericSignature.kt") + public void testDefaultImplsGenericSignature() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/defaultImplsGenericSignature.kt"); + doTest(fileName); + } + @TestMetadata("functionLiteralGenericSignature.kt") public void testFunctionLiteralGenericSignature() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functionLiteralGenericSignature.kt"); doTest(fileName); } + + @TestMetadata("compiler/testData/codegen/box/reflection/noKotlinReflect") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NoKotlinReflect extends AbstractBlackBoxCodegenTest { + public void testAllFilesPresentInNoKotlinReflect() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/noKotlinReflect"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("javaClass.kt") + public void testJavaClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noKotlinReflect/javaClass.kt"); + doTest(fileName); + } + + @TestMetadata("primitiveJavaClass.kt") + public void testPrimitiveJavaClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noKotlinReflect/primitiveJavaClass.kt"); + doTest(fileName); + } + + @TestMetadata("propertyGetSetName.kt") + public void testPropertyGetSetName() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noKotlinReflect/propertyGetSetName.kt"); + doTest(fileName); + } + + @TestMetadata("propertyInstanceof.kt") + public void testPropertyInstanceof() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noKotlinReflect/propertyInstanceof.kt"); + doTest(fileName); + } + + @TestMetadata("reifiedTypeJavaClass.kt") + public void testReifiedTypeJavaClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noKotlinReflect/reifiedTypeJavaClass.kt"); + doTest(fileName); + } + + @TestMetadata("simpleClassLiterals.kt") + public void testSimpleClassLiterals() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noKotlinReflect/simpleClassLiterals.kt"); + doTest(fileName); + } + + @TestMetadata("compiler/testData/codegen/box/reflection/noKotlinReflect/methodsFromAny") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MethodsFromAny extends AbstractBlackBoxCodegenTest { + public void testAllFilesPresentInMethodsFromAny() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/noKotlinReflect/methodsFromAny"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("callableReferences.kt") + public void testCallableReferences() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noKotlinReflect/methodsFromAny/callableReferences.kt"); + doTest(fileName); + } + + @TestMetadata("classReference.kt") + public void testClassReference() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noKotlinReflect/methodsFromAny/classReference.kt"); + doTest(fileName); + } + } + } } @TestMetadata("compiler/testData/codegen/box/regressions") diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxWithJavaCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxWithJavaCodegenTestGenerated.java index caf303962cc..e9d7fa1f6a1 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxWithJavaCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxWithJavaCodegenTestGenerated.java @@ -601,12 +601,6 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege doTest(fileName); } - @TestMetadata("defaultImplsGenericSignature.kt") - public void testDefaultImplsGenericSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/defaultImplsGenericSignature.kt"); - doTest(fileName); - } - @TestMetadata("functionReferenceErasedToKFunction.kt") public void testFunctionReferenceErasedToKFunction() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/functionReferenceErasedToKFunction.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxWithStdlibCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxWithStdlibCodegenTestGenerated.java index 27b99123016..9aaca3605e2 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxWithStdlibCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxWithStdlibCodegenTestGenerated.java @@ -3786,12 +3786,6 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode doTestWithStdlib(fileName); } - @TestMetadata("kt11121.kt") - public void testKt11121() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/kt11121.kt"); - doTestWithStdlib(fileName); - } - @TestMetadata("genericBackingFieldSignature.kt") public void testGenericBackingFieldSignature() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/genericBackingFieldSignature.kt"); @@ -3804,6 +3798,12 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode doTestWithStdlib(fileName); } + @TestMetadata("kt11121.kt") + public void testKt11121() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/kt11121.kt"); + doTestWithStdlib(fileName); + } + @TestMetadata("kt5112.kt") public void testKt5112() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/kt5112.kt"); @@ -4153,72 +4153,6 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode } } - @TestMetadata("compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NoKotlinReflect extends AbstractBlackBoxCodegenTest { - public void testAllFilesPresentInNoKotlinReflect() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("javaClass.kt") - public void testJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/javaClass.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("primitiveJavaClass.kt") - public void testPrimitiveJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/primitiveJavaClass.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("propertyGetSetName.kt") - public void testPropertyGetSetName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/propertyGetSetName.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("propertyInstanceof.kt") - public void testPropertyInstanceof() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/propertyInstanceof.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("reifiedTypeJavaClass.kt") - public void testReifiedTypeJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/reifiedTypeJavaClass.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("simpleClassLiterals.kt") - public void testSimpleClassLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/simpleClassLiterals.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/methodsFromAny") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MethodsFromAny extends AbstractBlackBoxCodegenTest { - public void testAllFilesPresentInMethodsFromAny() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/methodsFromAny"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("callableReferences.kt") - public void testCallableReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/methodsFromAny/callableReferences.kt"); - doTestWithStdlib(fileName); - } - - @TestMetadata("classReference.kt") - public void testClassReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/noKotlinReflect/methodsFromAny/classReference.kt"); - doTestWithStdlib(fileName); - } - } - } - @TestMetadata("compiler/testData/codegen/boxWithStdlib/reflection/parameters") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class)