In-place array sorting in JS.

This commit is contained in:
Ilya Gorbunov
2015-07-25 01:31:52 +03:00
parent 8d481fc611
commit 6f71e54268
6 changed files with 181 additions and 9 deletions
@@ -5,15 +5,6 @@ import org.junit.Test as test
class ArraysJVMTest {
test fun sort() {
var a = intArrayOf(5, 2, 1, 4, 3)
var b = intArrayOf(1, 2, 3, 4, 5)
a.sort()
for (i in a.indices)
expect(b[i]) { a[i] }
}
test fun orEmptyNull() {
val x: Array<String>? = null
val y: Array<out String>? = null