Add tests on types of items in java chain operations

This commit is contained in:
Vitaliy.Bibaev
2017-11-17 16:48:23 +03:00
committed by Yan Zhulanow
parent 16768bd9e3
commit 6b6ccc45f0
9 changed files with 63 additions and 3 deletions
@@ -1,12 +1,27 @@
package com.intellij.debugger.streams.kotlin.psi.java
import com.intellij.debugger.streams.kotlin.lib.JavaStandardLibrarySupportProvider
import com.intellij.debugger.streams.kotlin.psi.TypedChainTestCase
import com.intellij.debugger.streams.lib.impl.StandardLibrarySupportProvider
import com.intellij.debugger.streams.kotlin.trace.dsl.KotlinTypes.DOUBLE
import com.intellij.debugger.streams.kotlin.trace.dsl.KotlinTypes.INT
import com.intellij.debugger.streams.kotlin.trace.dsl.KotlinTypes.LONG
import com.intellij.debugger.streams.kotlin.trace.dsl.KotlinTypes.NULLABLE_ANY
import com.intellij.debugger.streams.wrapper.StreamChainBuilder
/**
* @author Vitaliy.Bibaev
*/
class TypedJavaChainTest : TypedChainTestCase("streams/positive/types") {
override val kotlinChainBuilder: StreamChainBuilder = StandardLibrarySupportProvider().chainBuilder
}
override val kotlinChainBuilder: StreamChainBuilder = JavaStandardLibrarySupportProvider().chainBuilder
fun testOneCall() = doTest(NULLABLE_ANY)
fun testMapToSame() = doTest(NULLABLE_ANY, NULLABLE_ANY)
fun testPrimitiveOneCall() = doTest(INT)
fun testPrimitiveMapToSame() = doTest(LONG, LONG)
fun testMapToPrimitive() = doTest(NULLABLE_ANY, INT)
fun testMapToObj() = doTest(DOUBLE, NULLABLE_ANY)
fun testMapPrimitiveToPrimitive() = doTest(LONG, DOUBLE)
fun testFewTransitions() = doTest(NULLABLE_ANY, INT, NULLABLE_ANY, LONG, DOUBLE)
}