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

Expand test coverage for compatibility changes related to annotations #396

Conversation

guillermocalvo
Copy link
Collaborator

I updated test classes CtClassBuilder, CtMethodBuilder and CtFieldBuilder so that tests can create annotations with elements.

Example:

// Creates a test class with an empty annotation:
//     @MyAnnotation
//     class Test { }
CtClassBuilder.create().name("japicmp.Test").withAnnotation("japicmp.MyAnnotation");

// Creates a test class with an annotation that contains one element:
//     @MyAnnotation(foo = 1000)
//     class Test { }
CtClassBuilder.create().name("japicmp.Test").withAnnotation("japicmp.MyAnnotation", new CtElement("foo", 1000));

This allows for test scenarios where compatibility change ANNOTATION_MODIFIED should be reported.

Closes #385

@siom79 siom79 merged commit 66dddc6 into siom79:master Apr 24, 2024
6 checks passed
@siom79
Copy link
Owner

siom79 commented Apr 24, 2024

Thank you for the PR.

@guillermocalvo guillermocalvo deleted the expand-test-coverage-for-annotation-changes branch April 24, 2024 19:31
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.

Take changes to annotations into account
2 participants