[K/N][Tests] Adjust moved codegen tests to new infra

^KT-61259
This commit is contained in:
Vladimir Sukharev
2023-12-14 20:14:47 +01:00
committed by Space Team
parent 71a834b778
commit 73032213f0
295 changed files with 1362 additions and 1145 deletions
@@ -0,0 +1,38 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
import kotlin.test.*
import kotlin.native.internal.*
import kotlin.reflect.*
class Delegate {
operator fun getValue(thisRef: Any?, property: KProperty<*>) : String {
assertTrue(property.isPermanent());
assertTrue(property.returnType.isPermanent())
return property.name
}
}
class A {
val z by Delegate()
}
fun f() = 5
fun box(): String {
val x = typeOf<Map<String, Int>>()
assertTrue(x.isPermanent())
val a = A()
assertTrue(a.z.isPermanent())
assertEquals("z", a.z)
val t = ::f
assertTrue(t.isPermanent())
assertEquals(5, t())
val z = { 6 }
assertTrue(z.isPermanent())
assertEquals(6, z())
return "OK"
}