Author: kornelpal
Date: 2006-07-19 07:48:29 -0400 (Wed, 19 Jul 2006)
New Revision: 62741
Modified:
trunk/mcs/class/corlib/Test/System/ChangeLog
trunk/mcs/class/corlib/Test/System/StringTest.cs
Log:
StringTest.cs: Added some more TestSbytePtrConstructorNegative tests and
TestSbytePtrConstructorOverflow tests.
Modified: trunk/mcs/class/corlib/Test/System/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System/ChangeLog 2006-07-19 11:46:44 UTC
(rev 62740)
+++ trunk/mcs/class/corlib/Test/System/ChangeLog 2006-07-19 11:48:29 UTC
(rev 62741)
@@ -1,3 +1,8 @@
+2006-07-19 Korn�l P�l <[EMAIL PROTECTED]>
+
+ * StringTest.cs: Added some more TestSbytePtrConstructorNegative tests
+ and TestSbytePtrConstructorOverflow tests.
+
2006-07-18 Korn�l P�l <[EMAIL PROTECTED]>
* StringTest.cs: Added several tests for constructors that take sbyte*
Modified: trunk/mcs/class/corlib/Test/System/StringTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System/StringTest.cs 2006-07-19 11:46:44 UTC
(rev 62740)
+++ trunk/mcs/class/corlib/Test/System/StringTest.cs 2006-07-19 11:48:29 UTC
(rev 62741)
@@ -215,15 +215,81 @@
[ExpectedException (typeof (ArgumentOutOfRangeException))]
public unsafe void TestSbytePtrConstructorNegative1 ()
{
- AssertEquals (String.Empty, new String ((sbyte*) null, -1, 0,
Encoding.Default));
+ AssertEquals (String.Empty, new String ((sbyte*) null, -1, 0));
}
[ExpectedException (typeof (ArgumentOutOfRangeException))]
public unsafe void TestSbytePtrConstructorNegative2 ()
{
+ AssertEquals (String.Empty, new String ((sbyte*) null, 0, -1));
+ }
+
+ [ExpectedException (typeof (ArgumentOutOfRangeException))]
+ public unsafe void TestSbytePtrConstructorNegative3 ()
+ {
+ AssertEquals (String.Empty, new String ((sbyte*) null, -1, 0,
null));
+ }
+
+ [ExpectedException (typeof (ArgumentOutOfRangeException))]
+ public unsafe void TestSbytePtrConstructorNegative4 ()
+ {
+ AssertEquals (String.Empty, new String ((sbyte*) null, 0, -1,
null));
+ }
+
+ [ExpectedException (typeof (ArgumentOutOfRangeException))]
+ public unsafe void TestSbytePtrConstructorNegative5 ()
+ {
+ AssertEquals (String.Empty, new String ((sbyte*) null, -1, 0,
Encoding.Default));
+ }
+
+ [ExpectedException (typeof (ArgumentOutOfRangeException))]
+ public unsafe void TestSbytePtrConstructorNegative6 ()
+ {
AssertEquals (String.Empty, new String ((sbyte*) null, 0, -1,
Encoding.Default));
}
+ [Ignore ("Blocked by mcs bug 78899")]
+ [ExpectedException (typeof (ArgumentOutOfRangeException))]
+ public unsafe void TestSbytePtrConstructorOverflow1 ()
+ {
+ AssertEquals (String.Empty, new String ((sbyte*) (-1), 1, 0));
+ }
+
+ [Ignore ("Blocked by mcs bug 78899")]
+ [ExpectedException (typeof (ArgumentOutOfRangeException))]
+ public unsafe void TestSbytePtrConstructorOverflow2 ()
+ {
+ AssertEquals (String.Empty, new String ((sbyte*) (-1), 1, 1));
+ }
+
+ [Ignore ("Blocked by mcs bug 78899")]
+ [ExpectedException (typeof (ArgumentOutOfRangeException))]
+ public unsafe void TestSbytePtrConstructorOverflow3 ()
+ {
+ AssertEquals (String.Empty, new String ((sbyte*) (-1), 1, 0,
null));
+ }
+
+ [Ignore ("Blocked by mcs bug 78899")]
+ [ExpectedException (typeof (ArgumentOutOfRangeException))]
+ public unsafe void TestSbytePtrConstructorOverflow4 ()
+ {
+ AssertEquals (String.Empty, new String ((sbyte*) (-1), 1, 1,
null));
+ }
+
+ [Ignore ("Blocked by mcs bug 78899")]
+ [ExpectedException (typeof (ArgumentOutOfRangeException))]
+ public unsafe void TestSbytePtrConstructorOverflow5 ()
+ {
+ AssertEquals (String.Empty, new String ((sbyte*) (-1), 1, 0,
Encoding.Default));
+ }
+
+ [Ignore ("Blocked by mcs bug 78899")]
+ [ExpectedException (typeof (ArgumentOutOfRangeException))]
+ public unsafe void TestSbytePtrConstructorOverflow6 ()
+ {
+ AssertEquals (String.Empty, new String ((sbyte*) (-1), 1, 1,
Encoding.Default));
+ }
+
public void TestLength ()
{
string str = "test string";
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches