Update mcs/class/System.Core/System/TimeZoneInfo.cs
[mono.git] / mcs / tests / test-41.cs
1 //
2 // This tests the ref access to parameters
3 //
4 using System;
5
6 class X {
7
8         static void A (ref int a, ref uint b, ref sbyte c, ref byte d, ref long e, ref ulong f,
9                        ref short g, ref ushort h, ref char i, ref X x, ref float j, ref double k)
10         {
11                 if (a == 1)
12                         a = 2;
13
14                 if (b == 1)
15                         b = 2;
16
17                 if (c == 1)
18                         c = 2;
19
20                 if (d == 1)
21                         d = 2;
22
23                 if (e == 1)
24                         e = 2;
25
26                 if (f == 1)
27                         f = 2;
28
29                 if (g == 1)
30                         g = 2;
31
32                 if (h == 1)
33                         h = 2;
34
35                 if (i == 'a')
36                         i = 'b';
37
38                 if (x == null)
39                         x = new X ();
40
41                 if (j == 1.0)
42                         j = 2.0F;
43                 if (k == 1.0)
44                         k = 2.0;
45         }
46
47         static int Main ()
48         {
49                 int a = 1;
50                 uint b = 1;
51                 sbyte c = 1;
52                 byte d = 1;
53                 long e = 1;
54                 ulong f = 1;
55                 short g = 1;
56                 ushort h = 1;
57                 char i = 'a';
58                 float j = 1.0F;
59                 double k = 1.0;
60                 X x = null;
61
62                 A (ref a, ref b, ref c, ref d, ref e, ref f, ref g, ref h, ref i, ref x, ref j, ref k);
63
64                 if (a != 2)
65                         return 1;
66                 if (b != 2)
67                         return 2;
68                 if (c != 2)
69                         return 3;
70                 if (d != 2)
71                         return 4;
72                 if (e != 2)
73                         return 5;
74                 if (f != 2)
75                         return 6;
76                 if (g != 2)
77                         return 7;
78                 if (h != 2)
79                         return 8;
80                 if (i != 'b')
81                         return 9;
82                 if (j != 2.0)
83                         return 10;
84                 if (k != 2.0)
85                         return 11;
86                 if (x == null)
87                         return 12;
88
89                 Console.WriteLine ("Test passed");
90                 return 0;
91         }
92 }
93