Make zipWithNext work & add test

This commit is contained in:
Vitaliy.Bibaev
2017-12-21 15:49:20 +03:00
committed by Yan Zhulanow
parent d8bc73367f
commit eaee6697f2
2 changed files with 11 additions and 12 deletions
@@ -4,6 +4,7 @@ package com.intellij.debugger.streams.kotlin.lib.sequence
import com.intellij.debugger.streams.lib.IntermediateOperation
import com.intellij.debugger.streams.lib.impl.*
import com.intellij.debugger.streams.resolve.AppendResolver
import com.intellij.debugger.streams.resolve.PairMapResolver
import com.intellij.debugger.streams.trace.impl.handler.unified.DistinctByKeyHandler
import com.intellij.debugger.streams.trace.impl.handler.unified.DistinctTraceHandler
@@ -28,7 +29,7 @@ class KotlinSequencesSupport : LibrarySupportBase() {
addIntermediateOperationsSupport(ConcatOperation("plus", AppendResolver()))
addIntermediateOperationsSupport(ConcatOperation("plusElement", AppendResolver()))
addIntermediateOperationsSupport()
addIntermediateOperationsSupport(OrderBasedOperation("zipWithNext", PairMapResolver()))
}
private fun filterOperations(vararg names: String): Array<IntermediateOperation> =
@@ -13,16 +13,16 @@ count
after: nothing
mappings for zipWithNext
direct:
1 -> nothing
2 -> nothing
4 -> nothing
6 -> nothing
8 -> nothing
1 -> 3
2 -> 3,5
4 -> 5,7
6 -> 7,9
8 -> 9
reverse:
nothing <- 3
nothing <- 5
nothing <- 7
nothing <- 9
1,2 <- 3
2,4 <- 5
4,6 <- 7
6,8 <- 9
mappings for count
direct:
3 -> nothing
@@ -33,6 +33,4 @@ mappings for count
empty
Disconnected from the target VM
WRONG
Process finished with exit code 0