Minor: migrate remaining scanReduceIndexed usages

This commit is contained in:
Ilya Gorbunov
2020-09-11 18:43:24 +03:00
parent 744f290fc4
commit 349cad7b9a
2 changed files with 5 additions and 5 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -145,8 +145,8 @@ class IndexOverflowJVMTest {
}
@Test
fun scanReduceIndexedOverflow() {
assertIndexOverflow { maxIndexSequence.scanReduceIndexed { index, _, s -> checkIndexPositive(index); s }.forEach { } }
fun runningReduceIndexedOverflow() {
assertIndexOverflow { maxIndexSequence.runningReduceIndexed { index, _, s -> checkIndexPositive(index); s }.forEach { } }
}
@@ -173,4 +173,4 @@ class IndexOverflowJVMTest {
assertEquals(listOf(Int.MAX_VALUE.toLong(), Int.MAX_VALUE + 1L), range.drop(Int.MAX_VALUE))
}
}
}
+1 -1
View File
@@ -1397,7 +1397,7 @@ class StringTest {
}
@Test
fun scanReduceIndexed() = withOneCharSequenceArg { arg1 ->
fun runningReduceIndexed() = withOneCharSequenceArg { arg1 ->
for (size in 0 until 4) {
val expected = listOf(0, 1, 6, 27).take(size).map { it.toChar() }
val source = arg1((0.toChar() until size.toChar()).joinToString(separator = ""))