[mono/mono] d115725a: [jit] Make the exceptions.cs test suite runnable in mobile.

"Zoltan Varga ([email protected])" <[email protected]> Fri, 15 Nov 2013 00:42:55 +0000
Newsgroups gmane.comp.gnome.mono.patches
Message-ID <000001425935ed8f-35f13567-b011-4b9c-a336-b0ff95d9da64-000000@email.amazonses.com>
   Branch: refs/heads/master
     Home: https://github.com/mono/mono
  Compare: https://github.com/mono/mono/compare/c3b5906efd1d...d115725adef9

   Commit: d115725adef99c06b38ccb896f9d5b3209bf30ad
   Author: Zoltan Varga <[email protected]> (vargaz)
     Date: 2013-11-15 00:41:33 GMT
      URL: https://github.com/mono/mono/commit/d115725adef99c06b38ccb896f9d5b3209bf30ad

[jit] Make the exceptions.cs test suite runnable in mobile.

Changed paths:
  M mono/mini/exceptions.cs

Modified: mono/mini/exceptions.cs
===================================================================
@@ -24,11 +24,18 @@
  * the IL code looks.
  */
 
-class Tests {
-
+#if MOBILE
+class ExceptionTests
+#else
+class Tests
+#endif
+{
+
+#if !MOBILE
 	public static int Main (string[] args) {
 		return TestDriver.RunTests (typeof (Tests), args);
 	}
+#endif
 
 	public static int test_0_catch () {
 		Exception x = new Exception ();
@@ -2408,7 +2415,7 @@ struct S {
 	}
 
 	public static int test_0_nonvirt_nullref_at_clause_start () {
-		Tests t = null;
+		ExceptionTests t = null;
 		try {
 			t.amethod ();
 		} catch (NullReferenceException) {
@@ -2528,7 +2535,11 @@ struct S {
 	public static int test_0_lmf_filter () {
 		try {
 			// The invoke calls a runtime-invoke wrapper which has a filter clause
+#if MOBILE
+			typeof (ExceptionTests).GetMethod ("lmf_filter").Invoke (null, new object [] { });
+#else
 			typeof (Tests).GetMethod ("lmf_filter").Invoke (null, new object [] { });
+#endif
 		} catch (TargetInvocationException) {
 		}
 		return 0;
@@ -2732,3 +2743,8 @@ unsafe struct Foo
 	}
 }
 
+#if !MOBILE
+class ExceptionTests : Tests
+{
+}
+#endif
\ No newline at end of file


_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches