瀏覽代碼

Update for mobile profile

Marek Safar 13 年之前
父節點
當前提交
1ff548cb12
共有 19 個文件被更改,包括 104 次插入65 次删除
  1. 7 1
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Call.cs
  2. 3 0
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Lambda.cs
  3. 6 0
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Quote.cs
  4. 1 1
      mcs/class/System.Core/Test/System.Linq/EnumerableAsQueryableTest.cs
  5. 29 59
      mcs/class/System.Core/Test/System.Linq/ParallelEnumerableTests.cs
  6. 6 2
      mcs/class/System.Core/Test/System.Linq/ParallelTestHelper.cs
  7. 1 1
      mcs/class/System.Core/Test/System.Runtime.CompilerServices/DynamicAttributeTest.cs
  8. 5 1
      mcs/class/System.Core/Test/System.Security.Cryptography/AesCryptoServiceProviderTest.cs
  9. 6 0
      mcs/class/System.Core/Test/System.Security.Cryptography/AesManagedTest.cs
  10. 4 0
      mcs/class/System.Core/Test/System.Security.Cryptography/CngAlgorithmGroupTest.cs
  11. 4 0
      mcs/class/System.Core/Test/System.Security.Cryptography/CngAlgorithmTest.cs
  12. 4 0
      mcs/class/System.Core/Test/System.Security.Cryptography/MD5CngTest.cs
  13. 4 0
      mcs/class/System.Core/Test/System.Security.Cryptography/SHA1CngTest.cs
  14. 4 0
      mcs/class/System.Core/Test/System.Security.Cryptography/SHA256CngTest.cs
  15. 4 0
      mcs/class/System.Core/Test/System.Security.Cryptography/SHA256CryptoServiceProviderTest.cs
  16. 4 0
      mcs/class/System.Core/Test/System.Security.Cryptography/SHA384CngTest.cs
  17. 4 0
      mcs/class/System.Core/Test/System.Security.Cryptography/SHA384CryptoServiceProviderTest.cs
  18. 4 0
      mcs/class/System.Core/Test/System.Security.Cryptography/SHA512CngTest.cs
  19. 4 0
      mcs/class/System.Core/Test/System.Security.Cryptography/SHA512CryptoServiceProviderTest.cs

+ 7 - 1
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Call.cs

@@ -87,7 +87,7 @@ namespace MonoTests.System.Linq.Expressions {
 		}
 		}
 
 
 		[Test]
 		[Test]
-#if NET_4_0
+#if NET_4_0 && !MONOTOUCH
 		[ExpectedException (typeof (ArgumentException))]
 		[ExpectedException (typeof (ArgumentException))]
 #else
 #else
 		[ExpectedException (typeof (ArgumentNullException))]
 		[ExpectedException (typeof (ArgumentNullException))]
@@ -371,6 +371,9 @@ namespace MonoTests.System.Linq.Expressions {
 		}
 		}
 
 
 		[Test]
 		[Test]
