[Tests] Use stable order for ir/kotlinLike dumps
^KT-65406
This commit is contained in:
committed by
Space Team
parent
0fa42a9c11
commit
e6f4d6e6fa
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user