Reformatted.

This commit is contained in:
Evgeny Gerashchenko
2013-03-01 23:20:15 +04:00
parent 8df2f83de0
commit bfd80e7855
+3 -3
View File
@@ -19,15 +19,15 @@ class IoTest(){
} }
} }
fun sample() : Reader { fun sample(): Reader {
return StringReader("Hello\nWorld"); return StringReader("Hello\nWorld");
} }
test fun testLineIterator() { test fun testLineIterator() {
// TODO we should maybe zap the useLines approach as it encourages // TODO we should maybe zap the useLines approach as it encourages
// use of iterators which don't close the underlying stream // use of iterators which don't close the underlying stream
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(arrayList("Hello", "World"), list1)
assertEquals(arrayList("Hello", "World"), list2) assertEquals(arrayList("Hello", "World"), list2)