[bcl] Remove NET_4_0 defines from class libs
[mono.git] / mcs / class / corlib / Test / System.Globalization / CultureInfoTest.cs
index 760e5da656e25344459190d2954fe282dd088be4..32233f269db981b78c76b9dd72551f6667c63a71 100644 (file)
@@ -179,11 +179,7 @@ namespace MonoTests.System.Globalization
                        try {
                                CultureInfo.CreateSpecificCulture ("uy32");
                                Assert.Fail ("#1");
-#if NET_4_0
                        } catch (CultureNotFoundException) {
-#else
-                       } catch (ArgumentException) {
-#endif
                        }
 
                        try {
@@ -200,11 +196,7 @@ namespace MonoTests.System.Globalization
                        CultureInfo ci = new CultureInfo ("nl");
                        try {
                                DateTimeFormatInfo dfi = ci.DateTimeFormat;
-#if NET_4_0
                                Assert.IsNotNull (dfi, "#1");
-#else
-                               Assert.Fail ("#1:" + (dfi != null));
-#endif
                        } catch (NotSupportedException ex) {
                                Assert.AreEqual (typeof (NotSupportedException), ex.GetType (), "#2");
                                Assert.IsNull (ex.InnerException, "#3");
@@ -235,9 +227,6 @@ namespace MonoTests.System.Globalization
                }
 
                [Test]
-#if !NET_4_0
-               [ExpectedException (typeof (NotSupportedException))]
-#endif
                public void TrySetNeutralCultureNotInvariant ()
                {
                        Thread.CurrentThread.CurrentCulture = new CultureInfo ("ar");
@@ -400,11 +389,7 @@ namespace MonoTests.System.Globalization
                        CultureInfo ci = new CultureInfo ("nl");
                        try {
                                NumberFormatInfo nfi = ci.NumberFormat;
-#if NET_4_0
                                Assert.IsNotNull (nfi, "#1");
-#else
-                               Assert.Fail ("#1:" + (nfi != null));
-#endif
                        } catch (NotSupportedException ex) {
                                Assert.AreEqual (typeof (NotSupportedException), ex.GetType (), "#2");
                                Assert.IsNull (ex.InnerException, "#3");
@@ -449,11 +434,7 @@ namespace MonoTests.System.Globalization
                                CultureInfo.GetCultureInfo (666);
                                Assert.Fail ("#1");
                        } catch (ArgumentException ex) {
-#if NET_4_0
                                Assert.AreEqual (typeof (CultureNotFoundException), ex.GetType (), "#2");
-#else
-                               Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2");
-#endif
                                Assert.IsNull (ex.InnerException, "#3");
                                Assert.IsNotNull (ex.Message, "#4");
                                Assert.IsNotNull (ex.ParamName, "#5");
@@ -483,11 +464,7 @@ namespace MonoTests.System.Globalization
                                CultureInfo.GetCultureInfo ("666");
                                Assert.Fail ("#1");
                        } catch (ArgumentException ex) {
-#if NET_4_0
                                Assert.AreEqual (typeof (CultureNotFoundException), ex.GetType (), "#2");
-#else
-                               Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2");
-#endif
                                Assert.IsNull (ex.InnerException, "#3");
                                Assert.IsNotNull (ex.Message, "#4");
                                Assert.IsNotNull (ex.ParamName, "#5");
@@ -612,11 +589,7 @@ namespace MonoTests.System.Globalization
                }
                
                [Test]
-#if NET_4_0
                [ExpectedException (typeof (CultureNotFoundException))]
-#else
-               [ExpectedException (typeof (ArgumentException))]
-#endif
                public void CultureNotFound ()
                {
                        // that's how the 'locale' gets defined for a device with an English UI