Refactored tests using Array constructor:

Some moved to tests with stdlib
Some changed to use arrayOfNulls
This commit is contained in:
Denis Zharkov
2014-12-11 10:45:15 +03:00
committed by Alexander Udalov
parent abbcf61183
commit 654411a0b0
68 changed files with 266 additions and 253 deletions
@@ -1,11 +1,11 @@
fun box() : String {
val a = Array<Int> (5, {0})
val a = arrayOfNulls<Int>(5)
var i = 0
var sum = 0
for(el in 0..4) {
a[i] = i++
}
for (el in a) {
for (el in (a as Array<Int>)) {
sum = sum + el
}
if(sum != 10) return "a failed"