projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
abc16080565889bcd8251842ba2d1dd8b6db50fd
[mono.git]
/
mcs
/
tests
/
gtest-optional-02.cs
1
using System;
2
3
public class C
4
{
5
public static bool Test3 (int? i = new int ())
6
{
7
return i == 0;
8
}
9
10
public static bool Test2 (int? i = null)
11
{
12
return i == null;
13
}
14
15
public static int Test (int? i = 1)
16
{
17
return i ?? 9;
18
}
19
20
public static int Main ()
21
{
22
if (Test () != 1)
23
return 1;
24
25
if (Test (null) != 9)
26
return 2;
27
28
if (!Test2 ())
29
return 3;
30
31
if (Test2 (3))
32
return 4;
33
34
if (!Test3 ())
35
return 5;
36
37
return 0;
38
}
39
}
40