+#if MONOTOUCH
+		[Category ("NotWorking")]
+#endif
 		[Category ("NotDotNet")] // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=319190
 		[Category ("NotDotNet")] // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=319190
 		public void Connect319190 ()
 		public void Connect319190 ()
 		{
 		{
@@ -477,6 +480,9 @@ namespace MonoTests.System.Linq.Expressions {
 		}
 		}
 
 
 		[Test]
 		[Test]
+#if MONOTOUCH
+		[Category ("NotWorking")]
+#endif
 		public void CallNullableGetValueOrDefault () // #568989
 		public void CallNullableGetValueOrDefault () // #568989
 		{
 		{
 			var value = Expression.Parameter (typeof (int?), "value");
 			var value = Expression.Parameter (typeof (int?), "value");

+ 3 - 0
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Lambda.cs

@@ -118,6 +118,9 @@ namespace MonoTests.System.Linq.Expressions
 		}
 		}
 
 
 		[Test]
 		[Test]
+#if MONOTOUCH
+		[Category ("NotWorking")]
+#endif
 		[ExpectedException(typeof(InvalidOperationException))]
 		[ExpectedException(typeof(InvalidOperationException))]
 		public void ParameterOutOfScope ()
 		public void ParameterOutOfScope ()
 		{
 		{

+ 6 - 0
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Quote.cs

@@ -48,6 +48,9 @@ namespace MonoTests.System.Linq.Expressions
 		}
 		}
 #else
 #else
 		[Test]
 		[Test]
+#if MONOTOUCH
+		[Category ("NotWorking")]
+#endif
 		[ExpectedException (typeof (ArgumentException))]
 		[ExpectedException (typeof (ArgumentException))]
 		public void QuoteConstant ()
 		public void QuoteConstant ()
 		{
 		{
@@ -69,6 +72,9 @@ namespace MonoTests.System.Linq.Expressions
 		}
 		}
 
 
 		[Test]
 		[Test]
+#if MONOTOUCH
+		[Category ("NotWorking")]
+#endif
 		public void ParameterInQuotedExpression () // #550722
 		public void ParameterInQuotedExpression () // #550722
 		{
 		{
 			// Expression<Func<string, Expression<Func<string>>>> e = (string s) => () => s;
 			// Expression<Func<string, Expression<Func<string>>>> e = (string s) => () => s;

+ 1 - 1
mcs/class/System.Core/Test/System.Linq/EnumerableAsQueryableTest.cs

@@ -422,7 +422,7 @@ namespace MonoTests.System.Linq {
 			IEnumerable bar = new Bar<int, string> ();
 			IEnumerable bar = new Bar<int, string> ();
 			IQueryable queryable = bar.AsQueryable ();
 			IQueryable queryable = bar.AsQueryable ();
 
 
-			Assert.IsInstanceOfType (typeof (IQueryable<string>), queryable);
+			Assert.IsTrue (queryable is IQueryable<string>);
 		}
 		}
 	}
 	}
 
 

+ 29 - 59
mcs/class/System.Core/Test/System.Linq/ParallelEnumerableTests.cs

@@ -55,40 +55,10 @@ namespace MonoTests.System.Linq
 		{
 		{
 			baseEnumerable = Enumerable.Range(1, 1000);
 			baseEnumerable = Enumerable.Range(1, 1000);
 		}
 		}
-		
-		void AreEquivalent (IEnumerable<int> syncEnumerable, IEnumerable<int> async_resEnumerable, int count)
-		{
-			int[] sync  = Enumerable.ToArray(syncEnumerable);
-			int[] async_res = Enumerable.ToArray(async_resEnumerable);
-			
-			// This is not AreEquals because ParallelQuery is non-deterministic (IParallelOrderedEnumerable is)
-			// thus the order of the initial Enumerable might not be preserved
-			string error = "";
-
-			if (sync.Length != async_res.Length)
-				error = string.Format ("Expected size {0} but got {1} #{2}", sync.Length, async_res.Length, count);
-
-			Array.Sort (sync);
-			Array.Sort (async_res);
-			int i, j;
-			for (i = j = 0; i < sync.Length && j < async_res.Length; ++i) {
-				if (sync [i] != async_res [j])
-					error += "missing "  + sync [i] + "";
-				else
-					++j;
-			}
-			if (error != "")
-				Assert.Fail (error);
-		}
-		
-		void AreEquivalent<T> (IEnumerable<T> syncEnumerable, IEnumerable<T> async_resEnumerable, int count)
+
+		static void AreEquivalent (IEnumerable syncEnumerable, IEnumerable async_resEnumerable)
 		{
 		{
-			T[] sync  = Enumerable.ToArray(syncEnumerable);
-			T[] async_res = Enumerable.ToArray(async_resEnumerable);
-			
-			// This is not AreEquals because ParallelQuery is non-deterministic (IParallelOrderedEnumerable is)
-			// thus the order of the initial Enumerable might not be preserved
-			CollectionAssert.AreEquivalent(sync, async_res, "#" + count);
+			Assert.That (async_resEnumerable, new NUnit.Framework.Constraints.CollectionEquivalentConstraint (syncEnumerable));
 		}
 		}
 		
 		
 		static void AssertAreSame<T> (IEnumerable<T> expected, IEnumerable<T> actual)
 		static void AssertAreSame<T> (IEnumerable<T> expected, IEnumerable<T> actual)
