StdLib cleanup, deprecated symbol usage: size() and length()

This commit is contained in:
Ilya Gorbunov
2015-11-14 05:56:57 +03:00
parent 21e2e68ed4
commit 07654eb82b
59 changed files with 730 additions and 730 deletions
@@ -267,7 +267,7 @@ public class SequenceTest {
@test fun sequenceExtensions() {
val d = ArrayList<Int>()
sequenceOf(0, 1, 2, 3, 4, 5).takeWhileTo(d, { i -> i < 4 })
assertEquals(4, d.size())
assertEquals(4, d.size)
}
@test fun flatMapAndTakeExtractTheTransformedElements() {
@@ -330,8 +330,8 @@ 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.sortedByDescending { it.length() }.iterator().assertSorted { a, b -> compareValuesBy(a, b) { it.length() } >= 0 }
it.sortedBy { 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 {