Author: zoltan
Date: 2005-03-24 12:16:43 -0500 (Thu, 24 Mar 2005)
New Revision: 42224
Modified:
trunk/mcs/class/corlib/Test/System/ChangeLog
trunk/mcs/class/corlib/Test/System/ModuleHandleTest.cs
trunk/mcs/class/corlib/Test/System/StringTest.cs
Log:
2005-03-24 Zoltan Varga <[EMAIL PROTECTED]>
* StringTest.cs: Added tests for new methods.
* ModuleHandleTest.cs: Fix warning.
Modified: trunk/mcs/class/corlib/Test/System/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System/ChangeLog 2005-03-24 17:14:32 UTC
(rev 42223)
+++ trunk/mcs/class/corlib/Test/System/ChangeLog 2005-03-24 17:16:43 UTC
(rev 42224)
@@ -1,3 +1,9 @@
+2005-03-24 Zoltan Varga <[EMAIL PROTECTED]>
+
+ * StringTest.cs: Added tests for new methods.
+
+ * ModuleHandleTest.cs: Fix warning.
+
2005-03-24 Sebastien Pouliot <[EMAIL PROTECTED]>
* ActivatorCas.cs: New. CAS unit tests for Activator.
Modified: trunk/mcs/class/corlib/Test/System/ModuleHandleTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System/ModuleHandleTest.cs 2005-03-24
17:14:32 UTC (rev 42223)
+++ trunk/mcs/class/corlib/Test/System/ModuleHandleTest.cs 2005-03-24
17:16:43 UTC (rev 42224)
@@ -37,8 +37,6 @@
}
}
- public event EventHandler baz;
-
public ModuleHandleTest () {
}
Modified: trunk/mcs/class/corlib/Test/System/StringTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System/StringTest.cs 2005-03-24 17:14:32 UTC
(rev 42223)
+++ trunk/mcs/class/corlib/Test/System/StringTest.cs 2005-03-24 17:16:43 UTC
(rev 42224)
@@ -687,6 +687,30 @@
"Mono".IndexOfAny (new char [1] { 'o' }, 1, Int32.MaxValue);
}
+#if NET_2_0
+ [Test]
+ [ExpectedException (typeof (ArgumentNullException))]
+ public void Contains_Null () {
+ "ABC".Contains (null);
+ }
+
+ [Test]
+ public void TestContains () {
+ Assert ("ABC".Contains (""));
+ Assert ("ABC".Contains ("ABC"));
+ Assert ("ABC".Contains ("AB"));
+ Assert (!"ABC".Contains ("AD"));
+ }
+
+ [Test]
+ public void TestIsNullOrEmpty () {
+ Assert (String.IsNullOrEmpty (null));
+ Assert (String.IsNullOrEmpty (String.Empty));
+ Assert (String.IsNullOrEmpty (""));
+ Assert (!String.IsNullOrEmpty ("A"));
+ }
+#endif
+
public void TestInsert() {
string s1 = "original";
@@ -1165,6 +1189,26 @@
"Mono".Remove (1, Int32.MaxValue);
}
+#if NET_2_0
+ [Test]
+ [ExpectedException (typeof (ArgumentOutOfRangeException))]
+ public void TestRemove1_NegativeStartIndex () {
+ "ABC".Remove (-1);
+ }
+
+ [Test]
+ [ExpectedException (typeof (ArgumentOutOfRangeException))]
+ public void TestRemove1_StartIndexOverflow () {
+ "ABC".Remove (3);
+ }
+
+ [Test]
+ public void TestRemove1 () {
+ AssertEquals ("AB", "ABC".Remove (2));
+ AssertEquals ("", "ABC".Remove (0));
+ }
+#endif
+
public void TestReplace() {
string s1 = "original";
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches