Skip to content

Conversation

@Markoutte
Copy link
Collaborator

@Markoutte Markoutte commented Jun 1, 2022

Description

Constructors have "<init>" as a method name therefore bad methods created by fuzzer which uses method name as a part of test method.

Fixes #111

Type of Change

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

How Has This Been Tested?

Read issue section "To Reproduce"

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
  • Tests that prove my change is effective
  • All tests pass locally with my changes

@Markoutte Markoutte requested a review from sergeypospelov June 1, 2022 14:05
fullPath = emptyList(),
coverage = concreteExecutionResult.coverage,
testMethodName = "test${methodUnderTest.callable.name.capitalize()}ByFuzzer${index}"
testMethodName = if (methodUnderTest.isMethod) "test${methodUnderTest.callable.name.capitalize()}ByFuzzer${index}" else null
Copy link
Member

@sergeypospelov sergeypospelov Jun 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor:

Suggested change
testMethodName = if (methodUnderTest.isMethod) "test${methodUnderTest.callable.name.capitalize()}ByFuzzer${index}" else null
testMethodName = "test${methodUnderTest.callable.name.capitalize()}ByFuzzer${index}".takeIf { methodUnderTest.isMethod }

@Markoutte Markoutte merged commit 08447fc into main Jun 1, 2022
@Markoutte Markoutte deleted the pelevin/fix-fuzzer-generates-uncompilable-method-names branch June 1, 2022 15:59
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.

Fuzzer generates uncompilable test methods in Contest Estimator

3 participants