Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/corlib/Test/System.IO/PathTest.cs')
-rw-r--r--mcs/class/corlib/Test/System.IO/PathTest.cs24
1 files changed, 8 insertions, 16 deletions
diff --git a/mcs/class/corlib/Test/System.IO/PathTest.cs b/mcs/class/corlib/Test/System.IO/PathTest.cs
index 179cbd1e965..4d23ef35fb2 100644
--- a/mcs/class/corlib/Test/System.IO/PathTest.cs
+++ b/mcs/class/corlib/Test/System.IO/PathTest.cs
@@ -129,23 +129,15 @@ namespace MonoTests.System.IO
AssertEquals ("ChangeExtension #17", String.Empty, testPath);
testPath = Path.ChangeExtension (null, null);
AssertNull ("ChangeExtension #18", testPath);
- }
-
- [Test]
- [ExpectedException (typeof (ArgumentException))]
- public void ChangeExtension_BadPath ()
- {
- if (!Windows) throw new ArgumentException ("Test Only On Windows");
- Path.ChangeExtension ("<", ".extension");
- }
- [Test]
-// [ExpectedException (typeof (ArgumentException))]
- public void ChangeExtension_BadExtension ()
- {
- if (!Windows) throw new ArgumentException ("Test Only On Windows");
- string fn = Path.ChangeExtension ("file.ext", "<");
- AssertEquals ("Invalid filename", "file.<", fn);
+ if (Windows) {
+ try {
+ testPath = Path.ChangeExtension ("<", ".extension");
+ Fail ("ChangeException Fail #01");
+ } catch (Exception e) {
+ AssertEquals ("ChangeExtension Exc. #01", typeof (ArgumentException), e.GetType ());
+ }
+ }
}
public void TestCombine ()