Merge pull request #3563 from lewurm/interpreter
[mono.git] / mcs / class / System / Test / System.Diagnostics / SwitchesTest.cs
index dc82f1fa2ed863eb08e9b09ccbf4d37f05e63bba..0d26154097c236f9bac26e6d29bbaf95820be2ec 100644 (file)
@@ -11,6 +11,8 @@
 // (C) 2003 Martin Willemoes Hansen
 //
 
+#if !MOBILE && !MONOMAC
+
 using NUnit.Framework;
 using System;
 using System.Text;
@@ -46,12 +48,10 @@ namespace MonoTests.System.Diagnostics {
                        }
                }
 
-#if NET_2_0
                public string [] ExposeSupportedAttributes ()
                {
                        return GetSupportedAttributes ();
                }
-#endif
 
                public bool Validate ()
                {
@@ -78,6 +78,12 @@ namespace MonoTests.System.Diagnostics {
                }
        }
 
+       class TestNullSwitch : Switch {
+               public TestNullSwitch () : base (null, null)
+               {
+               }
+       }
+
        [TestFixture]
        public class SwitchesTest {
     
@@ -138,16 +144,13 @@ namespace MonoTests.System.Diagnostics {
                }
 
                [Test]
-#if NET_2_0
                [Ignore ("this test depends on 1.x configuration type")]
-#endif
                public void NewSwitch ()
                {
                        Assert.AreEqual ("42", tns.TestValue, "#NS:TestValue");
                        Assert.IsTrue (tns.Validate(), "#NS:Validate");
                }
 
-#if NET_2_0
                [Test]
                public void GetSupportedAttributes ()
                {
@@ -182,7 +185,15 @@ namespace MonoTests.System.Diagnostics {
                        BooleanSwitch s = new BooleanSwitch ("test", "", "hoge");
                        Assert.IsTrue (!s.Enabled);
                }
-#endif
+
+               [Test]
+               public void NullSwitchHasEmptyDisplayNameAndDescription ()
+               {
+                       var s = new TestNullSwitch ();
+                       AssertHelper.IsEmpty (s.DisplayName);
+                       AssertHelper.IsEmpty (s.Description);
+               }
        }
 }
 
+#endif