diff options
author | Marek Safar <marek.safar@gmail.com> | 2004-06-21 13:46:14 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2004-06-21 13:46:14 +0400 |
commit | 66e7897cc9ea2f30688fa360b992f28c2e6c88f9 (patch) | |
tree | 895f1e2fa22c33dee31e1c146eaced271257a516 /mcs/tests/test-275.cs | |
parent | c3046ba7a7fbc597bb3b4623bacdbdd064961986 (diff) |
2004-06-21 Marek Safar <marek.safar@seznam.cz>
* test-275.cs: New test for #59792
svn path=/trunk/mcs/; revision=30022
Diffstat (limited to 'mcs/tests/test-275.cs')
-rw-r--r-- | mcs/tests/test-275.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mcs/tests/test-275.cs b/mcs/tests/test-275.cs new file mode 100644 index 00000000000..f3f047b68b2 --- /dev/null +++ b/mcs/tests/test-275.cs @@ -0,0 +1,29 @@ +using System; +using System.Reflection; +using System.Runtime.CompilerServices; + +public class Test +{ + public delegate void DelType(); + + public event DelType MyEvent; + + public static int Main() + { + EventInfo ei = typeof(Test).GetEvent ("MyEvent"); + MethodImplAttributes methodImplAttributes = ei.GetAddMethod ().GetMethodImplementationFlags(); + + if ((methodImplAttributes & MethodImplAttributes.Synchronized) == 0) { + Console.WriteLine ("FAILED"); + return 1; + } + + methodImplAttributes = ei.GetRemoveMethod ().GetMethodImplementationFlags(); + if ((methodImplAttributes & MethodImplAttributes.Synchronized) == 0) { + Console.WriteLine ("FAILED"); + return 2; + } + + return 0; + } +} |