Quellcode durchsuchen

lifted relational tests

svn path=/trunk/mcs/; revision=104284
Jb Evain vor 17 Jahren
Ursprung
Commit
40acaeda3d

+ 17 - 0
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Equal.cs

@@ -165,5 +165,22 @@ namespace MonoTests.System.Linq.Expressions
 			Assert.IsFalse (eq (1, 2));
 			Assert.IsTrue (eq (1, 1));
 		}
+
+		[Test]
+		[Category ("NotWorking")]
+		public void NullableInt32NotEqual () // have to move that to its own file
+		{
+			var l = Expression.Parameter (typeof (int?), "l");
+			var r = Expression.Parameter (typeof (int?), "r");
+
+			var neq = Expression.Lambda<Func<int?, int?, bool>> (
+				Expression.NotEqual (l, r), l, r).Compile ();
+
+			Assert.IsFalse (neq (null, null));
+			Assert.IsTrue (neq (null, 1));
+			Assert.IsTrue (neq (1, null));
+			Assert.IsTrue (neq (1, 2));
+			Assert.IsFalse (neq (1, 1));
+		}
 	}
 }