[System] Throw PlatformNotSupportedException if NetworkInformation.NetworkChange...
[mono-project.git] / mcs / tests / gtest-540.cs
blob46b6f3b6ce0fcf0b5e9f7b99f76171a6aaa50fdc
1 // lifted null binary operators
3 using System;
5 class C
7 public static int Main ()
9 bool v;
10 v = (true & null) == null;
11 if (!v)
12 return 1;
14 v = (false & null) != null;
15 if (!v)
16 return 2;
18 v = (null & true) == null;
19 if (!v)
20 return 3;
22 v = (null & false) != null;
23 if (!v)
24 return 4;
26 v = (true | null) == null;
27 if (v != false)
28 return 11;
30 v = (false | null) != null;
31 if (v != false)
32 return 12;
34 v = (null | true) == null;
35 if (v != false)
36 return 13;
38 v = (null | false) != null;
39 if (v != false)
40 return 14;
42 v = (null & 1) == null;
43 if (v != true)
44 return 20;
46 v = (null & 0) != null;
47 if (v != false)
48 return 21;
50 bool? a = false;
51 bool? b = true;
53 if ((a & null) != false)
54 return 50;
56 if ((b & null) != null)
57 return 51;
59 if ((null & a) != false)
60 return 52;
62 if ((null & b) != null)
63 return 53;
65 if ((a & true) != false)
66 return 54;
68 if ((true & a) != false)
69 return 55;
71 if ((a | null) != null)
72 return 60;
74 if ((b | null) != true)
75 return 61;
77 if ((null | a) != null)
78 return 62;
80 if ((null | b) != true)
81 return 63;
83 if ((a | true) != true)
84 return 64;
86 if ((true | a) != true)
87 return 65;
89 var b4 = true;
90 if ((b4 & null) != null)
91 return 100;
93 if ((null & b4) != null)
94 return 101;
96 if ((b4 | null) != true)
97 return 102;
99 if ((null | b4) != true)
100 return 103;
102 bool? x_n = null;
103 bool? x_f = false;
104 bool? x_t = true;
106 bool? res;
107 res = null & x_n;
108 if (res.HasValue)
109 return 201;
111 res = null & x_t;
112 if (res.HasValue)
113 return 202;
115 res = null & x_f;
116 if (res.Value != false)
117 return 203;
119 res = null | x_n;
120 if (res.HasValue)
121 return 204;
123 res = null | x_t;
124 if (res.Value != true)
125 return 205;
127 res = null | x_f;
128 if (res.HasValue)
129 return 206;
131 return 0;
134 // This does not look right but C# spec needs tidying up to special case it
135 void BrokenLiftedNull ()
137 int i = 44;
138 int? u = null;
139 i <<= u;
140 i <<= null;