[interp] testcase for static field stuff
authorBernhard Urban <bernhard.urban@xamarin.com>
Tue, 25 Apr 2017 22:13:38 +0000 (00:13 +0200)
committerBernhard Urban <bernhard.urban@xamarin.com>
Fri, 28 Apr 2017 18:52:06 +0000 (20:52 +0200)
mono/mini/objects.cs

index d8a7edd6dd8483d3628e9f99d80ab45bed0d35d6..8d0cf336b8c96281d5670973cad0a1133cccb9fe 100644 (file)
@@ -1035,6 +1035,19 @@ class Tests {
                return 0;
        }
 
+       static Nullable<bool> s_nullb;
+       static AStruct s_struct1;
+
+       /* test if VES uses correct sizes for value type write to static field */
+       public static int test_0_static_nullable_bool () {
+               s_struct1 = new AStruct (0x1337dead);
+               s_nullb = true;
+               /* make sure that the write to s_nullb didn't smash the value after it */
+               if (s_struct1.i != 0x1337dead)
+                       return 2;
+               return 0;
+       }
+
        public static int test_71_long_shift_right () {
                ulong value = 38654838087;
                int x = 0;