From 3fdcf8376f57644d2d4e00621d507d8744746544 Mon Sep 17 00:00:00 2001 From: pyos Date: Mon, 8 Apr 2019 16:41:05 +0200 Subject: [PATCH] Add IR equivalent of the WriteFlags test --- .../visibility/functionReference.kt | 1 + .../functionReferenceInInlineFunction.kt | 1 + .../visibility/propertyReference.kt | 1 + .../propertyReferenceInInlineFunction.kt | 1 + .../class/accessFlags/mappingWhen.kt | 1 + .../writeFlags/class/deprecatedFlag/class.kt | 1 + .../class/deprecatedFlag/classObject.kt | 1 + .../class/deprecatedFlag/enumClass.kt | 1 + .../class/deprecatedFlag/innerClass.kt | 1 + .../writeFlags/class/deprecatedFlag/trait.kt | 1 + .../class/visibility/internal/enum.kt | 1 + .../class/visibility/internal/innerEnum.kt | 1 + .../class/visibility/private/enum.kt | 1 + .../class/visibility/private/innerEnum.kt | 1 + .../class/visibility/public/enum.kt | 1 + .../class/visibility/public/innerEnum.kt | 1 + .../writeFlags/function/constructors/enum.kt | 1 + .../function/constructors/objectLiteral.kt | 1 + .../getterAnnotationOnProperty.kt | 1 + .../setterAnnotationOnProperty.kt | 1 + .../withDefaultArguments/funInClass.kt | 1 + .../withDefaultArguments/funInClassObject.kt | 1 + .../inlineOnlyFunInClass.kt | 1 + .../withDefaultArguments/reifiedFunInClass.kt | 1 + .../withDefaultArguments/topLevelFun.kt | 1 + .../testData/writeFlags/hidden/function.kt | 1 + .../writeFlags/hidden/propertyGetter.kt | 1 + .../writeFlags/hidden/propertySetter.kt | 1 + .../writeFlags/inline/lostInnerClass.kt | 1 + .../writeFlags/inline/lostInnerClass2.kt | 1 + .../writeFlags/inline/lostInnerClass3.kt | 1 + .../compatibility/propertyAccessors.kt | 1 + .../compatibility/propertyAnnotation.kt | 1 + .../writeFlags/jvm8/defaults/defaultMethod.kt | 1 + .../jvm8/defaults/defaultProperty.kt | 1 + .../jvm8/defaults/propertyAnnotation.kt | 1 + .../lambda/lambdaInInlineFunction.kt | 1 + .../writeFlags/lambda/simpleLambda.kt | 1 + .../writeFlags/lateinit/lateinitProperty.kt | 1 + .../property/classObject/class/internalVar.kt | 1 + .../class/internalVarPrivateSet.kt | 1 + .../class/protectedVarPrivateSet.kt | 1 + .../classObject/class/publicValNonDefault.kt | 1 + .../property/classObject/class/publicVar.kt | 1 + .../classObject/class/publicVarNonDefault.kt | 1 + .../classObject/class/publicVarPrivateSet.kt | 1 + .../class/publicVarProtectedSet.kt | 1 + .../classObject/class/publicVarPublicSet.kt | 1 + .../rename/constructorAndClassObject.kt | 1 + .../rename/delegatedAndDelegated.kt | 1 + .../rename/delegatedAndProperty.kt | 1 + .../classObject/rename/propertyAndProperty.kt | 1 + .../trait/delegatedProtectedVar.kt | 1 + .../classObject/trait/delegatedPublicVal.kt | 1 + .../classObject/trait/internalConstVal.kt | 1 + .../property/classObject/trait/internalVal.kt | 1 + .../property/classObject/trait/internalVar.kt | 1 + .../trait/internalVarPrivateSet.kt | 1 + .../property/classObject/trait/privateVal.kt | 1 + .../property/classObject/trait/privateVar.kt | 1 + .../classObject/trait/protectedConstVal.kt | 1 + .../classObject/trait/protectedVal.kt | 1 + .../trait/protectedVarPrivateSet.kt | 1 + .../classObject/trait/publicConstVal.kt | 1 + .../property/classObject/trait/publicVal.kt | 1 + .../classObject/trait/publicValNonDefault.kt | 1 + .../property/classObject/trait/publicVar.kt | 1 + .../classObject/trait/publicVarNonDefault.kt | 1 + .../classObject/trait/publicVarPrivateSet.kt | 1 + .../trait/publicVarProtectedSet.kt | 1 + .../classObject/trait/publicVarPublicSet.kt | 1 + .../deprecatedFlag/propertyInClass.kt | 1 + .../deprecatedFlag/topLevelProperty.kt | 1 + .../privateProperty.kt | 1 + .../protectedProperty.kt | 1 + .../publicProperty.kt | 1 + .../privateTypealias.kt | 1 + .../publicTypealias.kt | 1 + .../codegen/ir/AbstractIrWriteFlagsTest.kt | 17 + .../flags/WriteFlagsTestGenerated.java | 148 +- .../codegen/ir/IrWriteFlagsTestGenerated.java | 1219 +++++++++++++++++ .../generators/tests/GenerateCompilerTests.kt | 6 +- 82 files changed, 1393 insertions(+), 75 deletions(-) create mode 100644 compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractIrWriteFlagsTest.kt create mode 100644 compiler/tests/org/jetbrains/kotlin/codegen/ir/IrWriteFlagsTestGenerated.java diff --git a/compiler/testData/writeFlags/callableReference/visibility/functionReference.kt b/compiler/testData/writeFlags/callableReference/visibility/functionReference.kt index bae66e6de6c..78c99bd1fe3 100644 --- a/compiler/testData/writeFlags/callableReference/visibility/functionReference.kt +++ b/compiler/testData/writeFlags/callableReference/visibility/functionReference.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class A { fun foo() {} diff --git a/compiler/testData/writeFlags/callableReference/visibility/functionReferenceInInlineFunction.kt b/compiler/testData/writeFlags/callableReference/visibility/functionReferenceInInlineFunction.kt index 5c706fde3f7..4b6befe7fa4 100644 --- a/compiler/testData/writeFlags/callableReference/visibility/functionReferenceInInlineFunction.kt +++ b/compiler/testData/writeFlags/callableReference/visibility/functionReferenceInInlineFunction.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class A { fun foo() {} diff --git a/compiler/testData/writeFlags/callableReference/visibility/propertyReference.kt b/compiler/testData/writeFlags/callableReference/visibility/propertyReference.kt index eeab284fba0..c1a463a9f81 100644 --- a/compiler/testData/writeFlags/callableReference/visibility/propertyReference.kt +++ b/compiler/testData/writeFlags/callableReference/visibility/propertyReference.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class A { val foo = "" diff --git a/compiler/testData/writeFlags/callableReference/visibility/propertyReferenceInInlineFunction.kt b/compiler/testData/writeFlags/callableReference/visibility/propertyReferenceInInlineFunction.kt index e61f47a5710..ac1daefb15b 100644 --- a/compiler/testData/writeFlags/callableReference/visibility/propertyReferenceInInlineFunction.kt +++ b/compiler/testData/writeFlags/callableReference/visibility/propertyReferenceInInlineFunction.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class A { val foo = "" diff --git a/compiler/testData/writeFlags/class/accessFlags/mappingWhen.kt b/compiler/testData/writeFlags/class/accessFlags/mappingWhen.kt index bfa271ec30d..1fec51abcd0 100644 --- a/compiler/testData/writeFlags/class/accessFlags/mappingWhen.kt +++ b/compiler/testData/writeFlags/class/accessFlags/mappingWhen.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR enum class BigEnum { ITEM1, diff --git a/compiler/testData/writeFlags/class/deprecatedFlag/class.kt b/compiler/testData/writeFlags/class/deprecatedFlag/class.kt index cee07a66de0..0911a46f141 100644 --- a/compiler/testData/writeFlags/class/deprecatedFlag/class.kt +++ b/compiler/testData/writeFlags/class/deprecatedFlag/class.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR @Deprecated("") class MyClass() { } diff --git a/compiler/testData/writeFlags/class/deprecatedFlag/classObject.kt b/compiler/testData/writeFlags/class/deprecatedFlag/classObject.kt index 0e98cb09b42..c7028254bbc 100644 --- a/compiler/testData/writeFlags/class/deprecatedFlag/classObject.kt +++ b/compiler/testData/writeFlags/class/deprecatedFlag/classObject.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class MyClass { @Deprecated("") companion object { diff --git a/compiler/testData/writeFlags/class/deprecatedFlag/enumClass.kt b/compiler/testData/writeFlags/class/deprecatedFlag/enumClass.kt index e8308c34df7..7214ec243be 100644 --- a/compiler/testData/writeFlags/class/deprecatedFlag/enumClass.kt +++ b/compiler/testData/writeFlags/class/deprecatedFlag/enumClass.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR @Deprecated("") enum class MyEnum { FIRST } diff --git a/compiler/testData/writeFlags/class/deprecatedFlag/innerClass.kt b/compiler/testData/writeFlags/class/deprecatedFlag/innerClass.kt index 31f051f3ed2..5584906f80e 100644 --- a/compiler/testData/writeFlags/class/deprecatedFlag/innerClass.kt +++ b/compiler/testData/writeFlags/class/deprecatedFlag/innerClass.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class MyClass() { @Deprecated("") public class MyInnerClass() {} } diff --git a/compiler/testData/writeFlags/class/deprecatedFlag/trait.kt b/compiler/testData/writeFlags/class/deprecatedFlag/trait.kt index 1597987c24b..6f267bad21d 100644 --- a/compiler/testData/writeFlags/class/deprecatedFlag/trait.kt +++ b/compiler/testData/writeFlags/class/deprecatedFlag/trait.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR @Deprecated("") public interface MyTrait { } diff --git a/compiler/testData/writeFlags/class/visibility/internal/enum.kt b/compiler/testData/writeFlags/class/visibility/internal/enum.kt index fe2786b49c7..2808bb49f9f 100644 --- a/compiler/testData/writeFlags/class/visibility/internal/enum.kt +++ b/compiler/testData/writeFlags/class/visibility/internal/enum.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR enum class MyClass() { } diff --git a/compiler/testData/writeFlags/class/visibility/internal/innerEnum.kt b/compiler/testData/writeFlags/class/visibility/internal/innerEnum.kt index a4286f152bf..6886801fafa 100644 --- a/compiler/testData/writeFlags/class/visibility/internal/innerEnum.kt +++ b/compiler/testData/writeFlags/class/visibility/internal/innerEnum.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class Foo { enum class MyClass() { } diff --git a/compiler/testData/writeFlags/class/visibility/private/enum.kt b/compiler/testData/writeFlags/class/visibility/private/enum.kt index f828907646d..257e77a641e 100644 --- a/compiler/testData/writeFlags/class/visibility/private/enum.kt +++ b/compiler/testData/writeFlags/class/visibility/private/enum.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR private enum class MyClass() { } diff --git a/compiler/testData/writeFlags/class/visibility/private/innerEnum.kt b/compiler/testData/writeFlags/class/visibility/private/innerEnum.kt index 9e741f1e400..fd12278adbd 100644 --- a/compiler/testData/writeFlags/class/visibility/private/innerEnum.kt +++ b/compiler/testData/writeFlags/class/visibility/private/innerEnum.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // NO_FLAGS because we put enum in companion object of foo. When it will be fixed - MyClass should have ACC_PRIVATE flag class Foo { diff --git a/compiler/testData/writeFlags/class/visibility/public/enum.kt b/compiler/testData/writeFlags/class/visibility/public/enum.kt index 5bcda7fb324..0fceb556199 100644 --- a/compiler/testData/writeFlags/class/visibility/public/enum.kt +++ b/compiler/testData/writeFlags/class/visibility/public/enum.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR public enum class MyClass() { } diff --git a/compiler/testData/writeFlags/class/visibility/public/innerEnum.kt b/compiler/testData/writeFlags/class/visibility/public/innerEnum.kt index cee3b737e99..03f0df0a022 100644 --- a/compiler/testData/writeFlags/class/visibility/public/innerEnum.kt +++ b/compiler/testData/writeFlags/class/visibility/public/innerEnum.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class Foo { public enum class MyClass() { } diff --git a/compiler/testData/writeFlags/function/constructors/enum.kt b/compiler/testData/writeFlags/function/constructors/enum.kt index 235310cd3dd..9d61d4c5834 100644 --- a/compiler/testData/writeFlags/function/constructors/enum.kt +++ b/compiler/testData/writeFlags/function/constructors/enum.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR enum class Foo { A, B, C } diff --git a/compiler/testData/writeFlags/function/constructors/objectLiteral.kt b/compiler/testData/writeFlags/function/constructors/objectLiteral.kt index 57ccd6b8d9d..b0ad0757cd5 100644 --- a/compiler/testData/writeFlags/function/constructors/objectLiteral.kt +++ b/compiler/testData/writeFlags/function/constructors/objectLiteral.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class Foo { fun a() { val s = object { } diff --git a/compiler/testData/writeFlags/function/deprecatedFlag/getterAnnotationOnProperty.kt b/compiler/testData/writeFlags/function/deprecatedFlag/getterAnnotationOnProperty.kt index dd121d16303..c71663f525b 100644 --- a/compiler/testData/writeFlags/function/deprecatedFlag/getterAnnotationOnProperty.kt +++ b/compiler/testData/writeFlags/function/deprecatedFlag/getterAnnotationOnProperty.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class MyClass() { @Deprecated("") val test = "" } diff --git a/compiler/testData/writeFlags/function/deprecatedFlag/setterAnnotationOnProperty.kt b/compiler/testData/writeFlags/function/deprecatedFlag/setterAnnotationOnProperty.kt index f581aa17ed9..d91bc8b989c 100644 --- a/compiler/testData/writeFlags/function/deprecatedFlag/setterAnnotationOnProperty.kt +++ b/compiler/testData/writeFlags/function/deprecatedFlag/setterAnnotationOnProperty.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class MyClass() { @Deprecated("") var test = "" } diff --git a/compiler/testData/writeFlags/function/withDefaultArguments/funInClass.kt b/compiler/testData/writeFlags/function/withDefaultArguments/funInClass.kt index df31e2d9afa..a63a5acc3b7 100644 --- a/compiler/testData/writeFlags/function/withDefaultArguments/funInClass.kt +++ b/compiler/testData/writeFlags/function/withDefaultArguments/funInClass.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class MyClass() { fun test(s: String = "") {} } diff --git a/compiler/testData/writeFlags/function/withDefaultArguments/funInClassObject.kt b/compiler/testData/writeFlags/function/withDefaultArguments/funInClassObject.kt index 57b80e3fb37..7465ddaa141 100644 --- a/compiler/testData/writeFlags/function/withDefaultArguments/funInClassObject.kt +++ b/compiler/testData/writeFlags/function/withDefaultArguments/funInClassObject.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class MyClass() { companion object { fun test(s: String, x:Int = 10) {} diff --git a/compiler/testData/writeFlags/function/withDefaultArguments/inlineOnlyFunInClass.kt b/compiler/testData/writeFlags/function/withDefaultArguments/inlineOnlyFunInClass.kt index 5a7d777311f..fbca2ef0456 100644 --- a/compiler/testData/writeFlags/function/withDefaultArguments/inlineOnlyFunInClass.kt +++ b/compiler/testData/writeFlags/function/withDefaultArguments/inlineOnlyFunInClass.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class MyClass() { @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") @kotlin.internal.InlineOnly diff --git a/compiler/testData/writeFlags/function/withDefaultArguments/reifiedFunInClass.kt b/compiler/testData/writeFlags/function/withDefaultArguments/reifiedFunInClass.kt index 4439b2d2a40..74a18e8f7ad 100644 --- a/compiler/testData/writeFlags/function/withDefaultArguments/reifiedFunInClass.kt +++ b/compiler/testData/writeFlags/function/withDefaultArguments/reifiedFunInClass.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class MyClass() { inline fun test(s: String = "") {} } diff --git a/compiler/testData/writeFlags/function/withDefaultArguments/topLevelFun.kt b/compiler/testData/writeFlags/function/withDefaultArguments/topLevelFun.kt index 6385ae7fc34..7cee9ef42d1 100644 --- a/compiler/testData/writeFlags/function/withDefaultArguments/topLevelFun.kt +++ b/compiler/testData/writeFlags/function/withDefaultArguments/topLevelFun.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR fun test(s: String = "") {} // TESTED_OBJECT_KIND: function diff --git a/compiler/testData/writeFlags/hidden/function.kt b/compiler/testData/writeFlags/hidden/function.kt index 1a5e697d8f1..632492e8f9d 100644 --- a/compiler/testData/writeFlags/hidden/function.kt +++ b/compiler/testData/writeFlags/hidden/function.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class MyClass() { @Deprecated("hidden", level = DeprecationLevel.HIDDEN) fun test() {} diff --git a/compiler/testData/writeFlags/hidden/propertyGetter.kt b/compiler/testData/writeFlags/hidden/propertyGetter.kt index ee1f82749e4..1dfddc37f5d 100644 --- a/compiler/testData/writeFlags/hidden/propertyGetter.kt +++ b/compiler/testData/writeFlags/hidden/propertyGetter.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class MyClass() { @Deprecated("hidden", level = DeprecationLevel.HIDDEN) var test: Int diff --git a/compiler/testData/writeFlags/hidden/propertySetter.kt b/compiler/testData/writeFlags/hidden/propertySetter.kt index bc046e313ca..7774d135110 100644 --- a/compiler/testData/writeFlags/hidden/propertySetter.kt +++ b/compiler/testData/writeFlags/hidden/propertySetter.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class MyClass() { @Deprecated("hidden", level = DeprecationLevel.HIDDEN) var test: Int diff --git a/compiler/testData/writeFlags/inline/lostInnerClass.kt b/compiler/testData/writeFlags/inline/lostInnerClass.kt index addf27a7ef3..46f2b639367 100644 --- a/compiler/testData/writeFlags/inline/lostInnerClass.kt +++ b/compiler/testData/writeFlags/inline/lostInnerClass.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class Introspector { inner class SchemaRetriever(val transaction: String) { inline fun inSchema(crossinline modifier: (String) -> Unit) = diff --git a/compiler/testData/writeFlags/inline/lostInnerClass2.kt b/compiler/testData/writeFlags/inline/lostInnerClass2.kt index 886ad9e7fd4..70bf06dc03d 100644 --- a/compiler/testData/writeFlags/inline/lostInnerClass2.kt +++ b/compiler/testData/writeFlags/inline/lostInnerClass2.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface Introspector { class SchemaRetriever(val transaction: String) { diff --git a/compiler/testData/writeFlags/inline/lostInnerClass3.kt b/compiler/testData/writeFlags/inline/lostInnerClass3.kt index d3909a59c2d..a2c98cbb75c 100644 --- a/compiler/testData/writeFlags/inline/lostInnerClass3.kt +++ b/compiler/testData/writeFlags/inline/lostInnerClass3.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface Introspector { fun test() { class SchemaRetriever(val transaction: String) { diff --git a/compiler/testData/writeFlags/jvm8/defaults/compatibility/propertyAccessors.kt b/compiler/testData/writeFlags/jvm8/defaults/compatibility/propertyAccessors.kt index 5ea84a5c4e3..a35efca57a7 100644 --- a/compiler/testData/writeFlags/jvm8/defaults/compatibility/propertyAccessors.kt +++ b/compiler/testData/writeFlags/jvm8/defaults/compatibility/propertyAccessors.kt @@ -1,4 +1,5 @@ // !JVM_DEFAULT_MODE: compatibility +// IGNORE_BACKEND: JVM_IR // JVM_TARGET: 1.8 // WITH_RUNTIME diff --git a/compiler/testData/writeFlags/jvm8/defaults/compatibility/propertyAnnotation.kt b/compiler/testData/writeFlags/jvm8/defaults/compatibility/propertyAnnotation.kt index b68c9469831..f44eaa920b0 100644 --- a/compiler/testData/writeFlags/jvm8/defaults/compatibility/propertyAnnotation.kt +++ b/compiler/testData/writeFlags/jvm8/defaults/compatibility/propertyAnnotation.kt @@ -1,4 +1,5 @@ // !JVM_DEFAULT_MODE: compatibility +// IGNORE_BACKEND: JVM_IR // JVM_TARGET: 1.8 // WITH_RUNTIME diff --git a/compiler/testData/writeFlags/jvm8/defaults/defaultMethod.kt b/compiler/testData/writeFlags/jvm8/defaults/defaultMethod.kt index 0552a70ca80..bed85333f57 100644 --- a/compiler/testData/writeFlags/jvm8/defaults/defaultMethod.kt +++ b/compiler/testData/writeFlags/jvm8/defaults/defaultMethod.kt @@ -1,4 +1,5 @@ // !JVM_DEFAULT_MODE: enable +// IGNORE_BACKEND: JVM_IR // JVM_TARGET: 1.8 // WITH_RUNTIME diff --git a/compiler/testData/writeFlags/jvm8/defaults/defaultProperty.kt b/compiler/testData/writeFlags/jvm8/defaults/defaultProperty.kt index 7363d499b23..69727a7b24a 100644 --- a/compiler/testData/writeFlags/jvm8/defaults/defaultProperty.kt +++ b/compiler/testData/writeFlags/jvm8/defaults/defaultProperty.kt @@ -1,4 +1,5 @@ // !JVM_DEFAULT_MODE: enable +// IGNORE_BACKEND: JVM_IR // JVM_TARGET: 1.8 // WITH_RUNTIME diff --git a/compiler/testData/writeFlags/jvm8/defaults/propertyAnnotation.kt b/compiler/testData/writeFlags/jvm8/defaults/propertyAnnotation.kt index 95ffcfba561..c86aa948308 100644 --- a/compiler/testData/writeFlags/jvm8/defaults/propertyAnnotation.kt +++ b/compiler/testData/writeFlags/jvm8/defaults/propertyAnnotation.kt @@ -1,4 +1,5 @@ // !JVM_DEFAULT_MODE: enable +// IGNORE_BACKEND: JVM_IR // JVM_TARGET: 1.8 // WITH_RUNTIME diff --git a/compiler/testData/writeFlags/lambda/lambdaInInlineFunction.kt b/compiler/testData/writeFlags/lambda/lambdaInInlineFunction.kt index 456b219aa0b..4f4645e11ff 100644 --- a/compiler/testData/writeFlags/lambda/lambdaInInlineFunction.kt +++ b/compiler/testData/writeFlags/lambda/lambdaInInlineFunction.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class Foo { inline fun foo() = { } } diff --git a/compiler/testData/writeFlags/lambda/simpleLambda.kt b/compiler/testData/writeFlags/lambda/simpleLambda.kt index eea052bd0b9..cc5b150a86e 100644 --- a/compiler/testData/writeFlags/lambda/simpleLambda.kt +++ b/compiler/testData/writeFlags/lambda/simpleLambda.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class Foo { fun foo() = { } } diff --git a/compiler/testData/writeFlags/lateinit/lateinitProperty.kt b/compiler/testData/writeFlags/lateinit/lateinitProperty.kt index 11a00b4b81d..6d9cfdfe94d 100644 --- a/compiler/testData/writeFlags/lateinit/lateinitProperty.kt +++ b/compiler/testData/writeFlags/lateinit/lateinitProperty.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class My { lateinit var s: String private set diff --git a/compiler/testData/writeFlags/property/classObject/class/internalVar.kt b/compiler/testData/writeFlags/property/classObject/class/internalVar.kt index a514b0db9e3..679381db6b2 100644 --- a/compiler/testData/writeFlags/property/classObject/class/internalVar.kt +++ b/compiler/testData/writeFlags/property/classObject/class/internalVar.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class Test { companion object { var prop: Int = 0; diff --git a/compiler/testData/writeFlags/property/classObject/class/internalVarPrivateSet.kt b/compiler/testData/writeFlags/property/classObject/class/internalVarPrivateSet.kt index 5eb2e7e2702..9567595ad3c 100644 --- a/compiler/testData/writeFlags/property/classObject/class/internalVarPrivateSet.kt +++ b/compiler/testData/writeFlags/property/classObject/class/internalVarPrivateSet.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class Test { companion object { var prop: Int = 0 diff --git a/compiler/testData/writeFlags/property/classObject/class/protectedVarPrivateSet.kt b/compiler/testData/writeFlags/property/classObject/class/protectedVarPrivateSet.kt index bab2cc582d1..433ba5780d9 100644 --- a/compiler/testData/writeFlags/property/classObject/class/protectedVarPrivateSet.kt +++ b/compiler/testData/writeFlags/property/classObject/class/protectedVarPrivateSet.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class Test { companion object { protected var prop: Int = 0 diff --git a/compiler/testData/writeFlags/property/classObject/class/publicValNonDefault.kt b/compiler/testData/writeFlags/property/classObject/class/publicValNonDefault.kt index a80356683c0..751d48e7ab0 100644 --- a/compiler/testData/writeFlags/property/classObject/class/publicValNonDefault.kt +++ b/compiler/testData/writeFlags/property/classObject/class/publicValNonDefault.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class Test { companion object { public val prop: Int = 0 diff --git a/compiler/testData/writeFlags/property/classObject/class/publicVar.kt b/compiler/testData/writeFlags/property/classObject/class/publicVar.kt index 83fac291ee4..ea5fb4798e2 100644 --- a/compiler/testData/writeFlags/property/classObject/class/publicVar.kt +++ b/compiler/testData/writeFlags/property/classObject/class/publicVar.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class Test { companion object { public var prop: Int = 0; diff --git a/compiler/testData/writeFlags/property/classObject/class/publicVarNonDefault.kt b/compiler/testData/writeFlags/property/classObject/class/publicVarNonDefault.kt index d24eea7a620..2b20a6f99ba 100644 --- a/compiler/testData/writeFlags/property/classObject/class/publicVarNonDefault.kt +++ b/compiler/testData/writeFlags/property/classObject/class/publicVarNonDefault.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class Test { companion object { public var prop: Int = 0 diff --git a/compiler/testData/writeFlags/property/classObject/class/publicVarPrivateSet.kt b/compiler/testData/writeFlags/property/classObject/class/publicVarPrivateSet.kt index 4e4da195e44..dc585cc65e6 100644 --- a/compiler/testData/writeFlags/property/classObject/class/publicVarPrivateSet.kt +++ b/compiler/testData/writeFlags/property/classObject/class/publicVarPrivateSet.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class Test { companion object { public var prop: Int = 0 diff --git a/compiler/testData/writeFlags/property/classObject/class/publicVarProtectedSet.kt b/compiler/testData/writeFlags/property/classObject/class/publicVarProtectedSet.kt index 02434006d7f..0e694b25157 100644 --- a/compiler/testData/writeFlags/property/classObject/class/publicVarProtectedSet.kt +++ b/compiler/testData/writeFlags/property/classObject/class/publicVarProtectedSet.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class Test { companion object { public var prop: Int = 0 diff --git a/compiler/testData/writeFlags/property/classObject/class/publicVarPublicSet.kt b/compiler/testData/writeFlags/property/classObject/class/publicVarPublicSet.kt index e10ae4251cb..4f508b56f72 100644 --- a/compiler/testData/writeFlags/property/classObject/class/publicVarPublicSet.kt +++ b/compiler/testData/writeFlags/property/classObject/class/publicVarPublicSet.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class Test { companion object { public var prop: Int = 0 diff --git a/compiler/testData/writeFlags/property/classObject/rename/constructorAndClassObject.kt b/compiler/testData/writeFlags/property/classObject/rename/constructorAndClassObject.kt index 4198a24aa82..2ed92b841ae 100644 --- a/compiler/testData/writeFlags/property/classObject/rename/constructorAndClassObject.kt +++ b/compiler/testData/writeFlags/property/classObject/rename/constructorAndClassObject.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class Test(val prop: String) { companion object { diff --git a/compiler/testData/writeFlags/property/classObject/rename/delegatedAndDelegated.kt b/compiler/testData/writeFlags/property/classObject/rename/delegatedAndDelegated.kt index c4bd477fa31..fe9144a45dd 100644 --- a/compiler/testData/writeFlags/property/classObject/rename/delegatedAndDelegated.kt +++ b/compiler/testData/writeFlags/property/classObject/rename/delegatedAndDelegated.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR import kotlin.reflect.KProperty public open class TestDelegate(private val initializer: () -> T) { diff --git a/compiler/testData/writeFlags/property/classObject/rename/delegatedAndProperty.kt b/compiler/testData/writeFlags/property/classObject/rename/delegatedAndProperty.kt index 6a641ff54a9..8c3ee6c1e8a 100644 --- a/compiler/testData/writeFlags/property/classObject/rename/delegatedAndProperty.kt +++ b/compiler/testData/writeFlags/property/classObject/rename/delegatedAndProperty.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR import kotlin.reflect.KProperty public open class TestDelegate(private val initializer: () -> T) { diff --git a/compiler/testData/writeFlags/property/classObject/rename/propertyAndProperty.kt b/compiler/testData/writeFlags/property/classObject/rename/propertyAndProperty.kt index b39996d6753..ebe75c31d87 100644 --- a/compiler/testData/writeFlags/property/classObject/rename/propertyAndProperty.kt +++ b/compiler/testData/writeFlags/property/classObject/rename/propertyAndProperty.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class Test { public var prop: Int = 0; diff --git a/compiler/testData/writeFlags/property/classObject/trait/delegatedProtectedVar.kt b/compiler/testData/writeFlags/property/classObject/trait/delegatedProtectedVar.kt index 3cbf9bf1bc4..239c013d0e3 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/delegatedProtectedVar.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/delegatedProtectedVar.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR import kotlin.reflect.KProperty class TestDelegate() { diff --git a/compiler/testData/writeFlags/property/classObject/trait/delegatedPublicVal.kt b/compiler/testData/writeFlags/property/classObject/trait/delegatedPublicVal.kt index 667b1f67ed5..cac17d939f4 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/delegatedPublicVal.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/delegatedPublicVal.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR import kotlin.reflect.KProperty class TestDelegate() { diff --git a/compiler/testData/writeFlags/property/classObject/trait/internalConstVal.kt b/compiler/testData/writeFlags/property/classObject/trait/internalConstVal.kt index 147ae2ce4f9..e21bc2b4640 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/internalConstVal.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/internalConstVal.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface Test { companion object { internal const val prop: Int = 0; diff --git a/compiler/testData/writeFlags/property/classObject/trait/internalVal.kt b/compiler/testData/writeFlags/property/classObject/trait/internalVal.kt index 9d1fc3de087..6fc089afbd6 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/internalVal.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/internalVal.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface Test { companion object { internal val prop: Int = 0; diff --git a/compiler/testData/writeFlags/property/classObject/trait/internalVar.kt b/compiler/testData/writeFlags/property/classObject/trait/internalVar.kt index 61589802929..ad44e055626 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/internalVar.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/internalVar.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface Test { companion object { internal var prop: Int = 0; diff --git a/compiler/testData/writeFlags/property/classObject/trait/internalVarPrivateSet.kt b/compiler/testData/writeFlags/property/classObject/trait/internalVarPrivateSet.kt index 4f16053d69a..e13fe2c65b7 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/internalVarPrivateSet.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/internalVarPrivateSet.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface Test { companion object { internal var prop: Int = 0 diff --git a/compiler/testData/writeFlags/property/classObject/trait/privateVal.kt b/compiler/testData/writeFlags/property/classObject/trait/privateVal.kt index 99c63881837..a59bdece66c 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/privateVal.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/privateVal.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface Test { companion object { private val prop = 0; diff --git a/compiler/testData/writeFlags/property/classObject/trait/privateVar.kt b/compiler/testData/writeFlags/property/classObject/trait/privateVar.kt index 6939583cad7..4a6b1744b91 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/privateVar.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/privateVar.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface Test { companion object { private var prop = 0; diff --git a/compiler/testData/writeFlags/property/classObject/trait/protectedConstVal.kt b/compiler/testData/writeFlags/property/classObject/trait/protectedConstVal.kt index 43abe383c46..d59f6babfb2 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/protectedConstVal.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/protectedConstVal.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface Test { companion object { protected const val prop: Int = 0 diff --git a/compiler/testData/writeFlags/property/classObject/trait/protectedVal.kt b/compiler/testData/writeFlags/property/classObject/trait/protectedVal.kt index 5187c7818df..0b1992c3656 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/protectedVal.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/protectedVal.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface Test { companion object { protected val prop: Int = 0 diff --git a/compiler/testData/writeFlags/property/classObject/trait/protectedVarPrivateSet.kt b/compiler/testData/writeFlags/property/classObject/trait/protectedVarPrivateSet.kt index 3741b313b45..18c232aa841 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/protectedVarPrivateSet.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/protectedVarPrivateSet.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface Test { companion object { protected var prop: Int = 0 diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicConstVal.kt b/compiler/testData/writeFlags/property/classObject/trait/publicConstVal.kt index 8ec4a97d406..4a39e67a65d 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicConstVal.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicConstVal.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface Test { companion object { public const val prop: Int = 0; diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicVal.kt b/compiler/testData/writeFlags/property/classObject/trait/publicVal.kt index f87cadd1322..17644f139f9 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicVal.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicVal.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface Test { companion object { public val prop: Int = 0; diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicValNonDefault.kt b/compiler/testData/writeFlags/property/classObject/trait/publicValNonDefault.kt index c785d044a62..bec0210e96d 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicValNonDefault.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicValNonDefault.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface Test { companion object { public val prop: Int = 0 diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicVar.kt b/compiler/testData/writeFlags/property/classObject/trait/publicVar.kt index 1e024c71530..337ccb183fd 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicVar.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicVar.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface Test { companion object { public var prop: Int = 0 diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicVarNonDefault.kt b/compiler/testData/writeFlags/property/classObject/trait/publicVarNonDefault.kt index 68be7cdffc0..0a922adcd08 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicVarNonDefault.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicVarNonDefault.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface Test { companion object { public var prop: Int = 0 diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicVarPrivateSet.kt b/compiler/testData/writeFlags/property/classObject/trait/publicVarPrivateSet.kt index a880caa6076..a5789de060f 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicVarPrivateSet.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicVarPrivateSet.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface Test { companion object { public var prop: Int = 0 diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicVarProtectedSet.kt b/compiler/testData/writeFlags/property/classObject/trait/publicVarProtectedSet.kt index 327755430c6..b8d4d43d11d 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicVarProtectedSet.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicVarProtectedSet.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface Test { companion object { public var prop: Int = 0 diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicVarPublicSet.kt b/compiler/testData/writeFlags/property/classObject/trait/publicVarPublicSet.kt index a362660a830..e338e606961 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicVarPublicSet.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicVarPublicSet.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface Test { companion object { public var prop: Int = 0 diff --git a/compiler/testData/writeFlags/property/deprecatedFlag/propertyInClass.kt b/compiler/testData/writeFlags/property/deprecatedFlag/propertyInClass.kt index 6dfe3e5d207..2514d6fd48a 100644 --- a/compiler/testData/writeFlags/property/deprecatedFlag/propertyInClass.kt +++ b/compiler/testData/writeFlags/property/deprecatedFlag/propertyInClass.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class MyClass() { @Deprecated("") public val test: Int = 0 } diff --git a/compiler/testData/writeFlags/property/deprecatedFlag/topLevelProperty.kt b/compiler/testData/writeFlags/property/deprecatedFlag/topLevelProperty.kt index e2115d0fd22..994ea2edf04 100644 --- a/compiler/testData/writeFlags/property/deprecatedFlag/topLevelProperty.kt +++ b/compiler/testData/writeFlags/property/deprecatedFlag/topLevelProperty.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR @Deprecated("") val test: Int = 0 // TESTED_OBJECT_KIND: property diff --git a/compiler/testData/writeFlags/property/syntheticAnnotationsMethod/privateProperty.kt b/compiler/testData/writeFlags/property/syntheticAnnotationsMethod/privateProperty.kt index 1fe78842019..5e44f85cde5 100644 --- a/compiler/testData/writeFlags/property/syntheticAnnotationsMethod/privateProperty.kt +++ b/compiler/testData/writeFlags/property/syntheticAnnotationsMethod/privateProperty.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class Foo { annotation class Anno diff --git a/compiler/testData/writeFlags/property/syntheticAnnotationsMethod/protectedProperty.kt b/compiler/testData/writeFlags/property/syntheticAnnotationsMethod/protectedProperty.kt index f27e76f4695..6f8f6a73322 100644 --- a/compiler/testData/writeFlags/property/syntheticAnnotationsMethod/protectedProperty.kt +++ b/compiler/testData/writeFlags/property/syntheticAnnotationsMethod/protectedProperty.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR open class Foo { annotation class Anno diff --git a/compiler/testData/writeFlags/property/syntheticAnnotationsMethod/publicProperty.kt b/compiler/testData/writeFlags/property/syntheticAnnotationsMethod/publicProperty.kt index 27b13f60013..441ae56f9ac 100644 --- a/compiler/testData/writeFlags/property/syntheticAnnotationsMethod/publicProperty.kt +++ b/compiler/testData/writeFlags/property/syntheticAnnotationsMethod/publicProperty.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class Foo { annotation class Anno diff --git a/compiler/testData/writeFlags/typealias/syntheticAnnotationsMethod/privateTypealias.kt b/compiler/testData/writeFlags/typealias/syntheticAnnotationsMethod/privateTypealias.kt index 7bb3b0f1d43..e2fda3f051e 100644 --- a/compiler/testData/writeFlags/typealias/syntheticAnnotationsMethod/privateTypealias.kt +++ b/compiler/testData/writeFlags/typealias/syntheticAnnotationsMethod/privateTypealias.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR @Target(AnnotationTarget.TYPEALIAS) annotation class Anno diff --git a/compiler/testData/writeFlags/typealias/syntheticAnnotationsMethod/publicTypealias.kt b/compiler/testData/writeFlags/typealias/syntheticAnnotationsMethod/publicTypealias.kt index ea8d960a48f..71b36393893 100644 --- a/compiler/testData/writeFlags/typealias/syntheticAnnotationsMethod/publicTypealias.kt +++ b/compiler/testData/writeFlags/typealias/syntheticAnnotationsMethod/publicTypealias.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR @Target(AnnotationTarget.TYPEALIAS) annotation class Anno diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractIrWriteFlagsTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractIrWriteFlagsTest.kt new file mode 100644 index 00000000000..030bbbb0ade --- /dev/null +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractIrWriteFlagsTest.kt @@ -0,0 +1,17 @@ +/* + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.codegen.ir + +import org.jetbrains.kotlin.codegen.flags.AbstractWriteFlagsTest +import org.jetbrains.kotlin.config.CompilerConfiguration +import org.jetbrains.kotlin.config.JVMConfigurationKeys +import org.jetbrains.kotlin.test.TargetBackend + +abstract class AbstractIrWriteFlagsTest : AbstractWriteFlagsTest() { + override fun updateConfiguration(configuration: CompilerConfiguration) { + configuration.put(JVMConfigurationKeys.IR, true) + } +} diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/flags/WriteFlagsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/flags/WriteFlagsTestGenerated.java index d5f78b68b10..cf99f31c1a7 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/flags/WriteFlagsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/flags/WriteFlagsTestGenerated.java @@ -22,11 +22,11 @@ import java.util.regex.Pattern; @RunWith(JUnit3RunnerWithInners.class) public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInWriteFlags() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("compiler/testData/writeFlags/callableReference") @@ -34,11 +34,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInCallableReference() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("compiler/testData/writeFlags/callableReference/visibility") @@ -46,11 +46,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Visibility extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInVisibility() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/callableReference/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/callableReference/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("functionReference.kt") @@ -80,11 +80,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Class extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInClass() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("compiler/testData/writeFlags/class/accessFlags") @@ -92,11 +92,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class AccessFlags extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInAccessFlags() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/accessFlags"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/accessFlags"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("defaultImpls.kt") @@ -150,11 +150,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class DeprecatedFlag extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInDeprecatedFlag() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/deprecatedFlag"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/deprecatedFlag"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("class.kt") @@ -188,11 +188,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Visibility extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInVisibility() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("compiler/testData/writeFlags/class/visibility/internal") @@ -200,11 +200,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Internal extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInInternal() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility/internal"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility/internal"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("class.kt") @@ -253,11 +253,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Packageprivate extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInPackageprivate() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility/packageprivate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility/packageprivate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("enumEntry.kt") @@ -271,11 +271,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Private extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInPrivate() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility/private"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility/private"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("class.kt") @@ -324,11 +324,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Public extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInPublic() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility/public"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility/public"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("class.kt") @@ -379,11 +379,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class DelegatedProperty extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInDelegatedProperty() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/delegatedProperty"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/delegatedProperty"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("compiler/testData/writeFlags/delegatedProperty/visibility") @@ -391,11 +391,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Visibility extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInVisibility() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/delegatedProperty/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/delegatedProperty/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("privateSet.kt") @@ -410,11 +410,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInFunction() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("compiler/testData/writeFlags/function/classObjectPrivate") @@ -422,11 +422,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class ClassObjectPrivate extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInClassObjectPrivate() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/classObjectPrivate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/classObjectPrivate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("privateFun.kt") @@ -450,11 +450,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Constructors extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInConstructors() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/constructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/constructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("classObject.kt") @@ -488,11 +488,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class DeprecatedFlag extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInDeprecatedFlag() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/deprecatedFlag"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/deprecatedFlag"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("emptyGetter.kt") @@ -561,11 +561,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class WithDefaultArguments extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInWithDefaultArguments() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/withDefaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/withDefaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("funInClass.kt") @@ -600,11 +600,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Hidden extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInHidden() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/hidden"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/hidden"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("function.kt") @@ -628,11 +628,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInInline() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("lostInnerClass.kt") @@ -656,11 +656,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class InnerClass extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInInnerClass() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/innerClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/innerClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("compiler/testData/writeFlags/innerClass/visibility") @@ -668,11 +668,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Visibility extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInVisibility() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/innerClass/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/innerClass/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("internal.kt") @@ -712,11 +712,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Jvm8 extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInJvm8() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/jvm8"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/jvm8"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("interfaceMethod.kt") @@ -734,11 +734,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Defaults extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInDefaults() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("defaultMethod.kt") @@ -761,11 +761,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Compatibility extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInCompatibility() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/jvm8/defaults/compatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/jvm8/defaults/compatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("propertyAccessors.kt") @@ -786,11 +786,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Lambda extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInLambda() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/lambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/lambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("lambdaInInlineFunction.kt") @@ -809,11 +809,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Lateinit extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInLateinit() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/lateinit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/lateinit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("lateinitGetter.kt") @@ -837,11 +837,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInProperty() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("compiler/testData/writeFlags/property/classObject") @@ -849,11 +849,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class ClassObject extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInClassObject() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("compiler/testData/writeFlags/property/classObject/class") @@ -861,11 +861,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Class extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInClass() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject/class"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject/class"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("delegatedProtectedVar.kt") @@ -959,11 +959,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Rename extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInRename() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject/rename"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject/rename"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constructorAndClassObject.kt") @@ -992,11 +992,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Trait extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInTrait() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject/trait"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject/trait"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("delegatedProtectedVar.kt") @@ -1106,11 +1106,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class DeprecatedFlag extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInDeprecatedFlag() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/deprecatedFlag"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/deprecatedFlag"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("propertyInClass.kt") @@ -1129,11 +1129,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class SyntheticAnnotationsMethod extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInSyntheticAnnotationsMethod() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/syntheticAnnotationsMethod"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/syntheticAnnotationsMethod"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("privateProperty.kt") @@ -1157,11 +1157,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Visibility extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInVisibility() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("internal.kt") @@ -1186,11 +1186,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class Typealias extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInTypealias() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/typealias"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/typealias"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("compiler/testData/writeFlags/typealias/syntheticAnnotationsMethod") @@ -1198,11 +1198,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @RunWith(JUnit3RunnerWithInners.class) public static class SyntheticAnnotationsMethod extends AbstractWriteFlagsTest { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInSyntheticAnnotationsMethod() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/typealias/syntheticAnnotationsMethod"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/typealias/syntheticAnnotationsMethod"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("privateTypealias.kt") diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrWriteFlagsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrWriteFlagsTestGenerated.java new file mode 100644 index 00000000000..589cd6533a6 --- /dev/null +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrWriteFlagsTestGenerated.java @@ -0,0 +1,1219 @@ +/* + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.codegen.ir; + +import com.intellij.testFramework.TestDataPath; +import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; +import org.jetbrains.kotlin.test.KotlinTestUtils; +import org.jetbrains.kotlin.test.TargetBackend; +import org.jetbrains.kotlin.test.TestMetadata; +import org.junit.runner.RunWith; + +import java.io.File; +import java.util.regex.Pattern; + +/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ +@SuppressWarnings("all") +@TestMetadata("compiler/testData/writeFlags") +@TestDataPath("$PROJECT_ROOT") +@RunWith(JUnit3RunnerWithInners.class) +public class IrWriteFlagsTestGenerated extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInWriteFlags() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("compiler/testData/writeFlags/callableReference") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CallableReference extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInCallableReference() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("compiler/testData/writeFlags/callableReference/visibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Visibility extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInVisibility() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/callableReference/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("functionReference.kt") + public void testFunctionReference() throws Exception { + runTest("compiler/testData/writeFlags/callableReference/visibility/functionReference.kt"); + } + + @TestMetadata("functionReferenceInInlineFunction.kt") + public void testFunctionReferenceInInlineFunction() throws Exception { + runTest("compiler/testData/writeFlags/callableReference/visibility/functionReferenceInInlineFunction.kt"); + } + + @TestMetadata("propertyReference.kt") + public void testPropertyReference() throws Exception { + runTest("compiler/testData/writeFlags/callableReference/visibility/propertyReference.kt"); + } + + @TestMetadata("propertyReferenceInInlineFunction.kt") + public void testPropertyReferenceInInlineFunction() throws Exception { + runTest("compiler/testData/writeFlags/callableReference/visibility/propertyReferenceInInlineFunction.kt"); + } + } + } + + @TestMetadata("compiler/testData/writeFlags/class") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Class extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("compiler/testData/writeFlags/class/accessFlags") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AccessFlags extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInAccessFlags() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/accessFlags"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("defaultImpls.kt") + public void testDefaultImpls() throws Exception { + runTest("compiler/testData/writeFlags/class/accessFlags/defaultImpls.kt"); + } + + @TestMetadata("innerSealed.kt") + public void testInnerSealed() throws Exception { + runTest("compiler/testData/writeFlags/class/accessFlags/innerSealed.kt"); + } + + @TestMetadata("mappingWhen.kt") + public void testMappingWhen() throws Exception { + runTest("compiler/testData/writeFlags/class/accessFlags/mappingWhen.kt"); + } + + @TestMetadata("objectLiteral.kt") + public void testObjectLiteral() throws Exception { + runTest("compiler/testData/writeFlags/class/accessFlags/objectLiteral.kt"); + } + + @TestMetadata("publicFinalClass.kt") + public void testPublicFinalClass() throws Exception { + runTest("compiler/testData/writeFlags/class/accessFlags/publicFinalClass.kt"); + } + + @TestMetadata("publicFinalInnerClass.kt") + public void testPublicFinalInnerClass() throws Exception { + runTest("compiler/testData/writeFlags/class/accessFlags/publicFinalInnerClass.kt"); + } + + @TestMetadata("publicInnerInterface.kt") + public void testPublicInnerInterface() throws Exception { + runTest("compiler/testData/writeFlags/class/accessFlags/publicInnerInterface.kt"); + } + + @TestMetadata("publicInterface.kt") + public void testPublicInterface() throws Exception { + runTest("compiler/testData/writeFlags/class/accessFlags/publicInterface.kt"); + } + + @TestMetadata("simpleFilePackageFacade.kt") + public void testSimpleFilePackageFacade() throws Exception { + runTest("compiler/testData/writeFlags/class/accessFlags/simpleFilePackageFacade.kt"); + } + } + + @TestMetadata("compiler/testData/writeFlags/class/deprecatedFlag") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DeprecatedFlag extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInDeprecatedFlag() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/deprecatedFlag"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("class.kt") + public void testClass() throws Exception { + runTest("compiler/testData/writeFlags/class/deprecatedFlag/class.kt"); + } + + @TestMetadata("classObject.kt") + public void testClassObject() throws Exception { + runTest("compiler/testData/writeFlags/class/deprecatedFlag/classObject.kt"); + } + + @TestMetadata("enumClass.kt") + public void testEnumClass() throws Exception { + runTest("compiler/testData/writeFlags/class/deprecatedFlag/enumClass.kt"); + } + + @TestMetadata("innerClass.kt") + public void testInnerClass() throws Exception { + runTest("compiler/testData/writeFlags/class/deprecatedFlag/innerClass.kt"); + } + + @TestMetadata("trait.kt") + public void testTrait() throws Exception { + runTest("compiler/testData/writeFlags/class/deprecatedFlag/trait.kt"); + } + } + + @TestMetadata("compiler/testData/writeFlags/class/visibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Visibility extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInVisibility() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("compiler/testData/writeFlags/class/visibility/internal") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Internal extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInInternal() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility/internal"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("class.kt") + public void testClass() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/internal/class.kt"); + } + + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/internal/enum.kt"); + } + + @TestMetadata("innerClass.kt") + public void testInnerClass() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/internal/innerClass.kt"); + } + + @TestMetadata("innerEnum.kt") + public void testInnerEnum() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/internal/innerEnum.kt"); + } + + @TestMetadata("innerObject.kt") + public void testInnerObject() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/internal/innerObject.kt"); + } + + @TestMetadata("innerTrait.kt") + public void testInnerTrait() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/internal/innerTrait.kt"); + } + + @TestMetadata("object.kt") + public void testObject() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/internal/object.kt"); + } + + @TestMetadata("trait.kt") + public void testTrait() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/internal/trait.kt"); + } + } + + @TestMetadata("compiler/testData/writeFlags/class/visibility/packageprivate") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Packageprivate extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInPackageprivate() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility/packageprivate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("enumEntry.kt") + public void testEnumEntry() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/packageprivate/enumEntry.kt"); + } + } + + @TestMetadata("compiler/testData/writeFlags/class/visibility/private") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Private extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInPrivate() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility/private"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("class.kt") + public void testClass() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/private/class.kt"); + } + + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/private/enum.kt"); + } + + @TestMetadata("innerClass.kt") + public void testInnerClass() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/private/innerClass.kt"); + } + + @TestMetadata("innerEnum.kt") + public void testInnerEnum() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/private/innerEnum.kt"); + } + + @TestMetadata("innerObject.kt") + public void testInnerObject() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/private/innerObject.kt"); + } + + @TestMetadata("innerTrait.kt") + public void testInnerTrait() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/private/innerTrait.kt"); + } + + @TestMetadata("object.kt") + public void testObject() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/private/object.kt"); + } + + @TestMetadata("trait.kt") + public void testTrait() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/private/trait.kt"); + } + } + + @TestMetadata("compiler/testData/writeFlags/class/visibility/public") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Public extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInPublic() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility/public"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("class.kt") + public void testClass() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/public/class.kt"); + } + + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/public/enum.kt"); + } + + @TestMetadata("innerClass.kt") + public void testInnerClass() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/public/innerClass.kt"); + } + + @TestMetadata("innerEnum.kt") + public void testInnerEnum() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/public/innerEnum.kt"); + } + + @TestMetadata("innerObject.kt") + public void testInnerObject() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/public/innerObject.kt"); + } + + @TestMetadata("innerTrait.kt") + public void testInnerTrait() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/public/innerTrait.kt"); + } + + @TestMetadata("object.kt") + public void testObject() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/public/object.kt"); + } + + @TestMetadata("trait.kt") + public void testTrait() throws Exception { + runTest("compiler/testData/writeFlags/class/visibility/public/trait.kt"); + } + } + } + } + + @TestMetadata("compiler/testData/writeFlags/delegatedProperty") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegatedProperty extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInDelegatedProperty() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/delegatedProperty"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("compiler/testData/writeFlags/delegatedProperty/visibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Visibility extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInVisibility() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/delegatedProperty/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("privateSet.kt") + public void testPrivateSet() throws Exception { + runTest("compiler/testData/writeFlags/delegatedProperty/visibility/privateSet.kt"); + } + } + } + + @TestMetadata("compiler/testData/writeFlags/function") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Function extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInFunction() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("compiler/testData/writeFlags/function/classObjectPrivate") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassObjectPrivate extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInClassObjectPrivate() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/classObjectPrivate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("privateFun.kt") + public void testPrivateFun() throws Exception { + runTest("compiler/testData/writeFlags/function/classObjectPrivate/privateFun.kt"); + } + + @TestMetadata("privateVal.kt") + public void testPrivateVal() throws Exception { + runTest("compiler/testData/writeFlags/function/classObjectPrivate/privateVal.kt"); + } + + @TestMetadata("privateVar.kt") + public void testPrivateVar() throws Exception { + runTest("compiler/testData/writeFlags/function/classObjectPrivate/privateVar.kt"); + } + } + + @TestMetadata("compiler/testData/writeFlags/function/constructors") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Constructors extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInConstructors() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/constructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("classObject.kt") + public void testClassObject() throws Exception { + runTest("compiler/testData/writeFlags/function/constructors/classObject.kt"); + } + + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + runTest("compiler/testData/writeFlags/function/constructors/enum.kt"); + } + + @TestMetadata("objectInClass.kt") + public void testObjectInClass() throws Exception { + runTest("compiler/testData/writeFlags/function/constructors/objectInClass.kt"); + } + + @TestMetadata("objectLiteral.kt") + public void testObjectLiteral() throws Exception { + runTest("compiler/testData/writeFlags/function/constructors/objectLiteral.kt"); + } + + @TestMetadata("topLevelObject.kt") + public void testTopLevelObject() throws Exception { + runTest("compiler/testData/writeFlags/function/constructors/topLevelObject.kt"); + } + } + + @TestMetadata("compiler/testData/writeFlags/function/deprecatedFlag") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DeprecatedFlag extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInDeprecatedFlag() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/deprecatedFlag"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("emptyGetter.kt") + public void testEmptyGetter() throws Exception { + runTest("compiler/testData/writeFlags/function/deprecatedFlag/emptyGetter.kt"); + } + + @TestMetadata("emptySetter.kt") + public void testEmptySetter() throws Exception { + runTest("compiler/testData/writeFlags/function/deprecatedFlag/emptySetter.kt"); + } + + @TestMetadata("extentionFun.kt") + public void testExtentionFun() throws Exception { + runTest("compiler/testData/writeFlags/function/deprecatedFlag/extentionFun.kt"); + } + + @TestMetadata("funInClass.kt") + public void testFunInClass() throws Exception { + runTest("compiler/testData/writeFlags/function/deprecatedFlag/funInClass.kt"); + } + + @TestMetadata("funInClassObject.kt") + public void testFunInClassObject() throws Exception { + runTest("compiler/testData/writeFlags/function/deprecatedFlag/funInClassObject.kt"); + } + + @TestMetadata("getter.kt") + public void testGetter() throws Exception { + runTest("compiler/testData/writeFlags/function/deprecatedFlag/getter.kt"); + } + + @TestMetadata("getterAnnotationOnProperty.kt") + public void testGetterAnnotationOnProperty() throws Exception { + runTest("compiler/testData/writeFlags/function/deprecatedFlag/getterAnnotationOnProperty.kt"); + } + + @TestMetadata("getterForPropertyInConstructor.kt") + public void testGetterForPropertyInConstructor() throws Exception { + runTest("compiler/testData/writeFlags/function/deprecatedFlag/getterForPropertyInConstructor.kt"); + } + + @TestMetadata("setter.kt") + public void testSetter() throws Exception { + runTest("compiler/testData/writeFlags/function/deprecatedFlag/setter.kt"); + } + + @TestMetadata("setterAnnotationOnProperty.kt") + public void testSetterAnnotationOnProperty() throws Exception { + runTest("compiler/testData/writeFlags/function/deprecatedFlag/setterAnnotationOnProperty.kt"); + } + + @TestMetadata("setterForPropertyInConstructor.kt") + public void testSetterForPropertyInConstructor() throws Exception { + runTest("compiler/testData/writeFlags/function/deprecatedFlag/setterForPropertyInConstructor.kt"); + } + + @TestMetadata("topLevelFun.kt") + public void testTopLevelFun() throws Exception { + runTest("compiler/testData/writeFlags/function/deprecatedFlag/topLevelFun.kt"); + } + } + + @TestMetadata("compiler/testData/writeFlags/function/withDefaultArguments") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class WithDefaultArguments extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInWithDefaultArguments() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/withDefaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("funInClass.kt") + public void testFunInClass() throws Exception { + runTest("compiler/testData/writeFlags/function/withDefaultArguments/funInClass.kt"); + } + + @TestMetadata("funInClassObject.kt") + public void testFunInClassObject() throws Exception { + runTest("compiler/testData/writeFlags/function/withDefaultArguments/funInClassObject.kt"); + } + + @TestMetadata("inlineOnlyFunInClass.kt") + public void testInlineOnlyFunInClass() throws Exception { + runTest("compiler/testData/writeFlags/function/withDefaultArguments/inlineOnlyFunInClass.kt"); + } + + @TestMetadata("reifiedFunInClass.kt") + public void testReifiedFunInClass() throws Exception { + runTest("compiler/testData/writeFlags/function/withDefaultArguments/reifiedFunInClass.kt"); + } + + @TestMetadata("topLevelFun.kt") + public void testTopLevelFun() throws Exception { + runTest("compiler/testData/writeFlags/function/withDefaultArguments/topLevelFun.kt"); + } + } + } + + @TestMetadata("compiler/testData/writeFlags/hidden") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Hidden extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInHidden() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/hidden"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("function.kt") + public void testFunction() throws Exception { + runTest("compiler/testData/writeFlags/hidden/function.kt"); + } + + @TestMetadata("propertyGetter.kt") + public void testPropertyGetter() throws Exception { + runTest("compiler/testData/writeFlags/hidden/propertyGetter.kt"); + } + + @TestMetadata("propertySetter.kt") + public void testPropertySetter() throws Exception { + runTest("compiler/testData/writeFlags/hidden/propertySetter.kt"); + } + } + + @TestMetadata("compiler/testData/writeFlags/inline") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Inline extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInInline() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("lostInnerClass.kt") + public void testLostInnerClass() throws Exception { + runTest("compiler/testData/writeFlags/inline/lostInnerClass.kt"); + } + + @TestMetadata("lostInnerClass2.kt") + public void testLostInnerClass2() throws Exception { + runTest("compiler/testData/writeFlags/inline/lostInnerClass2.kt"); + } + + @TestMetadata("lostInnerClass3.kt") + public void testLostInnerClass3() throws Exception { + runTest("compiler/testData/writeFlags/inline/lostInnerClass3.kt"); + } + } + + @TestMetadata("compiler/testData/writeFlags/innerClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InnerClass extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInInnerClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/innerClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("compiler/testData/writeFlags/innerClass/visibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Visibility extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInVisibility() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/innerClass/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("internal.kt") + public void testInternal() throws Exception { + runTest("compiler/testData/writeFlags/innerClass/visibility/internal.kt"); + } + + @TestMetadata("internalClassObject.kt") + public void testInternalClassObject() throws Exception { + runTest("compiler/testData/writeFlags/innerClass/visibility/internalClassObject.kt"); + } + + @TestMetadata("private.kt") + public void testPrivate() throws Exception { + runTest("compiler/testData/writeFlags/innerClass/visibility/private.kt"); + } + + @TestMetadata("privateClassObject.kt") + public void testPrivateClassObject() throws Exception { + runTest("compiler/testData/writeFlags/innerClass/visibility/privateClassObject.kt"); + } + + @TestMetadata("public.kt") + public void testPublic() throws Exception { + runTest("compiler/testData/writeFlags/innerClass/visibility/public.kt"); + } + + @TestMetadata("publicClassObject.kt") + public void testPublicClassObject() throws Exception { + runTest("compiler/testData/writeFlags/innerClass/visibility/publicClassObject.kt"); + } + } + } + + @TestMetadata("compiler/testData/writeFlags/jvm8") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Jvm8 extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInJvm8() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/jvm8"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("interfaceMethod.kt") + public void testInterfaceMethod() throws Exception { + runTest("compiler/testData/writeFlags/jvm8/interfaceMethod.kt"); + } + + @TestMetadata("interfaceProperty.kt") + public void testInterfaceProperty() throws Exception { + runTest("compiler/testData/writeFlags/jvm8/interfaceProperty.kt"); + } + + @TestMetadata("compiler/testData/writeFlags/jvm8/defaults") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Defaults extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInDefaults() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("defaultMethod.kt") + public void testDefaultMethod() throws Exception { + runTest("compiler/testData/writeFlags/jvm8/defaults/defaultMethod.kt"); + } + + @TestMetadata("defaultProperty.kt") + public void testDefaultProperty() throws Exception { + runTest("compiler/testData/writeFlags/jvm8/defaults/defaultProperty.kt"); + } + + @TestMetadata("propertyAnnotation.kt") + public void testPropertyAnnotation() throws Exception { + runTest("compiler/testData/writeFlags/jvm8/defaults/propertyAnnotation.kt"); + } + + @TestMetadata("compiler/testData/writeFlags/jvm8/defaults/compatibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Compatibility extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInCompatibility() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/jvm8/defaults/compatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("propertyAccessors.kt") + public void testPropertyAccessors() throws Exception { + runTest("compiler/testData/writeFlags/jvm8/defaults/compatibility/propertyAccessors.kt"); + } + + @TestMetadata("propertyAnnotation.kt") + public void testPropertyAnnotation() throws Exception { + runTest("compiler/testData/writeFlags/jvm8/defaults/compatibility/propertyAnnotation.kt"); + } + } + } + } + + @TestMetadata("compiler/testData/writeFlags/lambda") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Lambda extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInLambda() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/lambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("lambdaInInlineFunction.kt") + public void testLambdaInInlineFunction() throws Exception { + runTest("compiler/testData/writeFlags/lambda/lambdaInInlineFunction.kt"); + } + + @TestMetadata("simpleLambda.kt") + public void testSimpleLambda() throws Exception { + runTest("compiler/testData/writeFlags/lambda/simpleLambda.kt"); + } + } + + @TestMetadata("compiler/testData/writeFlags/lateinit") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Lateinit extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInLateinit() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/lateinit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("lateinitGetter.kt") + public void testLateinitGetter() throws Exception { + runTest("compiler/testData/writeFlags/lateinit/lateinitGetter.kt"); + } + + @TestMetadata("lateinitProperty.kt") + public void testLateinitProperty() throws Exception { + runTest("compiler/testData/writeFlags/lateinit/lateinitProperty.kt"); + } + + @TestMetadata("lateinitPropertyNoSetter.kt") + public void testLateinitPropertyNoSetter() throws Exception { + runTest("compiler/testData/writeFlags/lateinit/lateinitPropertyNoSetter.kt"); + } + } + + @TestMetadata("compiler/testData/writeFlags/property") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Property extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInProperty() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("compiler/testData/writeFlags/property/classObject") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassObject extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInClassObject() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("compiler/testData/writeFlags/property/classObject/class") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Class extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject/class"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("delegatedProtectedVar.kt") + public void testDelegatedProtectedVar() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/class/delegatedProtectedVar.kt"); + } + + @TestMetadata("delegatedPublicVal.kt") + public void testDelegatedPublicVal() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/class/delegatedPublicVal.kt"); + } + + @TestMetadata("internalVal.kt") + public void testInternalVal() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/class/internalVal.kt"); + } + + @TestMetadata("internalVar.kt") + public void testInternalVar() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/class/internalVar.kt"); + } + + @TestMetadata("internalVarPrivateSet.kt") + public void testInternalVarPrivateSet() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/class/internalVarPrivateSet.kt"); + } + + @TestMetadata("noBackingField.kt") + public void testNoBackingField() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/class/noBackingField.kt"); + } + + @TestMetadata("privateVal.kt") + public void testPrivateVal() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/class/privateVal.kt"); + } + + @TestMetadata("privateVar.kt") + public void testPrivateVar() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/class/privateVar.kt"); + } + + @TestMetadata("protectedVal.kt") + public void testProtectedVal() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/class/protectedVal.kt"); + } + + @TestMetadata("protectedVarPrivateSet.kt") + public void testProtectedVarPrivateSet() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/class/protectedVarPrivateSet.kt"); + } + + @TestMetadata("publicVal.kt") + public void testPublicVal() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/class/publicVal.kt"); + } + + @TestMetadata("publicValNonDefault.kt") + public void testPublicValNonDefault() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/class/publicValNonDefault.kt"); + } + + @TestMetadata("publicVar.kt") + public void testPublicVar() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/class/publicVar.kt"); + } + + @TestMetadata("publicVarNonDefault.kt") + public void testPublicVarNonDefault() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/class/publicVarNonDefault.kt"); + } + + @TestMetadata("publicVarPrivateSet.kt") + public void testPublicVarPrivateSet() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/class/publicVarPrivateSet.kt"); + } + + @TestMetadata("publicVarProtectedSet.kt") + public void testPublicVarProtectedSet() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/class/publicVarProtectedSet.kt"); + } + + @TestMetadata("publicVarPublicSet.kt") + public void testPublicVarPublicSet() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/class/publicVarPublicSet.kt"); + } + } + + @TestMetadata("compiler/testData/writeFlags/property/classObject/rename") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Rename extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInRename() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject/rename"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("constructorAndClassObject.kt") + public void testConstructorAndClassObject() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/rename/constructorAndClassObject.kt"); + } + + @TestMetadata("delegatedAndDelegated.kt") + public void testDelegatedAndDelegated() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/rename/delegatedAndDelegated.kt"); + } + + @TestMetadata("delegatedAndProperty.kt") + public void testDelegatedAndProperty() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/rename/delegatedAndProperty.kt"); + } + + @TestMetadata("propertyAndProperty.kt") + public void testPropertyAndProperty() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/rename/propertyAndProperty.kt"); + } + } + + @TestMetadata("compiler/testData/writeFlags/property/classObject/trait") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Trait extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInTrait() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject/trait"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("delegatedProtectedVar.kt") + public void testDelegatedProtectedVar() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/trait/delegatedProtectedVar.kt"); + } + + @TestMetadata("delegatedPublicVal.kt") + public void testDelegatedPublicVal() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/trait/delegatedPublicVal.kt"); + } + + @TestMetadata("internalConstVal.kt") + public void testInternalConstVal() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/trait/internalConstVal.kt"); + } + + @TestMetadata("internalVal.kt") + public void testInternalVal() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/trait/internalVal.kt"); + } + + @TestMetadata("internalVar.kt") + public void testInternalVar() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/trait/internalVar.kt"); + } + + @TestMetadata("internalVarPrivateSet.kt") + public void testInternalVarPrivateSet() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/trait/internalVarPrivateSet.kt"); + } + + @TestMetadata("noBackingField.kt") + public void testNoBackingField() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/trait/noBackingField.kt"); + } + + @TestMetadata("privateVal.kt") + public void testPrivateVal() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/trait/privateVal.kt"); + } + + @TestMetadata("privateVar.kt") + public void testPrivateVar() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/trait/privateVar.kt"); + } + + @TestMetadata("protectedConstVal.kt") + public void testProtectedConstVal() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/trait/protectedConstVal.kt"); + } + + @TestMetadata("protectedVal.kt") + public void testProtectedVal() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/trait/protectedVal.kt"); + } + + @TestMetadata("protectedVarPrivateSet.kt") + public void testProtectedVarPrivateSet() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/trait/protectedVarPrivateSet.kt"); + } + + @TestMetadata("publicConstVal.kt") + public void testPublicConstVal() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/trait/publicConstVal.kt"); + } + + @TestMetadata("publicVal.kt") + public void testPublicVal() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/trait/publicVal.kt"); + } + + @TestMetadata("publicValNonDefault.kt") + public void testPublicValNonDefault() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/trait/publicValNonDefault.kt"); + } + + @TestMetadata("publicVar.kt") + public void testPublicVar() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/trait/publicVar.kt"); + } + + @TestMetadata("publicVarNonDefault.kt") + public void testPublicVarNonDefault() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/trait/publicVarNonDefault.kt"); + } + + @TestMetadata("publicVarPrivateSet.kt") + public void testPublicVarPrivateSet() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/trait/publicVarPrivateSet.kt"); + } + + @TestMetadata("publicVarProtectedSet.kt") + public void testPublicVarProtectedSet() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/trait/publicVarProtectedSet.kt"); + } + + @TestMetadata("publicVarPublicSet.kt") + public void testPublicVarPublicSet() throws Exception { + runTest("compiler/testData/writeFlags/property/classObject/trait/publicVarPublicSet.kt"); + } + } + } + + @TestMetadata("compiler/testData/writeFlags/property/deprecatedFlag") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DeprecatedFlag extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInDeprecatedFlag() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/deprecatedFlag"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("propertyInClass.kt") + public void testPropertyInClass() throws Exception { + runTest("compiler/testData/writeFlags/property/deprecatedFlag/propertyInClass.kt"); + } + + @TestMetadata("topLevelProperty.kt") + public void testTopLevelProperty() throws Exception { + runTest("compiler/testData/writeFlags/property/deprecatedFlag/topLevelProperty.kt"); + } + } + + @TestMetadata("compiler/testData/writeFlags/property/syntheticAnnotationsMethod") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SyntheticAnnotationsMethod extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInSyntheticAnnotationsMethod() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/syntheticAnnotationsMethod"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("privateProperty.kt") + public void testPrivateProperty() throws Exception { + runTest("compiler/testData/writeFlags/property/syntheticAnnotationsMethod/privateProperty.kt"); + } + + @TestMetadata("protectedProperty.kt") + public void testProtectedProperty() throws Exception { + runTest("compiler/testData/writeFlags/property/syntheticAnnotationsMethod/protectedProperty.kt"); + } + + @TestMetadata("publicProperty.kt") + public void testPublicProperty() throws Exception { + runTest("compiler/testData/writeFlags/property/syntheticAnnotationsMethod/publicProperty.kt"); + } + } + + @TestMetadata("compiler/testData/writeFlags/property/visibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Visibility extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInVisibility() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("internal.kt") + public void testInternal() throws Exception { + runTest("compiler/testData/writeFlags/property/visibility/internal.kt"); + } + + @TestMetadata("private.kt") + public void testPrivate() throws Exception { + runTest("compiler/testData/writeFlags/property/visibility/private.kt"); + } + + @TestMetadata("public.kt") + public void testPublic() throws Exception { + runTest("compiler/testData/writeFlags/property/visibility/public.kt"); + } + } + } + + @TestMetadata("compiler/testData/writeFlags/typealias") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Typealias extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInTypealias() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/typealias"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("compiler/testData/writeFlags/typealias/syntheticAnnotationsMethod") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SyntheticAnnotationsMethod extends AbstractIrWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInSyntheticAnnotationsMethod() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/typealias/syntheticAnnotationsMethod"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("privateTypealias.kt") + public void testPrivateTypealias() throws Exception { + runTest("compiler/testData/writeFlags/typealias/syntheticAnnotationsMethod/privateTypealias.kt"); + } + + @TestMetadata("publicTypealias.kt") + public void testPublicTypealias() throws Exception { + runTest("compiler/testData/writeFlags/typealias/syntheticAnnotationsMethod/publicTypealias.kt"); + } + } + } +} diff --git a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt index 005d7e8357d..161187fb441 100644 --- a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt +++ b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt @@ -221,7 +221,7 @@ fun main(args: Array) { } testClass { - model("writeFlags") + model("writeFlags", targetBackend = TargetBackend.JVM) } testClass { @@ -373,6 +373,10 @@ fun main(args: Array) { model("checkLocalVariablesTable", targetBackend = TargetBackend.JVM_IR) } + testClass { + model("writeFlags", targetBackend = TargetBackend.JVM_IR) + } + testClass { model("lineNumber", targetBackend = TargetBackend.JVM_IR) }