[sgen] Evacuate from emptier blocks to fuller ones
[mono.git] / mcs / tests / gtest-optional-09.cs
1 using System;
2
3 public class Program
4 {
5         static int Test_1 (int i, sbyte s = 1)
6         {
7                 return 1;
8         }
9
10         static int Test_1<T> (T s)
11         {
12                 return 0;
13         }
14
15         static int Test_1 (int i, long s = 1)
16         {
17                 return 2;
18         }
19
20         static int Test_2 (short s)
21         {
22                 return 1;
23         }
24
25         static int Test_2 (int i, sbyte s = 1)
26         {
27                 return 0;
28         }
29
30         static int Test_3 (string s)
31         {
32                 return 0;
33         }
34
35         static int Test_3 (string s, sbyte s2 = 1)
36         {
37                 return 1;
38         }
39
40         static int Test_4 (object o = null)
41         {
42                 return 1;
43         }
44
45         static int Test_4 (params object[] a)
46         {
47                 return 0;
48         }
49
50         static int Test_5 ()
51         {
52                 return 0;
53         }
54
55         static int Test_5 (int i = 1, params object[] a)
56         {
57                 return 1;
58         }
59
60         static int Test_6 (params object[] o)
61         {
62                 return 1;
63         }
64
65         static int Test_6 (int i = 1, params object[] a)
66         {
67                 return 0;
68         }
69
70         static int Test_7 (bool b, params object[] o)
71         {
72                 return 1;
73         }
74
75         static int Test_7 (bool b, int i = 1, params object[] a)
76         {
77                 return 0;
78         }
79
80         static int Test_8 (Type t, bool b = false, int x = 0)
81         {
82                 return 0;
83         }
84
85         static int Test_8 (Type t, params int[] x)
86         {
87                 return 1;
88         }
89
90         public static int Main ()
91         {
92                 if (Test_1 (5) != 0)
93                         return 1;
94
95                 if (Test_2 (6) != 0)
96                         return 2;
97
98                 if (Test_3 ("") != 0)
99                         return 3;
100
101                 if (Test_4 (null) != 0)
102                         return 4;
103
104                 if (Test_5 () != 0)
105                         return 5;
106
107                 if (Test_6 () != 0)
108                         return 6;
109
110                 if (Test_7 (false) != 0)
111                         return 7;
112
113                 if (Test_8 (typeof (bool)) != 0)
114                         return 8;
115
116                 Console.WriteLine ("ok");
117                 return 0;
118         }
119 }