BC native tests port to Konan's TestRunner
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
package codegen.localClass.innerTakesCapturedFromOuter
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
fun box() {
|
||||
var previous: Any? = null
|
||||
for (i in 0 .. 2) {
|
||||
@@ -13,6 +17,6 @@ fun box() {
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@Test fun runTest() {
|
||||
box()
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
package codegen.localClass.innerWithCapture
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
fun box(s: String): String {
|
||||
class Local {
|
||||
open inner class Inner() {
|
||||
@@ -8,6 +12,6 @@ fun box(s: String): String {
|
||||
return Local().Inner().result()
|
||||
}
|
||||
|
||||
fun main(args : Array<String>) {
|
||||
@Test fun runTest() {
|
||||
println(box("OK"))
|
||||
}
|
||||
@@ -1,4 +1,8 @@
|
||||
fun main(args : Array<String>) {
|
||||
package codegen.localClass.localFunctionCallFromLocalClass
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
@Test fun runTest() {
|
||||
var x = 1
|
||||
fun local1() {
|
||||
x++
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
fun main(args : Array<String>) {
|
||||
package codegen.localClass.localFunctionInLocalClass
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
@Test fun runTest() {
|
||||
var x = 0
|
||||
class A {
|
||||
fun bar() {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
package codegen.localClass.localHierarchy
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
fun foo(s: String): String {
|
||||
open class Local {
|
||||
fun f() = s
|
||||
@@ -10,6 +14,6 @@ fun foo(s: String): String {
|
||||
return Derived().g()
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@Test fun runTest() {
|
||||
println(foo("OK"))
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
package codegen.localClass.noPrimaryConstructor
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
fun box(s: String): String {
|
||||
class Local {
|
||||
constructor(x: Int) {
|
||||
@@ -16,6 +20,6 @@ fun box(s: String): String {
|
||||
return Local(42).result() + Local("zzz").result()
|
||||
}
|
||||
|
||||
fun main(args : Array<String>) {
|
||||
@Test fun runTest() {
|
||||
println(box("OK"))
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
package codegen.localClass.objectExpressionInInitializer
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
abstract class Father {
|
||||
abstract inner class InClass {
|
||||
abstract fun work(): String
|
||||
@@ -20,6 +24,6 @@ fun box(): String {
|
||||
return Child().ChildInClass.work()
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@Test fun runTest() {
|
||||
println(box())
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
package codegen.localClass.objectExpressionInProperty
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
abstract class Father {
|
||||
abstract inner class InClass {
|
||||
abstract fun work(): String
|
||||
@@ -16,6 +20,6 @@ fun box(): String {
|
||||
return Child().ChildInClass.work()
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@Test fun runTest() {
|
||||
println(box())
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
package codegen.localClass.tryCatch
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
private fun foo() {
|
||||
val local =
|
||||
object {
|
||||
@@ -11,6 +15,6 @@ private fun foo() {
|
||||
local.bar()
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@Test fun runTest() {
|
||||
foo()
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
package codegen.localClass.virtualCallFromConstructor
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
abstract class WaitFor {
|
||||
init {
|
||||
condition()
|
||||
@@ -20,6 +24,6 @@ fun box(): String {
|
||||
return result;
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@Test fun runTest() {
|
||||
println(box())
|
||||
}
|
||||
Reference in New Issue
Block a user