[IR] Dump IdSignatures and mangled names in irText tests

The reason #1 for this feature is that we want to test IdSignatures
generated for declarations. Currently, there is no (easy) way to ensure
that a change in the signature building logic doesn't cause any breaking
changes wrt klibs.

Now, most IdSignatures include hashed mangled names in them, so even if
we catch a regression where the included hash changes, there would be no
way of knowing immediately what caused it, unless we'd also have mangled
names in the expectations.

The reason #2 is to test the manglers themselves. Currently, there are
no tests for them. They heavily duplicate each other, this is already
causing issues (see KT-57427) that would be very hard to catch without
these tests.

^KT-58238 Fixed
This commit is contained in:
Sergej Jaskiewicz
2023-04-06 15:07:36 +02:00
committed by Space Team
parent bccf69910d
commit 6e8283a6fe
791 changed files with 36162 additions and 357 deletions
@@ -0,0 +1,84 @@
// CHECK:
// Mangled name: {}I0
// Public signature: /I0|3638397844945051376[0]
const val I0: Int
// CHECK JVM_IR:
// Mangled name: #<get-I0>(){}kotlin.Int
// Public signature: /I0.<get-I0>|-6746694356593193165[0]
// CHECK JS_IR NATIVE:
// Mangled name: #<get-I0>(){}
// Public signature: /I0.<get-I0>|7085170094336958136[0]
get
// CHECK:
// Mangled name: {}I1
// Public signature: /I1|84494794639401383[0]
const val I1: Int
// CHECK JVM_IR:
// Mangled name: #<get-I1>(){}kotlin.Int
// Public signature: /I1.<get-I1>|-8819240179982204215[0]
// CHECK JS_IR NATIVE:
// Mangled name: #<get-I1>(){}
// Public signature: /I1.<get-I1>|1430672906566406691[0]
get
// CHECK:
// Mangled name: {}I2
// Public signature: /I2|-5820322169900540552[0]
const val I2: Int
// CHECK JVM_IR:
// Mangled name: #<get-I2>(){}kotlin.Int
// Public signature: /I2.<get-I2>|-4989683773709385937[0]
// CHECK JS_IR NATIVE:
// Mangled name: #<get-I2>(){}
// Public signature: /I2.<get-I2>|-1160209788406877161[0]
get
// CHECK:
// Mangled name: {}STR1
// Public signature: /STR1|-6743560849647323388[0]
const val STR1: String
// CHECK JVM_IR:
// Mangled name: #<get-STR1>(){}kotlin.String
// Public signature: /STR1.<get-STR1>|-2293085048547070941[0]
// CHECK JS_IR NATIVE:
// Mangled name: #<get-STR1>(){}
// Public signature: /STR1.<get-STR1>|5781950605000309766[0]
get
// CHECK:
// Mangled name: {}STR2
// Public signature: /STR2|373630768127354084[0]
const val STR2: String
// CHECK JVM_IR:
// Mangled name: #<get-STR2>(){}kotlin.String
// Public signature: /STR2.<get-STR2>|1585456442054637269[0]
// CHECK JS_IR NATIVE:
// Mangled name: #<get-STR2>(){}
// Public signature: /STR2.<get-STR2>|8041479152331919578[0]
get
// CHECK:
// Mangled name: {}STR3
// Public signature: /STR3|-2584825627971705247[0]
const val STR3: String
// CHECK JVM_IR:
// Mangled name: #<get-STR3>(){}kotlin.String
// Public signature: /STR3.<get-STR3>|-7307022761040876675[0]
// CHECK JS_IR NATIVE:
// Mangled name: #<get-STR3>(){}
// Public signature: /STR3.<get-STR3>|8574952695803340733[0]
get
// CHECK:
// Mangled name: {}STR4
// Public signature: /STR4|-8283585211440994945[0]
const val STR4: String
// CHECK JVM_IR:
// Mangled name: #<get-STR4>(){}kotlin.String
// Public signature: /STR4.<get-STR4>|-2113476242053901162[0]
// CHECK JS_IR NATIVE:
// Mangled name: #<get-STR4>(){}
// Public signature: /STR4.<get-STR4>|-7243567156065898284[0]
get