Skip to content

Commit b3da371

Browse files
committed
Do not run compilation on Kotlin tests on lambdas due to generics issues
1 parent 848f660 commit b3da371

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

utbot-framework-test/src/test/kotlin/org/utbot/examples/lambda/SimpleLambdaExamplesTest.kt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,22 @@ package org.utbot.examples.lambda
22

33
import org.junit.jupiter.api.Disabled
44
import org.junit.jupiter.api.Test
5+
import org.utbot.framework.plugin.api.CodegenLanguage
56
import org.utbot.tests.infrastructure.UtValueTestCaseChecker
67
import org.utbot.tests.infrastructure.isException
78
import org.utbot.testcheckers.eq
9+
import org.utbot.tests.infrastructure.CodeGeneration
810

9-
class SimpleLambdaExamplesTest : UtValueTestCaseChecker(testClass = SimpleLambdaExamples::class) {
11+
class SimpleLambdaExamplesTest : UtValueTestCaseChecker(
12+
testClass = SimpleLambdaExamples::class,
13+
languagePipelines = listOf(
14+
CodeGenerationLanguageLastStage(CodegenLanguage.JAVA),
15+
// TODO: generics in Kotlin. At the moment, when we create an instance of a functional interface
16+
// via lambda (through reflection), we need to do a type cast (e.g. `obj as Predicate<Int>`),
17+
// but since generics are not supported yet, we use a raw type `Predicate` instead (which is not allowed in Kotlin).
18+
CodeGenerationLanguageLastStage(CodegenLanguage.KOTLIN, CodeGeneration)
19+
)
20+
) {
1021
@Test
1122
fun testBiFunctionLambdaExample() {
1223
checkWithException(

0 commit comments

Comments
 (0)