-
-
Notifications
You must be signed in to change notification settings - Fork 352
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
review: fix: better tests for CtScanner #1642
Conversation
@tdurieux @monperrus How to fix missing calls of scan(getComments()) in CtScanner? I guess it is correct to add them everywhere. Actually all 3 cases are there in CtScanner. Is it intentional? Should we unify it? |
I would say A). |
3e6a69f
to
a4a4abd
Compare
|
||
@Override | ||
@UnsettableProperty | ||
<T extends CtActualTypeContainer> T setActualTypeArguments(List<? extends CtTypeReference<?>> actualTypeArguments); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This property seems to be settable, because when I made it unset-able by
class CtIntersectionTypeReferenceImpl ... { ...
public <C extends CtActualTypeContainer> C setActualTypeArguments(List<? extends CtTypeReference<?>> actualTypeArguments) {
return (C) this;
}
Then TypeReferenceTest#testRecursiveTypeReference
started to fail.
But I am not able to decide yet what is correct. Test or Unsettable property. I do not understand spoon/java model around CtIntersectionTypeReference.
So check this one carefully.
a4a4abd
to
1573ecb
Compare
I suggest to add calls of |
#1627 Meta model cannot be removed, because the test of new CtScanner is based on this new metamodel. I agree to focus on meta model first. And I am open to spent on that discussion some days, because I found metamodel of spoon as quite interesting feature for future maintenance and generation of spoon code - so it should be well designed, with respect to your meta model knowledge of spoon too! |
1573ecb
to
1e0c2b5
Compare
40a1ce2
to
d025466
Compare
So now metamodel is merged and this one is next in the review queue ;-) |
d025466
to
e4643ff
Compare
Now this PR contains only fix of CtScannerTest and fixes of spoon model, which were found by that fixed test. |
just reviewed the test and added some documentation. really good work, thanks! I'm OK to merge, are you done? |
yes I am done. Please merge it soon. I will then rebase other PRs so I can clean my workspace and continue with next features ;-) |
This PR contains fixes of CtScanner, CtScanner test and Spoon model annotations related to CtScanner.