@@ -218,7 +188,7 @@ namespace MonoTests.System.Linq
 				IEnumerable<int> sync  = baseEnumerable.Select (i => i * i);
 				IEnumerable<int> sync  = baseEnumerable.Select (i => i * i);
 				IEnumerable<int> async_res = baseEnumerable.AsParallel ().Select (i => i * i);
 				IEnumerable<int> async_res = baseEnumerable.AsParallel ().Select (i => i * i);
 				
 				
-				AreEquivalent(sync, async_res, 1);
+				AreEquivalent(sync, async_res);
 			});
 			});
 		}
 		}
 			
 			
@@ -229,7 +199,7 @@ namespace MonoTests.System.Linq
 				IEnumerable<int> sync  = baseEnumerable.Where(i => i % 2 == 0);
 				IEnumerable<int> sync  = baseEnumerable.Where(i => i % 2 == 0);
 				IEnumerable<int> async_res = baseEnumerable.AsParallel().Where(i => i % 2 == 0);
 				IEnumerable<int> async_res = baseEnumerable.AsParallel().Where(i => i % 2 == 0);
 				
 				
-				AreEquivalent(sync, async_res, 1);
+				AreEquivalent(sync, async_res);
 			});
 			});
 		}
 		}
 		
 		
@@ -266,7 +236,7 @@ namespace MonoTests.System.Linq
 				int [] second = {2, 4, 6};
 				int [] second = {2, 4, 6};
 				int [] result = {0, 1, 3, 5};
 				int [] result = {0, 1, 3, 5};
 	
 	
-				AreEquivalent (result, first.AsReallyParallel ().Except (second.AsParallel ()), 1);
+				AreEquivalent (result, first.AsReallyParallel ().Except (second.AsParallel ()));
 			});
 			});
 		}
 		}
 
 
@@ -278,7 +248,7 @@ namespace MonoTests.System.Linq
 				int [] second = {2, 4, 6};
 				int [] second = {2, 4, 6};
 				int [] result = {2, 4};
 				int [] result = {2, 4};
 	
 	
-				AreEquivalent (result, first.AsReallyParallel ().Intersect (second.AsParallel ()), 1);
+				AreEquivalent (result, first.AsReallyParallel ().Intersect (second.AsParallel ()));
 			});
 			});
 		}
 		}
 
 
@@ -290,7 +260,7 @@ namespace MonoTests.System.Linq
 				int [] second = {2, 4, 6};
 				int [] second = {2, 4, 6};
 				int [] result = {0, 1, 2, 3, 4, 5, 6};
 				int [] result = {0, 1, 2, 3, 4, 5, 6};
 				
 				
-				AreEquivalent (result, first.AsReallyParallel ().Union (second.AsParallel ()), 1);
+				AreEquivalent (result, first.AsReallyParallel ().Union (second.AsParallel ()));
 			});
 			});
 		}
 		}
 
 
@@ -301,8 +271,8 @@ namespace MonoTests.System.Linq
 				int [] first = Enumerable.Range (1, 10000).ToArray ();
 				int [] first = Enumerable.Range (1, 10000).ToArray ();
 				int [] second = Enumerable.Range (323, 757).ToArray ();
 				int [] second = Enumerable.Range (323, 757).ToArray ();
 
 
-				AreEquivalent (first, first.AsReallyParallel ().Union (second.AsParallel ()), 1);
-			}, 10);
+				AreEquivalent (first, first.AsReallyParallel ().Union (second.AsParallel ()));
+			});
 		}
 		}
 
 
 		[Test]
 		[Test]
