JS tests: fix testData files
This commit is contained in:
+13
-6
@@ -2,15 +2,22 @@ package foo
|
||||
|
||||
import java.util.*
|
||||
|
||||
fun <T> ArrayList<T>.plusAssign(other: Collection<T>) {
|
||||
class A<T>(val list: MutableList<T>) {
|
||||
fun addAll(c: Collection<T>) {
|
||||
list.addAll(c)
|
||||
}
|
||||
}
|
||||
|
||||
fun <T> A<T>.plusAssign(other: Collection<T>) {
|
||||
addAll(other)
|
||||
}
|
||||
|
||||
fun box(): Boolean {
|
||||
var v1 = ArrayList<String>()
|
||||
val v2 = ArrayList<String>()
|
||||
v1.add("foo")
|
||||
v2.add("bar")
|
||||
v1 += v2
|
||||
var v1 = arrayListOf("foo")
|
||||
val v2 = listOf("bar")
|
||||
|
||||
val a = A(v1)
|
||||
a += v2
|
||||
|
||||
return (v1.size() == 2 && v1[0] == "foo" && v1[1] == "bar")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user