From: Raja R Harinath Date: Tue, 8 Sep 2009 15:12:38 +0000 (-0000) Subject: Check in up-to-date version of RegexTest.cs. Somehow the previous X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=ce41ff407f160f971e8b219631db222cc783c7b6;p=mono.git Check in up-to-date version of RegexTest.cs. Somehow the previous checkin got an untested preliminary version svn path=/trunk/mcs/; revision=141530 --- diff --git a/mcs/class/System/Test/System.Text.RegularExpressions/RegexTest.cs b/mcs/class/System/Test/System.Text.RegularExpressions/RegexTest.cs index 1d593d50059..83924890e4b 100644 --- a/mcs/class/System/Test/System.Text.RegularExpressions/RegexTest.cs +++ b/mcs/class/System/Test/System.Text.RegularExpressions/RegexTest.cs @@ -222,13 +222,15 @@ namespace MonoTests.System.Text.RegularExpressions [Test, ExpectedException (typeof (ArgumentOutOfRangeException))] public void Replace_InvalidCount () { - Regex.Replace ("foo", "foo|bar", "baz", -4); + Regex r = new Regex ("foo|bar"); + r.Replace ("foo", "baz", -4); } [Test, ExpectedException (typeof (ArgumentOutOfRangeException))] public void Replace_InvalidStart () { - Regex.Replace ("foo", "foo|bar", "baz", 1, -4); + Regex r = new Regex ("foo|bar"); + r.Replace ("foo", "baz", 1, -4); } [Test, ExpectedException (typeof (ArgumentNullException))] @@ -243,16 +245,18 @@ namespace MonoTests.System.Text.RegularExpressions Regex.Split (null, "^.*$", RegexOptions.RightToLeft); } - [Test, ExpectedException (typeof (ArgumentNullException))] + [Test, ExpectedException (typeof (ArgumentOutOfRangeException))] public void Split_InvalidCount () { - Regex.Split (null, "^.*$", -4); + Regex r = new Regex ("^.*$"); + r.Split ("foo", -4); } - [Test, ExpectedException (typeof (ArgumentNullException))] + [Test, ExpectedException (typeof (ArgumentOutOfRangeException))] public void Split_InvalidCount2 () { - Regex.Split (null, "^.*$", 1, -4); + Regex r = new Regex ("^.*$"); + r.Split ("foo", 1, -4); } [Test, ExpectedException (typeof (ArgumentNullException))]