Got rid of deprecated method.

This commit is contained in:
Evgeny Gerashchenko
2013-03-04 18:46:11 +04:00
parent e2a13da325
commit c93df9fd9d
+6 -6
View File
@@ -13,7 +13,7 @@ class IoTest(){
val reader = sample().buffered() val reader = sample().buffered()
try { try {
val list = reader.lineIterator().toArrayList() val list = reader.lineIterator().toArrayList()
assertEquals(arrayList("Hello", "World"), list) assertEquals(arrayListOf("Hello", "World"), list)
} finally { } finally {
reader.close() reader.close()
} }
@@ -29,8 +29,8 @@ class IoTest(){
val list1 = sample().useLines{ it.toArrayList() } val list1 = sample().useLines{ it.toArrayList() }
val list2 = sample().useLines<ArrayList<String>>{ it.toArrayList() } val list2 = sample().useLines<ArrayList<String>>{ it.toArrayList() }
assertEquals(arrayList("Hello", "World"), list1) assertEquals(arrayListOf("Hello", "World"), list1)
assertEquals(arrayList("Hello", "World"), list2) assertEquals(arrayListOf("Hello", "World"), list2)
} }
test fun testForEach() { test fun testForEach() {
@@ -47,7 +47,7 @@ class IoTest(){
} }
} }
assertEquals(arrayList("Hello", "World"), list) assertEquals(arrayListOf("Hello", "World"), list)
} }
test fun testForEachLine() { test fun testForEachLine() {
@@ -69,7 +69,7 @@ class IoTest(){
list.add(it) list.add(it)
} }
assertEquals(arrayList("Hello", "World"), list) assertEquals(arrayListOf("Hello", "World"), list)
} }
test fun testForEachLineFile() { test fun testForEachLineFile() {
@@ -82,7 +82,7 @@ class IoTest(){
list.add(it) list.add(it)
} }
assertEquals(arrayList("Hello", "World"), list) assertEquals(arrayListOf("Hello", "World"), list)
file.deleteOnExit() file.deleteOnExit()
} }