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
@@ -2,7 +2,6 @@
// Mangled name: IRunnable
// Public signature: /IRunnable|null[0]
fun interface IRunnable {
// CHECK:
// Mangled name: IRunnable#run(){}
// Public signature: /IRunnable.run|-991178076551934874[0]
@@ -2,7 +2,6 @@
// Mangled name: Foo
// Public signature: /Foo|null[0]
fun interface Foo {
// CHECK JVM_IR:
// Mangled name: Foo#invoke(){}kotlin.String
// Public signature: /Foo.invoke|8861605044563078664[0]
@@ -2,7 +2,6 @@
// Mangled name: KRunnable
// Public signature: /KRunnable|null[0]
fun interface KRunnable {
// CHECK:
// Mangled name: KRunnable#invoke(){}
// Public signature: /KRunnable.invoke|-4663091332620260873[0]
@@ -1,5 +1,4 @@
fun interface Foo : Function0<Int> {
}
fun id(foo: Foo): Any {
@@ -2,7 +2,6 @@
// Mangled name: Foo
// Public signature: /Foo|null[0]
fun interface Foo : Function0<Int> {
// CHECK JVM_IR:
// Mangled name: Foo#invoke(){}kotlin.Int
// Public signature: /Foo.invoke|906964710558498066[0]
@@ -54,7 +54,6 @@ class J {
// Mangled name: Fn
// Public signature: /Fn|null[0]
fun interface Fn<T : Any?, R : Any?> {
// CHECK JVM_IR:
// Mangled name: Fn#run(kotlin.String;kotlin.Int;1:0){}1:1
// Public signature: /Fn.run|6229634511602909233[0]
@@ -2,7 +2,6 @@
// Mangled name: IFoo
// Public signature: /IFoo|null[0]
fun interface IFoo {
// CHECK:
// Mangled name: IFoo#foo(kotlin.Int){}
// Public signature: /IFoo.foo|-104159190164110731[0]
@@ -2,7 +2,6 @@
// Mangled name: MyRunnable
// Public signature: /MyRunnable|null[0]
fun interface MyRunnable {
// CHECK:
// Mangled name: MyRunnable#run(){}
// Public signature: /MyRunnable.run|-991178076551934874[0]
@@ -2,7 +2,6 @@
// Mangled name: KRunnable
// Public signature: /KRunnable|null[0]
fun interface KRunnable {
// CHECK:
// Mangled name: KRunnable#run(){}
// Public signature: /KRunnable.run|-991178076551934874[0]
@@ -83,7 +83,6 @@ fun <T> test7b(a: T) where T : Function1<Int, Unit>, T : Function0<Unit> {
}
interface Unrelated {
}
fun <T> test7c(a: T) where T : Unrelated, T : Function0<Unit> {
@@ -83,7 +83,6 @@ fun <T> test7b(a: T) where T : Function1<Int, Unit>, T : Function0<Unit> {
}
interface Unrelated {
}
fun <T> test7c(a: T) where T : Unrelated, T : Function0<Unit> {
@@ -2,7 +2,6 @@
// Mangled name: KRunnable
// Public signature: /KRunnable|null[0]
fun interface KRunnable {
// CHECK:
// Mangled name: KRunnable#run(){}
// Public signature: /KRunnable.run|-991178076551934874[0]
@@ -15,7 +14,6 @@ fun interface KRunnable {
// Mangled name: Unrelated
// Public signature: /Unrelated|null[0]
interface Unrelated {
}
// CHECK JVM_IR: