Rename sortedDescendingBy to sortedByDescending

This commit is contained in:
Ilya Gorbunov
2015-07-27 20:08:44 +03:00
parent 002c3e850f
commit 521e0b679d
5 changed files with 89 additions and 89 deletions
@@ -828,8 +828,8 @@ class ArraysTest {
fun String.nullIfEmpty() = if (isEmpty()) null else this
arrayOf(null, "").let {
expect(listOf(null, "")) { it.sortedBy { it.orEmpty()}}
expect(listOf("", null)) { it.sortedDescendingBy { it.orEmpty() }}
expect(listOf("", null)) { it.sortedDescendingBy { it?.nullIfEmpty() }}
expect(listOf("", null)) { it.sortedByDescending { it.orEmpty() }}
expect(listOf("", null)) { it.sortedByDescending { it?.nullIfEmpty() }}
}
}