2002-09-24 Nick Drochak <ndrochak@gol.com>
authorNick Drochak <nickd@mono-cvs.ximian.com>
Tue, 24 Sep 2002 14:10:33 +0000 (14:10 -0000)
committerNick Drochak <nickd@mono-cvs.ximian.com>
Tue, 24 Sep 2002 14:10:33 +0000 (14:10 -0000)
* ArrayListTest.cs: Add test for InsertRange() for the case where an
ArrayList is passed to itself to be insterted.

svn path=/trunk/mcs/; revision=7774

mcs/class/corlib/Test/System.Collections/ArrayListTest.cs
mcs/class/corlib/Test/System.Collections/ChangeLog

index 23f23c192134f772c509b6ccbfd85067977fa1e5..617700a41d051218487bfd1a4acab0dafd9d30b8 100644 (file)
@@ -1449,6 +1449,16 @@ public class ArrayListTest : TestCase {
                }\r
        }\r
 \r
+       public void TestInsertRange_this() {\r
+               String[] s1 = {"this", "is", "a", "test"};\r
+               ArrayList al = new ArrayList(s1);\r
+               al.InsertRange(2, al);\r
+               String[] s2 = {"this", "is", "this", "is", "a", "test", "a", "test"};\r
+               for (int i=0; i < al.Count; i++) {\r
+                       AssertEquals("at i=" + i, s2[i], al[i]);\r
+               }\r
+       }\r
+\r
        public void TestSort() {\r
                {\r
                        bool errorThrown = false;\r
index 3a2395779a43cdcf1e317d7b50bc071e29ce18f1..7949a476e2646575886e368e9593a040f6473145 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-24  Nick Drochak  <ndrochak@gol.com>\r
+\r
+       * ArrayListTest.cs: Add test for InsertRange() for the case where an\r
+       ArrayList is passed to itself to be insterted.\r
+\r
 2002-09-24  Nick Drochak  <ndrochak@gol.com>\r
 \r
        * ArrayListTest.cs: Add check that enumerator is invalidated after a\r