complete test
authorJb Evain <jbevain@gmail.com>
Fri, 30 May 2008 14:28:33 +0000 (14:28 -0000)
committerJb Evain <jbevain@gmail.com>
Fri, 30 May 2008 14:28:33 +0000 (14:28 -0000)
svn path=/trunk/mcs/; revision=104528

mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Not.cs

index 81ed19ec5d7ec84fa11d075a9a428a3f0e1b9398..ff8ee538e5e19ae9ea5d350f04c73f009a2e3016 100644 (file)
@@ -168,7 +168,13 @@ namespace MonoTests.System.Linq.Expressions
                public void UserDefinedNotNullable ()
                {
                        var s = Expression.Parameter (typeof (Slot?), "s");
-                       var not = Expression.Lambda<Func<Slot?, bool?>> (Expression.Not (s), s).Compile ();
+                       var node = Expression.Not (s);
+                       Assert.IsTrue (node.IsLifted);
+                       Assert.IsTrue (node.IsLiftedToNull);
+                       Assert.AreEqual (typeof (bool?), node.Type);
+                       Assert.AreEqual (typeof (Slot).GetMethod ("op_LogicalNot"), node.Method);
+
+                       var not = Expression.Lambda<Func<Slot?, bool?>> (node, s).Compile ();
 
                        Assert.AreEqual (null, not (null));
                        Assert.AreEqual (true, not (new Slot (1)));