BC native tests port to Konan's TestRunner
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
class Test {
|
||||
package codegen.propertyCallableReference.dynamicReceiver
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
class TestClass {
|
||||
var x: Int = 42
|
||||
}
|
||||
|
||||
fun foo(): Test {
|
||||
fun foo(): TestClass {
|
||||
println(42)
|
||||
return Test()
|
||||
return TestClass()
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@Test fun runTest() {
|
||||
foo()::x
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
package a
|
||||
package codegen.propertyCallableReference.linkTest.a
|
||||
|
||||
class A(val x: Int)
|
||||
@@ -1,6 +1,10 @@
|
||||
import a.A
|
||||
package codegen.propertyCallableReference.linkTest_main
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
import kotlin.test.*
|
||||
|
||||
import codegen.propertyCallableReference.linkTest.a.A
|
||||
|
||||
@Test fun runTest() {
|
||||
val p1 = A::x
|
||||
println(p1.get(A(42)))
|
||||
val a = A(117)
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package codegen.propertyCallableReference.valClass
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
class A(val x: Int)
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@Test fun runTest() {
|
||||
val p1 = A::x
|
||||
println(p1.get(A(42)))
|
||||
val a = A(117)
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
package codegen.propertyCallableReference.valExtension
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
class A(y: Int) {
|
||||
var x = y
|
||||
}
|
||||
|
||||
val A.z get() = this.x
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@Test fun runTest() {
|
||||
val p1 = A::z
|
||||
println(p1.get(A(42)))
|
||||
val a = A(117)
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package codegen.propertyCallableReference.valModule
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
val x = 42
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@Test fun runTest() {
|
||||
val p = ::x
|
||||
println(p.get())
|
||||
}
|
||||
@@ -1,6 +1,10 @@
|
||||
package codegen.propertyCallableReference.varClass
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
class A(var x: Int)
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@Test fun runTest() {
|
||||
val p1 = A::x
|
||||
val a = A(42)
|
||||
p1.set(a, 117)
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
package codegen.propertyCallableReference.varExtension
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
class A(y: Int) {
|
||||
var x = y
|
||||
}
|
||||
@@ -8,7 +12,7 @@ var A.z: Int
|
||||
this.x = value
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@Test fun runTest() {
|
||||
val p1 = A::z
|
||||
val a = A(42)
|
||||
p1.set(a, 117)
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package codegen.propertyCallableReference.varModule
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
var x = 42
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@Test fun runTest() {
|
||||
val p = ::x
|
||||
p.set(117)
|
||||
println(x)
|
||||
|
||||
Reference in New Issue
Block a user