[K/N][Tests] Adjust moved tests interfaceCallsNCasts..vector to new infra

^KT-61259
This commit is contained in:
Vladimir Sukharev
2023-12-16 23:54:04 +01:00
committed by Space Team
parent 93642020ff
commit bb8a7b6795
163 changed files with 841 additions and 672 deletions
@@ -3,19 +3,22 @@
* that can be found in the LICENSE file.
*/
package codegen.propertyCallableReference.dynamicReceiver
import kotlin.test.*
val sb = StringBuilder()
class TestClass {
var x: Int = 42
}
fun foo(): TestClass {
println(42)
sb.append(42)
return TestClass()
}
@Test fun runTest() {
fun box(): String {
foo()::x
assertEquals("42", sb.toString())
return "OK"
}
@@ -3,16 +3,16 @@
* that can be found in the LICENSE file.
*/
package codegen.propertyCallableReference.valClass
import kotlin.test.*
class A(val x: Int)
@Test fun runTest() {
fun box(): String {
val p1 = A::x
println(p1.get(A(42)))
assertEquals(42, p1.get(A(42)))
val a = A(117)
val p2 = a::x
println(p2.get())
assertEquals(117, p2.get())
return "OK"
}
@@ -1,2 +0,0 @@
42
117
@@ -3,8 +3,6 @@
* that can be found in the LICENSE file.
*/
package codegen.propertyCallableReference.valExtension
import kotlin.test.*
class A(y: Int) {
@@ -13,10 +11,12 @@ class A(y: Int) {
val A.z get() = this.x
@Test fun runTest() {
fun box(): String {
val p1 = A::z
println(p1.get(A(42)))
assertEquals(42, p1.get(A(42)))
val a = A(117)
val p2 = a::z
println(p2.get())
assertEquals(117, p2.get())
return "OK"
}
@@ -1,2 +0,0 @@
42
117
@@ -3,13 +3,13 @@
* that can be found in the LICENSE file.
*/
package codegen.propertyCallableReference.valModule
import kotlin.test.*
val x = 42
@Test fun runTest() {
fun box(): String {
val p = ::x
println(p.get())
assertEquals(42, p.get())
return "OK"
}
@@ -1 +0,0 @@
42
@@ -3,20 +3,20 @@
* that can be found in the LICENSE file.
*/
package codegen.propertyCallableReference.varClass
import kotlin.test.*
class A(var x: Int)
@Test fun runTest() {
fun box(): String {
val p1 = A::x
val a = A(42)
p1.set(a, 117)
println(a.x)
println(p1.get(a))
assertEquals(117, a.x)
assertEquals(117, p1.get(a))
val p2 = a::x
p2.set(42)
println(a.x)
println(p2.get())
assertEquals(42, a.x)
assertEquals(42, p2.get())
return "OK"
}
@@ -1,4 +0,0 @@
117
117
42
42
@@ -3,8 +3,6 @@
* that can be found in the LICENSE file.
*/
package codegen.propertyCallableReference.varExtension
import kotlin.test.*
class A(y: Int) {
@@ -17,14 +15,16 @@ var A.z: Int
this.x = value
}
@Test fun runTest() {
fun box(): String {
val p1 = A::z
val a = A(42)
p1.set(a, 117)
println(a.x)
println(p1.get(a))
assertEquals(117, a.x)
assertEquals(117, p1.get(a))
val p2 = a::z
p2.set(42)
println(a.x)
println(p2.get())
assertEquals(42, a.x)
assertEquals(42, p2.get())
return "OK"
}
@@ -1,4 +0,0 @@
117
117
42
42
@@ -3,15 +3,15 @@
* that can be found in the LICENSE file.
*/
package codegen.propertyCallableReference.varModule
import kotlin.test.*
var x = 42
@Test fun runTest() {
fun box(): String {
val p = ::x
p.set(117)
println(x)
println(p.get())
assertEquals(117, x)
assertEquals(117, p.get())
return "OK"
}
@@ -1,2 +0,0 @@
117
117