dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetlib/tests/runtime/System/Collections Tes


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/tests/runtime/System/Collections TestArrayList.cs,1.3,1.4
Date: Sat, 14 Dec 2002 22:19:46 -0500

Update of /cvsroot/dotgnu-pnet/pnetlib/tests/runtime/System/Collections
In directory subversions:/tmp/cvs-serv9884/tests/runtime/System/Collections

Modified Files:
        TestArrayList.cs 
Log Message:


Fix the pivot values in the quicksort implementations within Array and 
ArrayList.


Index: TestArrayList.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/tests/runtime/System/Collections/TestArrayList.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** TestArrayList.cs    20 Nov 2002 02:14:16 -0000      1.3
--- TestArrayList.cs    15 Dec 2002 03:19:44 -0000      1.4
***************
*** 115,117 ****
--- 115,137 ----
                        }
  
+       // Test sorting an array list.
+       public void TestArrayListSort()
+                       {
+                               ArrayList list = new ArrayList();
+                               list.Add(98);
+                               list.Add(45);
+                               list.Sort();
+                               AssertEquals("Sort (1)", 45, list[0]);
+                               AssertEquals("Sort (2)", 98, list[1]);
+ 
+                               list = new ArrayList();
+                               list.Add(98);
+                               list.Add(0);
+                               list.Add(45);
+                               list.Sort();
+                               AssertEquals("Sort (3)",  0, list[0]);
+                               AssertEquals("Sort (4)", 45, list[1]);
+                               AssertEquals("Sort (5)", 98, list[2]);
+                       }
+ 
  }; // class TestArrayList




reply via email to

[Prev in Thread] Current Thread [Next in Thread]