Merge pull request #3573 from ntherning/replace-NUnit-Culture-with-SetCulture
authorMarek Safar <marek.safar@gmail.com>
Fri, 16 Sep 2016 18:01:08 +0000 (20:01 +0200)
committerGitHub <noreply@github.com>
Fri, 16 Sep 2016 18:01:08 +0000 (20:01 +0200)
Use NUnit's SetCulture attribute rather than Culture

mcs/class/corlib/Test/System/DateTimeTest.cs
mcs/class/corlib/Test/System/DecimalTest-Microsoft.cs
mcs/class/corlib/Test/System/DoubleTest.cs

index a22b17ebb5b8d377d9314fbe848cc6434640dd2b..ae383e310dd76adc68a779e9969f1df4c7e0ffe5 100644 (file)
@@ -2646,7 +2646,7 @@ namespace MonoTests.System
                }
 
                [Test]
-               [Culture ("en-us")]
+               [SetCulture ("en-us")]
                public void ToUniversalTime_TimeZoneOffsetShouldNotOverflow ()
                {
                        var m = DateTime.MaxValue;
@@ -2662,7 +2662,7 @@ namespace MonoTests.System
                        res = m.ToUniversalTime ();
 
                        // It does not matter which time zone but we should never overflow or have DateTime.MinValue
-                       Assert.AreEqual (0, res.Year, "#10");
+                       Assert.AreEqual (1, res.Year, "#10");
                        Assert.AreEqual (1, res.Month, "#11");
                        Assert.AreEqual (1, res.Day, "#12");
                        Assert.AreEqual (DateTimeKind.Utc, res.Kind, "#13");
index 3ef265c7b4d82ac2d24fd7207a5d1b2141fcc518..261e9b5692537a0593711614e27b619b917e3637 100644 (file)
@@ -496,7 +496,7 @@ namespace MonoTests.System
                }
                
                [Test]
-               [Culture ("en")]
+               [SetCulture ("en")]
                public void TestParse()
                {
                    // Boolean Decimal.TryParse(String, NumberStyles, IFormatProvider, Decimal)
@@ -810,7 +810,7 @@ namespace MonoTests.System
                }
                
                [Test]
-               [Culture ("en")]
+               [SetCulture ("en")]
                public void TestToString()
                {
                    // String Decimal.ToString()
@@ -865,7 +865,7 @@ namespace MonoTests.System
                }
                
                [Test]
-               [Culture ("en")]
+               [SetCulture ("en")]
                public void TestNumberBufferLimit()
                {
                    Decimal dE = 1234567890123456789012345.6785m;
index 45d7ee110519c0c7a01f1d5e155b064f5f965eb0..81b2a5fdb2a45300da291b23c2e54d7a5714d113 100644 (file)
@@ -147,7 +147,7 @@ namespace MonoTests.System
                }
 
                [Test]
-               [Culture ("en-US")]
+               [SetCulture ("en-US")]
                public void Parse ()
                {
                        int i = 0;