Fix testData/js: replace deprecated usages: times, sortBy, reverse, splitBy.

This commit is contained in:
Ilya Gorbunov
2015-10-02 21:11:49 +03:00
parent 1c416ae5f3
commit 352ac58ba5
6 changed files with 7 additions and 7 deletions
@@ -4,7 +4,7 @@ val Int.abs: Int
get() = if (this >= 0) this else -this
fun test(xs: List<Int>): List<Int> =
xs.sortBy(comparator { a, b -> a.abs.compareTo(b.abs) })
xs.sortedWith(comparator { a, b -> a.abs.compareTo(b.abs) })
fun box(): String {
assertEquals(listOf(1, -2, 3, -4), test(listOf(-2, 1, -4, 3)))