test: add labels and breaks count tests.
This commit is contained in:
@@ -30,37 +30,51 @@ class InlineString(val res : String) {
|
||||
}
|
||||
}
|
||||
|
||||
// CHECK_BREAKS_COUNT: function=test0Param count=0 TARGET_BACKENDS=JS_IR
|
||||
// CHECK_LABELS_COUNT: function=test0Param name=$l$block count=0 TARGET_BACKENDS=JS_IR
|
||||
fun test0Param(): String {
|
||||
val inlineX = InlineString("10")
|
||||
return inlineX.foo({ -> "1"})
|
||||
}
|
||||
|
||||
// CHECK_BREAKS_COUNT: function=test1Param count=0 TARGET_BACKENDS=JS_IR
|
||||
// CHECK_LABELS_COUNT: function=test1Param name=$l$block count=0 TARGET_BACKENDS=JS_IR
|
||||
fun test1Param(): String {
|
||||
val inlineX = InlineString("10")
|
||||
return inlineX.foo11({ z: String -> z})
|
||||
}
|
||||
|
||||
// CHECK_BREAKS_COUNT: function=test1ParamCaptured count=0 TARGET_BACKENDS=JS_IR
|
||||
// CHECK_LABELS_COUNT: function=test1ParamCaptured name=$l$block count=0 TARGET_BACKENDS=JS_IR
|
||||
fun test1ParamCaptured(): String {
|
||||
val s = "100"
|
||||
val inlineX = InlineString("10")
|
||||
return inlineX.foo11({ z: String -> s})
|
||||
}
|
||||
|
||||
// CHECK_BREAKS_COUNT: function=test1ParamMissed count=0 TARGET_BACKENDS=JS_IR
|
||||
// CHECK_LABELS_COUNT: function=test1ParamMissed name=$l$block count=0 TARGET_BACKENDS=JS_IR
|
||||
fun test1ParamMissed() : String {
|
||||
val inlineX = InlineString("10")
|
||||
return inlineX.foo11({ z: String -> "111"})
|
||||
}
|
||||
|
||||
// CHECK_BREAKS_COUNT: function=test1ParamFromCallContext count=0 TARGET_BACKENDS=JS_IR
|
||||
// CHECK_LABELS_COUNT: function=test1ParamFromCallContext name=$l$block count=0 TARGET_BACKENDS=JS_IR
|
||||
fun test1ParamFromCallContext() : String {
|
||||
val inlineX = InlineString("1000")
|
||||
return inlineX.fooRes({ z: String -> z})
|
||||
}
|
||||
|
||||
// CHECK_BREAKS_COUNT: function=test2Params count=0 TARGET_BACKENDS=JS_IR
|
||||
// CHECK_LABELS_COUNT: function=test2Params name=$l$block count=0 TARGET_BACKENDS=JS_IR
|
||||
fun test2Params() : String {
|
||||
val inlineX = InlineString("1000")
|
||||
return inlineX.fooRes2({ y: String, z: String -> y + "0" + z})
|
||||
}
|
||||
|
||||
// CHECK_BREAKS_COUNT: function=test2ParamsWithCaptured count=0 TARGET_BACKENDS=JS_IR
|
||||
// CHECK_LABELS_COUNT: function=test2ParamsWithCaptured name=$l$block count=0 TARGET_BACKENDS=JS_IR
|
||||
fun test2ParamsWithCaptured() : String {
|
||||
val inlineX = InlineString("1000")
|
||||
val s = "9"
|
||||
|
||||
Reference in New Issue
Block a user