@@ -312,8 +282,8 @@ namespace MonoTests.System.Linq
 				int [] first = Enumerable.Range (1, 10000).ToArray ();
 				int [] first = Enumerable.Range (1, 10000).ToArray ();
 				int [] second = Enumerable.Range (323, 757).ToArray ();
 				int [] second = Enumerable.Range (323, 757).ToArray ();
 
 
-				AreEquivalent (second, first.AsReallyParallel ().Intersect (second.AsParallel ()), 1);
-			}, 10);
+				AreEquivalent (second, first.AsReallyParallel ().Intersect (second.AsParallel ()));
+			});
 		}
 		}
 		
 		
 		class Foo {}
 		class Foo {}
@@ -329,7 +299,7 @@ namespace MonoTests.System.Linq
 			Foo [] foos = new Foo [] {a, b, c};
 			Foo [] foos = new Foo [] {a, b, c};
 			Bar [] result = new Bar [] {a, b, c};
 			Bar [] result = new Bar [] {a, b, c};
 
 
-			AreEquivalent (result, foos.AsReallyParallel ().Cast<Bar> (), 1);
+			AreEquivalent (result, foos.AsReallyParallel ().Cast<Bar> ());
 		}
 		}
 		
 		
 		[Test]
 		[Test]
@@ -385,7 +355,7 @@ namespace MonoTests.System.Linq
 
 
 			ParallelTestHelper.Repeat (() => {
 			ParallelTestHelper.Repeat (() => {
 					var actual = initial.AsReallyParallel ().SelectMany ((i) => Enumerable.Range (1, i));
 					var actual = initial.AsReallyParallel ().SelectMany ((i) => Enumerable.Range (1, i));
-					AreEquivalent (expected, actual, 1);
+					AreEquivalent (expected, actual);
 				});
 				});
 		}
 		}
 
 
@@ -607,7 +577,7 @@ namespace MonoTests.System.Linq
 				                                                            (e) => e.Item1,
 				                                                            (e) => e.Item1,
 				                                                            (e1, e2) => e1.Item2 + e2.Item2,
 				                                                            (e1, e2) => e1.Item2 + e2.Item2,
 				                                                            EqualityComparer<int>.Default);
 				                                                            EqualityComparer<int>.Default);
-				AreEquivalent (expected, actual, 1);
+				AreEquivalent (expected, actual);
 			});
 			});
 		}
 		}
 
 
@@ -617,7 +587,7 @@ namespace MonoTests.System.Linq
 			var items = new [] { 1, 2, 3 };
 			var items = new [] { 1, 2, 3 };
 			var items2 = new [] { 1, 2, 3, 4 };
 			var items2 = new [] { 1, 2, 3, 4 };
 			var actual = items.AsReallyParallel ().Join (items2.AsReallyParallel (), i => i, i => i, (e1, e2) => e1 + e2);
 			var actual = items.AsReallyParallel ().Join (items2.AsReallyParallel (), i => i, i => i, (e1, e2) => e1 + e2);
-			AreEquivalent (new[] { 2, 4, 6 }, actual, 1);
+			AreEquivalent (new[] { 2, 4, 6 }, actual);
 		}
 		}
 
 
 		[Test]
 		[Test]
