Skip to content
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

test: Add tests for comment association #5169

Merged
merged 3 commits into from
Apr 21, 2023
Merged

test: Add tests for comment association #5169

merged 3 commits into from
Apr 21, 2023

Conversation

Zuplyx
Copy link
Contributor

@Zuplyx Zuplyx commented Apr 8, 2023

I've created failing UnitTests for some of the issues with comment association reported in the linked issue.

The tests demonstrate the following issues:

  • Comments at CtArrayAccess and CtBinaryOperator elements are not added to the AST.
  • Depending on their position, comments at CtTypeParameter elements are either wrongly added to the class (comments 1 and 4) or not added to the AST at all (comments 2 and 3).
  • Comments at CtAnnotation elements are not added to the annotation, but instead to the CtLiteral parameter of the annotation.

Copy link
Collaborator

@I-Al-Istannen I-Al-Istannen left a comment

Choose a reason for hiding this comment

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

Hey, thanks for the tests :) Just a small nitpick.

src/test/java/spoon/test/comment/CommentTest.java Outdated Show resolved Hide resolved
@I-Al-Istannen
Copy link
Collaborator

Also paging @SirYwell because I think he has thrown himself off that cliff before :)

@Zuplyx Zuplyx requested a review from I-Al-Istannen April 10, 2023 18:34
Copy link
Collaborator

@SirYwell SirYwell left a comment

Choose a reason for hiding this comment

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

If I ever looked at comments before, I successfully forgot about it again. But the tests look good.

@I-Al-Istannen I-Al-Istannen changed the title review: test: Added tests for comment association test: Add tests for comment association Apr 21, 2023
@I-Al-Istannen I-Al-Istannen merged commit 2f6ff0b into INRIA:master Apr 21, 2023
@I-Al-Istannen
Copy link
Collaborator

Thanks @Zuplyx :)

@Zuplyx Zuplyx deleted the comments branch April 21, 2023 12:49
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.

3 participants