File tree Expand file tree Collapse file tree 4 files changed +43
-5
lines changed
utbot-framework-test/src/test/kotlin/org/utbot/examples Expand file tree Collapse file tree 4 files changed +43
-5
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,20 @@ import org.utbot.framework.plugin.api.DocPreTagStatement
99import org.utbot.framework.plugin.api.DocRegularStmt
1010import org.utbot.framework.plugin.api.MockStrategyApi
1111import org.junit.jupiter.api.Test
12+ import org.utbot.framework.plugin.api.CodegenLanguage
1213import org.utbot.testcheckers.eq
1314import org.utbot.testcheckers.ge
14-
15- internal class SortTest : UtValueTestCaseChecker (testClass = Sort : :class) {
15+ import org.utbot.tests.infrastructure.CodeGeneration
16+
17+ // TODO Kotlin mocks generics https://github.com/UnitTestBot/UTBotJava/issues/88
18+ internal class SortTest : UtValueTestCaseChecker (
19+ testClass = Sort : :class,
20+ testCodeGeneration = true ,
21+ languagePipelines = listOf(
22+ CodeGenerationLanguageLastStage (CodegenLanguage .JAVA ),
23+ CodeGenerationLanguageLastStage (CodegenLanguage .KOTLIN , CodeGeneration )
24+ )
25+ ) {
1626 @Test
1727 fun testQuickSort () {
1828 check(
Original file line number Diff line number Diff line change @@ -13,7 +13,15 @@ import java.util.Random
1313import org.junit.jupiter.api.Test
1414import org.utbot.testcheckers.eq
1515
16- internal class MockRandomTest : UtValueTestCaseChecker (testClass = MockRandomExamples : :class) {
16+ // TODO Kotlin mocks generics https://github.com/UnitTestBot/UTBotJava/issues/88
17+ internal class MockRandomTest : UtValueTestCaseChecker (
18+ testClass = MockRandomExamples : :class,
19+ testCodeGeneration = true ,
20+ languagePipelines = listOf(
21+ CodeGenerationLanguageLastStage (CodegenLanguage .JAVA ),
22+ CodeGenerationLanguageLastStage (CodegenLanguage .KOTLIN , CodeGeneration )
23+ )
24+ ) {
1725 @Test
1826 fun testRandomAsParameter () {
1927 val method: Random .() -> Int = Random ::nextInt
Original file line number Diff line number Diff line change @@ -3,11 +3,21 @@ package org.utbot.examples.natives
33import org.utbot.tests.infrastructure.UtValueTestCaseChecker
44import org.utbot.tests.infrastructure.DoNotCalculate
55import org.junit.jupiter.api.Test
6+ import org.utbot.framework.plugin.api.CodegenLanguage
67import org.utbot.testcheckers.eq
78import org.utbot.testcheckers.ge
89import org.utbot.testcheckers.withSolverTimeoutInMillis
10+ import org.utbot.tests.infrastructure.CodeGeneration
911
10- internal class NativeExamplesTest : UtValueTestCaseChecker (testClass = NativeExamples : :class) {
12+ // TODO Kotlin mocks generics https://github.com/UnitTestBot/UTBotJava/issues/88
13+ internal class NativeExamplesTest : UtValueTestCaseChecker (
14+ testClass = NativeExamples : :class,
15+ testCodeGeneration = true ,
16+ languagePipelines = listOf(
17+ CodeGenerationLanguageLastStage (CodegenLanguage .JAVA ),
18+ CodeGenerationLanguageLastStage (CodegenLanguage .KOTLIN , CodeGeneration )
19+ )
20+ ) {
1121
1222 @Test
1323 fun testFindAndPrintSum () {
Original file line number Diff line number Diff line change @@ -13,10 +13,20 @@ import org.utbot.framework.plugin.api.DocStatement
1313import kotlin.math.pow
1414import org.junit.jupiter.api.Disabled
1515import org.junit.jupiter.api.Test
16+ import org.utbot.framework.plugin.api.CodegenLanguage
1617import org.utbot.testcheckers.eq
1718import org.utbot.testcheckers.ge
19+ import org.utbot.tests.infrastructure.CodeGeneration
1820
19- internal class RecursionTest : UtValueTestCaseChecker (testClass = Recursion : :class) {
21+ // TODO Kotlin mocks generics https://github.com/UnitTestBot/UTBotJava/issues/88
22+ internal class RecursionTest : UtValueTestCaseChecker (
23+ testClass = Recursion : :class,
24+ testCodeGeneration = true ,
25+ languagePipelines = listOf(
26+ CodeGenerationLanguageLastStage (CodegenLanguage .JAVA ),
27+ CodeGenerationLanguageLastStage (CodegenLanguage .KOTLIN , CodeGeneration )
28+ )
29+ ) {
2030 @Test
2131 fun testFactorial () {
2232 val factorialSummary = listOf<DocStatement >(
You can’t perform that action at this time.
0 commit comments