Author: atsushi
Date: 2006-04-25 02:48:23 -0400 (Tue, 25 Apr 2006)
New Revision: 59835
Modified:
trunk/mcs/class/corlib/Test/System.Collections/ChangeLog
trunk/mcs/class/corlib/Test/System.Collections/QueueTest.cs
trunk/mcs/class/corlib/Test/System.Collections/SortedListTest.cs
Log:
2006-04-25 Atsushi Enomoto <[EMAIL PROTECTED]>
* QueueTest.cs, SortedListTest.cs : many capacity-related tests are
written under improper assumption. As a result they don't pass when
we run make PROFILE=net_2_0 run-test-ondotnet, so got rid of them.
Modified: trunk/mcs/class/corlib/Test/System.Collections/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System.Collections/ChangeLog 2006-04-25
06:41:15 UTC (rev 59834)
+++ trunk/mcs/class/corlib/Test/System.Collections/ChangeLog 2006-04-25
06:48:23 UTC (rev 59835)
@@ -1,3 +1,9 @@
+2006-04-25 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * QueueTest.cs, SortedListTest.cs : many capacity-related tests are
+ written under improper assumption. As a result they don't pass when
+ we run make PROFILE=net_2_0 run-test-ondotnet, so got rid of them.
+
2006-01-04 Sebastien Pouliot <[EMAIL PROTECTED]>
* HashtableTest.cs: Added test case to check if all subclasses are
Modified: trunk/mcs/class/corlib/Test/System.Collections/QueueTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System.Collections/QueueTest.cs 2006-04-25
06:41:15 UTC (rev 59834)
+++ trunk/mcs/class/corlib/Test/System.Collections/QueueTest.cs 2006-04-25
06:48:23 UTC (rev 59835)
@@ -136,9 +136,11 @@
public void TestSyncRoot()
{
SetUp();
+#if !NET_2_0 // umm, why on earth do you expect SyncRoot is the Queue itself?
AssertEquals("SyncRoot q1", q1, q1.SyncRoot);
AssertEquals("SyncRoot q2", q2, q2.SyncRoot);
AssertEquals("SyncRoot emptyQueue", emptyQueue,
emptyQueue.SyncRoot);
+#endif
Queue q1sync = Queue.Synchronized(q1);
AssertEquals("SyncRoot value of a synchronized queue",
q1, q1sync.SyncRoot);
Modified: trunk/mcs/class/corlib/Test/System.Collections/SortedListTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System.Collections/SortedListTest.cs
2006-04-25 06:41:15 UTC (rev 59834)
+++ trunk/mcs/class/corlib/Test/System.Collections/SortedListTest.cs
2006-04-25 06:48:23 UTC (rev 59835)
@@ -39,7 +39,9 @@
public void TestConstructor1() {
SortedList temp1 = new SortedList();
AssertNotNull("sl.constructor-1: returns null", temp1);
+#if !NET_2_0 // no such expectation as it is broken in .NET 2.0
AssertEquals("sl.constructor-1: incorrect initial capacity",
icap, temp1.Capacity);
+#endif
}
[Test]
@@ -47,7 +49,9 @@
Comparer c = Comparer.Default;
SortedList temp1 = new SortedList(c);
AssertNotNull("sl.constructor-2: returns null", temp1);
+#if !NET_2_0 // no such expectation as it is broken in .NET 2.0
AssertEquals("sl.constructor-2: incorrect initial capacity",
icap, temp1.Capacity);
+#endif
}
[Test]
@@ -111,6 +115,7 @@
} catch (ArgumentOutOfRangeException) {}
}
+#if !NET_2_0 // no such expectation as it is broken in .NET 2.0
[Test]
public void Constructor_Capacity ()
{
@@ -128,6 +133,7 @@
AssertEquals ("Capacity-Resetted" + i.ToString (), 16,
sl.Capacity);
}
}
+#endif
[Test]
public void TestIsSynchronized() {
@@ -183,7 +189,9 @@
SortedList list = new SortedList (42);
AssertEquals ("42", 42, list.Capacity);
list.Capacity = 0;
+#if !NET_2_0 // no such expectation as it is broken in .NET 2.0
AssertEquals ("0(16)", 16, list.Capacity);
+#endif
}
[Test]
@@ -312,9 +320,12 @@
AssertEquals("sl.Clear: should have one element", 2, sl1.Count);
sl1.Clear();
AssertEquals("sl.Clear: is not cleared", 0, sl1.Count);
+#if !NET_2_0 // no such expectation as it is broken in .NET 2.0
AssertEquals("sl.Clear: capacity is altered", 16, sl1.Capacity);
+#endif
}
+#if !NET_2_0 // no such expectation as it is broken in .NET 2.0
[Test]
public void Clear_Capacity ()
{
@@ -340,6 +351,7 @@
AssertEquals ("Capacity", 16, sl.Capacity);
// note: we didn't return to 0 - so Clear cahnge the default
capacity
}
+#endif
[Test]
public void TestClone() {
@@ -799,11 +811,15 @@
SortedList sl1 = new SortedList(24);
sl1.TrimToSize();
+#if !NET_2_0 // no such expectation as it is broken in .NET 2.0
AssertEquals("sl.TrimToSize: incorrect capacity after trimming
empty list",icap,sl1.Capacity);
+#endif
for (int i = 72; i>=0; i--) sl1.Add(100+i,i);
sl1.TrimToSize();
+#if !NET_2_0 // no such expectation as it is broken in .NET 2.0
AssertEquals("sl.TrimToSize: incorrect capacity after trimming
a list",73,sl1.Capacity);
+#endif
}
[Test]
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches