BC native tests port to Konan's TestRunner
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package a
|
||||
package codegen.delegatedProperty.delegatedOverride.a
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
import a.*
|
||||
package codegen.delegatedProperty.delegatedOverride_main
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
import codegen.delegatedProperty.delegatedOverride.a.*
|
||||
|
||||
open class C: B() {
|
||||
override val x: Int = 156
|
||||
@@ -11,7 +15,7 @@ open class C: B() {
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@Test fun runTest() {
|
||||
val c = C()
|
||||
c.foo()
|
||||
}
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
package codegen.delegatedProperty.lazy
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
val lazyValue: String by lazy {
|
||||
println("computed!")
|
||||
"Hello"
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@Test fun runTest() {
|
||||
println(lazyValue)
|
||||
println(lazyValue)
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
package codegen.delegatedProperty.local
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
fun foo(): Int {
|
||||
@@ -13,6 +17,6 @@ fun foo(): Int {
|
||||
return x
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@Test fun runTest() {
|
||||
println(foo())
|
||||
}
|
||||
@@ -1,9 +1,13 @@
|
||||
package codegen.delegatedProperty.map
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
class User(val map: Map<String, Any?>) {
|
||||
val name: String by map
|
||||
val age: Int by map
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@Test fun runTest() {
|
||||
val user = User(mapOf(
|
||||
"name" to "John Doe",
|
||||
"age" to 25
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
package codegen.delegatedProperty.observable
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
class User {
|
||||
@@ -7,7 +11,7 @@ class User {
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@Test fun runTest() {
|
||||
val user = User()
|
||||
user.name = "first"
|
||||
user.name = "second"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
package codegen.delegatedProperty.packageLevel
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Delegate {
|
||||
@@ -9,6 +13,6 @@ class Delegate {
|
||||
|
||||
val x: Int by Delegate()
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@Test fun runTest() {
|
||||
println(x)
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
package codegen.delegatedProperty.simpleVal
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Delegate {
|
||||
@@ -11,6 +15,6 @@ class C {
|
||||
val x: Int by Delegate()
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@Test fun runTest() {
|
||||
println(C().x)
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
package codegen.delegatedProperty.simpleVar
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Delegate {
|
||||
@@ -18,7 +22,7 @@ class C {
|
||||
var x: Int by Delegate()
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@Test fun runTest() {
|
||||
val c = C()
|
||||
println(c.x)
|
||||
c.x = 117
|
||||
|
||||
Reference in New Issue
Block a user