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
9
9
import org.utbot.framework.plugin.api.DocRegularStmt
10
10
import org.utbot.framework.plugin.api.MockStrategyApi
11
11
import org.junit.jupiter.api.Test
12
+ import org.utbot.framework.plugin.api.CodegenLanguage
12
13
import org.utbot.testcheckers.eq
13
14
import 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
+ ) {
16
26
@Test
17
27
fun testQuickSort () {
18
28
check(
Original file line number Diff line number Diff line change @@ -13,7 +13,15 @@ import java.util.Random
13
13
import org.junit.jupiter.api.Test
14
14
import org.utbot.testcheckers.eq
15
15
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
+ ) {
17
25
@Test
18
26
fun testRandomAsParameter () {
19
27
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
3
3
import org.utbot.tests.infrastructure.UtValueTestCaseChecker
4
4
import org.utbot.tests.infrastructure.DoNotCalculate
5
5
import org.junit.jupiter.api.Test
6
+ import org.utbot.framework.plugin.api.CodegenLanguage
6
7
import org.utbot.testcheckers.eq
7
8
import org.utbot.testcheckers.ge
8
9
import org.utbot.testcheckers.withSolverTimeoutInMillis
10
+ import org.utbot.tests.infrastructure.CodeGeneration
9
11
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
+ ) {
11
21
12
22
@Test
13
23
fun testFindAndPrintSum () {
Original file line number Diff line number Diff line change @@ -13,10 +13,20 @@ import org.utbot.framework.plugin.api.DocStatement
13
13
import kotlin.math.pow
14
14
import org.junit.jupiter.api.Disabled
15
15
import org.junit.jupiter.api.Test
16
+ import org.utbot.framework.plugin.api.CodegenLanguage
16
17
import org.utbot.testcheckers.eq
17
18
import org.utbot.testcheckers.ge
19
+ import org.utbot.tests.infrastructure.CodeGeneration
18
20
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
+ ) {
20
30
@Test
21
31
fun testFactorial () {
22
32
val factorialSummary = listOf<DocStatement >(
You can’t perform that action at this time.
0 commit comments