-
-
Notifications
You must be signed in to change notification settings - Fork 189
[test] extend tests for immutability of maps #3725
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
Conversation
|
So, in
|
|
I do not understand the underlying implementation of "forked", though: default IMap<K, V> forked() {
return this;
} |
|
using |
|
Kudos, SonarCloud Quality Gate passed!
|
|
Ready to be merged from my point of view. Tests fail until the fix is applied. |
joewiz
left a comment
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.
I can confirm that when building eXist from this PR's branch, the tests that @PieterLamers and I developed in #3724 all return the expected results.
exist-core/src/main/java/org/exist/xquery/functions/map/MapType.java
Outdated
Show resolved
Hide resolved
|
@joewiz great! Do you think the test cases I added are covering every combination we need to check? |
|
@line-o Yes, I think you've got the ones in the issue covered with mt:immutable-put-after-merge, mt:immutable-remove-after-merge, and mt:immutable-merge-after-merge, and the other variations were a great idea too. |
|
@line-o I just built the HEAD of Bifurcan and checked against that too. I wanted to do so, as it has some fixes that are not released yet. Unfortunately there was no change, still 6 failing tests. I will dig a little deeper... |
|
@line-o I just expanded on some of your tests, and it caused me to find another bug in maps. The XQuery F+O specs says that default behaviour for |
|
Is there any new info on this? |
|
what is the state of the PR? @line-o @adamretter |
|
I am waiting for this to either a) be merged as it is or for a review that tells what needs to change (I expect this to be "remove the surplus calls to forked()") |
|
|
|
Oh wait. I was under the impression that this PR was already applied! |
|
Rebase and with improved test cases. |
|
Kudos, SonarCloud Quality Gate passed! |
|
This is no longer needed, as the bug was indeed in Bifurcan and was fixed as lacuna/bifurcan#35 (comment); upgraded in eXist-db as #3886 The tests from this PR were incorporated and expanded upon in #3738 @line-o are you happy to close this one now? |
|
@adamretter I actually re-incorporated the tests here and added a final improvement to them. What about we make this PR the one adding the tests and #3738 can then be solely about |
|
I will take responsibility in changing the PR description and title as well as the commit history assuming you do so for #3738 as well. |
|
@line-o I don't think that makes sense, you would also need to remove all your Java changes in this PR; If you want my PR split into two, with and without the change to merge-order to match the spec, I have previously already offered to do that... |
|
Of course I will remove the no longer needed commits. |
|
I would also rather squash all the back and forth in the tests into a single commit. |
…sier to determine classes of failure
…claimed, now it does
|
Kudos, SonarCloud Quality Gate passed! |
Description:
This PR now only adds tests that extend the previous test for the immutability of maps
fork maps before mutating themReference:
refs #3724
Map implementation (bifurcan) documentation of the
forked()methodhttps://lacuna.io/docs/bifurcan/io/lacuna/bifurcan/IMap.html#forked--
Type of tests:
Extended XQsuite tests in exist-core/src/test/xquery/maps/maps.xql