[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
Vendored
+62
@@ -0,0 +1,62 @@
|
||||
// CHECK:
|
||||
// Mangled name: Ann
|
||||
// Public signature: /Ann|null[0]
|
||||
open annotation class Ann : Annotation {
|
||||
// CHECK:
|
||||
// Mangled name: Ann#<init>(){}
|
||||
// Public signature: /Ann.<init>|-5645683436151566731[0]
|
||||
constructor() /* primary */
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: A
|
||||
// Public signature: /A|null[0]
|
||||
class A {
|
||||
// CHECK:
|
||||
// Mangled name: A#<init>(){}
|
||||
// Public signature: /A.<init>|-5645683436151566731[0]
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: A#f@kotlin.String(){}kotlin.String
|
||||
// Public signature: /A.f|-7101655006580999052[0]
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: A#f@kotlin.String(){}
|
||||
// Public signature: /A.f|8972825158424444953[0]
|
||||
fun String.f(): String
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: A@kotlin.String?{}p
|
||||
// Public signature: /A.p|-5332805019112550693[0]
|
||||
val String?.p: String
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: A#<get-p>@kotlin.String?(){}kotlin.String
|
||||
// Public signature: /A.p.<get-p>|2132774030714660058[0]
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: A#<get-p>@kotlin.String?(){}
|
||||
// Public signature: /A.p.<get-p>|-206460032103866705[0]
|
||||
get(): String
|
||||
|
||||
}
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: #topLevelF@kotlin.String?(){}kotlin.String
|
||||
// Public signature: /topLevelF|1393314255563085986[0]
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: #topLevelF@kotlin.String?(){}
|
||||
// Public signature: /topLevelF|657392952960169607[0]
|
||||
fun String?.topLevelF(): String
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: @kotlin.String{}topLevelP
|
||||
// Public signature: /topLevelP|4430474858321876067[0]
|
||||
val String.topLevelP: String
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: #<get-topLevelP>@kotlin.String(){}kotlin.String
|
||||
// Public signature: /topLevelP.<get-topLevelP>|6082050321613134215[0]
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: #<get-topLevelP>@kotlin.String(){}
|
||||
// Public signature: /topLevelP.<get-topLevelP>|529461791237324071[0]
|
||||
get(): String
|
||||
|
||||
Reference in New Issue
Block a user