File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
utbot-framework-test/src/test/kotlin/org/utbot/examples/lambda Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 1
1
package org.utbot.examples.lambda
2
2
3
3
import org.junit.jupiter.api.Test
4
+ import org.utbot.framework.plugin.api.CodegenLanguage
4
5
import org.utbot.testcheckers.eq
6
+ import org.utbot.tests.infrastructure.CodeGeneration
5
7
import org.utbot.tests.infrastructure.DoNotCalculate
6
8
import org.utbot.tests.infrastructure.UtValueTestCaseChecker
7
9
import org.utbot.tests.infrastructure.isException
8
10
9
- class CustomPredicateExampleTest : UtValueTestCaseChecker (testClass = CustomPredicateExample : :class) {
11
+ class CustomPredicateExampleTest : UtValueTestCaseChecker (
12
+ testClass = CustomPredicateExample : :class,
13
+ languagePipelines = listOf(
14
+ CodeGenerationLanguageLastStage (CodegenLanguage .JAVA ),
15
+ // TODO : https://github.com/UnitTestBot /UTBotJava /issues/88 (generics in Kotlin )
16
+ // At the moment, when we create an instance of a functional interface via lambda (through reflection),
17
+ // we need to do a type cast (e.g. `obj as Predicate <Int >`), but since generics are not supported yet,
18
+ // we use a raw type (e.g. `Predicate `) instead (which is not allowed in Kotlin ).
19
+ CodeGenerationLanguageLastStage (CodegenLanguage .KOTLIN , CodeGeneration )
20
+ )
21
+ ) {
10
22
@Test
11
23
fun testNoCapturedValuesPredicateCheck () {
12
24
checkWithException(
You can’t perform that action at this time.
0 commit comments