Codegen tests: move stdlib tests to boxWithStdlib

This commit is contained in:
Alexander Udalov
2013-02-07 20:43:13 +04:00
committed by Alexander Udalov
parent 83b93071d3
commit 8a605b3884
24 changed files with 10 additions and 103 deletions
@@ -0,0 +1,19 @@
import kotlin.util.*
import java.io.*
import java.util.*
fun sample() : Reader {
return StringReader("""Hello
World""");
}
fun box() : String {
// TODO compiler error
// both these expressions causes java.lang.NoClassDefFoundError: collections/CollectionPackage
val list1 = sample().useLines{it.toArrayList()}
val list2 = sample().useLines<ArrayList<String>>{it.toArrayList()}
if(arrayList("Hello", "World") != list1) return "fail"
if(arrayList("Hello", "World") != list2) return "fail"
return "OK"
}