merge 99630:99762
[mono.git] / mcs / tests / gtest-380.cs
1 using System.Reflection;
2 using System;
3
4 class Test
5 {
6         public volatile int field;
7
8         public static int Main ()
9         {
10                 FieldInfo fi = typeof (Test).GetField ("field");
11                 if (fi.GetCustomAttributes (true).Length != 0)
12                         return 1;
13                 
14                 Type[] t = fi.GetRequiredCustomModifiers ();
15                 if (t.Length != 1)
16                         return 2;
17                 
18                 if (t [0] != typeof (System.Runtime.CompilerServices.IsVolatile))
19                         return 3;
20                 
21                 Console.WriteLine ("OK");
22                 return 0;
23         }
24 }