diff options
author | Marek Safar <marek.safar@gmail.com> | 2008-04-03 18:49:06 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2008-04-03 18:49:06 +0400 |
commit | 7d43d59a72c2bf1f0949745d5dc595cf77c6caba (patch) | |
tree | 90bdcbd72b98af57e5fc66a54fc436542d9e1482 /mcs/tests/gtest-380.cs | |
parent | e0db83425b8c6d9ed61bbec5923b4e813246de17 (diff) |
New test.
svn path=/trunk/mcs/; revision=99748
Diffstat (limited to 'mcs/tests/gtest-380.cs')
-rw-r--r-- | mcs/tests/gtest-380.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/mcs/tests/gtest-380.cs b/mcs/tests/gtest-380.cs new file mode 100644 index 00000000000..00d7e3bd45d --- /dev/null +++ b/mcs/tests/gtest-380.cs @@ -0,0 +1,24 @@ +using System.Reflection; +using System; + +class Test +{ + public volatile int field; + + public static int Main () + { + FieldInfo fi = typeof (Test).GetField ("field"); + if (fi.GetCustomAttributes (true).Length != 0) + return 1; + + Type[] t = fi.GetRequiredCustomModifiers (); + if (t.Length != 1) + return 2; + + if (t [0] != typeof (System.Runtime.CompilerServices.IsVolatile)) + return 3; + + Console.WriteLine ("OK"); + return 0; + } +} |