Merge pull request #4998 from kumpera/fix_56684
[mono.git] / mcs / tests / gtest-optional-03.cs
1 // Compiler options: -r:gtest-optional-03-lib.dll
2
3 using System;
4
5 class C
6 {
7         static int Test (int i = 1, string s = "", bool b = false, ushort u = 4)
8         {
9                 return i;
10         }
11         
12         public static int Main ()
13         {
14                 if (Test () != 1)
15                         return 1;
16                 
17                 if (B.TestString () != "mono")
18                         return 3;
19                 
20                 if (B.TestString ("top") != "top")
21                         return 4;
22                 
23                 if (B.TestB () != null)
24                         return 5;
25
26                 if (B.Test<ushort> () != 0)
27                         return 6;
28
29                 if (B.TestDecimal (2) != decimal.MinValue)
30                         return 7;
31                 
32                 if (B.TestDecimal (2, 5) != 5)
33                         return 8;
34                 
35                 if (B.TestEnum () != E.Value)
36                         return 9;
37                 
38                 B b = new B ();
39                 b [1] = 3;
40                 if (b [0] != 6)
41                         return 10;
42                 
43                 B.TestNew ();
44                 
45                 Console.WriteLine ("ok");
46                 
47                 return 0;
48         }
49 }