[eglib] In AIX/generic POSIX, handle null addresses better (#17892)
[mono-project.git] / mcs / tests / gtest-optional-09.cs
blob9ed101f55221f9dd6473518cee7ab70a0fe27795
1 using System;
3 public class Program
5 static int Test_1 (int i, sbyte s = 1)
7 return 1;
10 static int Test_1<T> (T s)
12 return 0;
15 static int Test_1 (int i, long s = 1)
17 return 2;
20 static int Test_2 (short s)
22 return 1;
25 static int Test_2 (int i, sbyte s = 1)
27 return 0;
30 static int Test_3 (string s)
32 return 0;
35 static int Test_3 (string s, sbyte s2 = 1)
37 return 1;
40 static int Test_4 (object o = null)
42 return 1;
45 static int Test_4 (params object[] a)
47 return 0;
50 static int Test_5 ()
52 return 0;
55 static int Test_5 (int i = 1, params object[] a)
57 return 1;
60 static int Test_6 (params object[] o)
62 return 1;
65 static int Test_6 (int i = 1, params object[] a)
67 return 0;
70 static int Test_7 (bool b, params object[] o)
72 return 1;
75 static int Test_7 (bool b, int i = 1, params object[] a)
77 return 0;
80 static int Test_8 (Type t, bool b = false, int x = 0)
82 return 0;
85 static int Test_8 (Type t, params int[] x)
87 return 1;
90 public static int Main ()
92 if (Test_1 (5) != 0)
93 return 1;
95 if (Test_2 (6) != 0)
96 return 2;
98 if (Test_3 ("") != 0)
99 return 3;
101 if (Test_4 (null) != 0)
102 return 4;
104 if (Test_5 () != 0)
105 return 5;
107 if (Test_6 () != 1)
108 return 6;
110 if (Test_7 (false) != 1)
111 return 7;
113 if (Test_8 (typeof (bool)) != 0)
114 return 8;
116 Console.WriteLine ("ok");
117 return 0;