@@ -630,14 +600,14 @@ namespace MonoTests.System.Linq
 			ParallelTestHelper.Repeat (() => {
 			ParallelTestHelper.Repeat (() => {
 				ParallelQuery<IGrouping<int, int>> actual = source.AsReallyParallel ().GroupBy ((e) => e.Item1, (e) => e.Item2, EqualityComparer<int>.Default);
 				ParallelQuery<IGrouping<int, int>> actual = source.AsReallyParallel ().GroupBy ((e) => e.Item1, (e) => e.Item2, EqualityComparer<int>.Default);
 				foreach (var group in actual) {
 				foreach (var group in actual) {
-					Assert.GreaterOrEqual (group.Key, 0);
-					Assert.Less (group.Key, num / 10);
+					Assert.IsTrue (group.Key >= 0);
+					Assert.IsTrue (group.Key < num / 10);
 
 
 					int count = 0;
 					int count = 0;
 					foreach (var e in group) {
 					foreach (var e in group) {
 						count++;
 						count++;
-						Assert.GreaterOrEqual (e, group.Key * 10);
-						Assert.Less (e, (group.Key + 1) * 10);
+						Assert.IsTrue (e >= group.Key * 10);
+						Assert.IsTrue (e <  (group.Key + 1) * 10);
 					}
 					}
 
 
 					Assert.AreEqual (10, count, "count");
 					Assert.AreEqual (10, count, "count");
@@ -652,12 +622,12 @@ namespace MonoTests.System.Linq
 				ParallelQuery<int> async_res = baseEnumerable.AsReallyParallel ().AsOrdered ().Take(800);
 				ParallelQuery<int> async_res = baseEnumerable.AsReallyParallel ().AsOrdered ().Take(800);
 				IEnumerable<int> sync = baseEnumerable.Take(800);
 				IEnumerable<int> sync = baseEnumerable.Take(800);
 
 
-				AreEquivalent(sync, async_res, 1);
+				AreEquivalent(sync, async_res);
 
 
 				async_res = baseEnumerable.AsReallyParallel ().AsOrdered ().Take(100);
 				async_res = baseEnumerable.AsReallyParallel ().AsOrdered ().Take(100);
 				sync = baseEnumerable.Take(100);
 				sync = baseEnumerable.Take(100);
 
 
-				AreEquivalent(sync, async_res, 2);
+				AreEquivalent(sync, async_res);
 			});
 			});
 		}
 		}
 
 
@@ -684,7 +654,7 @@ namespace MonoTests.System.Linq
 				ParallelQuery<int> async_res = baseEnumerable.AsReallyParallel ().AsOrdered().Skip (800);
 				ParallelQuery<int> async_res = baseEnumerable.AsReallyParallel ().AsOrdered().Skip (800);
 				IEnumerable<int> sync = baseEnumerable.Skip (800);
 				IEnumerable<int> sync = baseEnumerable.Skip (800);
 				
 				
-				AreEquivalent (sync, async_res, 1);
+				AreEquivalent (sync, async_res);
 			});
 			});
 		}
 		}
 
 
@@ -696,7 +666,7 @@ namespace MonoTests.System.Linq
 				var sync = baseEnumerable.Skip(100);
 				var sync = baseEnumerable.Skip(100);
 				
 				
 				Assert.AreEqual (sync.Count (), async_res.Count ());
 				Assert.AreEqual (sync.Count (), async_res.Count ());
-			}, 20);
+			});
 		}
 		}
 
 
 		[Test]
 		[Test]
@@ -707,7 +677,7 @@ namespace MonoTests.System.Linq
 				ParallelQuery<int> async_res2 = ParallelEnumerable.Repeat(1, 10000).Zip(async_res1, (e1, e2) => e1 + e2);
 				ParallelQuery<int> async_res2 = ParallelEnumerable.Repeat(1, 10000).Zip(async_res1, (e1, e2) => e1 + e2);
 				
 				
 				int[] expected = Enumerable.Range (1, 10000).ToArray ();
 				int[] expected = Enumerable.Range (1, 10000).ToArray ();
-				CollectionAssert.AreEquivalent(expected, Enumerable.ToArray (async_res2), "#1");
+				AreEquivalent(expected, Enumerable.ToArray (async_res2));
 			});
 			});
 		}
 		}
 		
 		
@@ -718,7 +688,7 @@ namespace MonoTests.System.Linq
 				IEnumerable<int> sync  = Enumerable.Range(1, 1000);
 				IEnumerable<int> sync  = Enumerable.Range(1, 1000);
 				IEnumerable<int> async_res = ParallelEnumerable.Range(1, 1000);
 				IEnumerable<int> async_res = ParallelEnumerable.Range(1, 1000);
 				
 				
-				AreEquivalent (sync, async_res, 1);
+				AreEquivalent (sync, async_res);
 			});
 			});
 		}
 		}
 		
 		
@@ -729,7 +699,7 @@ namespace MonoTests.System.Linq
 				IEnumerable<int> sync  = Enumerable.Repeat(1, 1000);
 				IEnumerable<int> sync  = Enumerable.Repeat(1, 1000);
 				IEnumerable<int> async_res = ParallelEnumerable.Repeat(1, 1000);
 				IEnumerable<int> async_res = ParallelEnumerable.Repeat(1, 1000);
 				
 				
-				AreEquivalent (sync, async_res, 1);
+				AreEquivalent (sync, async_res);
 			});
 			});
 		}
 		}
 		
 		
@@ -812,7 +782,7 @@ namespace MonoTests.System.Linq
 
 
 			var list = data.AsReallyParallel ().ToList ();
 			var list = data.AsReallyParallel ().ToList ();
 
 
-			CollectionAssert.AreEquivalent (data, list);
+			AreEquivalent (data, list);
 
 
 			Assert.AreEqual (typeof (List<int>), list.GetType ());
 			Assert.AreEqual (typeof (List<int>), list.GetType ());
 		}
 		}
@@ -829,7 +799,7 @@ namespace MonoTests.System.Linq
 
 
 			var array = coll.AsReallyParallel ().ToArray ();
 			var array = coll.AsReallyParallel ().ToArray ();
 
 
-			CollectionAssert.AreEquivalent (result, array);
+			AreEquivalent (result, array);
 
 
 			Assert.AreEqual (typeof (int []), array.GetType ());
 			Assert.AreEqual (typeof (int []), array.GetType ());
 		}
 		}

+ 6 - 2
mcs/class/System.Core/Test/System.Linq/ParallelTestHelper.cs

@@ -31,8 +31,12 @@ namespace MonoTests.System.Linq
 {
 {
 	public static class ParallelTestHelper
 	public static class ParallelTestHelper
 	{
 	{
-		const int NumRun = 17;
-		
+#if MOBILE
+		const int NumRun = 3;
+#else
+		const int NumRun = 11;
+#endif
+
 		public static void Repeat (Action action)
 		public static void Repeat (Action action)
 		{
 		{
 			Repeat (action, NumRun);
 			Repeat (action, NumRun);

+ 1 - 1
mcs/class/System.Core/Test/System.Runtime.CompilerServices/DynamicAttributeTest.cs

@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 //
 
 
-#if NET_4_0
+#if NET_4_0 && !MONOTOUCH
 
 
 using System;
 using System;
 using System.Runtime.CompilerServices;
 using System.Runtime.CompilerServices;

+ 5 - 1
mcs/class/System.Core/Test/System.Security.Cryptography/AesCryptoServiceProviderTest.cs

@@ -26,6 +26,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 //
 
 
+#if !MOBILE
+
 using System;
 using System;
 using System.Security.Cryptography;
 using System.Security.Cryptography;
 
 
@@ -114,4 +116,6 @@ namespace MonoTests.System.Security.Cryptography {
 			}
 			}
 		}
 		}
 	}
 	}
-}
+}
+
+#endif

+ 6 - 0
mcs/class/System.Core/Test/System.Security.Cryptography/AesManagedTest.cs

@@ -37,7 +37,9 @@ namespace MonoTests.System.Security.Cryptography {
 	public class AesManagedTest {
 	public class AesManagedTest {
 		
 		
 		[Test]
 		[Test]
+#if !MOBILE
 		[ExpectedException (typeof (CryptographicException))]
 		[ExpectedException (typeof (CryptographicException))]
+#endif
 		public void CFB_NotAllowed ()
 		public void CFB_NotAllowed ()
 		{
 		{
 			// that's differnt from RjindaelManaged
 			// that's differnt from RjindaelManaged
@@ -49,7 +51,9 @@ namespace MonoTests.System.Security.Cryptography {
 		}
 		}
 		
 		
 		[Test]
 		[Test]
+#if !MOBILE
 		[ExpectedException (typeof (CryptographicException))]
 		[ExpectedException (typeof (CryptographicException))]
+#endif
 		public void CTS_NotAllowed ()
 		public void CTS_NotAllowed ()
 		{
 		{
 			// this check is normally (e.g. RijndaelManaged) done later
 			// this check is normally (e.g. RijndaelManaged) done later
@@ -59,7 +63,9 @@ namespace MonoTests.System.Security.Cryptography {
 		}
 		}
 		
 		
 		[Test]
 		[Test]
+#if !MOBILE
 		[ExpectedException (typeof (CryptographicException))]
 		[ExpectedException (typeof (CryptographicException))]
+#endif
 		public void OFB_NotAllowed ()
 		public void OFB_NotAllowed ()
 		{
 		{
 			// this check is normally (e.g. RijndaelManaged) done later
 			// this check is normally (e.g. RijndaelManaged) done later

+ 4 - 0
mcs/class/System.Core/Test/System.Security.Cryptography/CngAlgorithmGroupTest.cs

@@ -26,6 +26,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 //
 
 
+#if !MOBILE
+
 using System;
 using System;
 using System.Security.Cryptography;
 using System.Security.Cryptography;
 
 
@@ -142,3 +144,5 @@ namespace MonoTests.System.Security.Cryptography {
 		}
 		}
 	}
 	}
 }
 }
+
+#endif

+ 4 - 0
mcs/class/System.Core/Test/System.Security.Cryptography/CngAlgorithmTest.cs

@@ -26,6 +26,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 //
 
 
+#if !MOBILE
+
 using System;
 using System;
 using System.Security.Cryptography;
 using System.Security.Cryptography;
 
 
@@ -208,3 +210,5 @@ namespace MonoTests.System.Security.Cryptography {
 		}
 		}
 	}
 	}
 }
 }
+
+#endif

+ 4 - 0
mcs/class/System.Core/Test/System.Security.Cryptography/MD5CngTest.cs

@@ -10,6 +10,8 @@
 // Copyright (C) 2008 Novell, Inc (http://www.novell.com)
 // Copyright (C) 2008 Novell, Inc (http://www.novell.com)
 //
 //
 
 
+#if !MOBILE
+
 using NUnit.Framework;
 using NUnit.Framework;
 using System;
 using System;
 using System.Security.Cryptography;
 using System.Security.Cryptography;
@@ -71,3 +73,5 @@ namespace MonoTests.System.Security.Cryptography {
 		}
 		}
 	}
 	}
 }
 }
+
+#endif

+ 4 - 0
mcs/class/System.Core/Test/System.Security.Cryptography/SHA1CngTest.cs

@@ -8,6 +8,8 @@
 // Copyright (C) 2004, 2007 Novell, Inc (http://www.novell.com)
 // Copyright (C) 2004, 2007 Novell, Inc (http://www.novell.com)
 //
 //
 
 
+#if !MOBILE
+
 using NUnit.Framework;
 using NUnit.Framework;
 using System;
 using System;
 using System.Security.Cryptography;
 using System.Security.Cryptography;
@@ -61,3 +63,5 @@ namespace MonoTests.System.Security.Cryptography {
 		}
 		}
 	}
 	}
 }
 }
+
+#endif

+ 4 - 0
mcs/class/System.Core/Test/System.Security.Cryptography/SHA256CngTest.cs

@@ -8,6 +8,8 @@
 // Copyright (C) 2004, 2007-2008 Novell, Inc (http://www.novell.com)
 // Copyright (C) 2004, 2007-2008 Novell, Inc (http://www.novell.com)
 //
 //
 
 
+#if !MOBILE
+
 using NUnit.Framework;
 using NUnit.Framework;
 using System;
 using System;
 using System.Security.Cryptography;
 using System.Security.Cryptography;
@@ -74,3 +76,5 @@ namespace MonoTests.System.Security.Cryptography {
 		}
 		}
 	}
 	}
 }
 }
+
+#endif

+ 4 - 0
mcs/class/System.Core/Test/System.Security.Cryptography/SHA256CryptoServiceProviderTest.cs

@@ -8,6 +8,8 @@
 // Copyright (C) 2004, 2007-2008 Novell, Inc (http://www.novell.com)
 // Copyright (C) 2004, 2007-2008 Novell, Inc (http://www.novell.com)
 //
 //
 
 
+#if !MOBILE
+
 using NUnit.Framework;
 using NUnit.Framework;
 using System;
 using System;
 using System.Security.Cryptography;
 using System.Security.Cryptography;
@@ -74,3 +76,5 @@ namespace MonoTests.System.Security.Cryptography {
 		}
 		}
 	}
 	}
 }
 }
+
+#endif

+ 4 - 0
mcs/class/System.Core/Test/System.Security.Cryptography/SHA384CngTest.cs

@@ -8,6 +8,8 @@
 // Copyright (C) 2004, 2007-2008 Novell, Inc (http://www.novell.com)
 // Copyright (C) 2004, 2007-2008 Novell, Inc (http://www.novell.com)
 //
 //
 
 
+#if !MOBILE
+
 using NUnit.Framework;
 using NUnit.Framework;
 using System;
 using System;
 using System.Security.Cryptography;
 using System.Security.Cryptography;
@@ -74,3 +76,5 @@ namespace MonoTests.System.Security.Cryptography {
 		}
 		}
 	}
 	}
 }
 }
+
+#endif

+ 4 - 0
mcs/class/System.Core/Test/System.Security.Cryptography/SHA384CryptoServiceProviderTest.cs

@@ -8,6 +8,8 @@
 // Copyright (C) 2004, 2007-2008 Novell, Inc (http://www.novell.com)
 // Copyright (C) 2004, 2007-2008 Novell, Inc (http://www.novell.com)
 //
 //
 
 
+#if !MOBILE
+
 using NUnit.Framework;
 using NUnit.Framework;
 using System;
 using System;
 using System.Security.Cryptography;
 using System.Security.Cryptography;
@@ -74,3 +76,5 @@ namespace MonoTests.System.Security.Cryptography {
 		}
 		}
 	}
 	}
 }
 }
+
+#endif

+ 4 - 0
mcs/class/System.Core/Test/System.Security.Cryptography/SHA512CngTest.cs

@@ -8,6 +8,8 @@
 // Copyright (C) 2004, 2007-2008 Novell, Inc (http://www.novell.com)
 // Copyright (C) 2004, 2007-2008 Novell, Inc (http://www.novell.com)
 //
 //
 
 
+#if !MOBILE
+
 using NUnit.Framework;
 using NUnit.Framework;
 using System;
 using System;
 using System.Security.Cryptography;
 using System.Security.Cryptography;
@@ -74,3 +76,5 @@ namespace MonoTests.System.Security.Cryptography {
 		}
 		}
 	}
 	}
 }
 }
+
+#endif

+ 4 - 0
mcs/class/System.Core/Test/System.Security.Cryptography/SHA512CryptoServiceProviderTest.cs

@@ -8,6 +8,8 @@
 // Copyright (C) 2004, 2007-2008 Novell, Inc (http://www.novell.com)
 // Copyright (C) 2004, 2007-2008 Novell, Inc (http://www.novell.com)
 //
 //
 
 
+#if !MOBILE
+
 using NUnit.Framework;
 using NUnit.Framework;
 using System;
 using System;
 using System.Security.Cryptography;
 using System.Security.Cryptography;
@@ -74,3 +76,5 @@ namespace MonoTests.System.Security.Cryptography {
 		}
 		}
 	}
 	}
 }
 }
+
+#endif