Lookup of test resource files in ResourceReaderTest fails on Windows
authorNiklas Therning <niklas@therning.org>
Thu, 1 Sep 2016 14:34:49 +0000 (16:34 +0200)
committerNiklas Therning <niklas@therning.org>
Mon, 5 Sep 2016 08:45:26 +0000 (10:45 +0200)
Removed the differing code paths in FixtureSetUp() when running on non-Windows
platforms vs when running Mono on Windows or on .NET. The path previously
taken only on non-Windows platforms has been verified to work as expected on
both Mono on Windows and on .NET.

mcs/class/corlib/Test/System.Resources/ResourceReaderTest.cs

index 88690944df3851ad2a9d846b0fbbae50723d8eb5..55f00dd8bede15797ed25b02495180e54f79ccfb 100644 (file)
@@ -28,15 +28,9 @@ namespace MonoTests.System.Resources
                [TestFixtureSetUp]
                public void FixtureSetUp ()
                {
-                       char ds = Path.DirectorySeparatorChar;
-                       if (ds == '/') {
-                               string base_path = Path.Combine (Directory.GetCurrentDirectory (), Path.Combine ("Test", "resources"));
-                               m_ResourceFile = Path.Combine (base_path, "MyResources.resources");
-                               m_BadResourceFile = Path.Combine (base_path, "Empty.resources");
-                       } else {
-                               m_ResourceFile = Path.Combine ("Test", Path.Combine ("resources", "MyResources.resources"));
-                               m_BadResourceFile = "resources" + ds + "Empty.resources";
-                       }
+                       string base_path = Path.Combine (Directory.GetCurrentDirectory (), Path.Combine ("Test", "resources"));
+                       m_ResourceFile = Path.Combine (base_path, "MyResources.resources");
+                       m_BadResourceFile = Path.Combine (base_path, "Empty.resources");
                }
 
                [SetUp]