Merge pull request #819 from brendanzagaeski/patch-1
[mono.git] / mcs / class / System.Core / Test / System.Linq.Expressions / ExpressionTest_Equal.cs
index 749d78e40f8dcec109c137a286ebb06c09054468..497955c4a4e2873a32175a4371fd195698cc11fa 100644 (file)
@@ -81,6 +81,18 @@ namespace MonoTests.System.Linq.Expressions
 #endif
                }
 
+               [Test]
+               public void PrimitiveNonNumeric ()
+               {
+                       BinaryExpression expr = Expression.Equal (Expression.Constant ('a'), Expression.Constant ('b'));
+                       Assert.AreEqual (ExpressionType.Equal, expr.NodeType);
+                       Assert.AreEqual (typeof (bool), expr.Type);
+                       Assert.IsNull (expr.Method);
+
+                       var eq = Expression.Lambda<Func<bool>> (expr).Compile ();
+                       Assert.IsFalse (eq ());
+               }
+
                [Test]
                public void Nullable_LiftToNull_SetToFalse ()
                {
@@ -236,6 +248,7 @@ namespace MonoTests.System.Linq.Expressions
                }
 
                [Test]
+               [Category ("NotWorkingInterpreter")]
                public void UserDefinedEqualLifted ()
                {
                        var l = Expression.Parameter (typeof (Slot?), "l");
@@ -257,6 +270,7 @@ namespace MonoTests.System.Linq.Expressions
                }
 
                [Test]
+               [Category ("NotWorkingInterpreter")]
                public void UserDefinedEqualLiftedToNull ()
                {
                        var l = Expression.Parameter (typeof (Slot?), "l");
@@ -460,6 +474,7 @@ namespace MonoTests.System.Linq.Expressions
                }
 
                [Test]
+               [Category ("NotWorkingInterpreter")]
                public void NullableNullEqual ()
                {
                        var param = Expression.Parameter (typeof (DateTime?), "x");