2002-06-20 Nick Drochak <ndrochak@gol.com>
authorNick Drochak <nickd@mono-cvs.ximian.com>
Thu, 20 Jun 2002 09:32:27 +0000 (09:32 -0000)
committerNick Drochak <nickd@mono-cvs.ximian.com>
Thu, 20 Jun 2002 09:32:27 +0000 (09:32 -0000)
* All changes: Make tests pass against ms.net.

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

mcs/class/corlib/Test/System.Collections/ChangeLog
mcs/class/corlib/Test/System.Collections/QueueTest.cs
mcs/class/corlib/Test/System.Collections/SortedListTest.cs
mcs/class/corlib/Test/System.Runtime.Serialization/ObjectIDGeneratorTests.cs
mcs/class/corlib/Test/System/ChangeLog
mcs/class/corlib/Test/System/DecimalTest2.cs

index ae1f4ee62d396156259b91ac47c3eb7926cc4044..fc311f4f90c7857bd09f91b9deecb69e296aca1a 100644 (file)
@@ -1,3 +1,8 @@
+2002-06-20  Nick Drochak  <ndrochak@gol.com>\r
+\r
+       * SortedListTest.cs: Make tests pass against ms.net.\r
+       * QueueTest.cs: Make tests pass against ms.net.\r
+\r
 2002-06-19  Nick Drochak  <ndrochak@gol.com>\r
 \r
        * AllTests.cs: Sort names and include missing tests.\r
index 2a50df18b95c2f5b611a31355df43b24f2875131..beb7d57f00acece2f8201528e3130a112a6d61d5 100644 (file)
@@ -92,7 +92,7 @@ namespace MonoTests.System.Collections {
                        e = q2.GetEnumerator ();\r
                        i = 50;\r
                        while (e.MoveNext ()) {\r
-                               Assert (((int) e.Current) == i++);\r
+                               AssertEquals (i, ((int) e.Current));\r
                                i++;\r
                        }\r
                        e = emptyQueue.GetEnumerator ();\r
@@ -104,15 +104,9 @@ namespace MonoTests.System.Collections {
                                e.MoveNext ();\r
                                q1.Enqueue (0);\r
                                e.MoveNext ();\r
-                               Fail ("Should have thrown InvalidOperationException");\r
+                               Fail ("#1 Should have thrown InvalidOperationException");\r
                        } catch (InvalidOperationException) { }\r
                        e = q1.GetEnumerator ();\r
-                       try {\r
-                               e.MoveNext ();\r
-                               q1.Enqueue (0);\r
-                               object o = e.Current;\r
-                               Fail ("Should have thrown InvalidOperationException");\r
-                       } catch (InvalidOperationException) { } \r
                }\r
 \r
                public void TestClone () {\r
index 0a1d23124243baa502a0f0bb0b4dde7642939cb9..71668a28873dab42b953fc61c1a29ce09cd7a901 100755 (executable)
@@ -83,10 +83,9 @@ public class SortedListTest : TestCase {
                        d.Add(7987,"lkj");\r
                        temp1 = new SortedList(d);\r
                        Fail ("sl.constructor-3: does not throw InvalidCastException");\r
-               } catch (InvalidCastException) { // IS NOT THROWN as stated in MSDN\r
-                       //Console.WriteLine("InvalidCastException Handler: {0}", e.ToString());\r
-               } catch (InvalidOperationException e) { // instead it throws this\r
-                       Fail ("sl.constructor-3: [undocumented] InvalidOperationException Handler: e=" + e.ToString());\r
+               } catch (InvalidOperationException) {\r
+               } catch (Exception e) {\r
+                       Fail ("Unexpected Exception throw: e=" + e);\r
                }\r
        }\r
        \r
@@ -243,7 +242,7 @@ public class SortedListTest : TestCase {
                        AssertEquals("sl.Clear: should have one element",       2, sl1.Count);\r
                        sl1.Clear();\r
                        AssertEquals("sl.Clear: is not cleared",0, sl1.Count);\r
-                       AssertEquals("sl.Clear: capacity is altered",10, sl1.Capacity);\r
+                       AssertEquals("sl.Clear: capacity is altered",16, sl1.Capacity);\r
                }\r
        }\r
 \r
index 4ae49a2a2826e916c50a2ca10d3a01540932ea38..fc53fe9234a4550a71f9e05168a4dcc92a672c0e 100755 (executable)
@@ -53,7 +53,9 @@ namespace MonoTests.System.Runtime.Serialization
                //
                public void TestGetId2 ()
                {
+                       bool testBool1;
                        bool testBool2;
+                       id = generator.GetId (obj1, out testBool1);
                        long testId1 = generator.GetId (obj1, out testBool2);
 
                        AssertEquals ("B1", testId1, id); // same object, same ID
@@ -65,7 +67,9 @@ namespace MonoTests.System.Runtime.Serialization
                //
                public void TestHasId1 ()
                {
+                       bool testBool1;
                        bool testBool3;
+                       id = generator.GetId (obj1, out testBool1);
                        long testId2 = generator.HasId (obj1, out testBool3);
 
                        AssertEquals ("C1", false, testBool3); // this has been inserted before
index d3d3af92c57a6eaef1b310e7e0e3297d4ee26977..0f6fe6db0d012a52527cc98cee6ebf9cf576f9c9 100644 (file)
@@ -1,3 +1,7 @@
+2002-06-20  Nick Drochak  <ndrochak@gol.com>
+
+       * DecimalTest2.cs: Make tests pass against ms.net.
+
 2002-06-19  Nick Drochak  <ndrochak@gol.com>
 
        * AllTests.cs: Add missing test: DecimalTest2
index 7587e281ac7ab41952cb678a8ea216ca36eb0a3f..d7859c8b4565e8fd96ca114c025313bcd92f591f 100644 (file)
@@ -2403,7 +2403,7 @@ namespace MonoTests.System
            new TestResult(0, 79228162514264337593543950335m), // 6 / 1\r
            new TestResult(0, -79228162514264337593543950335m), // 6 / 2\r
            new TestResult(4, 39614081257132168796771975168m), // 6 / 3\r
-           new TestResult(0, 7922816251426433759354395033.5m), // 6 / 4\r
+           new TestResult(4, 7922816251426433759354395034m), // 6 / 4\r
            new TestResult(1, 0m), // 6 / 5\r
            new TestResult(0, 1m), // 6 / 6\r
            new TestResult(0, -1m), // 6 / 7\r
@@ -2433,7 +2433,7 @@ namespace MonoTests.System
            new TestResult(0, -79228162514264337593543950335m), // 7 / 1\r
            new TestResult(0, 79228162514264337593543950335m), // 7 / 2\r
            new TestResult(4, -39614081257132168796771975168m), // 7 / 3\r
-           new TestResult(0, -7922816251426433759354395033.5m), // 7 / 4\r
+           new TestResult(4, -7922816251426433759354395034m), // 7 / 4\r
            new TestResult(1, 0m), // 7 / 5\r
            new TestResult(0, -1m), // 7 / 6\r
            new TestResult(0, 1m), // 7 / 7\r