New tests.
authorMarek Safar <marek.safar@gmail.com>
Wed, 15 Dec 2010 17:09:43 +0000 (17:09 +0000)
committerMarek Safar <marek.safar@gmail.com>
Wed, 15 Dec 2010 17:25:42 +0000 (17:25 +0000)
mcs/tests/gtest-anon-23.cs
mcs/tests/gtest-implicitarray-03.cs [new file with mode: 0644]
mcs/tests/ver-il-gmcs.xml

index 6ff5738983e8c88054509b464de1ee589a36bd55..6358a2a2418f6994de4c47e36ca9841d251a3f10 100644 (file)
@@ -20,6 +20,12 @@ class MemberAccessData
        }
 }
 
+enum E
+{
+       E1,
+       E2
+}
+
 public class B
 {
        protected virtual void BaseM ()
@@ -35,6 +41,11 @@ public class C : B
        {
        }
        
+       static void Test (Action<E> func)
+       {
+               func (E.E1);
+       }
+       
        void InstanceTests ()
        {
                Test (() => base.BaseM ());
@@ -82,6 +93,15 @@ public class C : B
                        };
                });
                
+               Test (x => {
+                       switch (x) {
+                       case E.E1:
+                               goto case E.E2;
+                       case E.E2:
+                               break;
+                       }
+               });             
+               
                var c = new C ();
                c.InstanceTests ();
        }
diff --git a/mcs/tests/gtest-implicitarray-03.cs b/mcs/tests/gtest-implicitarray-03.cs
new file mode 100644 (file)
index 0000000..97ab1ba
--- /dev/null
@@ -0,0 +1,18 @@
+using System;
+using System.Linq.Expressions;
+
+public static class InferArrayType
+{
+       public static void foo (Func<Expression, bool>[] args)
+       {
+       }
+
+       public static void bar (Action<Expression> seq, Func<Expression, bool> action)
+       {
+               foo (new[] { p => { seq (p); return true; }, action });
+       }
+
+       public static void Main ()
+       {
+       }
+}
index d8ea2e4e447848d40ab960a2a0ee50ddc162ca99..13f778ae590874d473b3de03b510a051488dab02 100644 (file)
       </method>
     </type>
   </test>
+  <test name="gtest-416.cs">
+    <type name="Z">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="A`2[X,Y]">
+      <method name="X Foo(Y)">
+        <size>17</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Foo">
+      <method name="Int32 Main()">
+        <size>26</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="gtest-418.cs">
     <type name="N.Nested">
       <method name="Void .ctor()">
         <size>1</size>
       </method>
       <method name="Void Main()">
-        <size>212</size>
+        <size>246</size>
       </method>
     </type>
     <type name="C+D">
       <method name="Void &lt;BaseM&gt;__BaseCallProxy0()">
         <size>7</size>
       </method>
+      <method name="Void Test(System.Action`1[E])">
+        <size>8</size>
+      </method>
+      <method name="Void &lt;Main&gt;m__7(E)">
+        <size>31</size>
+      </method>
     </type>
   </test>
   <test name="gtest-anon-24.cs">
       </method>
     </type>
   </test>
+  <test name="gtest-implicitarray-03.cs">
+    <type name="InferArrayType">
+      <method name="Void foo(System.Func`2[System.Linq.Expressions.Expression,System.Boolean][])">
+        <size>1</size>
+      </method>
+      <method name="Void bar(System.Action`1[System.Linq.Expressions.Expression], System.Func`2[System.Linq.Expressions.Expression,System.Boolean])">
+        <size>44</size>
+      </method>
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+    </type>
+    <type name="InferArrayType+&lt;bar&gt;c__AnonStorey0">
+      <method name="Boolean &lt;&gt;m__0(System.Linq.Expressions.Expression)">
+        <size>14</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="gtest-initialize-01.cs">
     <type name="MyClass">
       <method name="Void .ctor()">