* All changes: Make tests pass against ms.net.
svn path=/trunk/mcs/; revision=5360
+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
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
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
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
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
//
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
//
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
+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
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
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