-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
WIP: test: spoon model collections contract #1922
Conversation
bcfb3e2
to
a3f03c6
Compare
This PR was rebased on #1923, which makes all derived properties unmodifiable. Now this PR reports no problem on derived collections. Note: there are probably still some methods in Spoon model, which returns modifiable detached collections, but they are not recognized by SpoonMetaModel, because they have no CtRole. |
So we can close this one @pvojtechovsky right? |
There was idea in #1917 that we create the test, which checks behavior of spoon model collections and that we will release next Spoon only when this test reports that all not derived collections are consistent -> modifiable attached, correctly firing change events and setting parent. This PR is the test which can do that "before release check" So if we still want to migrate all non derived collections, then keep it opened. We should then rebase it on latest version and see the current state. |
a3f03c6
to
1c26763
Compare
Note: The collection contract test in #1922 was wrong. It tested collection contract only for first added entry. But many collections in spoon behaves like this:
The report below made by fixed #1922 and #1917 shows on each line
Expected collection handling:derived;[READ_ONLY, READ_ONLY]annonymousExecutable of CtClass Wrong collection handling:Failed check of;CtArrayTypeReference#interface. SpoonException : Setting of CtRole.INTERFACE is not supported for CtArrayTypeReferenceImpl ... so there are still some MUTABLE_ATTACHED_INCORRECT collections, which should be fixed ... but in different PR |
1c26763
to
4eaafaf
Compare
4eaafaf
to
cc2d83c
Compare
cc2d83c
to
a3459ce
Compare
Pass to close staled PRs. Feel free to reopen if appropriate. |
As discussed in #1917 here is the test, which checks type of each (most) Spoon model collections.