New stdlib generators

This commit is contained in:
Ilya Ryzhenkov
2014-03-18 13:45:31 +04:00
committed by Andrey Breslav
parent 0980f5e40a
commit e37d8174c3
109 changed files with 13317 additions and 7735 deletions
@@ -0,0 +1,29 @@
package test.collections
import kotlin.test.*
import java.util.*
import org.junit.Test as test
class MutableCollectionTest {
test fun fromIterable() {
val data: Iterable<String> = arrayListOf("foo", "bar")
val collection = ArrayList<String>()
collection.addAll(data)
assertEquals(data, collection)
}
test fun fromStream() {
val list = arrayListOf("foo", "bar")
val collection = ArrayList<String>()
collection.addAll(list.stream())
assertEquals(list, collection)
}
}