Move ir box test under "box/ir"

This commit is contained in:
Mikhael Bogdanov
2018-08-02 09:36:31 +02:00
parent 24579c27a2
commit cb53e86183
25 changed files with 605 additions and 4 deletions
+22
View File
@@ -0,0 +1,22 @@
fun <T> assertEquals(actual: T, expected: T) {
if (actual != expected) {
throw java.lang.AssertionError("Assertion failed: $actual != $expected")
}
}
class Test(val x: Int) {
val y = x + 1
val z: Int
init {
z = y + 1
}
}
fun box(): String {
val test = Test(1)
assertEquals(test.x, 1)
assertEquals(test.y, 2)
assertEquals(test.z, 3)
return "OK"
}