Author: atsushi
Date: 2005-05-09 05:21:17 -0400 (Mon, 09 May 2005)
New Revision: 44253
Modified:
trunk/mcs/class/corlib/System.Collections/ChangeLog
trunk/mcs/class/corlib/System.Collections/Stack.cs
trunk/mcs/class/corlib/Test/System.Collections/ChangeLog
trunk/mcs/class/corlib/Test/System.Collections/StackTest.cs
Log:
2005-05-09 Atsushi Enomoto <[EMAIL PROTECTED]>
* Stack.cs : empty_stack.CopyTo(empty_array, 0) should be allowed.
* StackTest.cs : test for CopyTo() on an empty stack.
Modified: trunk/mcs/class/corlib/System.Collections/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Collections/ChangeLog 2005-05-09 08:31:19 UTC
(rev 44252)
+++ trunk/mcs/class/corlib/System.Collections/ChangeLog 2005-05-09 09:21:17 UTC
(rev 44253)
@@ -1,3 +1,7 @@
+2005-05-09 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * Stack.cs : empty_stack.CopyTo(empty_array, 0) should be allowed.
+
2005-02-21 Zoltan Varga <[EMAIL PROTECTED]>
* Hashtable.cs: Add net 2.0 ReliabilityContractAttributes.
Modified: trunk/mcs/class/corlib/System.Collections/Stack.cs
===================================================================
--- trunk/mcs/class/corlib/System.Collections/Stack.cs 2005-05-09 08:31:19 UTC
(rev 44252)
+++ trunk/mcs/class/corlib/System.Collections/Stack.cs 2005-05-09 09:21:17 UTC
(rev 44253)
@@ -222,7 +222,7 @@
}
if (array.Rank > 1 ||
- index >= array.Length ||
+ array.Length > 0 && index >= array.Length ||
count > array.Length - index) {
throw new ArgumentException();
}
Modified: trunk/mcs/class/corlib/Test/System.Collections/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System.Collections/ChangeLog 2005-05-09
08:31:19 UTC (rev 44252)
+++ trunk/mcs/class/corlib/Test/System.Collections/ChangeLog 2005-05-09
09:21:17 UTC (rev 44253)
@@ -1,3 +1,7 @@
+2005-05-09 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * StackTest.cs : test for CopyTo() on an empty stack.
+
2005-01-05 Nick Drochak <[EMAIL PROTECTED]>
* ComparerTest.cs: Modernize and fix line endings. Test is failing with
Modified: trunk/mcs/class/corlib/Test/System.Collections/StackTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System.Collections/StackTest.cs 2005-05-09
08:31:19 UTC (rev 44252)
+++ trunk/mcs/class/corlib/Test/System.Collections/StackTest.cs 2005-05-09
09:21:17 UTC (rev 44253)
@@ -369,6 +369,13 @@
}
}
+ public void TestEmptyCopyTo ()
+ {
+ Stack stack = new Stack ();
+ string [] arr = new string [0];
+ stack.CopyTo (arr, 0);
+ }
+
[SetUp]
protected void SetUp()
{
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches