StdLib cleanup: deprecated usages
This commit is contained in:
@@ -21,7 +21,7 @@ class ComplexMapJsTest : MapJsTest() {
|
||||
doTest<String>()
|
||||
}
|
||||
|
||||
override fun <T : kotlin.Comparable<T>> Collection<T>.toNormalizedList(): List<T> = this.toSortedList()
|
||||
override fun <T : kotlin.Comparable<T>> Collection<T>.toNormalizedList(): List<T> = this.sorted()
|
||||
// hashMapOf returns ComlpexHashMap because it is Generic
|
||||
override fun emptyMutableMap(): MutableMap<String, Int> = genericHashMapOf()
|
||||
override fun emptyMutableMapWithNullableKeyValue(): MutableMap<String?, Int?> = genericHashMapOf()
|
||||
@@ -39,7 +39,7 @@ class PrimitiveMapJsTest : MapJsTest() {
|
||||
assertEquals(VALUES.toNormalizedList(), map.values().toNormalizedList())
|
||||
}
|
||||
|
||||
override fun <T : kotlin.Comparable<T>> Collection<T>.toNormalizedList(): List<T> = this.toSortedList()
|
||||
override fun <T : kotlin.Comparable<T>> Collection<T>.toNormalizedList(): List<T> = this.sorted()
|
||||
override fun emptyMutableMap(): MutableMap<String, Int> = HashMap()
|
||||
override fun emptyMutableMapWithNullableKeyValue(): MutableMap<String?, Int?> = HashMap()
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ class StringJVMTest {
|
||||
assertTrue {
|
||||
data.all { it.isJavaLetter() }
|
||||
}
|
||||
assertNot {
|
||||
assertFalse {
|
||||
data.all { it.isUpperCase() }
|
||||
}
|
||||
}
|
||||
@@ -113,7 +113,7 @@ class StringJVMTest {
|
||||
assertTrue {
|
||||
data.any() { it.isDigit() }
|
||||
}
|
||||
assertNot {
|
||||
assertFalse {
|
||||
data.any() { it.isUpperCase() }
|
||||
}
|
||||
}
|
||||
@@ -362,7 +362,7 @@ class StringJVMTest {
|
||||
|
||||
@test fun orderIgnoringCase() {
|
||||
val list = listOf("Beast", "Ast", "asterisk")
|
||||
assertEquals(listOf("Ast", "Beast", "asterisk"), list.sort())
|
||||
assertEquals(listOf("Ast", "asterisk", "Beast"), list.sortBy(String.CASE_INSENSITIVE_ORDER))
|
||||
assertEquals(listOf("Ast", "Beast", "asterisk"), list.sorted())
|
||||
assertEquals(listOf("Ast", "asterisk", "Beast"), list.sortedWith(String.CASE_INSENSITIVE_ORDER))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user