Add tests for chain building for kotlin collections
This commit is contained in:
committed by
Yan Zhulanow
parent
dd05a9b11b
commit
5ab76d1eed
+3
@@ -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 }
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun main(args: Array<String>) {
|
||||
<caret> listOf(1, 2, 3).any()
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun main(args: Array<String>) {
|
||||
<caret> listOf(1, 2, 3).map { it * it }.all { it < 20 }
|
||||
}
|
||||
+17
@@ -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()
|
||||
}
|
||||
Reference in New Issue
Block a user