tests: Copy stdlib tests from Kotlin/JVM
This patch copies Kotlin/JVM stdlib tests (libraries/stdlib/test) excepting ones with explicit java dependencies. It also transforms the tests to use them as box-tests.
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
import kotlin.test.*
|
||||
import kotlin.comparisons.*
|
||||
|
||||
fun box() {
|
||||
val data = arrayListOf<String>()
|
||||
data.reverse()
|
||||
assertTrue(data.isEmpty())
|
||||
|
||||
data.add("foo")
|
||||
data.reverse()
|
||||
assertEquals(listOf("foo"), data)
|
||||
|
||||
data.add("bar")
|
||||
data.reverse()
|
||||
assertEquals(listOf("bar", "foo"), data)
|
||||
|
||||
data.add("zoo")
|
||||
data.reverse()
|
||||
assertEquals(listOf("zoo", "foo", "bar"), data)
|
||||
}
|
||||
Reference in New Issue
Block a user