Author: gert
Date: 2007-03-07 14:08:24 -0500 (Wed, 07 Mar 2007)
New Revision: 73900

Added:
   trunk/mcs/class/corlib/Test/System.Collections.Generic/IListTest.cs
Modified:
   trunk/mcs/class/corlib/ChangeLog
   trunk/mcs/class/corlib/Test/System.Collections.Generic/ChangeLog
   trunk/mcs/class/corlib/corlib_test.dll.sources
Log:
* corlib_test.dll.sources: Added IListTest.cs.
* IListTest.cs: Added test for bug #80260.


Modified: trunk/mcs/class/corlib/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/ChangeLog    2007-03-07 18:59:23 UTC (rev 73899)
+++ trunk/mcs/class/corlib/ChangeLog    2007-03-07 19:08:24 UTC (rev 73900)
@@ -1,3 +1,7 @@
+2007-03-07  Gert Driesen  <[EMAIL PROTECTED]>
+
+       * corlib_test.dll.sources: Added IListTest.cs.
+
 2007-01-31  Gert Driesen  <[EMAIL PROTECTED]>
 
        * corlib_test.dll.sources: Added EncodingTest.cs.

Modified: trunk/mcs/class/corlib/Test/System.Collections.Generic/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System.Collections.Generic/ChangeLog    
2007-03-07 18:59:23 UTC (rev 73899)
+++ trunk/mcs/class/corlib/Test/System.Collections.Generic/ChangeLog    
2007-03-07 19:08:24 UTC (rev 73900)
@@ -1,3 +1,7 @@
+2007-03-07  Gert Driesen  <[EMAIL PROTECTED]>
+
+       * IListTest.cs: Added test for bug #80260.
+
 2006-09-12  Gert Driesen  <[EMAIL PROTECTED]>
 
        * ListTest.cs: Added tests for binary serialization, and Enumerator

Added: trunk/mcs/class/corlib/Test/System.Collections.Generic/IListTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System.Collections.Generic/IListTest.cs 
2007-03-07 18:59:23 UTC (rev 73899)
+++ trunk/mcs/class/corlib/Test/System.Collections.Generic/IListTest.cs 
2007-03-07 19:08:24 UTC (rev 73900)
@@ -0,0 +1,53 @@
+//
+// MonoTests.System.Collections.Generic.Test.DictionaryTest
+//
+// Authors:
+//      Gert Driesen ([EMAIL PROTECTED])
+//
+// Copyright (C) 2007 Gert Driesen
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Collections.Generic;
+
+using NUnit.Framework;
+
+namespace MonoTests.System.Collections.Generic
+{
+       [TestFixture]
+       public class IListTest
+       {
+               [Test] // bug #80260
+               public void CastToArray ()
+               {
+                       IList<string> list = new string[] { "foo", "bar" };
+                       string[] array = (string[]) list;
+                       Assert.IsNotNull (array, "#1");
+                       Assert.AreEqual (2, array.Length, "#2");
+                       Assert.AreEqual ("foo", array [0], "#3");
+                       Assert.AreEqual ("bar", array [1], "#4");
+               }
+       }
+}
+#endif
+


Property changes on: 
trunk/mcs/class/corlib/Test/System.Collections.Generic/IListTest.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/mcs/class/corlib/corlib_test.dll.sources
===================================================================
--- trunk/mcs/class/corlib/corlib_test.dll.sources      2007-03-07 18:59:23 UTC 
(rev 73899)
+++ trunk/mcs/class/corlib/corlib_test.dll.sources      2007-03-07 19:08:24 UTC 
(rev 73900)
@@ -32,6 +32,7 @@
 System.Collections/SortedListTest.cs
 System.Collections/StackTest.cs
 System.Collections.Generic/DictionaryTest.cs
+System.Collections.Generic/IListTest.cs
 System.Collections.Generic/ListTest.cs
 System.Collections.ObjectModel/CollectionTest.cs
 System.Collections.ObjectModel/KeyedCollectionTest.cs

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to