浏览代码

complete

svn path=/trunk/mcs/; revision=101399
Jb Evain 17 年之前
父节点
当前提交
4209bcff00
共有 1 个文件被更改,包括 7 次插入4 次删除
  1. 7 4
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Call.cs

+ 7 - 4
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Call.cs

@@ -226,12 +226,15 @@ namespace MonoTests.System.Linq.Expressions {
 		[Test]
 		public void CallStaticMethodOnNonSenseInstanceExpression ()
 		{
-			var call = Expression.Lambda<Func<int>> (
-				Expression.Call (
+			var call = Expression.Call (
 					Expression.Constant ("la la la"),
-					this.GetType ().GetMethod ("OneStaticMethod"))).Compile ();
+					this.GetType ().GetMethod ("OneStaticMethod"));
+
+			Assert.IsNotNull (call.Object);
+
+			var callMethod = Expression.Lambda<Func<int>> (call).Compile ();
 
-			Assert.AreEqual (42, call ());
+			Assert.AreEqual (42, callMethod ());
 		}
 	}
 }