test for last Marek's issue
authorJb Evain <jbevain@gmail.com>
Mon, 21 Apr 2008 16:05:47 +0000 (16:05 -0000)
committerJb Evain <jbevain@gmail.com>
Mon, 21 Apr 2008 16:05:47 +0000 (16:05 -0000)
svn path=/trunk/mcs/; revision=101335

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

index 151682ff67d03fb7544bcc5b1c58453cac1b4550..19cf9fe9d009b6e55c81441e08893136c021d7c5 100644 (file)
@@ -217,5 +217,22 @@ namespace MonoTests.System.Linq.Expressions {
                        var s = new EineStrukt ("foo");
                        Assert.AreEqual ("foo", foo (s));
                }
+
+               public static int OneStaticMethod ()
+               {
+                       return 42;
+               }
+
+               [Test]
+               [Category ("NotWorking")]
+               public void CallStaticMethodOnNonSenseInstanceExpression ()
+               {
+                       var call = Expression.Lambda<Func<int>> (
+                               Expression.Call (
+                                       Expression.Constant ("la la la"),
+                                       this.GetType ().GetMethod ("OneStaticMethod"))).Compile ();
+
+                       Assert.AreEqual (42, call ());
+               }
        }
 }