Skip to content

Commit 06b90e9

Browse files
authored
Set correct cgLanguageAssistant in EngineProcess codegen #1918 (#1923)
Set correct cgLanguageAssistant in EngineProcess codegen
1 parent d37dd07 commit 06b90e9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

utbot-framework/src/main/kotlin/org/utbot/framework/codegen/CodeGenerator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ open class CodeGenerator(
3636
forceStaticMocking: ForceStaticMocking = ForceStaticMocking.defaultItem,
3737
generateWarningsForStaticMocking: Boolean = true,
3838
codegenLanguage: CodegenLanguage = CodegenLanguage.defaultItem,
39-
cgLanguageAssistant: CgLanguageAssistant = CgLanguageAssistant.getByCodegenLanguage(CodegenLanguage.defaultItem),
39+
cgLanguageAssistant: CgLanguageAssistant = CgLanguageAssistant.getByCodegenLanguage(codegenLanguage),
4040
parameterizedTestSource: ParametrizedTestSource = ParametrizedTestSource.defaultItem,
4141
runtimeExceptionTestsBehaviour: RuntimeExceptionTestsBehaviour = RuntimeExceptionTestsBehaviour.defaultItem,
4242
hangingTestsTimeout: HangingTestsTimeout = HangingTestsTimeout(),

utbot-framework/src/main/kotlin/org/utbot/framework/process/EngineProcessMain.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import org.utbot.framework.codegen.domain.ParametrizedTestSource
1717
import org.utbot.framework.codegen.domain.RuntimeExceptionTestsBehaviour
1818
import org.utbot.framework.codegen.domain.testFrameworkByName
1919
import org.utbot.framework.codegen.reports.TestsGenerationReport
20+
import org.utbot.framework.codegen.services.language.CgLanguageAssistant
2021
import org.utbot.framework.plugin.api.*
2122
import org.utbot.framework.plugin.api.MethodDescription
2223
import org.utbot.framework.plugin.api.util.UtContext
@@ -152,6 +153,7 @@ private fun EngineProcessModel.setup(kryoHelper: KryoHelper, watchdog: IdleWatch
152153
testFramework = testFramework,
153154
mockFramework = MockFramework.valueOf(params.mockFramework),
154155
codegenLanguage = CodegenLanguage.valueOf(params.codegenLanguage),
156+
cgLanguageAssistant = CgLanguageAssistant.getByCodegenLanguage(CodegenLanguage.valueOf(params.codegenLanguage)),
155157
parameterizedTestSource = ParametrizedTestSource.valueOf(params.parameterizedTestSource),
156158
staticsMocking = staticMocking,
157159
forceStaticMocking = kryoHelper.readObject(params.forceStaticMocking),

0 commit comments

Comments
 (0)