Minor: migrate remaining scanReduceIndexed usages
This commit is contained in:
@@ -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.
|
* 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
|
@Test
|
||||||
fun scanReduceIndexedOverflow() {
|
fun runningReduceIndexedOverflow() {
|
||||||
assertIndexOverflow { maxIndexSequence.scanReduceIndexed { index, _, s -> checkIndexPositive(index); s }.forEach { } }
|
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))
|
assertEquals(listOf(Int.MAX_VALUE.toLong(), Int.MAX_VALUE + 1L), range.drop(Int.MAX_VALUE))
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1397,7 +1397,7 @@ class StringTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun scanReduceIndexed() = withOneCharSequenceArg { arg1 ->
|
fun runningReduceIndexed() = withOneCharSequenceArg { arg1 ->
|
||||||
for (size in 0 until 4) {
|
for (size in 0 until 4) {
|
||||||
val expected = listOf(0, 1, 6, 27).take(size).map { it.toChar() }
|
val expected = listOf(0, 1, 6, 27).take(size).map { it.toChar() }
|
||||||
val source = arg1((0.toChar() until size.toChar()).joinToString(separator = ""))
|
val source = arg1((0.toChar() until size.toChar()).joinToString(separator = ""))
|
||||||
|
|||||||
Reference in New Issue
Block a user