Add tests for chain building for kotlin collections

This commit is contained in:
Vitaliy.Bibaev
2017-10-27 13:42:42 +03:00
committed by Yan Zhulanow
parent dd05a9b11b
commit 5ab76d1eed
5 changed files with 29 additions and 0 deletions
@@ -0,0 +1,3 @@
fun main(args: Array<String>) {
<caret> listOf(1, 2, 3).map { it * it }.filter { it % 2 == 0 }
}
@@ -0,0 +1,3 @@
fun main(args: Array<String>) {
<caret> listOf(1, 2, 3).filter { it < 1 }
}
@@ -0,0 +1,3 @@
fun main(args: Array<String>) {
<caret> listOf(1, 2, 3).any()
}
@@ -0,0 +1,3 @@
fun main(args: Array<String>) {
<caret> listOf(1, 2, 3).map { it * it }.all { it < 20 }
}
@@ -0,0 +1,17 @@
package com.intellij.debugger.streams.kotlin.psi.collection
import com.intellij.debugger.streams.kotlin.KotlinPsiChainBuilderTestCase
import com.intellij.debugger.streams.kotlin.lib.KotlinCollectionSupportProvider
import com.intellij.debugger.streams.wrapper.StreamChainBuilder
/**
* @author Vitaliy.Bibaev
*/
class PositiveCollectionBuildTest : KotlinPsiChainBuilderTestCase.Positive("collection/positive") {
override val kotlinChainBuilder: StreamChainBuilder = KotlinCollectionSupportProvider().chainBuilder
fun testIntermediateIsLastCall() = doTest()
fun testOnlyFilterCall() = doTest()
fun testTerminationCallUsed() = doTest()
fun testOnlyTerminationCallUsed() = doTest()
}