Merge pull request #2454 from tastywheattasteslikechicken/FixVtableAbort
[mono.git] / mono / mini / aot-tests.cs
index a79e708282b296df8284d14cb19bbd5672601c3b..bd823f2b9062cce310ff2791ed9c39a5876c1d44 100644 (file)
@@ -443,4 +443,36 @@ class Tests
                var s1 = new FpStruct () { a = 1, b = 1, c = 10 };
                return pass_hfa_on_stack (s1, s1, s1);
        }
+
+       public static int test_0_get_current_method () {
+               var m = MethodBase.GetCurrentMethod ();
+#if __MOBILE__
+               var m2 = typeof (AotTests).GetMethod ("test_0_get_current_method");
+#else
+               var m2 = typeof (Tests).GetMethod ("test_0_get_current_method");
+#endif
+               return m == m2 ? 0 : 1;
+       }
+
+       class GetCurrentMethodClass<T> {
+               [MethodImplAttribute (MethodImplOptions.NoInlining)]
+               public MethodBase get_current () {
+                       return MethodBase.GetCurrentMethod ();
+               }
+       }
+
+       public static int test_0_get_current_method_generic () {
+               var c = new GetCurrentMethodClass<string> ();
+               var m = c.get_current ();
+               var m2 = typeof (GetCurrentMethodClass<>).GetMethod ("get_current");
+               return m == m2 ? 0 : 1;
+       }
+
+       public static int test_0_array_wrappers_runtime_invoke () {
+               string[][] arr = new string [10][];
+               IEnumerable<string[]> iface = arr;
+               var m = typeof(IEnumerable<string[]>).GetMethod ("GetEnumerator");
+               m.Invoke (arr, null);
+               return 0;
+       }
 }