Adjust js collections to size transformation

This commit is contained in:
Denis Zharkov
2015-10-06 11:09:39 +03:00
parent e52e6cf869
commit a0e9754edc
5 changed files with 59 additions and 45 deletions
@@ -4,7 +4,7 @@ import java.util.AbstractList
class MyList<T>(vararg val data: T) : AbstractList<T>() {
override fun get(index: Int) = data[index]
override fun size() = data.size()
override val size: Int get() = data.size()
}
fun test<T>(expected: String, list: List<T>) {
@@ -3,7 +3,7 @@ package foo
import java.util.ArrayList;
fun test<T>(a: List<T>, b: List<T>, removed: Boolean, expected: List<T>): String? {
val t = ArrayList<T>(a.size())
val t = ArrayList<T>(a.size)
t.addAll(a)
if (t.retainAll(b) != removed) return "$a.retainAll($b) != $removed, result list: $t"