[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
+74
@@ -0,0 +1,74 @@
|
||||
// CHECK:
|
||||
// Mangled name: Host
|
||||
// Public signature: /Host|null[0]
|
||||
object Host {
|
||||
// CHECK:
|
||||
// Mangled name: Host@kotlin.String{}plusK
|
||||
// Public signature: /Host.plusK|-5135341778615178066[0]
|
||||
val String.plusK: String /* by */
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Host#<get-plusK>@kotlin.String(){}kotlin.String
|
||||
// Public signature: /Host.plusK.<get-plusK>|3745691594714867630[0]
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: Host#<get-plusK>@kotlin.String(){}
|
||||
// Public signature: /Host.plusK.<get-plusK>|9025996815801643210[0]
|
||||
get(): String
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: Host{}ok
|
||||
// Public signature: /Host.ok|3084714860561867417[0]
|
||||
val ok: String
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Host#<get-ok>(){}kotlin.String
|
||||
// Public signature: /Host.ok.<get-ok>|-4000622060828023401[0]
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: Host#<get-ok>(){}
|
||||
// Public signature: /Host.ok.<get-ok>|6963158084917262476[0]
|
||||
get
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: Host.StringDelegate
|
||||
// Public signature: /Host.StringDelegate|null[0]
|
||||
class StringDelegate {
|
||||
// CHECK:
|
||||
// Mangled name: Host.StringDelegate{}s
|
||||
// Public signature: /Host.StringDelegate.s|7217541905509134881[0]
|
||||
val s: String
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Host.StringDelegate#<get-s>(){}kotlin.String
|
||||
// Public signature: /Host.StringDelegate.s.<get-s>|4142379646177092803[0]
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: Host.StringDelegate#<get-s>(){}
|
||||
// Public signature: /Host.StringDelegate.s.<get-s>|-1662172381559511151[0]
|
||||
get
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: Host.StringDelegate#<init>(kotlin.String){}
|
||||
// Public signature: /Host.StringDelegate.<init>|1280618353163213788[0]
|
||||
constructor(s: String) /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Host.StringDelegate#getValue(kotlin.String;kotlin.Any){}kotlin.String
|
||||
// Public signature: /Host.StringDelegate.getValue|-6458230510682528416[0]
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: Host.StringDelegate#getValue(kotlin.String;kotlin.Any){}
|
||||
// Public signature: /Host.StringDelegate.getValue|7907668248030418959[0]
|
||||
operator fun getValue(receiver: String, p: Any): String
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: Host#<init>(){}
|
||||
// Public signature: /Host.<init>|-5645683436151566731[0]
|
||||
private constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Host#provideDelegate@kotlin.String(kotlin.Any?;kotlin.Any){}Host.StringDelegate
|
||||
// Public signature: /Host.provideDelegate|8603848002271829719[0]
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: Host#provideDelegate@kotlin.String(kotlin.Any?;kotlin.Any){}
|
||||
// Public signature: /Host.provideDelegate|-84581881633703397[0]
|
||||
operator fun String.provideDelegate(host: Any?, p: Any): StringDelegate
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user