Skip to content

Replace Kotlin setters with direct property access for models from Fuzzer #1241 #1243

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

Conversation

volivan239
Copy link
Collaborator

Description

Previously calls to Kotlin setters in Fuzzer models were not replaced with direct accesses because check fieldId.setter == methodId failed due to different types of operands (MethodId vs FuzzerMockableMethodId, see ExecutableId.equals()). Now this check is rewritten with new method describesSameMethodAs that checks only declaringClass and signature but ignores javaClass.

Fixes #1241

Type of Change

  • Minor bug fix (non-breaking small changes)

How Has This Been Tested?

Manual Scenario

Checked on scenario from #1241 -- works as expected

Checklist (remove irrelevant options):

This is the author self-check list

  • 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

@EgorkaKulikov EgorkaKulikov marked this pull request as ready for review November 1, 2022 13:38
@EgorkaKulikov EgorkaKulikov merged commit 95d503a into main Nov 1, 2022
@EgorkaKulikov EgorkaKulikov deleted the volivan239/replace_kotlin_setters_to_property_access_for_fuzzer_models branch November 1, 2022 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calls to Kotlin autogenerated setter isn't changed to direct property access for tests from fuzzer
2 participants