[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:
committed by
Space Team
parent
bccf69910d
commit
6e8283a6fe
+33
@@ -0,0 +1,33 @@
|
||||
package k
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: k{}p1
|
||||
// Public signature: k/p1|7711764890799440087[0]
|
||||
var p1: String? /* by */
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: k#<get-p1>(){}kotlin.String?
|
||||
// Public signature: k/p1.<get-p1>|5971261250566155614[0]
|
||||
get(): String?
|
||||
// CHECK:
|
||||
// Mangled name: k#<set-p1>(kotlin.String?){}
|
||||
// Public signature: k/p1.<set-p1>|3343971922772025315[0]
|
||||
set(<set-?>: String?): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: k{}p2
|
||||
// Public signature: k/p2|1837305664617486052[0]
|
||||
var p2: String? /* by */
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: k#<get-p2>(){}kotlin.String?
|
||||
// Public signature: k/p2.<get-p2>|-4091002339170091991[0]
|
||||
get(): String?
|
||||
// CHECK:
|
||||
// Mangled name: k#<set-p2>(kotlin.String?){}
|
||||
// Public signature: k/p2.<set-p2>|-4224463707988097282[0]
|
||||
set(<set-?>: String?): Unit
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: k#box(){}kotlin.String
|
||||
// Public signature: k/box|-9347091776561469[0]
|
||||
fun box(): String
|
||||
|
||||
Reference in New Issue
Block a user