Bump NuGet.BuildTasks to get new updates and switch to `dev` branch (#5566)
[mono.git] / mcs / tests / dtest-006.cs
index 53f8e91f870a5a989e7d11fcec81cc36b56562bf..4d80081df540c48b18161d2157352a64afedc54c 100644 (file)
@@ -523,6 +523,11 @@ class Tester
                dynamic d3 = new MyType? (new MyType (-7));
                Assert (d3 & new MyType (6), new MyType (0), "#3a");
                Assert<MyType?> (d3 + null, null, "#3b");
+
+               dynamic a = (bool?) true;
+               dynamic b = (bool?) null;
+               Assert (a & b, (bool?)null, "#4a");
+               Assert (b & a, (bool?)null, "#4b");
        }
 
        void AndAssignedTest ()
@@ -1099,6 +1104,14 @@ class Tester
                Assert (d2 >= null, false, "#3a");
        }
 
+       void IsTest ()
+       {
+               dynamic d = 1;
+               Assert (d is long, false, "#1");
+               Assert (d is int, true, "#2");
+               Assert (d is string, false, "#3");
+       }
+
        void LeftShiftTest ()
        {
                dynamic d = (ulong) 0x7F000;
@@ -1608,6 +1621,11 @@ class Tester
                Assert (d != true, false, "#5");
                Assert (d != null, true, "#5a");
                Assert (d != false, true, "#5b");
+
+               d = null;
+               long? l = null;
+               Assert (d != l, false, "#6a");
+               Assert (l != d, false, "#6b");
        }
 
        void NotEqualEnumTest ()