6e8283a6fe
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
43 lines
1.3 KiB
Kotlin
Vendored
43 lines
1.3 KiB
Kotlin
Vendored
// CHECK:
|
|
// Mangled name: #foo(kotlin.Int;kotlin.Int){}
|
|
// Public signature: /foo|-5894601321690082118[0]
|
|
fun foo(a: Int, b: Int): Unit
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: #noReorder1(){}kotlin.Int
|
|
// Public signature: /noReorder1|8490746646819369513[0]
|
|
// CHECK JS_IR NATIVE:
|
|
// Mangled name: #noReorder1(){}
|
|
// Public signature: /noReorder1|2041802031203244090[0]
|
|
fun noReorder1(): Int
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: #noReorder2(){}kotlin.Int
|
|
// Public signature: /noReorder2|1318805316632640434[0]
|
|
// CHECK JS_IR NATIVE:
|
|
// Mangled name: #noReorder2(){}
|
|
// Public signature: /noReorder2|-4183322961147077454[0]
|
|
fun noReorder2(): Int
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: #reordered1(){}kotlin.Int
|
|
// Public signature: /reordered1|-3373748716222518893[0]
|
|
// CHECK JS_IR NATIVE:
|
|
// Mangled name: #reordered1(){}
|
|
// Public signature: /reordered1|3363717619618452144[0]
|
|
fun reordered1(): Int
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: #reordered2(){}kotlin.Int
|
|
// Public signature: /reordered2|-1663811084556182906[0]
|
|
// CHECK JS_IR NATIVE:
|
|
// Mangled name: #reordered2(){}
|
|
// Public signature: /reordered2|8960515960707640681[0]
|
|
fun reordered2(): Int
|
|
|
|
// CHECK:
|
|
// Mangled name: #test(){}
|
|
// Public signature: /test|6620506149988718649[0]
|
|
fun test(): Unit
|
|
|