Move ByteArray.inputStream() method from kotlin package to kotlin.io

This commit is contained in:
Ilya Gorbunov
2015-09-24 22:30:24 +03:00
parent 8de40c01b9
commit 379c39a2ef
3 changed files with 22 additions and 4 deletions
+5 -3
View File
@@ -9,7 +9,7 @@ import org.junit.Test as test
class OldStdlibTest() {
@test fun testCollectionEmpty() {
assertNot {
assertFalse {
listOf(0, 1, 2).isEmpty()
}
}
@@ -27,8 +27,10 @@ class OldStdlibTest() {
x [index] = index.toByte()
}
for(b in x.inputStream()) {
println(b)
x.inputStream().use { stream ->
for(b in stream) {
println(b)
}
}
}
}