[corlib] Fix tests for watchOS. (#3131)
[mono.git] / mcs / class / corlib / Test / System / EnvironmentTest.cs
index 9a9f65a5e53948dd3889650cf75b2c68a5d27ee4..fed370974e584b8d5c33dd49eca0a75dc87de8e6 100644 (file)
@@ -138,7 +138,7 @@ namespace MonoTests.System
                        Assert.IsFalse (d.IsSynchronized, "IsSynchronized");
                }
 
-#if NET_2_0 && !NET_2_1
+#if !NET_2_1
                [Test] // bug #333740
                public void GetEnvironmentVariables_NewlySet ()
                {
@@ -156,12 +156,16 @@ namespace MonoTests.System
                public void GetCommandLineArgs ()
                {
                        string[] args = Environment.GetCommandLineArgs ();
+#if !__WATCHOS__
                        Assert.IsNotNull (args, "not null");
                        Assert.IsTrue (((args.Length > 0) && (args.Length < 256)), "reasonable");
                        Assert.IsNotNull (args [0], "application");
+#else
+                       Assert.AreEqual (0, args.Length, "length");
+#endif
                }
 
-#if NET_2_0 && !NET_2_1
+#if !NET_2_1
                [Test]
                [ExpectedException (typeof (ArgumentException))]
                public void GetEnvironmentVariable_Target_Invalid ()