Scan functions for Sequences and Iterable #KT-7657

This commit is contained in:
Abduqodiri Qurbonzoda
2020-01-24 04:42:19 +03:00
parent 0d7e641736
commit ed7b8e9b85
16 changed files with 2411 additions and 0 deletions
+4
View File
@@ -147,6 +147,10 @@ compileTestKotlin {
}
}
compileLongRunningTestKotlin {
kotlinOptions.freeCompilerArgs += "-Xuse-experimental=kotlin.ExperimentalStdlibApi"
}
task longRunningTest(type: Test, dependsOn: longRunningTestClasses) {
group = "verification"
testClassesDirs = sourceSets.longRunningTest.output.classesDirs
@@ -139,6 +139,17 @@ class IndexOverflowJVMTest {
}
@Test
fun scanIndexedOverflow() {
assertIndexOverflow { maxIndexSequence.scanIndexed("") { index, _, s -> checkIndexPositive(index); s }.forEach { } }
}
@Test
fun scanReduceIndexedOverflow() {
assertIndexOverflow { maxIndexSequence.scanReduceIndexed { index, _, s -> checkIndexPositive(index); s }.forEach { } }
}
@Test
fun dropTwiceMaxValue() {