[K/N][Tests] Adjust moved tests interfaceCallsNCasts..vector to new infra
^KT-61259
This commit is contained in:
committed by
Space Team
parent
93642020ff
commit
bb8a7b6795
+11
-8
@@ -3,11 +3,11 @@
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
package codegen.localClass.innerTakesCapturedFromOuter
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
fun box() {
|
||||
val sb = StringBuilder()
|
||||
|
||||
fun box(): String {
|
||||
var previous: Any? = null
|
||||
for (i in 0 .. 2) {
|
||||
class Outer {
|
||||
@@ -17,11 +17,14 @@ fun box() {
|
||||
|
||||
override fun toString() = Inner().toString()
|
||||
}
|
||||
if (previous != null) println(previous.toString())
|
||||
if (previous != null) sb.appendLine(previous.toString())
|
||||
previous = Outer()
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
box()
|
||||
}
|
||||
assertEquals("""
|
||||
0
|
||||
1
|
||||
|
||||
""".trimIndent(), sb.toString())
|
||||
return "OK"
|
||||
}
|
||||
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
0
|
||||
1
|
||||
@@ -3,8 +3,6 @@
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
package codegen.localClass.innerWithCapture
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
fun box(s: String): String {
|
||||
@@ -17,6 +15,6 @@ fun box(s: String): String {
|
||||
return Local().Inner().result()
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
println(box("OK"))
|
||||
fun box(): String {
|
||||
return box("OK")
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
OK
|
||||
+2
-4
@@ -3,11 +3,9 @@
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
package codegen.localClass.localFunctionCallFromLocalClass
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
@Test fun runTest() {
|
||||
fun box(): String {
|
||||
var x = 1
|
||||
fun local1() {
|
||||
x++
|
||||
@@ -19,5 +17,5 @@ import kotlin.test.*
|
||||
}
|
||||
}
|
||||
A().bar()
|
||||
println("OK")
|
||||
return "OK"
|
||||
}
|
||||
-1
@@ -1 +0,0 @@
|
||||
OK
|
||||
+2
-4
@@ -3,11 +3,9 @@
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
package codegen.localClass.localFunctionInLocalClass
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
@Test fun runTest() {
|
||||
fun box(): String {
|
||||
var x = 0
|
||||
class A {
|
||||
fun bar() {
|
||||
@@ -26,5 +24,5 @@ import kotlin.test.*
|
||||
}
|
||||
}
|
||||
A().bar()
|
||||
println("OK")
|
||||
return "OK"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
OK
|
||||
@@ -3,8 +3,6 @@
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
package codegen.localClass.localHierarchy
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
fun foo(s: String): String {
|
||||
@@ -19,6 +17,6 @@ fun foo(s: String): String {
|
||||
return Derived().g()
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
println(foo("OK"))
|
||||
fun box(): String {
|
||||
return foo("OK")
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
OK
|
||||
@@ -3,8 +3,6 @@
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
package codegen.localClass.noPrimaryConstructor
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
fun box(s: String): String {
|
||||
@@ -25,6 +23,7 @@ fun box(s: String): String {
|
||||
return Local(42).result() + Local("zzz").result()
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
println(box("OK"))
|
||||
fun box(): String {
|
||||
assertEquals("OKOK", box("OK"))
|
||||
return "OK"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
OKOK
|
||||
-6
@@ -3,8 +3,6 @@
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
package codegen.localClass.objectExpressionInInitializer
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
abstract class Father {
|
||||
@@ -28,7 +26,3 @@ class Child : Father() {
|
||||
fun box(): String {
|
||||
return Child().ChildInClass.work()
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
println(box())
|
||||
}
|
||||
-1
@@ -1 +0,0 @@
|
||||
OK
|
||||
@@ -3,8 +3,6 @@
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
package codegen.localClass.objectExpressionInProperty
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
abstract class Father {
|
||||
@@ -24,7 +22,3 @@ class Child : Father() {
|
||||
fun box(): String {
|
||||
return Child().ChildInClass.work()
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
println(box())
|
||||
}
|
||||
-1
@@ -1 +0,0 @@
|
||||
OK
|
||||
@@ -3,23 +3,25 @@
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
package codegen.localClass.tryCatch
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
val sb = StringBuilder()
|
||||
|
||||
private fun foo() {
|
||||
val local =
|
||||
object {
|
||||
fun bar() {
|
||||
try {
|
||||
} catch (t: Throwable) {
|
||||
println(t)
|
||||
sb.appendLine(t)
|
||||
}
|
||||
}
|
||||
}
|
||||
local.bar()
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
fun box(): String {
|
||||
sb.append("OK")
|
||||
foo()
|
||||
return sb.toString()
|
||||
}
|
||||
@@ -3,8 +3,6 @@
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
package codegen.localClass.virtualCallFromConstructor
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
abstract class WaitFor {
|
||||
@@ -28,7 +26,3 @@ fun box(): String {
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
println(box())
|
||||
}
|
||||
-1
@@ -1 +0,0 @@
|
||||
OK
|
||||
Reference in New Issue
Block a user