Replace deprecated reverse method usages.
This commit is contained in:
@@ -589,7 +589,7 @@ class CollectionTest {
|
||||
}
|
||||
|
||||
test fun sortedWith() {
|
||||
val comparator = compareBy<String> { it.toUpperCase().reverse() }
|
||||
val comparator = compareBy<String> { it.toUpperCase().reversed() }
|
||||
val data = listOf("cat", "dad", "BAD")
|
||||
|
||||
expect(listOf("BAD", "dad", "cat")) { data.sortedWith(comparator) }
|
||||
|
||||
@@ -333,7 +333,7 @@ public class SequenceTest {
|
||||
}
|
||||
|
||||
test fun sortedWith() {
|
||||
val comparator = compareBy { s: String -> s.reverse() }
|
||||
val comparator = compareBy { s: String -> s.reversed() }
|
||||
assertEquals(listOf("act", "wast", "test"), sequenceOf("act", "test", "wast").sortedWith(comparator).toList())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user