New test.
[mono.git] / mcs / tests / test-275.cs
1 using System; 
2 using System.Reflection;
3 using System.Runtime.CompilerServices;
4
5 public class Test 
6
7         public delegate void DelType(); 
8  
9         public event DelType MyEvent; 
10  
11         public static int Main()
12         {
13                 EventInfo ei = typeof(Test).GetEvent ("MyEvent");
14                 MethodImplAttributes methodImplAttributes = ei.GetAddMethod ().GetMethodImplementationFlags();
15             
16                 if ((methodImplAttributes & MethodImplAttributes.Synchronized) == 0) {
17                     Console.WriteLine ("FAILED");
18                     return 1;
19                 }
20
21                 methodImplAttributes = ei.GetRemoveMethod ().GetMethodImplementationFlags();
22                 if ((methodImplAttributes & MethodImplAttributes.Synchronized) == 0) {
23                     Console.WriteLine ("FAILED");
24                     return 2;
25                 }
26
27                 return 0;
28         } 
29 }