Migrate CompileKotlinAgainstKotlin test to multi-file framework

This commit is contained in:
Alexander Udalov
2016-02-24 12:02:25 +03:00
committed by Alexander Udalov
parent 5884d4be79
commit cc8af573f9
69 changed files with 569 additions and 358 deletions
@@ -0,0 +1,25 @@
// FILE: A.kt
package a
public var topLevel: Int = 42
public val String.extension: Long
get() = length.toLong()
// FILE: B.kt
import a.*
fun main(args: Array<String>) {
val f = ::topLevel
val x1 = f.get()
if (x1 != 42) throw AssertionError("Fail x1: $x1")
f.set(239)
val x2 = f.get()
if (x2 != 239) throw AssertionError("Fail x2: $x2")
val g = String::extension
val y1 = g.get("abcde")
if (y1 != 5L) throw AssertionError("Fail y1: $y1")
}