Results location is now set from defines NET_X_X.
authorMarcos Henrich <marcos.henrich@xamarin.com>
Fri, 25 Jul 2014 07:42:47 +0000 (08:42 +0100)
committerMarcos Henrich <marcos.henrich@xamarin.com>
Fri, 25 Jul 2014 07:42:47 +0000 (08:42 +0100)
mcs/class/System/Test/System/UriPermutationsTest.cs

index 8f56a2b6d309eb608286b632b29ee03b3259c209..1010b6e5c1a370d71cee41730c04d7b528ac36ad 100644 (file)
@@ -1,6 +1,4 @@
 using System;
-using System.IO;
-using System.Reflection;
 using System.Text;
 using NUnit.Framework;
 
@@ -13,6 +11,7 @@ namespace MonoTests.System {
                // The generated files should then be used when running the tests in Mono with CreateMode = false
                private const bool createMode = false;
 
+               // The final location depends on NET_2_0, NET_4_0, NET_4_5.
                private const string location = "./Test/System/UriPermutationsTest/";
 
                private const string nonAsciiTestedChars = "☕";
@@ -59,22 +58,17 @@ namespace MonoTests.System {
                        "", ".", "..", "...", "%2E", "%2E%2E", "%2E%2E%2E"
                };
 
-               public static readonly bool IriParsing;
-
-               static UriPermutationsTest ()
-               {
-                       FieldInfo iriParsingField = typeof (Uri).GetField ("s_IriParsing",
-                               BindingFlags.Static | BindingFlags.GetField | BindingFlags.NonPublic);
-                       if (iriParsingField != null)
-                               IriParsing = (bool) iriParsingField.GetValue (null);
-               }
-
                [SetUp]
                public void Setup()
                {
                        StringTester.CreateMode = createMode;
-                       StringTester.Location = location;
-                       StringTester.Location += (IriParsing) ? "IriParsing" : "NoIriParsing";
+#if NET_4_5
+                       StringTester.Location = location + "NET_4_5";
+#elif NET_4_0
+                       StringTester.Location = location + "NET_4_0";
+#else
+                       StringTester.Location = location + "NET_2_0";
+#endif
                }
 
                [TearDown]