Skip to content

Conversation

@CaelmBleidd
Copy link
Member

@CaelmBleidd CaelmBleidd commented Jan 4, 2023

Description

This request adds two missed generators for mocks that led to unexpected unsat results.
It happened because when a static variable was on a right side of an assignment, it was created with the corresponding mock generator. Then, if some other variable related to the same class would be encountered on the left side of the assignment, it was created without such a generator, which led to a contradiction between isMock values in these two scenarios.

There was one more missed generated related to final statics: when we reset statics, we should provide a corresponding mock generator.

Type of Change

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

How Has This Been Tested?

Regression and integration tests

The same as automatic tests.

Automated Testing

org.utbot.examples.mock.MockStaticFieldExampleTest#testCheckMocksInLeftAndRightAssignPartFinalField
org.utbot.examples.mock.MockStaticFieldExampleTest#testCheckMocksInLeftAndRightAssignPart

Manual Scenario

There is no specific manual scenario.

Checklist:

  • 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
  • New tests have been added
  • All tests pass locally with my changes

@CaelmBleidd CaelmBleidd added the comp-symbolic-engine Issue is related to the symbolic execution engine label Jan 4, 2023
@CaelmBleidd CaelmBleidd requested a review from Damtev January 4, 2023 10:49
@CaelmBleidd CaelmBleidd force-pushed the caelmbleidd/missed_static_field_generator branch from b5256bd to 191de24 Compare January 5, 2023 03:27
@CaelmBleidd CaelmBleidd requested a review from Damtev January 5, 2023 04:05
@CaelmBleidd CaelmBleidd merged commit ac19a3a into main Jan 5, 2023
@CaelmBleidd CaelmBleidd deleted the caelmbleidd/missed_static_field_generator branch January 5, 2023 06:10
@alisevych alisevych added the ctg-bug-fix PR is fixing a bug label Jan 23, 2023
@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-symbolic-engine Issue is related to the symbolic execution engine ctg-bug-fix PR is fixing a bug

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants