[Tests] Use stable order for ir/kotlinLike dumps

^KT-65406
This commit is contained in:
Pavel Kunyavskiy
2024-02-05 16:23:41 +01:00
committed by Space Team
parent 0fa42a9c11
commit e6f4d6e6fa
1265 changed files with 43896 additions and 48472 deletions
@@ -1,3 +1,14 @@
fun testBreakDoWhile() {
var k: Int = 0
{ // BLOCK
do// COMPOSITE {
when {
greater(arg0 = k, arg1 = 2) -> break
}
// } while (less(arg0 = k, arg1 = 10))
}
}
fun testBreakFor() {
val xs: IntArray = IntArray(size = 10, init = local fun <anonymous>(i: Int): Int {
return i
@@ -26,15 +37,24 @@ fun testBreakWhile() {
}
}
fun testBreakDoWhile() {
fun testContinueDoWhile() {
var k: Int = 0
var s: String = ""
{ // BLOCK
do// COMPOSITE {
{ // BLOCK
k = k.inc()
k
} /*~> Unit */
when {
greater(arg0 = k, arg1 = 2) -> break
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 AssertionError(p0 = s)
}
}
fun testContinueFor() {
@@ -65,23 +85,3 @@ fun testContinueWhile() {
}
}
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 AssertionError(p0 = s)
}
}