Add test for uncovered case.

This commit is contained in:
Pavel V. Talanov
2012-03-30 13:21:49 +04:00
parent fbd1279cc9
commit 36e242a9e6
3 changed files with 26 additions and 0 deletions
@@ -0,0 +1,18 @@
package foo
fun box() : Boolean {
if (t(1) != 0) {
return false
}
if (t(0) != 1) {
return false
}
return (t(100) == 2)
}
fun t(i : Int) = when(i) {
0 -> 1
1 -> 0
else -> 2
}