Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / mcs / tests / gtest-142.cs
index d875ad667ccf2a9ea78df4285035f097def43bee..ce98c1637a68482aa2771fb4fc6a6bd8707662b6 100644 (file)
@@ -27,12 +27,14 @@ public static class Assert
        }
 
        public static void IsNull<T> (string text, Nullable<T> nullable)
+               where T : struct
        {
                if (nullable.HasValue)
                        Error ("IsNull", text);
        }
 
        public static void IsNotNull<T> (string text, Nullable<T> nullable)
+               where T : struct
        {
                if (!nullable.HasValue)
                        Error ("IsNotNull", text);
@@ -53,7 +55,7 @@ public static class Assert
 
 class X
 {
-       static int Main ()
+       public static int Main ()
        {
                bool? a = null, b = false, c = true;
                bool? d = null, e = false, f = true;
@@ -89,26 +91,16 @@ class X
                Assert.IsTrue ("f | b", f | b);
                Assert.IsTrue ("f | c", f | c);
 
-               Assert.IsNull ("d && a", d && a);
-               Assert.IsFalse ("d && b", d && b);
-               Assert.IsNull ("d && c", d && c);
-               Assert.IsFalse ("e && a", e && a);
-               Assert.IsFalse ("e && b", e && b);
-               Assert.IsFalse ("e && c", e && c);
-               Assert.IsNull ("f && a", f && a);
-               Assert.IsFalse ("f && b", f && b);
-               Assert.IsTrue ("f && c", f && c);
-
-               Assert.IsNull ("d || a", d || a);
-               Assert.IsNull ("d || b", d || b);
-               Assert.IsTrue ("d || c", d || c);
-               Assert.IsNull ("e || a", e || a);
-               Assert.IsFalse ("e || b", e || b);
-               Assert.IsTrue ("e || c", e || c);
-               Assert.IsTrue ("f || a", f || a);
-               Assert.IsTrue ("f || b", f || b);
-               Assert.IsTrue ("f || c", f || c);
-
+               Assert.IsNull ("d ^ a", d ^ a);
+               Assert.IsNull ("d ^ b", d ^ b);
+               Assert.IsNull ("d ^ c", d ^ c);
+               Assert.IsNull ("e ^ a", e ^ a);
+               Assert.IsFalse ("e ^ b", e ^ b);
+               Assert.IsTrue ("e ^ c", e ^ c);
+               Assert.IsNull ("f ^ a", f ^ a);
+               Assert.IsTrue ("f ^ b", f ^ b);
+               Assert.IsFalse ("f ^ c", f ^ c);
+               
                int? g = 3, h = null, i = 3, j = null;
 
                Assert.IsFalse ("g == null", g == null);