test: add labels and breaks count tests.

This commit is contained in:
Artem Kobzar
2022-04-08 01:30:37 +02:00
committed by teamcity
parent 12f337f63d
commit c724ca943d
69 changed files with 217 additions and 1 deletions
+8
View File
@@ -21,21 +21,29 @@ class Inline() {
}
}
// CHECK_BREAKS_COUNT: function=test1 count=0 TARGET_BACKENDS=JS_IR
// CHECK_LABELS_COUNT: function=test1 name=$l$block count=0 TARGET_BACKENDS=JS_IR
fun test1(): Int {
val inlineX = Inline()
return inlineX.foo1Int({ z: Int -> z}, 25)
}
// CHECK_BREAKS_COUNT: function=test2 count=0 TARGET_BACKENDS=JS_IR
// CHECK_LABELS_COUNT: function=test2 name=$l$block count=0 TARGET_BACKENDS=JS_IR
fun test2(): Double {
val inlineX = Inline()
return inlineX.foo1Double(25.0, { z: Double -> z})
}
// CHECK_BREAKS_COUNT: function=test3 count=0 TARGET_BACKENDS=JS_IR
// CHECK_LABELS_COUNT: function=test3 name=$l$block count=0 TARGET_BACKENDS=JS_IR
fun test3(): Double {
val inlineX = Inline()
return inlineX.foo2Param(15.0, { z1: Int, z2: Double -> z1 + z2}, 10)
}
// CHECK_BREAKS_COUNT: function=test3WithCaptured count=0 TARGET_BACKENDS=JS_IR
// CHECK_LABELS_COUNT: function=test3WithCaptured name=$l$block count=0 TARGET_BACKENDS=JS_IR
fun test3WithCaptured(): Double {
val inlineX = Inline()
var c = 11.0;