8 public TestStruct (int i) {
15 return TestDriver.RunTests (typeof (Tests));
18 public static int test_1_nullable_unbox ()
20 return Unbox<int?> (1).Value;
23 public static int test_1_nullable_unbox_null ()
25 return Unbox<int?> (null).HasValue ? 0 : 1;
28 public static int test_1_nullable_box ()
30 return (int) Box<int?> (1);
33 public static int test_1_nullable_box_null ()
35 return Box<int?> (null) == null ? 1 : 0;
38 public static int test_1_isinst_nullable ()
41 return (o is int?) ? 1 : 0;
44 public static int test_1_nullable_unbox_vtype ()
46 return Unbox<TestStruct?> (new TestStruct (1)).Value.i;
49 public static int test_1_nullable_unbox_null_vtype ()
51 return Unbox<TestStruct?> (null).HasValue ? 0 : 1;
54 public static int test_1_nullable_box_vtype ()
56 return ((TestStruct)(Box<TestStruct?> (new TestStruct (1)))).i;
59 public static int test_1_nullable_box_null_vtype ()
61 return Box<TestStruct?> (null) == null ? 1 : 0;
64 public static int test_1_isinst_nullable_vtype ()
66 object o = new TestStruct (1);
67 return (o is TestStruct?) ? 1 : 0;
70 public static void stelem_any<T> (T[] arr, T elem) {
74 public static T ldelem_any<T> (T[] arr) {
78 public static int test_1_ldelem_stelem_any_int () {
79 int[] arr = new int [3];
82 return ldelem_any (arr);
85 static object Box<T> (T t)
90 static T Unbox <T> (object o) {