[IR] add testdata for dumpKotlinLike

This commit is contained in:
Zalim Bashorov
2020-11-05 02:47:53 +03:00
committed by teamcityserver
parent d2022ab115
commit 8d5facb15f
365 changed files with 15516 additions and 0 deletions
@@ -0,0 +1,82 @@
fun testBreakFor() {
val xs: IntArray = TODO("IrConstructorCall")
var k: Int = 0
{ //BLOCK
val tmp0_iterator: IntIterator = xs.iterator()
while (tmp0_iterator.hasNext()) { //BLOCK
val x: Int = tmp0_iterator.next()
{ //BLOCK
when {
greater(arg0 = k, arg1 = 2) -> break
}
}
}
}
}
fun testBreakWhile() {
var k: Int = 0
while (less(arg0 = k, arg1 = 10)) { //BLOCK
when {
greater(arg0 = k, arg1 = 2) -> break
}
}
}
fun testBreakDoWhile() {
var k: Int = 0
{ //BLOCK
do// COMPOSITE {
when {
greater(arg0 = k, arg1 = 2) -> break
}
// } while (less(arg0 = k, arg1 = 10))
}
}
fun testContinueFor() {
val xs: IntArray = TODO("IrConstructorCall")
var k: Int = 0
{ //BLOCK
val tmp0_iterator: IntIterator = xs.iterator()
while (tmp0_iterator.hasNext()) { //BLOCK
val x: Int = tmp0_iterator.next()
{ //BLOCK
when {
greater(arg0 = k, arg1 = 2) -> continue
}
}
}
}
}
fun testContinueWhile() {
var k: Int = 0
while (less(arg0 = k, arg1 = 10)) { //BLOCK
when {
greater(arg0 = k, arg1 = 2) -> continue
}
}
}
fun testContinueDoWhile() {
var k: Int = 0
var s: String = ""
{ //BLOCK
do// COMPOSITE {
{ //BLOCK
k = k.inc()
k
} /*~> Unit */
when {
greater(arg0 = k, arg1 = 2) -> continue
}
s = s.plus(other = k +
";")
// } while (less(arg0 = k, arg1 = 10))
}
when {
EQEQ(arg0 = s, arg1 = "1;2;").not() -> throw TODO("IrConstructorCall")
}
}