From 11dfbd41acc49277dbf4daf2f0f5aba8638cb5ca Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Fri, 2 Jul 2021 16:43:22 +0300 Subject: [PATCH] [Test] Delete obsolete descriptor renderer tests --- .../basicFunExpr.kt | 9 -- .../basicFunExprArgs.kt | 9 -- .../basicLambda.kt | 12 -- .../labeledLambda.kt | 12 -- .../parenthesizedFunExpr.kt | 9 -- .../parenthesizedLambda.kt | 9 -- compiler/testData/renderer/Classes.kt | 69 --------- compiler/testData/renderer/Enum.kt | 12 -- compiler/testData/renderer/ErrorType.kt | 3 - compiler/testData/renderer/FunctionTypes.kt | 49 ------- .../renderer/FunctionTypesInSignature.kt | 42 ------ compiler/testData/renderer/GlobalFunctions.kt | 38 ----- .../testData/renderer/GlobalProperties.kt | 29 ---- .../renderer/InheritedMembersVisibility.kt | 30 ---- compiler/testData/renderer/KeywordsInNames.kt | 37 ----- .../renderer/ObjectWithConstructor.kt | 35 ----- compiler/testData/renderer/StarProjection.kt | 19 --- .../testData/renderer/TraitWithConstructor.kt | 23 --- compiler/testData/renderer/TypeAnnotations.kt | 49 ------- compiler/testData/renderer/UnitType.kt | 5 - .../AbstractDescriptorRendererTest.kt | 136 ------------------ .../generators/GenerateJUnit3CompilerTests.kt | 10 -- .../DescriptorRendererTestGenerated.java | 101 ------------- ...ptorInExpressionRendererTestGenerated.java | 61 -------- ...ctionDescriptorInExpressionRendererTest.kt | 71 --------- 25 files changed, 879 deletions(-) delete mode 100644 compiler/testData/renderFunctionDescriptorInExpression/basicFunExpr.kt delete mode 100644 compiler/testData/renderFunctionDescriptorInExpression/basicFunExprArgs.kt delete mode 100644 compiler/testData/renderFunctionDescriptorInExpression/basicLambda.kt delete mode 100644 compiler/testData/renderFunctionDescriptorInExpression/labeledLambda.kt delete mode 100644 compiler/testData/renderFunctionDescriptorInExpression/parenthesizedFunExpr.kt delete mode 100644 compiler/testData/renderFunctionDescriptorInExpression/parenthesizedLambda.kt delete mode 100644 compiler/testData/renderer/Classes.kt delete mode 100644 compiler/testData/renderer/Enum.kt delete mode 100644 compiler/testData/renderer/ErrorType.kt delete mode 100644 compiler/testData/renderer/FunctionTypes.kt delete mode 100644 compiler/testData/renderer/FunctionTypesInSignature.kt delete mode 100644 compiler/testData/renderer/GlobalFunctions.kt delete mode 100644 compiler/testData/renderer/GlobalProperties.kt delete mode 100644 compiler/testData/renderer/InheritedMembersVisibility.kt delete mode 100644 compiler/testData/renderer/KeywordsInNames.kt delete mode 100644 compiler/testData/renderer/ObjectWithConstructor.kt delete mode 100644 compiler/testData/renderer/StarProjection.kt delete mode 100644 compiler/testData/renderer/TraitWithConstructor.kt delete mode 100644 compiler/testData/renderer/TypeAnnotations.kt delete mode 100644 compiler/testData/renderer/UnitType.kt delete mode 100644 compiler/tests-common/tests/org/jetbrains/kotlin/renderer/AbstractDescriptorRendererTest.kt delete mode 100644 compiler/tests-gen/org/jetbrains/kotlin/renderer/DescriptorRendererTestGenerated.java delete mode 100644 compiler/tests-gen/org/jetbrains/kotlin/renderer/FunctionDescriptorInExpressionRendererTestGenerated.java delete mode 100644 compiler/tests/org/jetbrains/kotlin/renderer/AbstractFunctionDescriptorInExpressionRendererTest.kt diff --git a/compiler/testData/renderFunctionDescriptorInExpression/basicFunExpr.kt b/compiler/testData/renderFunctionDescriptorInExpression/basicFunExpr.kt deleted file mode 100644 index 9f3d258238d..00000000000 --- a/compiler/testData/renderFunctionDescriptorInExpression/basicFunExpr.kt +++ /dev/null @@ -1,9 +0,0 @@ -annotation class Ann(val x: String) - -fun foo(block: () -> Unit) = block.javaClass - -fun box() { - foo( @Ann("OK1") fun() {}) -} - -//@Ann(x = "OK1") local final fun (): kotlin.Unit defined in box \ No newline at end of file diff --git a/compiler/testData/renderFunctionDescriptorInExpression/basicFunExprArgs.kt b/compiler/testData/renderFunctionDescriptorInExpression/basicFunExprArgs.kt deleted file mode 100644 index e02a005578d..00000000000 --- a/compiler/testData/renderFunctionDescriptorInExpression/basicFunExprArgs.kt +++ /dev/null @@ -1,9 +0,0 @@ -annotation class Ann(val x: String) - -fun foo(block: (Int, String) -> Unit) = block.javaClass - -fun box() { - foo( @Ann("OK1") fun(@Ann("1") x: Int, @Ann("2") y: String) {}) -} - -//@Ann(x = "OK1") local final fun (/*0*/ @Ann(x = "1") x: kotlin.Int, /*1*/ @Ann(x = "2") y: kotlin.String): kotlin.Unit defined in box \ No newline at end of file diff --git a/compiler/testData/renderFunctionDescriptorInExpression/basicLambda.kt b/compiler/testData/renderFunctionDescriptorInExpression/basicLambda.kt deleted file mode 100644 index 4036bf60107..00000000000 --- a/compiler/testData/renderFunctionDescriptorInExpression/basicLambda.kt +++ /dev/null @@ -1,12 +0,0 @@ -annotation class Ann(val x: String) - -fun foo(block: () -> Unit) = block.javaClass - -fun box() { - foo( @Ann("OK1") { }) - - foo() @Ann("OK2") { } -} - -//@Ann(x = "OK1") local final fun (): kotlin.Unit defined in box -//@Ann(x = "OK2") local final fun (): kotlin.Unit defined in box diff --git a/compiler/testData/renderFunctionDescriptorInExpression/labeledLambda.kt b/compiler/testData/renderFunctionDescriptorInExpression/labeledLambda.kt deleted file mode 100644 index e89b6fcb170..00000000000 --- a/compiler/testData/renderFunctionDescriptorInExpression/labeledLambda.kt +++ /dev/null @@ -1,12 +0,0 @@ -annotation class Ann(val x: String) - -fun foo(block: () -> Unit) = block.javaClass - -fun box() { - foo( @Ann("OK1") label@{ }) - - foo() @Ann("OK2") label@{ } -} - -//@Ann(x = "OK1") local final fun (): kotlin.Unit defined in box -//@Ann(x = "OK2") local final fun (): kotlin.Unit defined in box diff --git a/compiler/testData/renderFunctionDescriptorInExpression/parenthesizedFunExpr.kt b/compiler/testData/renderFunctionDescriptorInExpression/parenthesizedFunExpr.kt deleted file mode 100644 index 3460c6ed036..00000000000 --- a/compiler/testData/renderFunctionDescriptorInExpression/parenthesizedFunExpr.kt +++ /dev/null @@ -1,9 +0,0 @@ -annotation class Ann(val x: String) - -fun foo(block: () -> Unit) = block.javaClass - -fun box() { - foo( @Ann("OK1") (fun() {})) -} - -//local final fun (): kotlin.Unit defined in box \ No newline at end of file diff --git a/compiler/testData/renderFunctionDescriptorInExpression/parenthesizedLambda.kt b/compiler/testData/renderFunctionDescriptorInExpression/parenthesizedLambda.kt deleted file mode 100644 index 58a61ae3d00..00000000000 --- a/compiler/testData/renderFunctionDescriptorInExpression/parenthesizedLambda.kt +++ /dev/null @@ -1,9 +0,0 @@ -annotation class Ann(val x: String) - -fun foo(block: () -> Unit) = block.javaClass - -fun box() { - foo( @Ann("OK1") ({ })) -} - -//local final fun (): kotlin.Unit defined in box diff --git a/compiler/testData/renderer/Classes.kt b/compiler/testData/renderer/Classes.kt deleted file mode 100644 index 4eeffb3d49e..00000000000 --- a/compiler/testData/renderer/Classes.kt +++ /dev/null @@ -1,69 +0,0 @@ -package rendererTest - -annotation class TheAnnotation -annotation class AnotherAnnotation - -@TheAnnotation -public open class TheClass @AnotherAnnotation constructor() { - private val privateVal: Int = 5 - - val shouldBeFinal: Int = 5 - - val T.checkTypeParameterScope: Int get() = 6 - val checkTypeParameterScope2 = 6 - - protected abstract fun foo() {} - - @TheAnnotation private constructor() - - private class Inner {} -} - -internal class InternalClass { -} - -interface TheTrait { - fun abstractFun() - - companion object : TheClass { - fun classObjectFunction(): Int {} - } -} - -public class WithReified - -public interface TwoUpperBounds where T : Number, T : Any - -//package rendererTest -//public final annotation class TheAnnotation : kotlin.Annotation defined in rendererTest -//public constructor TheAnnotation() defined in rendererTest.TheAnnotation -//public final annotation class AnotherAnnotation : kotlin.Annotation defined in rendererTest -//public constructor AnotherAnnotation() defined in rendererTest.AnotherAnnotation -//@rendererTest.TheAnnotation public open class TheClass defined in rendererTest -// defined in rendererTest.TheClass -// defined in rendererTest.TheClass -//@rendererTest.AnotherAnnotation public constructor TheClass() defined in rendererTest.TheClass -//private final val privateVal: kotlin.Int defined in rendererTest.TheClass -//public final val shouldBeFinal: kotlin.Int defined in rendererTest.TheClass -//public final val T.checkTypeParameterScope: kotlin.Int defined in rendererTest.TheClass -// defined in rendererTest.TheClass.checkTypeParameterScope -//public final fun T.(): kotlin.Int defined in rendererTest.TheClass -//public final val checkTypeParameterScope2: kotlin.Int defined in rendererTest.TheClass -// defined in rendererTest.TheClass.checkTypeParameterScope2 -//protected abstract fun foo(): kotlin.Unit defined in rendererTest.TheClass -//@rendererTest.TheAnnotation private constructor TheClass() defined in rendererTest.TheClass -//private final class Inner defined in rendererTest.TheClass -//public constructor Inner() defined in rendererTest.TheClass.Inner -//internal final class InternalClass defined in rendererTest -//public constructor InternalClass() defined in rendererTest.InternalClass -//public interface TheTrait defined in rendererTest -//public abstract fun abstractFun(): kotlin.Unit defined in rendererTest.TheTrait -//public companion object : rendererTest.TheClass defined in rendererTest.TheTrait -//private constructor Companion() defined in rendererTest.TheTrait.Companion -//public final fun classObjectFunction(): kotlin.Int defined in rendererTest.TheTrait.Companion -//public final class WithReified defined in rendererTest -//public constructor WithReified() defined in rendererTest.WithReified -// defined in rendererTest.WithReified -// defined in rendererTest.WithReified -//public interface TwoUpperBounds where T : kotlin.Any defined in rendererTest -// defined in rendererTest.TwoUpperBounds \ No newline at end of file diff --git a/compiler/testData/renderer/Enum.kt b/compiler/testData/renderer/Enum.kt deleted file mode 100644 index ac8701684a7..00000000000 --- a/compiler/testData/renderer/Enum.kt +++ /dev/null @@ -1,12 +0,0 @@ -package rendererTest - -private enum class TheEnum(val rgb: Int) { - VAL1(0xFF0000) -} - -//package rendererTest -//private final enum class TheEnum : kotlin.Enum defined in rendererTest -//private constructor TheEnum(rgb: kotlin.Int) defined in rendererTest.TheEnum -//value-parameter rgb: kotlin.Int defined in rendererTest.TheEnum. -//enum entry VAL1 defined in rendererTest.TheEnum -//private constructor VAL1() defined in rendererTest.TheEnum.VAL1 diff --git a/compiler/testData/renderer/ErrorType.kt b/compiler/testData/renderer/ErrorType.kt deleted file mode 100644 index 513d5ed2c4c..00000000000 --- a/compiler/testData/renderer/ErrorType.kt +++ /dev/null @@ -1,3 +0,0 @@ -val a: E = 0 - -//public val a: [ERROR : E] defined in root package diff --git a/compiler/testData/renderer/FunctionTypes.kt b/compiler/testData/renderer/FunctionTypes.kt deleted file mode 100644 index c7d185556bf..00000000000 --- a/compiler/testData/renderer/FunctionTypes.kt +++ /dev/null @@ -1,49 +0,0 @@ -var v0: () -> Unit -var v1: (Int) -> Int -var v2: (number: Int, String) -> String -var v3: Function1 -var v4: (() -> Int, (s: String) -> Unit) -> String -var v5: Int.() -> Int -var v6 : Int.(String, Int) -> Unit -var v7 : @ExtensionFunctionType Function2 - -class F: Function0 -var v8: F - -class EF: @ExtensionFunctionType Function1 -var v9: EF - -class GF: Function0 -var v10: GF - -class GEF: @ExtensionFunctionType Function1 -var v11: GEF - -var v12: (() -> Unit).() -> Unit -var v13: (() -> Unit)?.() -> Unit - -//public var v0: () -> kotlin.Unit defined in root package -//public var v1: (kotlin.Int) -> kotlin.Int defined in root package -//public var v2: (number: kotlin.Int, kotlin.String) -> kotlin.String defined in root package -//public var v3: (kotlin.Int) -> kotlin.String defined in root package -//public var v4: (() -> kotlin.Int, (s: kotlin.String) -> kotlin.Unit) -> kotlin.String defined in root package -//public var v5: kotlin.Int.() -> kotlin.Int defined in root package -//public var v6: kotlin.Int.(kotlin.String, kotlin.Int) -> kotlin.Unit defined in root package -//public var v7: kotlin.Int.(kotlin.String) -> kotlin.Boolean defined in root package -//public final class F : () -> kotlin.Unit defined in root package -//public constructor F() defined in F -//public var v8: F defined in root package -//public final class EF : kotlin.String.() -> kotlin.Unit defined in root package -//public constructor EF() defined in EF -//public var v9: EF defined in root package -//public final class GF : () -> T defined in root package -//public constructor GF() defined in GF -// defined in GF -//public var v10: GF defined in root package -//public final class GEF : A.() -> B defined in root package -//public constructor GEF() defined in GEF -// defined in GEF -// defined in GEF -//public var v11: GEF defined in root package -//public var v12: (() -> kotlin.Unit).() -> kotlin.Unit defined in root package -//public var v13: (() -> kotlin.Unit)?.() -> kotlin.Unit defined in root package diff --git a/compiler/testData/renderer/FunctionTypesInSignature.kt b/compiler/testData/renderer/FunctionTypesInSignature.kt deleted file mode 100644 index 9d4b5dfe48b..00000000000 --- a/compiler/testData/renderer/FunctionTypesInSignature.kt +++ /dev/null @@ -1,42 +0,0 @@ -package test - -fun Function0.f1(f: Function0): Function0 { -} - -fun (() -> Unit).f2(f: Function0) : Function0 { -} - -fun ((() -> Unit) -> Unit).f3(f: Function0>) : Function0> { -} - -fun Function0<() -> Unit>.f4(f: (() -> Unit, () -> Unit) -> Unit): Function1<() -> Unit, () -> Unit> { -} - -fun Function0<(() -> Unit) -> (() -> Unit)>.f5() { -} - -fun Function0<(() -> Unit) -> (() -> Unit)>?.f6() { -} - -fun ((p: Int) -> Unit)?.f7() { -} - -fun (T.(Int) -> Unit).f8() { -} - -val Function0<(() -> Unit) -> (() -> Unit)>.p: Unit = Unit -//package test -//public fun (() -> kotlin.Unit).f1(f: () -> kotlin.Unit): () -> kotlin.Int defined in test -//value-parameter f: () -> kotlin.Unit defined in test.f1 -//public fun (() -> kotlin.Unit).f2(f: () -> kotlin.Unit): () -> kotlin.Int defined in test -//value-parameter f: () -> kotlin.Unit defined in test.f2 -//public fun ((() -> kotlin.Unit) -> kotlin.Unit).f3(f: () -> () -> kotlin.Unit): () -> () -> kotlin.Int defined in test -//value-parameter f: () -> () -> kotlin.Unit defined in test.f3 -//public fun (() -> () -> kotlin.Unit).f4(f: (() -> kotlin.Unit, () -> kotlin.Unit) -> kotlin.Unit): (() -> kotlin.Unit) -> () -> kotlin.Unit defined in test -//value-parameter f: (() -> kotlin.Unit, () -> kotlin.Unit) -> kotlin.Unit defined in test.f4 -//public fun (() -> (() -> kotlin.Unit) -> () -> kotlin.Unit).f5(): kotlin.Unit defined in test -//public fun (() -> (() -> kotlin.Unit) -> () -> kotlin.Unit)?.f6(): kotlin.Unit defined in test -//public fun ((p: kotlin.Int) -> kotlin.Unit)?.f7(): kotlin.Unit defined in test -//public fun (T.(kotlin.Int) -> kotlin.Unit).f8(): kotlin.Unit defined in test -// defined in test.f8 -//public val (() -> (() -> kotlin.Unit) -> () -> kotlin.Unit).p: kotlin.Unit defined in test \ No newline at end of file diff --git a/compiler/testData/renderer/GlobalFunctions.kt b/compiler/testData/renderer/GlobalFunctions.kt deleted file mode 100644 index bc3cf44439f..00000000000 --- a/compiler/testData/renderer/GlobalFunctions.kt +++ /dev/null @@ -1,38 +0,0 @@ -package rendererTest - -public fun pub() {} - -internal fun int: String {} - -fun int2(vararg ints: Int): Int = 5 - -private fun prv(a: String, b: Int = 5) = 5 - -public fun Int.ext(): Int {} - -public fun withTypeParam(a: Array): Int {} - -interface Foo -interface Bar - -fun

funTypeParameterWithTwoUpperBounds() where P : Foo, P : Bar = 17 - -@Deprecated("") fun deprecatedFun() - -//package rendererTest -//public fun pub(): kotlin.Unit defined in rendererTest -//internal fun int(): kotlin.String defined in rendererTest -//public fun int2(vararg ints: kotlin.Int): kotlin.Int defined in rendererTest -//value-parameter vararg ints: kotlin.Int defined in rendererTest.int2 -//private fun prv(a: kotlin.String, b: kotlin.Int = ...): kotlin.Int defined in rendererTest -//value-parameter a: kotlin.String defined in rendererTest.prv -//value-parameter b: kotlin.Int = ... defined in rendererTest.prv -//public fun kotlin.Int.ext(): kotlin.Int defined in rendererTest -//public fun withTypeParam(a: kotlin.Array): kotlin.Int defined in rendererTest -// defined in rendererTest.withTypeParam -//value-parameter a: kotlin.Array defined in rendererTest.withTypeParam -//public interface Foo defined in rendererTest -//public interface Bar defined in rendererTest -//public fun

funTypeParameterWithTwoUpperBounds(): kotlin.Int where P : rendererTest.Bar defined in rendererTest -//

defined in rendererTest.funTypeParameterWithTwoUpperBounds -//@kotlin.Deprecated(message = "") public fun deprecatedFun(): kotlin.Unit defined in rendererTest diff --git a/compiler/testData/renderer/GlobalProperties.kt b/compiler/testData/renderer/GlobalProperties.kt deleted file mode 100644 index 6be5442f3dd..00000000000 --- a/compiler/testData/renderer/GlobalProperties.kt +++ /dev/null @@ -1,29 +0,0 @@ -package rendererTest - -public val pub = "" - -internal var int: String = "" - -val int2: Int = 5 - -private var private = 5 - -public val Int.ext: Int -get() {} - -@Deprecated("") val deprecatedVal = 5 - -public val T.extWithTwoUpperBounds: Int where T : CharSequence, T : Number -get() {} - -//package rendererTest -//public val pub: kotlin.String defined in rendererTest -//internal var int: kotlin.String defined in rendererTest -//public val int2: kotlin.Int defined in rendererTest -//private var private: kotlin.Int defined in rendererTest -//public val kotlin.Int.ext: kotlin.Int defined in rendererTest -//public fun kotlin.Int.(): kotlin.Int defined in rendererTest -//@kotlin.Deprecated(message = "") public val deprecatedVal: kotlin.Int defined in rendererTest -//public val T.extWithTwoUpperBounds: kotlin.Int where T : kotlin.Number defined in rendererTest -// defined in rendererTest.extWithTwoUpperBounds -//public fun T.(): kotlin.Int defined in rendererTest diff --git a/compiler/testData/renderer/InheritedMembersVisibility.kt b/compiler/testData/renderer/InheritedMembersVisibility.kt deleted file mode 100644 index 77fe391f1ca..00000000000 --- a/compiler/testData/renderer/InheritedMembersVisibility.kt +++ /dev/null @@ -1,30 +0,0 @@ -interface A { - val v: Int - public var int: Int - private set - - protected fun f(): Int -} - -class B : A { - override var int: Int = 0 - get set - override fun f(): Int { - } - override val v: Int = 0 - get -} - -//public interface A defined in root package -//public abstract val v: kotlin.Int defined in A -//public abstract var int: kotlin.Int defined in A -//private abstract fun (: kotlin.Int): kotlin.Unit defined in A -//protected abstract fun f(): kotlin.Int defined in A -//public final class B : A defined in root package -//public constructor B() defined in B -//public open var int: kotlin.Int defined in B -//public open fun (): kotlin.Int defined in B -//private open fun (: kotlin.Int): kotlin.Unit defined in B -//protected open fun f(): kotlin.Int defined in B -//public open val v: kotlin.Int defined in B -//public open fun (): kotlin.Int defined in B diff --git a/compiler/testData/renderer/KeywordsInNames.kt b/compiler/testData/renderer/KeywordsInNames.kt deleted file mode 100644 index 04376b4241a..00000000000 --- a/compiler/testData/renderer/KeywordsInNames.kt +++ /dev/null @@ -1,37 +0,0 @@ -annotation class `true` - -val `val` = 5 - -@`true` interface `interface` - -class `class`<`in`>(p: `in`?) { - inner class `class` -} - -val `is` = `class`<`interface`>(null).`class`() -val `in` = `class`<`interface`>(null) - -fun <`in` : `interface`> `interface`.`fun`(`false`: `interface`): `interface` where `in` : Number - -val AS_SAFE = 1 -val NOT_IN = 2 -val NOT_IS = 3 - -//public final annotation class `true` : kotlin.Annotation defined in root package -//public constructor `true`() defined in `true` -//public val `val`: kotlin.Int defined in root package -//@`true` public interface `interface` defined in root package -//public final class `class`<`in`> defined in root package -//<`in`> defined in `class` -//public constructor `class`<`in`>(p: `in`?) defined in `class` -//value-parameter p: `in`? defined in `class`. -//public final inner class `class` defined in `class` -//public constructor `class`() defined in `class`.`class` -//public val `is`: `class`<`interface`>.`class` defined in root package -//public val `in`: `class`<`interface`> defined in root package -//public fun <`in` : `interface`> `interface`.`fun`(`false`: `interface`): `interface` where `in` : kotlin.Number defined in root package -//<`in` : `interface` & kotlin.Number> defined in `fun` -//value-parameter `false`: `interface` defined in `fun` -//public val AS_SAFE: kotlin.Int defined in root package -//public val NOT_IN: kotlin.Int defined in root package -//public val NOT_IS: kotlin.Int defined in root package diff --git a/compiler/testData/renderer/ObjectWithConstructor.kt b/compiler/testData/renderer/ObjectWithConstructor.kt deleted file mode 100644 index c42770c2d1b..00000000000 --- a/compiler/testData/renderer/ObjectWithConstructor.kt +++ /dev/null @@ -1,35 +0,0 @@ -object A1() { - constructor(x: Int = "", y: Int) : this() { - x + y - } -} - -object A2 public constructor(private val prop: Int) { - constructor(x: Int = "", y: Int) : this(x * y) { - x + y - } -} - -class A3 { - companion object B(val prop: Int) { - public constructor() : this(2) - } -} - -//public object A1 defined in root package -//private constructor A1() defined in A1 -//private constructor A1(x: kotlin.Int = ..., y: kotlin.Int) defined in A1 -//value-parameter x: kotlin.Int = ... defined in A1. -//value-parameter y: kotlin.Int defined in A1. -//public object A2 defined in root package -//public constructor A2(prop: kotlin.Int) defined in A2 -//value-parameter prop: kotlin.Int defined in A2. -//private constructor A2(x: kotlin.Int = ..., y: kotlin.Int) defined in A2 -//value-parameter x: kotlin.Int = ... defined in A2. -//value-parameter y: kotlin.Int defined in A2. -//public final class A3 defined in root package -//public constructor A3() defined in A3 -//public companion object B defined in A3 -//private constructor B(prop: kotlin.Int) defined in A3.B -//value-parameter prop: kotlin.Int defined in A3.B. -//public constructor B() defined in A3.B diff --git a/compiler/testData/renderer/StarProjection.kt b/compiler/testData/renderer/StarProjection.kt deleted file mode 100644 index 94f9041b29a..00000000000 --- a/compiler/testData/renderer/StarProjection.kt +++ /dev/null @@ -1,19 +0,0 @@ -package rendererTest - -class C> { - fun foo(c: C<*>) {} -} - -fun foo(c: C<*>) {} -fun foo1(c: C>) {} - -//package rendererTest -//public final class C> defined in rendererTest -//public constructor C>() defined in rendererTest.C -//> defined in rendererTest.C -//public final fun foo(c: rendererTest.C<*>): kotlin.Unit defined in rendererTest.C -//value-parameter c: rendererTest.C<*> defined in rendererTest.C.foo -//public fun foo(c: rendererTest.C<*>): kotlin.Unit defined in rendererTest -//value-parameter c: rendererTest.C<*> defined in rendererTest.foo -//public fun foo1(c: rendererTest.C>): kotlin.Unit defined in rendererTest -//value-parameter c: rendererTest.C> defined in rendererTest.foo1 \ No newline at end of file diff --git a/compiler/testData/renderer/TraitWithConstructor.kt b/compiler/testData/renderer/TraitWithConstructor.kt deleted file mode 100644 index 3dc53ca1548..00000000000 --- a/compiler/testData/renderer/TraitWithConstructor.kt +++ /dev/null @@ -1,23 +0,0 @@ -interface A1() { - constructor(x: Int = "", y: Int) : this() { - x + y - } -} - -interface A2 private constructor(private val prop: Int) { - constructor(x: Int = "", y: Int) : this(x * y) { - x + y - } -} - -//public interface A1 defined in root package -//public constructor A1() defined in A1 -//public constructor A1(x: kotlin.Int = ..., y: kotlin.Int) defined in A1 -//value-parameter x: kotlin.Int = ... defined in A1. -//value-parameter y: kotlin.Int defined in A1. -//public interface A2 defined in root package -//private constructor A2(prop: kotlin.Int) defined in A2 -//value-parameter prop: kotlin.Int defined in A2. -//public constructor A2(x: kotlin.Int = ..., y: kotlin.Int) defined in A2 -//value-parameter x: kotlin.Int = ... defined in A2. -//value-parameter y: kotlin.Int defined in A2. diff --git a/compiler/testData/renderer/TypeAnnotations.kt b/compiler/testData/renderer/TypeAnnotations.kt deleted file mode 100644 index 1ee8d8afc87..00000000000 --- a/compiler/testData/renderer/TypeAnnotations.kt +++ /dev/null @@ -1,49 +0,0 @@ -annotation class Ann1(val p1: Int, val p2: Int) -annotation class Ann2 -annotation class Ann3(val p: Int) -annotation class Ann4 -annotation class Ann5 -annotation class Ann6 -annotation class Ann7(val p: Boolean = false) - - -var v1: @Ann1(1, 2) String -var v2: @Ann2 Int? -var v3: @Ann3(0) (String, Int) -> Char -var v4: @Ann4 X // currently annotations are lost for error types -var v5: @Ann5() (String.() -> Unit) -var v6: @Ann6() (() -> Unit)? -fun f1(calculation: @Ann7 () -> Any) -fun f2(calculation: @Ann7() () -> Any) -fun f3(calculation: @Ann7(true) () -> Any) - -//public final annotation class Ann1 : kotlin.Annotation defined in root package -//public constructor Ann1(p1: kotlin.Int, p2: kotlin.Int) defined in Ann1 -//value-parameter p1: kotlin.Int defined in Ann1. -//value-parameter p2: kotlin.Int defined in Ann1. -//public final annotation class Ann2 : kotlin.Annotation defined in root package -//public constructor Ann2() defined in Ann2 -//public final annotation class Ann3 : kotlin.Annotation defined in root package -//public constructor Ann3(p: kotlin.Int) defined in Ann3 -//value-parameter p: kotlin.Int defined in Ann3. -//public final annotation class Ann4 : kotlin.Annotation defined in root package -//public constructor Ann4() defined in Ann4 -//public final annotation class Ann5 : kotlin.Annotation defined in root package -//public constructor Ann5() defined in Ann5 -//public final annotation class Ann6 : kotlin.Annotation defined in root package -//public constructor Ann6() defined in Ann6 -//public final annotation class Ann7 : kotlin.Annotation defined in root package -//public constructor Ann7(p: kotlin.Boolean = ...) defined in Ann7 -//value-parameter p: kotlin.Boolean = ... defined in Ann7. -//public var v1: @Ann1(p1 = 1, p2 = 2) kotlin.String defined in root package -//public var v2: @Ann2 kotlin.Int? defined in root package -//public var v3: @Ann3(p = 0) (kotlin.String, kotlin.Int) -> kotlin.Char defined in root package -//public var v4: [ERROR : X] defined in root package -//public var v5: @Ann5() (kotlin.String.() -> kotlin.Unit) defined in root package -//public var v6: @Ann6() (() -> kotlin.Unit)? defined in root package -//public fun f1(calculation: @Ann7 () -> kotlin.Any): kotlin.Unit defined in root package -//value-parameter calculation: @Ann7 () -> kotlin.Any defined in f1 -//public fun f2(calculation: @Ann7 () -> kotlin.Any): kotlin.Unit defined in root package -//value-parameter calculation: @Ann7 () -> kotlin.Any defined in f2 -//public fun f3(calculation: @Ann7(p = true) () -> kotlin.Any): kotlin.Unit defined in root package -//value-parameter calculation: @Ann7(p = true) () -> kotlin.Any defined in f3 diff --git a/compiler/testData/renderer/UnitType.kt b/compiler/testData/renderer/UnitType.kt deleted file mode 100644 index bb99e522666..00000000000 --- a/compiler/testData/renderer/UnitType.kt +++ /dev/null @@ -1,5 +0,0 @@ -var v1: Unit -var v2: Unit? - -//public var v1: kotlin.Unit defined in root package -//public var v2: kotlin.Unit? defined in root package diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/renderer/AbstractDescriptorRendererTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/renderer/AbstractDescriptorRendererTest.kt deleted file mode 100644 index 6c74efbda3d..00000000000 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/renderer/AbstractDescriptorRendererTest.kt +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright 2010-2016 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.renderer - -import com.intellij.openapi.editor.impl.DocumentImpl -import com.intellij.openapi.util.io.FileUtil -import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment -import org.jetbrains.kotlin.container.ComponentProvider -import org.jetbrains.kotlin.container.get -import org.jetbrains.kotlin.descriptors.* -import org.jetbrains.kotlin.psi.* -import org.jetbrains.kotlin.resolve.CompilerEnvironment -import org.jetbrains.kotlin.resolve.TargetEnvironment -import org.jetbrains.kotlin.resolve.lazy.JvmResolveUtil -import org.jetbrains.kotlin.resolve.lazy.ResolveSession -import org.jetbrains.kotlin.test.ConfigurationKind -import org.jetbrains.kotlin.test.KotlinTestUtils -import org.jetbrains.kotlin.test.KotlinTestWithEnvironment -import org.jetbrains.kotlin.test.testFramework.KtUsefulTestCase -import java.io.File -import java.util.* - -abstract class AbstractDescriptorRendererTest : KotlinTestWithEnvironment() { - protected open fun getDescriptor(declaration: KtDeclaration, container: ComponentProvider): DeclarationDescriptor { - return container.get().resolveToDescriptor(declaration) - } - - protected open val targetEnvironment: TargetEnvironment - get() = CompilerEnvironment - - fun doTest(path: String) { - val fileText = FileUtil.loadFile(File(path), true) - val psiFile = KtPsiFactory(project).createFile(fileText) - - val container = JvmResolveUtil.createContainer(environment, listOf(psiFile), targetEnvironment) - val module = container.get() - - val descriptors = ArrayList() - - psiFile.accept(object : KtVisitorVoid() { - override fun visitKtFile(file: KtFile) { - val fqName = file.packageFqName - if (!fqName.isRoot) { - descriptors.add(module.getPackage(fqName)) - } - file.acceptChildren(this) - } - - override fun visitParameter(parameter: KtParameter) { - val declaringElement = parameter.parent.parent - when (declaringElement) { - is KtFunctionType -> return - is KtNamedFunction -> - addCorrespondingParameterDescriptor(getDescriptor(declaringElement, container) as FunctionDescriptor, parameter) - is KtPrimaryConstructor -> { - val ktClassOrObject: KtClassOrObject = declaringElement.getContainingClassOrObject() - val classDescriptor = getDescriptor(ktClassOrObject, container) as ClassDescriptor - addCorrespondingParameterDescriptor(classDescriptor.unsubstitutedPrimaryConstructor!!, parameter) - } - else -> super.visitParameter(parameter) - } - } - - override fun visitPropertyAccessor(accessor: KtPropertyAccessor) { - val property = accessor.property - val propertyDescriptor = getDescriptor(property, container) as PropertyDescriptor - if (accessor.isGetter) { - descriptors.add(propertyDescriptor.getter!!) - } - else { - descriptors.add(propertyDescriptor.setter!!) - } - accessor.acceptChildren(this) - } - - override fun visitAnonymousInitializer(initializer: KtAnonymousInitializer) { - initializer.acceptChildren(this) - } - - override fun visitDeclaration(element: KtDeclaration) { - val descriptor = getDescriptor(element, container) - descriptors.add(descriptor) - if (descriptor is ClassDescriptor) { - // if class has primary constructor then we visit it later, otherwise add it artificially - if (element !is KtClassOrObject || !element.hasExplicitPrimaryConstructor()) { - if (descriptor.unsubstitutedPrimaryConstructor != null) { - descriptors.add(descriptor.unsubstitutedPrimaryConstructor!!) - } - } - } - element.acceptChildren(this) - } - - override fun visitKtElement(element: KtElement) { - element.acceptChildren(this) - } - - private fun addCorrespondingParameterDescriptor(functionDescriptor: FunctionDescriptor, parameter: KtParameter) { - for (valueParameterDescriptor in functionDescriptor.valueParameters) { - if (valueParameterDescriptor.name == parameter.nameAsName) { - descriptors.add(valueParameterDescriptor) - } - } - parameter.acceptChildren(this) - } - }) - - val renderer = DescriptorRenderer.withOptions { - classifierNamePolicy = ClassifierNamePolicy.FULLY_QUALIFIED - modifiers = DescriptorRendererModifier.ALL - annotationArgumentsRenderingPolicy = AnnotationArgumentsRenderingPolicy.UNLESS_EMPTY - } - val renderedDescriptors = descriptors.map { renderer.render(it) }.joinToString(separator = "\n") - - val document = DocumentImpl(psiFile.text) - KtUsefulTestCase.assertSameLines(KotlinTestUtils.getLastCommentedLines(document), renderedDescriptors) - } - - override fun createEnvironment(): KotlinCoreEnvironment { - return createEnvironmentWithMockJdk(ConfigurationKind.JDK_ONLY) - } -} diff --git a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt index b0116c608f5..d7ea5095392 100644 --- a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt +++ b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt @@ -43,8 +43,6 @@ import org.jetbrains.kotlin.lexer.kotlin.AbstractKotlinLexerTest import org.jetbrains.kotlin.modules.xml.AbstractModuleXmlParserTest import org.jetbrains.kotlin.multiplatform.AbstractMultiPlatformIntegrationTest import org.jetbrains.kotlin.parsing.AbstractParsingTest -import org.jetbrains.kotlin.renderer.AbstractDescriptorRendererTest -import org.jetbrains.kotlin.renderer.AbstractFunctionDescriptorInExpressionRendererTest import org.jetbrains.kotlin.repl.AbstractReplInterpreterTest import org.jetbrains.kotlin.resolve.AbstractResolveTest import org.jetbrains.kotlin.resolve.annotation.AbstractAnnotationParameterTest @@ -267,14 +265,6 @@ fun generateJUnit3CompilerTests(args: Array) { model("compileKotlinAgainstKotlinJdk15", targetBackend = TargetBackend.JVM_IR) } - testClass { - model("renderer") - } - - testClass { - model("renderFunctionDescriptorInExpression") - } - testClass { model("modules.xml", extension = "xml") } diff --git a/compiler/tests-gen/org/jetbrains/kotlin/renderer/DescriptorRendererTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/renderer/DescriptorRendererTestGenerated.java deleted file mode 100644 index e82b16b21b8..00000000000 --- a/compiler/tests-gen/org/jetbrains/kotlin/renderer/DescriptorRendererTestGenerated.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * 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.renderer; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -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/renderer") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class DescriptorRendererTestGenerated extends AbstractDescriptorRendererTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInRenderer() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/renderer"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("Classes.kt") - public void testClasses() throws Exception { - runTest("compiler/testData/renderer/Classes.kt"); - } - - @TestMetadata("Enum.kt") - public void testEnum() throws Exception { - runTest("compiler/testData/renderer/Enum.kt"); - } - - @TestMetadata("ErrorType.kt") - public void testErrorType() throws Exception { - runTest("compiler/testData/renderer/ErrorType.kt"); - } - - @TestMetadata("FunctionTypes.kt") - public void testFunctionTypes() throws Exception { - runTest("compiler/testData/renderer/FunctionTypes.kt"); - } - - @TestMetadata("FunctionTypesInSignature.kt") - public void testFunctionTypesInSignature() throws Exception { - runTest("compiler/testData/renderer/FunctionTypesInSignature.kt"); - } - - @TestMetadata("GlobalFunctions.kt") - public void testGlobalFunctions() throws Exception { - runTest("compiler/testData/renderer/GlobalFunctions.kt"); - } - - @TestMetadata("GlobalProperties.kt") - public void testGlobalProperties() throws Exception { - runTest("compiler/testData/renderer/GlobalProperties.kt"); - } - - @TestMetadata("InheritedMembersVisibility.kt") - public void testInheritedMembersVisibility() throws Exception { - runTest("compiler/testData/renderer/InheritedMembersVisibility.kt"); - } - - @TestMetadata("KeywordsInNames.kt") - public void testKeywordsInNames() throws Exception { - runTest("compiler/testData/renderer/KeywordsInNames.kt"); - } - - @TestMetadata("ObjectWithConstructor.kt") - public void testObjectWithConstructor() throws Exception { - runTest("compiler/testData/renderer/ObjectWithConstructor.kt"); - } - - @TestMetadata("StarProjection.kt") - public void testStarProjection() throws Exception { - runTest("compiler/testData/renderer/StarProjection.kt"); - } - - @TestMetadata("TraitWithConstructor.kt") - public void testTraitWithConstructor() throws Exception { - runTest("compiler/testData/renderer/TraitWithConstructor.kt"); - } - - @TestMetadata("TypeAnnotations.kt") - public void testTypeAnnotations() throws Exception { - runTest("compiler/testData/renderer/TypeAnnotations.kt"); - } - - @TestMetadata("UnitType.kt") - public void testUnitType() throws Exception { - runTest("compiler/testData/renderer/UnitType.kt"); - } -} diff --git a/compiler/tests-gen/org/jetbrains/kotlin/renderer/FunctionDescriptorInExpressionRendererTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/renderer/FunctionDescriptorInExpressionRendererTestGenerated.java deleted file mode 100644 index 078508e7257..00000000000 --- a/compiler/tests-gen/org/jetbrains/kotlin/renderer/FunctionDescriptorInExpressionRendererTestGenerated.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * 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.renderer; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -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/renderFunctionDescriptorInExpression") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class FunctionDescriptorInExpressionRendererTestGenerated extends AbstractFunctionDescriptorInExpressionRendererTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInRenderFunctionDescriptorInExpression() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/renderFunctionDescriptorInExpression"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("basicFunExpr.kt") - public void testBasicFunExpr() throws Exception { - runTest("compiler/testData/renderFunctionDescriptorInExpression/basicFunExpr.kt"); - } - - @TestMetadata("basicFunExprArgs.kt") - public void testBasicFunExprArgs() throws Exception { - runTest("compiler/testData/renderFunctionDescriptorInExpression/basicFunExprArgs.kt"); - } - - @TestMetadata("basicLambda.kt") - public void testBasicLambda() throws Exception { - runTest("compiler/testData/renderFunctionDescriptorInExpression/basicLambda.kt"); - } - - @TestMetadata("labeledLambda.kt") - public void testLabeledLambda() throws Exception { - runTest("compiler/testData/renderFunctionDescriptorInExpression/labeledLambda.kt"); - } - - @TestMetadata("parenthesizedFunExpr.kt") - public void testParenthesizedFunExpr() throws Exception { - runTest("compiler/testData/renderFunctionDescriptorInExpression/parenthesizedFunExpr.kt"); - } - - @TestMetadata("parenthesizedLambda.kt") - public void testParenthesizedLambda() throws Exception { - runTest("compiler/testData/renderFunctionDescriptorInExpression/parenthesizedLambda.kt"); - } -} diff --git a/compiler/tests/org/jetbrains/kotlin/renderer/AbstractFunctionDescriptorInExpressionRendererTest.kt b/compiler/tests/org/jetbrains/kotlin/renderer/AbstractFunctionDescriptorInExpressionRendererTest.kt deleted file mode 100644 index c0333fe5321..00000000000 --- a/compiler/tests/org/jetbrains/kotlin/renderer/AbstractFunctionDescriptorInExpressionRendererTest.kt +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2010-2016 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.renderer - -import com.intellij.openapi.editor.impl.DocumentImpl -import com.intellij.openapi.util.io.FileUtil -import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment -import org.jetbrains.kotlin.descriptors.DeclarationDescriptor -import org.jetbrains.kotlin.descriptors.impl.FunctionExpressionDescriptor -import org.jetbrains.kotlin.psi.KtLambdaExpression -import org.jetbrains.kotlin.psi.KtNamedFunction -import org.jetbrains.kotlin.psi.KtPsiFactory -import org.jetbrains.kotlin.psi.KtTreeVisitorVoid -import org.jetbrains.kotlin.resolve.BindingContext -import org.jetbrains.kotlin.resolve.lazy.JvmResolveUtil -import org.jetbrains.kotlin.test.ConfigurationKind -import org.jetbrains.kotlin.test.KotlinTestUtils -import org.jetbrains.kotlin.test.KotlinTestWithEnvironment -import org.jetbrains.kotlin.test.testFramework.KtUsefulTestCase -import org.jetbrains.kotlin.utils.addIfNotNull -import java.io.File - -abstract class AbstractFunctionDescriptorInExpressionRendererTest : KotlinTestWithEnvironment() { - fun doTest(path: String) { - val fileText = FileUtil.loadFile(File(path), true) - val file = KtPsiFactory(project).createFile(fileText) - val bindingContext = JvmResolveUtil.analyze(file, environment).bindingContext - - val descriptors = arrayListOf() - - file.accept(object : KtTreeVisitorVoid() { - override fun visitNamedFunction(function: KtNamedFunction) { - function.acceptChildren(this) - descriptors.addIfNotNull(bindingContext.get(BindingContext.FUNCTION, function) as? FunctionExpressionDescriptor) - } - override fun visitLambdaExpression(lambdaExpression: KtLambdaExpression) { - lambdaExpression.acceptChildren(this) - descriptors.add(bindingContext.get(BindingContext.FUNCTION, lambdaExpression.functionLiteral)!!) - } - }) - - val renderer = DescriptorRenderer.withOptions { - classifierNamePolicy = ClassifierNamePolicy.FULLY_QUALIFIED - modifiers = DescriptorRendererModifier.ALL - verbose = true - annotationArgumentsRenderingPolicy = AnnotationArgumentsRenderingPolicy.UNLESS_EMPTY - } - val renderedDescriptors = descriptors.map { renderer.render(it) }.joinToString(separator = "\n") - - val document = DocumentImpl(file.text) - KtUsefulTestCase.assertSameLines(KotlinTestUtils.getLastCommentedLines(document), renderedDescriptors.toString()) - } - - override fun createEnvironment(): KotlinCoreEnvironment { - return createEnvironmentWithMockJdk(ConfigurationKind.JDK_ONLY) - } -} \ No newline at end of file