Skip to content

Handle RecursionAssignment, SwitchCase, and CaughtException statement types in CustomJavaDocCommentBuilder #888

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 4 commits into from
Sep 9, 2022

Conversation

onewhl
Copy link
Member

@onewhl onewhl commented Sep 9, 2022

Description

Handle RecursionAssignment, SwitchCase, and CaughtException statement types in CustomJavaDocCommentBuilder to add related JavaDoc tags in summaries.

Fixes #773

Type of Change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Automated Testing

I added tests for each statement type: SummaryRecursionTest, SummarySwitchTest, SummaryExceptionExampleTest.

Manual Scenario

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

@onewhl onewhl requested a review from amandelpie September 9, 2022 06:44
fun testFib() {
val summary1 = "@utbot.classUnderTest {@link Recursion}\n" +
"@utbot.methodUnderTest {@link org.utbot.examples.recursion.Recursion#fib(int)}\n" +
"@utbot.executesCondition {@code (n == 0): False},\n" +
Copy link
Collaborator

@amandelpie amandelpie Sep 9, 2022

Choose a reason for hiding this comment

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

Just thought that in future we could have something like testing dsl

javadoc {
methodUnderTest = "org.utbot.examples.recursion.Recursion#fib(int)"
executesCondition = "(n == 0): False"
}

Copy link
Member Author

Choose a reason for hiding this comment

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

yesss, it would be awesome!

Copy link
Collaborator

@amandelpie amandelpie left a comment

Choose a reason for hiding this comment

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

LGTM, please have a look at the minor comments from my side

@onewhl onewhl enabled auto-merge (squash) September 9, 2022 13:40
@onewhl onewhl merged commit 7677d10 into main Sep 9, 2022
@onewhl onewhl deleted the zarina/773_add_new_custom_tags branch September 9, 2022 14:01
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.

Handle RecursionAssignment and SwitchCase statement types in CustomJavaDocCommentBuilder
2 participants