2008-08-31 Zoltan Varga <vargaz@gmail.com>
[mcs.git] / tests / gtest-380.cs
blob00d7e3bd45d84986217de923330e35025fe1a05a
1 using System.Reflection;
2 using System;
4 class Test
6 public volatile int field;
8 public static int Main ()
10 FieldInfo fi = typeof (Test).GetField ("field");
11 if (fi.GetCustomAttributes (true).Length != 0)
12 return 1;
14 Type[] t = fi.GetRequiredCustomModifiers ();
15 if (t.Length != 1)
16 return 2;
18 if (t [0] != typeof (System.Runtime.CompilerServices.IsVolatile))
19 return 3;
21 Console.WriteLine ("OK");
22 return 0;