[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,8 +3,6 @@
* that can be found in the LICENSE file.
*/
package codegen.interfaceCallsNCasts.conservativeItable
import kotlin.test.*
interface I0 {
@@ -559,9 +557,9 @@ fun foo(i42: I42, x: Int) = i42.foo42(x)
fun bar(i_m1: I_M1, x: Int) = i_m1.bar(x)
@Test fun runTest() {
fun box(): String {
val y = Bar2()
println(bar(y, 1))
assertEquals(539, bar(y, 1))
val x0 = Bar()
var t = 0
if (check_is_I0(x0)) t = t + 1
@@ -664,7 +662,7 @@ fun bar(i_m1: I_M1, x: Int) = i_m1.bar(x)
if (check_is_I97(x0)) t = t + 98
if (check_is_I98(x0)) t = t + 99
if (check_is_I99(x0)) t = t + 100
println(t)
assertEquals(5050, t)
val x1 = I42_Impl1()
val x2 = I42_Impl2()
val x3 = I42_Impl3()
@@ -682,5 +680,7 @@ fun bar(i_m1: I_M1, x: Int) = i_m1.bar(x)
t = foo(x6, t)
t = foo(x7, t)
t = foo(x8, t)
println(t)
assertEquals(26551140, t)
return "OK"
}
@@ -1,3 +0,0 @@
539
5050
26551140
@@ -3,8 +3,6 @@
* that can be found in the LICENSE file.
*/
package codegen.interfaceCallsNCasts.diamond
import kotlin.test.*
interface A<T, U> {
@@ -19,8 +17,7 @@ class Z : B<Int>, C<String> {
override fun foo(t: String, u: Int) = "Z"
}
@Test
fun runTest() {
fun box(): String {
val z = Z()
val c: C<String> = z
val b: B<Int> = z
@@ -30,4 +27,6 @@ fun runTest() {
assertEquals("Z", c.foo("", 0))
assertEquals("Z", b.foo("", 0))
assertEquals("Z", a.foo("", 0))
return "OK"
}
@@ -3,8 +3,6 @@
* that can be found in the LICENSE file.
*/
package codegen.interfaceCallsNCasts.finalMethod
import kotlin.test.*
interface I1<T> {
@@ -21,8 +19,9 @@ class C : I2 {
override fun foo(x: Int) = x
}
@Test
fun runTest() {
fun box(): String {
val c: I2 = C()
assertEquals(42, c.foo())
return "OK"
}
@@ -3,8 +3,6 @@
* that can be found in the LICENSE file.
*/
package codegen.interfaceCallsNCasts.functionNameClash
import kotlin.test.*
interface I1<T> {
@@ -18,11 +16,12 @@ class C : I1<String>, I2<Int> {
override fun foo(x: Int) = "I2.foo($x)"
}
@Test
fun runTest() {
fun box(): String {
val c = C()
val i1: I1<String> = c
assertEquals("I1.foo(str)", i1.foo("str"))
val i2: I2<Int> = c
assertEquals("I2.foo(42)", i2.foo(42))
return "OK"
}