18 Commits
Author SHA1 Message Date
Alexander Köplinger 98cf04084a [bcl] Remove NET_4_0 defines from class libs
NET_4_0 is always defined now, so the ifdefs are redundant.
I verified the libs are exactly the same after this change, so this is effectively a no-op.
2015-07-26 15:01:49 +02:00
Marek Safar 73699dc332 [system] Replace System.Collections.Generic from reference sources 2014-12-08 12:04:28 +01:00
Marek Safar f22e4d8986 [system] Add test for #25137 2014-12-08 12:04:28 +01:00
Marek Safar 8d40cb5b9c [system] Fix valid sorted set operations which could cause underlying tree modification 2014-02-13 19:59:56 +01:00
Raja R Harinath c78a0e1af6 SortedSet: Add move view tests.
svn path=/trunk/mcs/; revision=155126
2010-04-09 07:00:25 +00:00
Raja R Harinath 195fec2107 SortedSet: Don't maintain state in the view
* System.Collections.Generic/SortedSet.cs (SortedSubSet.count): Remove.
(SortedSubSet..ctor): Move counting loop ...
(SortedSubSet.Count): ... here.
(SortedSubSet.TryAdd, SortedSubSet.TryRemove): Update to changes.
(SortedSubSet.GetMin, SortedSubSet.GetMax): Likewise.  Use bounds
to determine if the view is empty, rather than the count.
* Test/System.Collections.Generic/SortedSetTest.cs (ViewCount):
Test that count reflects changes in underlying set.

svn path=/trunk/mcs/; revision=155125
2010-04-09 06:41:10 +00:00
Raja R Harinath c940e13b2b SortedSet: Enable set comparision operations on views, and improve performance
* RBTree.cs (Bound): New.  Returns the greatest lower bound and
least upper bound of the given key.
(GetSuffixEnumerator): New.  Returns an enumerator that starts at
the given key.
(NodeEnumerator): Provide suffix enumerator functionality.
* SortedSet.cs (GetEnumerator): Delegate to ...
(TryGetEnumerator): ... this.  New virtual function.
(Enumerator): Provide subset enumeration using RBTree's suffix enumerators.
(SortedSubSet.count): New.
(SortedSubSet.GetCount): Use it.
(SortedSubSet.TryAdd, SortedSubSet.TryRemove): Update count.
(SortedSubSet.GetMin, SortedSubSet.GetMax): Use RBTree.Bound().
(SortedSubSet.GetEnumerator): Remove.
(SortedSubSet.TryGetEnumerator): New.  Use ranged enumerators.
* SortedSetTest.cs: Update to test more view functionality,
including set comparison operators.

svn path=/trunk/mcs/; revision=154974
2010-04-07 16:31:25 +00:00
Jb Evain 8a1eb97343 2010-04-06 Jb Evain <[email protected]>
* SortedSetTest.cs: add test for SortedSubSet.Count.


svn path=/trunk/mcs/; revision=154841
2010-04-06 12:40:15 +00:00
Raja R Harinath aaeb4b6ff2 Take advantage of set properties, C# default parameters and C# named parameters to make tests less verbose
svn path=/trunk/mcs/; revision=154789
2010-04-05 10:56:23 +00:00
Raja R Harinath 4478f7eb04 SortedSet: Complete implementation of more methods
* SortedSet.cs (IsProperSubsetOf, IsSubsetOf): Implement using ...
(is_subset_of): ... new helper.
(IsProperSupersetOf, IsSupersetOf): Implement using ...
(is_superset_of): ... new helper.
(covers, nodups, overlaps): New helpers.
(SetEquals): Implement.
(Overlaps): Implement using overlaps().
(SymmetricExceptWith): Use nodups() helper.

svn path=/trunk/mcs/; revision=154788
2010-04-05 09:59:41 +00:00
Raja R Harinath 40979641a2 SortedSet: implement IntersectWith, UnionWith, ExceptWith and SymmetricExceptWith
* System.Collections.Generic/SortedSet.cs (CheckArgumentNotNull): New helper.
(IntersectWith, UnionWith): Implement.
(ExceptWith, SymmetricExceptWith): Likewise.
(SortedSubSet.IntersectWith): Implement override.
* Test/System.Collections.Generic/SortedSetTest.cs: Add tests for IntersectWith,
UnionWith, ExceptWith and SymmetricExceptWith.

svn path=/trunk/mcs/; revision=154769
2010-04-04 18:22:37 +00:00
Jb Evain 67c90000b1 2010-04-02 Jb Evain <[email protected]>
* SortedSetTest.cs: add tests for Min and Max on subsets.


svn path=/trunk/mcs/; revision=154726
2010-04-02 15:12:01 +00:00
Jb Evain 84fc79215f 2010-04-02 Jb Evain <[email protected]>
* SortedSetTest.cs: add tests for GetViewBetween.


svn path=/trunk/mcs/; revision=154723
2010-04-02 14:56:27 +00:00
Jb Evain dd394b1071 2010-04-02 Jb Evain <[email protected]>
* SortedSetTest.cs: add tests for Min and Max.


svn path=/trunk/mcs/; revision=154715
2010-04-02 12:29:14 +00:00
Jb Evain 9e0adb4647 2010-04-02 Jb Evain <[email protected]>
* SortedSetTest.cs: add test for RemoveWhere.


svn path=/trunk/mcs/; revision=154710
2010-04-02 12:05:37 +00:00
Jb Evain 0717f6b5fa 2010-04-02 Jb Evain <[email protected]>
* SortedSetTest.cs: add test for Reverse.


svn path=/trunk/mcs/; revision=154706
2010-04-02 10:54:10 +00:00
Jb Evain a7147ab1ec add GetEnumerator test
svn path=/trunk/mcs/; revision=154704
2010-04-02 10:48:04 +00:00
Jb Evain b4a69791f4 2010-04-02 Jb Evain <[email protected]>
* SortedSetTest.cs: add new fixture.

svn path=/trunk/mcs/; revision=154702
2010-04-02 10:42:24 +00:00