63 Commits
Author SHA1 Message Date
Marcos Henrich 863dc73d19 [bcl] Add NUnitHelper.cs with API not in nunit-lite
NUnitHelper.cs adds CollectionAssert, FileAssert, StringAssert.

Also adds AssertHelper class with methods that are not part of nunitlite
Assert class.
2016-10-29 14:09:33 +02:00
Alexander Köplinger b03e606287 Remove ChangeLog files from the repo
They weren't updated in the last 6 years and aren't helpful anymore (e.g. by causing unrelated matches during git grep searches).
2016-01-29 19:17:06 +01:00
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
Alexander Köplinger 746650d1b9 [bcl] Remove more NET_2_0 checks from class libs 2015-01-17 05:45:39 +01: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
Alexander Köplinger 48e112d652 [Cleanup] Removed TARGET_JVM
It was once part of a special Java target profile, but this is no longer used today.
2014-08-08 03:28:34 +02:00
Rodrigo Kumpera 676ef96431 [bcl] Fix test suites. 2014-02-19 14:19:35 -05:00
Simon Hartmann 11b5312c83 Bug 17838 - IDictionary item property implemention for ConcurrentDictionary/SortedList_T throws exception on non-existing key
Avoid double lookup for Dictionary IDictionary.get_Item property impl
2014-02-19 16:40:57 +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
Marek Safar c964e24d02 [system] More SortedDictionary argument checks 2014-02-05 13:16:40 +01:00
Marek Safar d90906cbaa [system] Fix calls on empty linked list 2014-02-05 12:07:17 +01:00
Marek Safar c5eab2d5dc [System] Use generic equality comparer in Find/FindLast methods. Fixes #5245 2014-01-14 14:25:45 +01:00
Marek Safar f0ad346fb6 Mobile tests update 2013-02-22 21:41:19 +01:00
Sebastien Pouliot cc182e7ec7 Allow the SortedList unit tests to be built with NUnitLite (MonoTouch) 2012-10-25 10:39:29 -04:00
Konrad M. Kruczynski 6f76efaedf Merge branch 'master' of https://github.com/mono/mono into issue4328
Conflicts:
	mcs/class/System/Test/System.Collections.Generic/SortedListTest.cs
2012-09-13 16:19:53 +02:00
Konrad M. Kruczynski f060b8055b Fix for the bug #4328. 2012-09-12 23:02:09 +02:00
Martin Baulig 018521fa73 Fix #4327: Properly handle exception from IComparer.Compare.
SortedList throws InvalidOperationException when IComparer.Compare
throws an Exception.
2012-06-20 03:46:00 +02:00
Todd Foster e787a12ab2 Fix bug #311: On LinkedList.Clear, detach each node instead of dropping them en masse. 2011-08-17 11:30:53 -07:00
Luke Halliwell c135c68bf6 Fix for bug 349053 - unable to serialize SortedDictionary 2011-01-03 21:43:27 -05: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
Gonzalo Paniagua Javier 07f3eb108e get rid of a bunch of warnings
svn path=/trunk/mcs/; revision=151720
2010-02-14 00:56:51 +00:00
Jb Evain 316aaacd09 2009-12-01 Jb Evain <[email protected]>
* StackTest.cs: add a test ensuring that disposing the stack
	enumerator prevents to iterate further.



svn path=/trunk/mcs/; revision=147249
2009-12-01 18:20:48 +00:00
Jb Evain 2ece19dfb2 in System.Collections.Generic:
2009-11-25  Jb Evain  <[email protected]>

	* Queue.cs (Enqueue): deal with the case where the tail
	is off the array when deciding to enlarge the capacity.

in Test/System.Collections.Generic:
2009-11-25  Jb Evain  <[email protected]>

	* QueueTest.cs: add test for a specific combination of
	calls that make the queue crash when enqueuing an item.

svn path=/trunk/mcs/; revision=146925
2009-11-25 17:30:16 +00:00
Jb Evain 108981cf3b in System.Collections.Generic:
2009-11-25  Jb Evain  <[email protected]>

	* Queue.cs (ICollection.CopyTo): fix typo, remove code duplication.

in Test/System.Collections.Generic:
2009-11-25  Jb Evain  <[email protected]>

	* QueueTest.cs: add tests for ICollection.CopyTo.

svn path=/trunk/mcs/; revision=146914
2009-11-25 15:43:49 +00:00
Raja R Harinath 876b8f2fb6 Fix Enumerator.Current handling in SortedDictionary<,>
* System.Collections.Generic/RBTree.cs (NodeEnumerator.check_current):
 New helper.
(NodeEnumerator.Current): Don't check invariants.
* SortedDictionary.cs (Enumerator.Current): Likewise.
(ValueCollection.Enumerator.Current): Likewise.
(KeyCollection.Enumerator.Current): Likewise.

* Test/System.Collections.Generic/SortedDictionaryTest.cs
(Enumerator_Current, KeyEnumerator_Current, ValueEnumerator_Current): New tests.

svn path=/trunk/mcs/; revision=139115
2009-07-30 19:42:04 +00:00
Gonzalo Paniagua Javier c8fd06fbe8 2009-07-14 Gonzalo Paniagua Javier <[email protected]>
* SortedListTest.cs: new tests for bug #521750 provided by
	Kevin Fitzgerald.


svn path=/trunk/mcs/; revision=137916
2009-07-15 01:05:07 +00:00
Andrés G. Aragoneses 1d1691647f 2009-05-10 Andy Hume <[email protected]>
* LinkedList.cs: Add null check. Fixes #481621.


svn path=/trunk/mcs/; revision=133864
2009-05-10 21:26:08 +00:00
Andrés G. Aragoneses 0176339162 reverted merge problem in last commit
svn path=/trunk/mcs/; revision=133860
2009-05-10 20:23:28 +00:00
Andrés G. Aragoneses 84eba90d37 2009-05-10 Andrés G. Aragoneses <[email protected]>
* LinkedListTest.cs: Added NotWorking test for #481621,
	converted from example code by Andy Hume <[email protected]>.


svn path=/trunk/mcs/; revision=133858
2009-05-10 20:18:03 +00:00
Miguel de Icaza 0f4e81e0fd Contribution from Pia Eriksson <[email protected]> that fixes
the CopyTo method in various generic containers.

Also fixes #497720


svn path=/trunk/mcs/; revision=133700
2009-05-07 00:42:16 +00:00
Zoltan Varga dfb2da7976 2009-03-11 Zoltan Varga <[email protected]>
* SortedListTest.cs: Add tests for #483985.

svn path=/trunk/mcs/; revision=129078
2009-03-11 16:51:19 +00:00
Jb Evain fb7a99f5f1 in System.Collections.Generic:
2007-08-20  Jb Evain  <[email protected]>

	* SortedList.cs: don't crash in ListKeys and ListValues
	when CopyTo targets an empty array, and that the
	sorted list is empty. Fixes #82492.

in Tests/System.Collections.Generic:
2007-08-20  Jb Evain  <[email protected]>

	* SortedListTest.cs: Tests for #82492.

svn path=/trunk/mcs/; revision=84419
2007-08-20 01:53:32 +00:00
Konstantin Triger 593dcc35f4 TARGET_JVM: exclude not working tests
svn path=/trunk/mcs/; revision=84084
2007-08-14 15:26:49 +00:00
Raja R Harinath 822e74d15d In .:
* System.dll.sources: Add RBTree.cs.

In System.Collections.Generic:
	Make add and remove operations O(log n).
	* SortedDictionary.cs: Rewrite to use the red-black tree
	implementation from RBTree.cs.
	* RBTree.cs: Some more refactoring.  Rename Insert() to Intern(),
	and modify semantics slightly.  Replace Contains() with Lookup().

In Test/System.Collections.Generic:
	* SortedDictionaryTest.cs (AddNullKeyNullable): Enable.

svn path=/trunk/mcs/; revision=76537
2007-05-01 19:07:31 +00:00
Gert Driesen 936bb390fb * QueueTest.cs: Removed usage of deprecated Assertion class. Added
test for TrimExcess. Added tests for binary serialization.
* StackTest.cs: Removed usage of deprecated Assertion class. Added
test for TrimExcess. Added tests for binary serialization.
* Queue.cs: Fixed binary serialization, based on patch provided by
Lionel Cuir. Fixes TrimExcess to use SetCapacity, before it was not
updating _head which could lead to IndexOutOfRangeException.
* Stack.cs: Fixed binary serialization, based on patch provided by
Lionel Cuir. In Pop, clear entry from array to help GC.

svn path=/trunk/mcs/; revision=76069
2007-04-22 16:21:13 +00:00
Alan McGovern 968a00b667 Fixed compilation
svn path=/trunk/mcs/; revision=75039
2007-03-27 18:46:25 +00:00