[Test] Migrate tests for java 9 to regular test infrastructure

This commit is contained in:
Dmitriy Novozhilov
2021-07-14 13:27:10 +03:00
committed by teamcityserver
parent ca214bef30
commit 4f73ebbcbd
28 changed files with 303 additions and 246 deletions
@@ -0,0 +1,21 @@
// STRING_CONCAT: indy-with-constants
// JVM_TARGET: 9
inline fun test(crossinline s: (String) -> String): String {
var result = "1" + s("2") + "3" + 4 + {
"5" + s("6") + "7"
}()
result += object {
fun run() = "8" + s("9") + "10"
}.run()
return result
}
fun box(): String {
val result = test { it }
if (result != "12345678910") return "fail 1: $result"
val result2 = test { it + "_" }
return if (result2 != "12_3456_789_10") "fail 2: $result2" else "OK"
}