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

Add support for ImmutableList<T> as the recursive collection #71

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

AArnott
Copy link
Owner

@AArnott AArnott commented Dec 23, 2015

Fixes #69

AArnott and others added 10 commits July 12, 2015 09:31
This is consistent with the Dev14 API for project trees.
ImmutableList`1.RemoveRange does not enumerate its argument when the list is empty.
ImmutableSortedSet`1.Except *does* enumerate its argument even when the collection is empty.
This difference in behavior caused a test failure when preparing ProjectTree to change to use ordered Children instead of sorted children.

This change makes sure that every element in the argument is "realized" from the enumerable, and thus exceptions are reliably thrown.
@AArnott AArnott self-assigned this Dec 23, 2015
@AArnott
Copy link
Owner Author

AArnott commented Dec 23, 2015

Some of the tests that were modified are assertion 'current' behavior even though that behavior isn't desirable. For example, MovingNodeAroundHierarchy asserts that removing a node in the front of the list causes the next item to report PositionUnderParent as changed (since it moved from index 1 to 0). But this is undesirable, since it is implied by the removal of another element in the list.

Ideally, PositionUnderParent is only reported for nodes that have changed positions when comparing the before and after list with only those contents that are present in both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant