[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
+56
@@ -0,0 +1,56 @@
|
||||
// CHECK:
|
||||
// Mangled name: KRunnable
|
||||
// Public signature: /KRunnable|null[0]
|
||||
fun interface KRunnable {
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: KRunnable#run(){}
|
||||
// Public signature: /KRunnable.run|-991178076551934874[0]
|
||||
abstract fun run(): Unit
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #foo0(){}
|
||||
// Public signature: /foo0|854950155582184407[0]
|
||||
fun foo0(): Unit
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: #foo1(kotlin.IntArray...){}kotlin.Int
|
||||
// Public signature: /foo1|7470134185704818303[0]
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: #foo1(kotlin.IntArray...){}
|
||||
// Public signature: /foo1|-6748328364529290172[0]
|
||||
fun foo1(vararg xs: Int): Int
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: #testSamConstructor(){}KRunnable
|
||||
// Public signature: /testSamConstructor|-5482155559435579976[0]
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: #testSamConstructor(){}
|
||||
// Public signature: /testSamConstructor|-7853436018033066699[0]
|
||||
fun testSamConstructor(): KRunnable
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #testSamConversion(){}
|
||||
// Public signature: /testSamConversion|8522656930427711360[0]
|
||||
fun testSamConversion(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #testSamConversionOnAdapted(){}
|
||||
// Public signature: /testSamConversionOnAdapted|2809940309834714371[0]
|
||||
fun testSamConversionOnAdapted(): Unit
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: #testSamCosntructorOnAdapted(){}KRunnable
|
||||
// Public signature: /testSamCosntructorOnAdapted|655519272240812814[0]
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: #testSamCosntructorOnAdapted(){}
|
||||
// Public signature: /testSamCosntructorOnAdapted|-7927635342265674772[0]
|
||||
fun testSamCosntructorOnAdapted(): KRunnable
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #use(KRunnable){}
|
||||
// Public signature: /use|3076420774911186780[0]
|
||||
fun use(r: KRunnable): Unit
|
||||
|
||||
Reference in New Issue
Block a user