Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2011-01-21 23:24:28 +0300
committerMarek Safar <marek.safar@gmail.com>2011-01-21 23:25:01 +0300
commitc74e30f6ac692257b919c3f73764eb844b0f1ec5 (patch)
treeecf00cc5c708b9b3182f5073942f477c1613d6d9 /mcs/tests/test-806.cs
parente278b5edc2bf7ca1e91ef7349c1e690b9a56cbb7 (diff)
New test
Diffstat (limited to 'mcs/tests/test-806.cs')
-rw-r--r--mcs/tests/test-806.cs44
1 files changed, 44 insertions, 0 deletions
diff --git a/mcs/tests/test-806.cs b/mcs/tests/test-806.cs
new file mode 100644
index 00000000000..5bdec376e49
--- /dev/null
+++ b/mcs/tests/test-806.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Reflection;
+
+class A1 : Attribute
+{
+ public float F;
+ public float UL;
+
+ public A1 (float f)
+ {
+ this.F = f;
+ }
+
+ public A1 (ulong ul)
+ {
+ this.UL = ul;
+ }
+}
+
+[A1 (45234.567f)]
+class T1
+{
+}
+
+[A1 (uint.MaxValue + (ulong)1)]
+class T2
+{
+}
+
+class Test
+{
+ public static int Main ()
+ {
+ var A1 = typeof (T1).GetCustomAttributes (false) [0] as A1;
+ if (A1.F != 45234.567f)
+ return 1;
+
+ A1 = typeof (T2).GetCustomAttributes (false) [0] as A1;
+ if (A1.UL != uint.MaxValue + (ulong)1)
+ return 2;
+
+ return 0;
+ }
+}