Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

31 lines
543 B
C#

class MyTest {
static void f (bool a, bool b)
{
if (a != b)
throw new System.Exception ("Something wrong: " + a + " vs. " + b);
}
public static void Main()
{
int? w = null;
int? x = null;
int? y = 0;
int? z = 1;
f (false, x == 0);
f (true, x != 0);
f (false, x == y);
f (true, x != y);
f (true, x == w);
f (false, x != w);
f (true, x == null);
f (false, x != null);
f (true, 0 == y);
f (false, 0 != y);
f (false, z == y);
f (true, z != y);
f (false, null == y);
f (true, null != y);
}
}