using System.Reflection;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
+using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
}
[Category ("DYNCALL")]
+ [Category ("!FULLAOT-AMD64")]
static int test_0_arm64_dyncall_hfa_double () {
double arg1 = 1.0f;
// HFA with double members
}
[Category ("DYNCALL")]
+ [Category ("!FULLAOT-AMD64")]
static int test_0_arm64_dyncall_hfa_float () {
double arg1 = 1.0f;
var s = new Struct2 ();
[Category ("DYNCALL")]
[Category ("GSHAREDVT")]
+ [Category ("!FULLAOT-AMD64")]
static int test_0_arm64_dyncall_gsharedvt_out_hfa_double () {
/* gsharedvt out trampoline with double hfa argument */
double arg1 = 1.0f;
[Category ("DYNCALL")]
[Category ("GSHAREDVT")]
+ [Category ("!FULLAOT-AMD64")]
static int test_0_arm64_dyncall_gsharedvt_out_hfa_float () {
/* gsharedvt out trampoline with double hfa argument */
double arg1 = 1.0f;
}
[Category ("DYNCALL")]
+ [Category ("GSHAREDVT")]
+ [Category ("!FULLAOT-AMD64")]
static int test_0_arm64_dyncall_vtypebyref_ret () {
var s = new VTypeByRefStruct () { o1 = 1, o2 = 2, o3 = 3 };
Type t = typeof (Foo5<>).MakeGenericType (new Type [] { typeof (VTypeByRefStruct) });
}
}
- [Category("DYNCALL")]
+ [Category ("DYNCALL")]
+ [Category ("GSHAREDVT")]
static int test_0_arm_dyncall_reg_stack_split () {
var m = typeof (Foo6).GetMethod ("reg_stack_split_inner").MakeGenericMethod (new Type[] { typeof (long) });
var o = new Foo6 ();
}
[Category ("DYNCALL")]
+ [Category ("!FULLAOT-AMD64")]
public static int test_0_dyncall_nullable () {
int? v;
return 0;
}
+ [Category ("DYNCALL")]
public static int test_0_array_accessor_runtime_invoke_ref () {
var t = typeof (string[]);
var arr = Array.CreateInstance (typeof (string), 1);
}
[Category ("DYNCALL")]
+ [Category ("!FULLAOT-AMD64")]
public static int test_0_large_nullable_invoke () {
var s = new LargeStruct () { a = 1, b = 2, c = 3, d = 4 };
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;
+ }
+
+ public static int test_0_fault_clauses () {
+ object [] data = { 1, 2, 3 };
+ int [] expected = { 1, 2, 3 };
+
+ try {
+ Action d = delegate () { data.Cast<IEnumerable> ().GetEnumerator ().MoveNext (); };
+ d ();
+ } catch (Exception ex) {
+ }
+ return 0;
+ }
}