Skip to content

Enable Java assertions in framework integration tests #539

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
Jul 15, 2022

Conversation

dtim
Copy link
Collaborator

@dtim dtim commented Jul 15, 2022

Description

This PR adds the -ea command line for java invocation when an integration test is run. The test runner code is refactored: a list of additional arguments is added, and list builders are used instead of list concatenation during the command line construction.

As list builders are experimental in Kotlin 1.4.20, necessary @OptIn annotations and the corresponding compiler argument have been added. They will become obsolete upon transition to Kotlin 1.7.

Fixes #538

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Refactoring

How Has This Been Tested?

Automated Testing

A new test with assert statement was added to the utbot-framework test suite: org.utbot.examples.codegen.JavaAssertTest.

Manual Scenario

It is an infrastructural change, so no explicit manual checking is expected. To verify that the change works, it is necessary to add a test involving Java assert statement to the utbot-framework test suite.

Checklist (remove irrelevant options):

  • The change followed the style guidelines of the UTBot project
  • Self-review of the code is passed
  • The change contains enough commentaries, particularly in hard-to-understand areas
  • New documentation is provided or existed one is altered
  • No new warnings
  • Tests that prove my change is effective
  • All tests pass locally with my changes

Added "-ea" command line argument to the java invocation used to run
integration tests in `utbot-framework`.
@dtim dtim requested a review from Damtev July 15, 2022 17:21
@dtim dtim merged commit 9b95f55 into main Jul 15, 2022
@dtim dtim deleted the dtim/538-assert-in-integration-tests branch July 15, 2022 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Integration tests in utbot-framework fail when assert is used in the Java code
2 participants