Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / test-806.cs
1 using System;
2 using System.Reflection;
3
4 class A1 : Attribute
5 {
6         public float F;
7         public float UL;
8         
9         public A1 (float f)
10         {
11                 this.F = f;
12         }
13         
14         public A1 (ulong ul)
15         {
16                 this.UL = ul;
17         }
18 }
19
20 [A1 (45234.567f)]
21 class T1
22 {
23 }
24
25 [A1 (uint.MaxValue + (ulong)1)]
26 class T2
27 {
28 }
29
30 class Test
31 {
32         public static int Main ()
33         {
34                 var A1 = typeof (T1).GetCustomAttributes (false) [0] as A1;
35                 if (A1.F != 45234.567f)
36                         return 1;
37
38                 A1 = typeof (T2).GetCustomAttributes (false) [0] as A1;
39                 if (A1.UL != uint.MaxValue + (ulong)1)
40                         return 2;
41                 
42                 return 0;
43         }
44 }