Bump mono-extensions to fix build break (#5677)
[mono.git] / mcs / tests / test-181.cs
index a2d5de1d680bf3c9ba0bc9416bec6204c8e430d9..526f238285fea10be61d84ad175f8618e6633a13 100644 (file)
@@ -14,10 +14,41 @@ class Test
        {
        }
 
-       static public int Main ()
+       [MethodImplAttribute((short)MethodImplOptions.Synchronized)]
+       public void test2 ()
        {
-               MethodImplAttributes iflags = typeof (Test).GetMethod ("test").GetMethodImplementationFlags ();
-               return ((iflags & MethodImplAttributes.Synchronized) != 0 ? 0 : 1);
+       }
+
+       [MethodImplAttribute((byte)32)]
+       public void test3 ()
+       {
+       }
+
+       [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
+       public void test4 ()
+       {
+       }
+
+       public static int Main ()
+       {
+               MethodImplAttributes iflags;
+               iflags = typeof (Test).GetMethod ("test").GetMethodImplementationFlags ();
+               if ((iflags & MethodImplAttributes.Synchronized) == 0)
+                       return 1;
+
+               iflags = typeof (Test).GetMethod ("test2").GetMethodImplementationFlags ();
+               if ((iflags & MethodImplAttributes.Synchronized) == 0)
+                       return 2;
+
+               iflags = typeof (Test).GetMethod ("test3").GetMethodImplementationFlags ();
+               if ((iflags & MethodImplAttributes.Synchronized) == 0)
+                       return 3;
+
+               iflags = typeof (Test).GetMethod ("test3").GetMethodImplementationFlags ();
+               if ((iflags & MethodImplAttributes.Synchronized) == 0)
+                       return 4;
+
+               return 0;
        }
 }