Skip to content

Set correct cgLanguageAssistant in EngineProcess codegen #1918 #1923

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 10, 2023

Conversation

volivan239
Copy link
Collaborator

@volivan239 volivan239 commented Mar 10, 2023

Description

After adding cgLanguageAssistant property to CodeGenerator, it was JavaCgLanguageAssistant by default, so anyone who constructs CodeGenerator should set the correct value in constructor. However, this was not done for codegenerator instance in EngineProcessMain, which lead to UtBot action always using Java for codegeneration. This PR sets this parameter correctly in EngineProcessMain and also changes the default value of property to default assistant for passed codegen language.

Fixes #1918

How to test

Manual tests

Just launch UtBot action with "Generated test language" = "Kotlin" on any class, and check that the generated tests is written in Kotlin.

Self-check list

  • I've set the proper labels for my PR (at least, for category and component).
  • PR title and description are clear and intelligible.
  • I've added enough comments to my code, particularly in hard-to-understand areas.
  • The functionality I've repaired, changed or added is covered with automated tests.
  • Manual tests have been provided optionally.
  • The documentation for the functionality I've been working on is up-to-date.

@volivan239 volivan239 added comp-codegen Issue is related to code generator lang-kotlin Issue is related to Kotlin language support ctg-bug-fix PR is fixing a bug labels Mar 10, 2023
@EgorkaKulikov EgorkaKulikov merged commit 06b90e9 into main Mar 10, 2023
@EgorkaKulikov EgorkaKulikov deleted the volivan239/java-code-generated-instead-of-kt branch March 10, 2023 11:04
tamarinvs19 pushed a commit that referenced this pull request Mar 15, 2023
Set correct cgLanguageAssistant in EngineProcess codegen
@alisevych alisevych added this to the 2023.03 Release milestone Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-codegen Issue is related to code generator ctg-bug-fix PR is fixing a bug lang-kotlin Issue is related to Kotlin language support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UTBot generates Java tests inside .kt file for Kotlin code
3 participants