lifted unary operators tests
[mono.git] / mcs / class / System.Core / Test / System.Linq.Expressions / ExpressionTest_Negate.cs
index 369e67b26a8296f43ec337c2bb10d2c3651b1bcf..59f00409b40f0274b777a0568a86670ff7c10658 100644 (file)
@@ -112,5 +112,18 @@ namespace MonoTests.System.Linq.Expressions
                        Assert.AreEqual (0, negate (0));
                        Assert.AreEqual (3, negate (-3));
                }
+
+               [Test]
+               [Category ("NotWorking")]
+               public void CompiledNegateNullableInt32 ()
+               {
+                       var p = Expression.Parameter (typeof (int?), "i");
+                       var negate = Expression.Lambda<Func<int?, int?>> (Expression.Negate (p), p).Compile ();
+
+                       Assert.AreEqual (null, negate (null));
+                       Assert.AreEqual ((int?) -2, negate (2));
+                       Assert.AreEqual ((int?) 0, negate (0));
+                       Assert.AreEqual ((int?) 3, negate (-3));
+               }
        }
 }