Added tests

This commit is contained in:
Valentin Kipyatkov
2016-08-12 19:12:04 +03:00
parent f5530c8bf0
commit bfed954e85
3 changed files with 34 additions and 0 deletions
@@ -0,0 +1,11 @@
// WITH_RUNTIME
// IS_APPLICABLE: false
fun foo(list: List<String>): Int? {
var index = 0
<caret>for (s in list) {
val x = s.length * index++
index++
if (x > 0) return x
}
return null
}
@@ -0,0 +1,11 @@
// WITH_RUNTIME
// IS_APPLICABLE: false
fun foo(list: List<String>): Int {
var index = 0
<caret>for (s in list) {
val x = s.length * index++
print(x)
print(s)
}
return index
}