From 2c7003fbc3b9a96c740652a5a5704fabb48776dc Mon Sep 17 00:00:00 2001 From: Ivan Volkov Date: Fri, 10 Mar 2023 12:32:52 +0300 Subject: [PATCH] Set correct cgLanguageAssistant in EngineProcess codegen --- .../main/kotlin/org/utbot/framework/codegen/CodeGenerator.kt | 2 +- .../kotlin/org/utbot/framework/process/EngineProcessMain.kt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/utbot-framework/src/main/kotlin/org/utbot/framework/codegen/CodeGenerator.kt b/utbot-framework/src/main/kotlin/org/utbot/framework/codegen/CodeGenerator.kt index b59794d45e..f11ddd6d65 100644 --- a/utbot-framework/src/main/kotlin/org/utbot/framework/codegen/CodeGenerator.kt +++ b/utbot-framework/src/main/kotlin/org/utbot/framework/codegen/CodeGenerator.kt @@ -36,7 +36,7 @@ open class CodeGenerator( forceStaticMocking: ForceStaticMocking = ForceStaticMocking.defaultItem, generateWarningsForStaticMocking: Boolean = true, codegenLanguage: CodegenLanguage = CodegenLanguage.defaultItem, - cgLanguageAssistant: CgLanguageAssistant = CgLanguageAssistant.getByCodegenLanguage(CodegenLanguage.defaultItem), + cgLanguageAssistant: CgLanguageAssistant = CgLanguageAssistant.getByCodegenLanguage(codegenLanguage), parameterizedTestSource: ParametrizedTestSource = ParametrizedTestSource.defaultItem, runtimeExceptionTestsBehaviour: RuntimeExceptionTestsBehaviour = RuntimeExceptionTestsBehaviour.defaultItem, hangingTestsTimeout: HangingTestsTimeout = HangingTestsTimeout(), diff --git a/utbot-framework/src/main/kotlin/org/utbot/framework/process/EngineProcessMain.kt b/utbot-framework/src/main/kotlin/org/utbot/framework/process/EngineProcessMain.kt index 3ef77f5a65..be56030580 100644 --- a/utbot-framework/src/main/kotlin/org/utbot/framework/process/EngineProcessMain.kt +++ b/utbot-framework/src/main/kotlin/org/utbot/framework/process/EngineProcessMain.kt @@ -17,6 +17,7 @@ import org.utbot.framework.codegen.domain.ParametrizedTestSource import org.utbot.framework.codegen.domain.RuntimeExceptionTestsBehaviour import org.utbot.framework.codegen.domain.testFrameworkByName import org.utbot.framework.codegen.reports.TestsGenerationReport +import org.utbot.framework.codegen.services.language.CgLanguageAssistant import org.utbot.framework.plugin.api.* import org.utbot.framework.plugin.api.MethodDescription import org.utbot.framework.plugin.api.util.UtContext @@ -152,6 +153,7 @@ private fun EngineProcessModel.setup(kryoHelper: KryoHelper, watchdog: IdleWatch testFramework = testFramework, mockFramework = MockFramework.valueOf(params.mockFramework), codegenLanguage = CodegenLanguage.valueOf(params.codegenLanguage), + cgLanguageAssistant = CgLanguageAssistant.getByCodegenLanguage(CodegenLanguage.valueOf(params.codegenLanguage)), parameterizedTestSource = ParametrizedTestSource.valueOf(params.parameterizedTestSource), staticsMocking = staticMocking, forceStaticMocking = kryoHelper.readObject(params.forceStaticMocking),