From: Marek Safar Date: Wed, 28 Oct 2009 18:04:48 +0000 (-0000) Subject: New tests. X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=d8e03ffbc8772a13adb894341bc799174156e978;p=mono.git New tests. svn path=/trunk/mcs/; revision=144959 --- diff --git a/mcs/tests/gtest-etree-01.cs b/mcs/tests/gtest-etree-01.cs index b7b9b465751..979badc2293 100644 --- a/mcs/tests/gtest-etree-01.cs +++ b/mcs/tests/gtest-etree-01.cs @@ -1679,8 +1679,10 @@ class Tester { string s = "localvar"; Expression> e9 = () => s; + s = "changed"; + AssertNodeType (e9, ExpressionType.MemberAccess); - Assert ("localvar", e9.Compile ().Invoke ()); + Assert ("changed", e9.Compile ().Invoke ()); } void MemberInitTest () @@ -2400,6 +2402,15 @@ class Tester Assert (2, e.Compile ().Invoke ().Compile ().Invoke ()); } + void QuoteTest_2 () + { + Expression>>> e = (string s) => () => s; + AssertNodeType (e, ExpressionType.Quote); + + // Blocked by https://bugzilla.novell.com/show_bug.cgi?id=550722 + //Assert ("data", e.Compile ().Invoke ("data").Compile ().Invoke ()); + } + void RightShiftTest () { Expression> e = (ulong a, short b) => a >> b; diff --git a/mcs/tests/gtest-etree-02.cs b/mcs/tests/gtest-etree-02.cs index d2d522e543c..681fac94749 100644 --- a/mcs/tests/gtest-etree-02.cs +++ b/mcs/tests/gtest-etree-02.cs @@ -6,8 +6,14 @@ class M public static void Foo (Expression> x) { } + + static string Param (string b) + { + Expression>>> e = (string s) => () => b; + return e.Compile () ("-##54!2").Compile () (); + } - public static void Main () + public static int Main () { Foo ((i) => i); @@ -15,6 +21,11 @@ class M Expression> func = (i) => i; Foo (func); + + if (Param ("my test") != "my test") + return 1; + + return 0; } } diff --git a/mcs/tests/ver-il-gmcs.xml b/mcs/tests/ver-il-gmcs.xml index fd3e14f34ab..906a6a02284 100644 --- a/mcs/tests/ver-il-gmcs.xml +++ b/mcs/tests/ver-il-gmcs.xml @@ -15549,7 +15549,7 @@ 63 - 80 + 91 302 @@ -16126,33 +16126,6 @@ 89 - - - - 7 - - - - - 7 - - - - - 7 - - - - - 7 - - - - - 7 - - - 159 @@ -16181,6 +16154,34 @@ 152 + + 63 + + + + + 7 + + + + + 7 + + + + + 7 + + + + + 7 + + + + + 7 + @@ -16191,8 +16192,16 @@ 1 - - 129 + + 114 + + + 157 + + + + + 7