[KLIB][tests] Keep "klib evolution" test data under "testData/klib/" dir

This commit is contained in:
Dmitriy Dolovov
2023-08-15 14:47:24 +02:00
committed by Space Team
parent d7e9fcea04
commit 60b950b9bd
46 changed files with 173 additions and 174 deletions
@@ -0,0 +1,49 @@
// MODULE: lib
// FILE: A.kt
// VERSION: 1
class X {
var x = 17
init {
x = 19
}
init {
x = 23
}
init {
x = 29
}
var y = 31
}
// FILE: B.kt
// VERSION: 2
class X {
init {
// Empty
}
var x = 17
var y = 31
init {
x = 37
y = 41
}
}
// MODULE: mainLib(lib)
// FILE: mainLib.kt
fun lib(): String {
val x = X()
return when {
x.x != 37 -> "fail 1"
x.y != 41 -> "fail 2"
else -> "OK"
}
}
// MODULE: main(mainLib)
// FILE: main.kt
fun box(): String = lib()