ability to test stdlib

This commit is contained in:
Alex Tkachman
2011-11-23 09:56:20 +02:00
parent 4bf3a61621
commit cb37f7b56f
7 changed files with 94 additions and 41 deletions
@@ -1,16 +1,7 @@
import std.io.*
import java.io.*
val ByteArray.inputStream : ByteArrayInputStream
get() = ByteArrayInputStream(this)
fun InputStream.iterator() : ByteIterator =
object: ByteIterator() {
override val hasNext : Boolean
get() = available() > 0
override fun nextByte() = read().byt
}
fun box() : String {
val x = ByteArray (10)