2004-08-03 Martin Baulig <martin@ximian.com>
[mono.git] / mcs / tests / test-232.cs
1 using System;
2 using System.Reflection;
3
4 public class CtorInfoTest
5 {
6         public static void Main(string[] args)
7         {
8                 // uses static initialization
9                 int[] iarray = // int array, int constants
10                 {
11                         0,
12                         1,
13                         2,
14                         3,
15                         4,
16                         5,
17                         6,
18                 };
19                 
20                 // mcs used to throw with 7 or more elements in the array initializer
21                 ConstructorInfo[] ciarray = // ref array, null constants
22                 {
23                         null,
24                         null,
25                         null,
26                         null,
27                         null,
28                         null,
29                         null,
30                 };
31
32                 string[] scarray = // string array, string constants
33                 {
34                         "a",
35                         "b",
36                         "c",
37                         "d",
38                         "e",
39                         "f",
40                         "g",
41                 };
42
43                 string[] snarray = // string array, null constants
44                 {
45                         null,
46                         null,
47                         null,
48                         null,
49                         null,
50                         null,
51                         null,
52                 };
53
54                 decimal[] darray = // decimal constants
55                 {
56                         0M,
57                         1M,
58                         2M,
59                         3M,
60                         4M,
61                         5M,
62                         6M,
63                         7M,
64                 };
65
66                 IConvertible[] lcarray = // boxed integer constants
67                 {
68                         1,
69                         2,
70                         3,
71                         4,
72                         5,
73                         6,
74                         7,
75                 };
76                 
77                 AttributeTargets[] atarray = // enum constants
78                 {
79                         AttributeTargets.Assembly,
80                         AttributeTargets.Module,
81                         AttributeTargets.Class,
82                         AttributeTargets.Struct,
83                         AttributeTargets.Enum,
84                         AttributeTargets.Constructor,
85                         AttributeTargets.Method,
86                         AttributeTargets.Property,
87                         AttributeTargets.Field,
88                         AttributeTargets.Event,
89                         AttributeTargets.Interface,
90                         AttributeTargets.Parameter,
91                         AttributeTargets.Delegate,
92                         AttributeTargets.ReturnValue,
93                         AttributeTargets.All,
94                 };
95
96                 System.Enum[] eatarray = // boxed enum constants
97                 {
98                         AttributeTargets.Assembly,
99                         AttributeTargets.Module,
100                         AttributeTargets.Class,
101                         AttributeTargets.Struct,
102                         AttributeTargets.Enum,
103                         AttributeTargets.Constructor,
104                         AttributeTargets.Method,
105                         AttributeTargets.Property,
106                         AttributeTargets.Field,
107                         AttributeTargets.Event,
108                         AttributeTargets.Interface,
109                         AttributeTargets.Parameter,
110                         AttributeTargets.Delegate,
111                         AttributeTargets.ReturnValue,
112                         AttributeTargets.All,
113                 };
114         }
115 }