Rename sortedDescendingBy to sortedByDescending
This commit is contained in:
@@ -323,12 +323,12 @@ public class SequenceTest {
|
||||
test fun sortedBy() {
|
||||
sequenceOf("it", "greater", "less").let {
|
||||
it.sortedBy { it.length() }.iterator().assertSorted { a, b -> compareValuesBy(a, b) { it.length() } <= 0 }
|
||||
it.sortedDescendingBy { it.length() }.iterator().assertSorted { a, b -> compareValuesBy(a, b) { it.length() } >= 0 }
|
||||
it.sortedByDescending { it.length() }.iterator().assertSorted { a, b -> compareValuesBy(a, b) { it.length() } >= 0 }
|
||||
}
|
||||
|
||||
sequenceOf('a', 'd', 'c', null).let {
|
||||
it.sortedBy {it}.iterator().assertSorted { a, b -> compareValues(a, b) <= 0 }
|
||||
it.sortedDescendingBy {it}.iterator().assertSorted { a, b -> compareValues(a, b) >= 0 }
|
||||
it.sortedByDescending {it}.iterator().assertSorted { a, b -> compareValues(a, b) >= 0 }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user