backend/tests: Add blackbox tests from Kotlin JVM
Added tests from testData/codegen/box directory. There are blackbox tests in other directories and they are to be added.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
fun box(): String {
|
||||
var x = 0
|
||||
do x++ while (x < 5)
|
||||
if (x != 5) return "Fail 1 $x"
|
||||
|
||||
var y = 0
|
||||
do { y++ } while (y < 5)
|
||||
if (y != 5) return "Fail 2 $y"
|
||||
|
||||
var z = ""
|
||||
do { z += z.length } while (z.length < 5)
|
||||
if (z != "01234") return "Fail 3 $z"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user