mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
Fix testData/codegen: replace deprecated sort usages.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
class K {
|
||||
fun reverse(s: String): String {
|
||||
return s.reverse()
|
||||
return s.reversed()
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -2,9 +2,9 @@ import kotlin.reflect.*
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(listOf("equals", "hashCode", "member", "staticMethod", "toString"), J::class.members.map { it.name }.toSortedList())
|
||||
assertEquals(listOf("equals", "hashCode", "member", "staticMethod", "toString"), J::class.functions.map { it.name }.toSortedList())
|
||||
assertEquals(listOf("member", "staticMethod"), J::class.declaredFunctions.map { it.name }.toSortedList())
|
||||
assertEquals(listOf("equals", "hashCode", "member", "staticMethod", "toString"), J::class.members.map { it.name }.sorted())
|
||||
assertEquals(listOf("equals", "hashCode", "member", "staticMethod", "toString"), J::class.functions.map { it.name }.sorted())
|
||||
assertEquals(listOf("member", "staticMethod"), J::class.declaredFunctions.map { it.name }.sorted())
|
||||
|
||||
assertEquals(1, J::class.constructors.size())
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(listOf("Inner", "Nested", "PrivateNested"), J::class.nestedClasses.map { it.simpleName!! }.toSortedList())
|
||||
assertEquals(listOf("Inner", "Nested", "PrivateNested"), J::class.nestedClasses.map { it.simpleName!! }.sorted())
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user