diff --git a/idea/testData/debugger/sequence/exec/sequence/src/map/Map.kt b/idea/testData/debugger/sequence/exec/sequence/src/map/Map.kt new file mode 100644 index 00000000000..324664b3574 --- /dev/null +++ b/idea/testData/debugger/sequence/exec/sequence/src/map/Map.kt @@ -0,0 +1,7 @@ +// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +package map + +fun main(args: Array) { + // Breakpoint! + doubleArrayOf(1.0, 2.0).asSequence().map { it * it }.contains(3.0) +} \ No newline at end of file diff --git a/idea/testData/debugger/sequence/exec/sequence/src/map/MapIndexed.kt b/idea/testData/debugger/sequence/exec/sequence/src/map/MapIndexed.kt new file mode 100644 index 00000000000..ed766b8dae0 --- /dev/null +++ b/idea/testData/debugger/sequence/exec/sequence/src/map/MapIndexed.kt @@ -0,0 +1,6 @@ +package map + +fun main(args: Array) { + // Breakpoint! + intArrayOf(1, 2, 3, 4).asSequence().mapIndexed { ix, _ -> ix }.count() +} \ No newline at end of file diff --git a/idea/testData/debugger/sequence/exec/sequence/src/map/MapNotNull.kt b/idea/testData/debugger/sequence/exec/sequence/src/map/MapNotNull.kt new file mode 100644 index 00000000000..57d2795b8ba --- /dev/null +++ b/idea/testData/debugger/sequence/exec/sequence/src/map/MapNotNull.kt @@ -0,0 +1,6 @@ +package map + +fun main(args: Array) { + // Breakpoint! + val lst = listOf(1, 2, null, 3).asSequence().mapNotNull { if (it != null && it % 2 == 1) it else null }.toList() +} \ No newline at end of file diff --git a/idea/testData/debugger/sequence/exec/sequence/src/map/WithIndex.kt b/idea/testData/debugger/sequence/exec/sequence/src/map/WithIndex.kt new file mode 100644 index 00000000000..9deaa7bf548 --- /dev/null +++ b/idea/testData/debugger/sequence/exec/sequence/src/map/WithIndex.kt @@ -0,0 +1,7 @@ +// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +package map + +fun main(args: Array) { + // Breakpoint! + intArrayOf(1, 2, 3).asSequence().withIndex().forEach {} +} \ No newline at end of file diff --git a/idea/tests/com/intellij/debugger/streams/kotlin/exec/sequence/MappingOperationsTest.kt b/idea/tests/com/intellij/debugger/streams/kotlin/exec/sequence/MappingOperationsTest.kt new file mode 100644 index 00000000000..410cb105f36 --- /dev/null +++ b/idea/tests/com/intellij/debugger/streams/kotlin/exec/sequence/MappingOperationsTest.kt @@ -0,0 +1,12 @@ +// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +package com.intellij.debugger.streams.kotlin.exec.sequence + +/** + * @author Vitaliy.Bibaev + */ +class MappingOperationsTest : OperationsTestCase("map") { + fun testMap() = doTestWithResult() + fun testMapNotNull() = doTestWithResult() + fun testMapIndexed() = doTestWithResult() + fun testWithIndex() = doTestWithoutResult() +} \ No newline at end of file