IR text tests: Stable blank lines between declarations in class

Rework rendering of kt-like dump and signatures dump in order to avoid
unstable blank line between declarations of the same level:
1. No blank line for the first declaration inside the member scope of
the class.
2. Always a single blank line between each two subsequent declarations
inside the member scope of the class.
This commit is contained in:
Dmitriy Dolovov
2023-11-23 23:00:58 +01:00
committed by Space Team
parent 4532f52898
commit 16d1e85932
231 changed files with 236 additions and 280 deletions
@@ -1,6 +1,5 @@
interface TestInterface<T : Any?> {
interface TestNestedInterface<TT : Any?> {
}
}
@@ -42,7 +42,6 @@ interface TestInterface<T : Any?> {
// Mangled name: TestInterface.TestNestedInterface
// Public signature: /TestInterface.TestNestedInterface|null[0]
interface TestNestedInterface<TT : Any?> {
}
}
@@ -83,6 +83,7 @@ class Test2 {
// Public signature: /Test2.TestInner.<init>|-8731461708390519279[0]
// Public signature debug description: <init>(1:0){}
constructor(z: Z) /* primary */
// CHECK:
// Mangled name: Test2.TestInner#<init>(1:0;kotlin.Int){}
// Public signature: /Test2.TestInner.<init>|7281397193015694517[0]
@@ -165,6 +166,7 @@ class Test4<T : Any?> {
// Public signature: /Test4.<init>|-5182794243525578284[0]
// Public signature debug description: <init>(kotlin.Int){}
constructor(x: Int) /* primary */
// CHECK:
// Mangled name: Test4#<init>(kotlin.Int;kotlin.Int){}
// Public signature: /Test4.<init>|-7691762014320324121[0]
@@ -37,6 +37,7 @@ data class Test<T : Any?> {
// Public signature: /Test.<init>|-7411275398527089511[0]
// Public signature debug description: <init>(1:0;kotlin.String){}
constructor(x: T, y: String) /* primary */
// CHECK JVM_IR:
// Mangled name: Test#component1(){}1:0
// Public signature: /Test.component1|2393470133763651536[0]
@@ -7,6 +7,7 @@ class Test<TT : Any?> : IBase<TT> {
// Public signature: /Test.<init>|-3017997426280513504[0]
// Public signature debug description: <init>(IBase<1:0>){}
constructor(impl: IBase<TT>) /* primary */
// CHECK:
// Mangled name: Test#foo(kotlin.Int){}
// Public signature: /Test.foo|-104159190164110731[0]
@@ -40,7 +41,6 @@ class Test<TT : Any?> : IBase<TT> {
// Mangled name: IBase
// Public signature: /IBase|null[0]
interface IBase<T : Any?> {
// CHECK:
// Mangled name: IBase#foo(kotlin.Int){}
// Public signature: /IBase.foo|-104159190164110731[0]