New tests.
authorMarek Safar <marek.safar@gmail.com>
Thu, 15 Jan 2009 15:23:45 +0000 (15:23 -0000)
committerMarek Safar <marek.safar@gmail.com>
Thu, 15 Jan 2009 15:23:45 +0000 (15:23 -0000)
svn path=/trunk/mcs/; revision=123491

mcs/tests/test-anon-88.cs [new file with mode: 0644]
mcs/tests/test-anon-89.cs [new file with mode: 0644]
mcs/tests/test-anon-90.cs [new file with mode: 0644]
mcs/tests/ver-il-gmcs.xml

diff --git a/mcs/tests/test-anon-88.cs b/mcs/tests/test-anon-88.cs
new file mode 100644 (file)
index 0000000..e13d8ac
--- /dev/null
@@ -0,0 +1,32 @@
+using System;
+
+class C
+{
+       public delegate void D ();
+
+       public static int Main ()
+       {
+               new C ().Test ();
+               return 0;
+       }
+
+       void Test ()
+       {
+               int l1 = 0;
+
+               if (l1 == 0) {
+                       int l2 = 1;
+                       if (l2 == 1) {
+                               D dd = delegate {
+                                       int l3 = 2;
+                                       D d2 = delegate { int x = l1; int z = l3; };
+                                       D d22 = delegate { int x = 1; };
+                               };
+                       }
+
+                       D d3 = delegate { int y = l2; };
+               }
+
+               D d1 = delegate { int x = l1; };
+       }
+}
diff --git a/mcs/tests/test-anon-89.cs b/mcs/tests/test-anon-89.cs
new file mode 100644 (file)
index 0000000..035d122
--- /dev/null
@@ -0,0 +1,60 @@
+using System;
+
+class C
+{
+       public delegate void D ();
+
+       int[] chats;
+       int total;
+
+       public static int Main ()
+       {
+               new C ().Test ();
+               return 0;
+       }
+
+       object GdkWindow
+       {
+               get { return null; }
+               set { }
+       }
+
+       public static void Invoke (D d)
+       {
+       }
+
+       void Test ()
+       {
+               try {
+                       if (total < 0)
+                               return;
+
+                       int x = 0;
+
+                       Invoke (delegate {
+                               try {
+                                       Invoke (delegate {
+                                               GdkWindow = null;
+                                       });
+
+                                       total = x;
+                                       int[] chats = new int[] { 1, 2 };
+
+                                       Invoke (delegate {
+                                               foreach (int chat in chats) {
+                                                       total = chat;
+                                               }
+                                       });
+                               } finally {
+                                       Invoke (delegate {
+                                               if (GdkWindow != null) {
+                                                       GdkWindow = null;
+                                               }
+                                       });
+                               }
+                       });
+               } catch {
+                       int x = 9;
+               }
+       }
+}
diff --git a/mcs/tests/test-anon-90.cs b/mcs/tests/test-anon-90.cs
new file mode 100644 (file)
index 0000000..e1c0ff4
--- /dev/null
@@ -0,0 +1,24 @@
+class C
+{
+       public static int Main ()
+       {
+               new C ().Foo ();
+               return 0;
+       }
+       
+       delegate void D ();
+       
+       void Foo ()
+       {
+               int x = 0;
+               D d1 = delegate () {
+                       int y = 1;
+                       if (y == 1) {
+                               int z = 2;
+                               D d2 = delegate () {
+                                       int a = x + y + z;
+                               };
+                       }
+               };
+       }
+}
\ No newline at end of file
index 95a65ca9c46f5825e20e7aed683bc95a63e7c44c..ccd7656d6d6326d3d20f0370b0290179b528a67d 100644 (file)
         <size>1</size>
       </method>
       <method name="Void Test[T](T)">
-        <size>59</size>
+        <size>46</size>
       </method>
       <method name="Void Main()">
         <size>1</size>
       <method name="Void .ctor()">
         <size>7</size>
       </method>
-    </type>
-    <type name="X+&lt;Test&gt;c__AnonStorey1`1[T]">
-      <method name="Void .ctor()">
-        <size>7</size>
-      </method>
-    </type>
-    <type name="X+&lt;Test&gt;c__AnonStorey0`1[T]">
       <method name="Simple &lt;&gt;m__0()">
-        <size>72</size>
+        <size>55</size>
       </method>
     </type>
-    <type name="X+&lt;Test&gt;c__AnonStorey0`1+&lt;Test&gt;c__AnonStorey2`1[T]">
+    <type name="X+&lt;Test&gt;c__AnonStorey0`1+&lt;Test&gt;c__AnonStorey1`1[T]">
       <method name="Void .ctor()">
         <size>7</size>
       </method>
         <size>7</size>
       </method>
       <method name="Boolean &lt;&gt;m__0()">
-        <size>187</size>
+        <size>194</size>
       </method>
     </type>
     <type name="Foo`1+&lt;ContainsAll&gt;c__AnonStorey0`1+&lt;ContainsAll&gt;c__AnonStorey1`1[T,U]">
         <size>7</size>
       </method>
       <method name="Void Test1[R](R, Int32)">
-        <size>157</size>
+        <size>150</size>
       </method>
       <method name="Void Run()">
         <size>13</size>
         <size>1</size>
       </method>
       <method name="Void DetermineLinkedCells()">
-        <size>67</size>
+        <size>74</size>
       </method>
     </type>
     <type name="Test+&lt;DetermineLinkedCells&gt;c__AnonStorey0">
       <method name="Void .ctor()">
         <size>7</size>
       </method>
-      <method name="Boolean &lt;&gt;m__0(System.Object)">
-        <size>13</size>
-      </method>
     </type>
     <type name="Test+&lt;DetermineLinkedCells&gt;c__AnonStorey1">
       <method name="Void .ctor()">
       <method name="Boolean &lt;&gt;m__1(System.Object)">
         <size>13</size>
       </method>
+      <method name="Boolean &lt;&gt;m__0(System.Object)">
+        <size>18</size>
+      </method>
     </type>
   </test>
   <test name="gtest-anon-5.cs">
         <size>1</size>
       </method>
       <method name="Void FailsToCompile()">
-        <size>32</size>
+        <size>19</size>
       </method>
     </type>
     <type name="SomeGenericClass`1+SomeHandlerType[SomeType]">
       <method name="Void .ctor()">
         <size>7</size>
       </method>
-      <method name="Void &lt;&gt;m__0()">
-        <size>49</size>
-      </method>
     </type>
-    <type name="SomeGenericClass`1+&lt;FailsToCompile&gt;c__AnonStorey0+&lt;FailsToCompile&gt;c__AnonStorey1[SomeType]">
-      <method name="Void .ctor()">
-        <size>7</size>
+    <type name="SomeGenericClass`1[SomeType]">
+      <method name="Void &lt;FailsToCompile&gt;m__0()">
+        <size>44</size>
       </method>
+    </type>
+    <type name="SomeGenericClass`1+&lt;FailsToCompile&gt;c__AnonStorey0[SomeType]">
       <method name="Void &lt;&gt;m__1()">
-        <size>23</size>
+        <size>18</size>
       </method>
     </type>
   </test>
       <method name="Boolean &lt;Main&gt;m__9(Boolean)">
         <size>5</size>
       </method>
-    </type>
-    <type name="Tester+&lt;ConvertTest_9&gt;c__AnonStorey5">
-      <method name="Void .ctor()">
-        <size>7</size>
-      </method>
-    </type>
-    <type name="Tester+&lt;MemberAccessTest&gt;c__AnonStorey6">
-      <method name="Void .ctor()">
-        <size>7</size>
-      </method>
-    </type>
-    <type name="Tester+&lt;MemberAccessTest_3&gt;c__AnonStorey7">
-      <method name="Void .ctor()">
-        <size>7</size>
-      </method>
-    </type>
-    <type name="Tester+&lt;MemberAccessTest_4&gt;c__AnonStorey8">
-      <method name="Void .ctor()">
-        <size>7</size>
-      </method>
-    </type>
-    <type name="Tester+&lt;MemberAccessTest_6&gt;c__AnonStorey9">
-      <method name="Void .ctor()">
-        <size>7</size>
-      </method>
-    </type>
-    <type name="Tester">
       <method name="Void NewArrayInitTest_5()">
         <size>158</size>
       </method>
-    </type>
-    <type name="Tester+&lt;MemberAccessTest_9&gt;c__AnonStoreyA">
-      <method name="Void .ctor()">
-        <size>7</size>
-      </method>
-    </type>
-    <type name="Tester">
       <method name="Void ConditionTest_5()">
         <size>107</size>
       </method>
         <size>101</size>
       </method>
     </type>
+    <type name="Tester+&lt;ConvertTest_9&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;MemberAccessTest&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;MemberAccessTest_3&gt;c__AnonStorey2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;MemberAccessTest_4&gt;c__AnonStorey3">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;MemberAccessTest_6&gt;c__AnonStorey4">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Tester+&lt;MemberAccessTest_9&gt;c__AnonStorey5">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
   </test>
   <test name="gtest-etree-02.cs">
     <type name="M">
         <size>7</size>
       </method>
       <method name="Boolean ContainsAll[U](IEnumerable`1)">
-        <size>177</size>
+        <size>184</size>
       </method>
       <method name="Boolean Contains(T)">
         <size>2</size>
         <size>44</size>
       </method>
     </type>
-    <type name="Foo`1+&lt;ContainsAll&gt;c__AnonStorey1`1[T,U]">
+    <type name="Foo`1+&lt;ContainsAll&gt;c__AnonStorey0`1[T,U]">
       <method name="Void .ctor()">
         <size>7</size>
       </method>
         <size>14</size>
       </method>
       <method name="Void Leak(Boolean, Int32)">
-        <size>78</size>
+        <size>85</size>
       </method>
     </type>
     <type name="Program">
         <size>7</size>
       </method>
       <method name="Void &lt;&gt;m__0()">
-        <size>23</size>
+        <size>18</size>
       </method>
       <method name="Void &lt;&gt;m__1()">
         <size>68</size>
         <size>7</size>
       </method>
       <method name="Void Test()">
-        <size>118</size>
+        <size>105</size>
       </method>
       <method name="Int32 Main()">
         <size>66</size>
         <size>0</size>
       </method>
     </type>
-    <type name="S+&lt;Test&gt;c__AnonStorey2">
-      <method name="Void .ctor()">
-        <size>7</size>
-      </method>
-      <method name="Void &lt;&gt;m__0()">
-        <size>86</size>
-      </method>
-    </type>
     <type name="S+&lt;Test&gt;c__AnonStorey1">
       <method name="Void .ctor()">
         <size>7</size>
         <size>7</size>
       </method>
     </type>
+    <type name="S+&lt;Test&gt;c__AnonStorey1">
+      <method name="Void &lt;&gt;m__0()">
+        <size>76</size>
+      </method>
+    </type>
   </test>
   <test name="test-anon-11.cs">
     <type name="X">
         <size>1</size>
       </method>
       <method name="Void Test(Int32)">
-        <size>150</size>
+        <size>158</size>
       </method>
     </type>
     <type name="X">
         <size>7</size>
       </method>
       <method name="Void &lt;&gt;m__0()">
-        <size>50</size>
+        <size>45</size>
       </method>
     </type>
     <type name="World+&lt;Test&gt;c__AnonStorey0">
         <size>1</size>
       </method>
       <method name="Void Test(Int32)">
-        <size>226</size>
+        <size>197</size>
       </method>
     </type>
     <type name="X">
       <method name="Void .ctor()">
         <size>7</size>
       </method>
-      <method name="Void &lt;&gt;m__0()">
-        <size>78</size>
-      </method>
-    </type>
-    <type name="World+&lt;Test&gt;c__AnonStorey3">
-      <method name="Void .ctor()">
-        <size>7</size>
-      </method>
     </type>
     <type name="World+&lt;Test&gt;c__AnonStorey2">
       <method name="Void .ctor()">
       <method name="Void .ctor()">
         <size>7</size>
       </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>63</size>
+      </method>
     </type>
   </test>
   <test name="test-anon-49.cs">
         <size>7</size>
       </method>
       <method name="Int32 Test(Int32)">
-        <size>351</size>
+        <size>344</size>
       </method>
       <method name="Int32 Main()">
         <size>46</size>
         <size>7</size>
       </method>
       <method name="Int32 Test(Int32)">
-        <size>538</size>
+        <size>515</size>
       </method>
       <method name="Int32 Main()">
         <size>46</size>
         <size>7</size>
       </method>
       <method name="Int32 Test(Int32)">
-        <size>588</size>
+        <size>567</size>
       </method>
       <method name="Int32 Main()">
         <size>46</size>
         <size>7</size>
       </method>
       <method name="Int32 Test()">
-        <size>351</size>
+        <size>333</size>
       </method>
       <method name="Int32 Main()">
         <size>59</size>
         <size>7</size>
       </method>
       <method name="Void &lt;&gt;m__0()">
-        <size>181</size>
+        <size>166</size>
       </method>
     </type>
     <type name="X+&lt;Test&gt;c__AnonStorey0">
         <size>7</size>
       </method>
     </type>
-    <type name="X+&lt;Test&gt;c__AnonStorey2">
-      <method name="Void .ctor()">
-        <size>7</size>
-      </method>
-    </type>
   </test>
   <test name="test-anon-62.cs">
     <type name="X">
         <size>1</size>
       </method>
       <method name="Void TestMe()">
-        <size>167</size>
+        <size>154</size>
       </method>
       <method name="Boolean &lt;TestMe&gt;m__0()">
         <size>2</size>
         <size>14</size>
       </method>
     </type>
-    <type name="Test+&lt;TestMe&gt;c__AnonStorey2">
-      <method name="Void .ctor()">
-        <size>7</size>
-      </method>
-    </type>
     <type name="Test+&lt;TestMe&gt;c__AnonStorey1">
       <method name="Void .ctor()">
         <size>7</size>
     </type>
     <type name="Test+&lt;TestMe&gt;c__AnonStorey0">
       <method name="Boolean &lt;&gt;m__1()">
-        <size>59</size>
+        <size>54</size>
       </method>
     </type>
   </test>
         <size>20</size>
       </method>
       <method name="Int32 Test()">
-        <size>40</size>
+        <size>27</size>
       </method>
       <method name="Int32 Foo2(C+Cmd2)">
         <size>7</size>
         <size>0</size>
       </method>
     </type>
-    <type name="C+&lt;Test&gt;c__AnonStorey0">
-      <method name="Void .ctor()">
-        <size>7</size>
-      </method>
-      <method name="Int32 &lt;&gt;m__0()">
-        <size>50</size>
+    <type name="C">
+      <method name="Int32 &lt;Test&gt;m__0()">
+        <size>45</size>
       </method>
     </type>
-    <type name="C+&lt;Test&gt;c__AnonStorey0+&lt;Test&gt;c__AnonStorey2">
+    <type name="C+&lt;Test&gt;c__AnonStorey1">
       <method name="Void .ctor()">
         <size>7</size>
       </method>
       <method name="Void &lt;&gt;m__1()">
-        <size>49</size>
+        <size>44</size>
       </method>
     </type>
-    <type name="C+&lt;Test&gt;c__AnonStorey0+&lt;Test&gt;c__AnonStorey2+&lt;Test&gt;c__AnonStorey1">
+    <type name="C+&lt;Test&gt;c__AnonStorey1+&lt;Test&gt;c__AnonStorey0">
       <method name="Void .ctor()">
         <size>7</size>
       </method>
       </method>
     </type>
   </test>
+  <test name="test-anon-88.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+      <method name="Void Test()">
+        <size>102</size>
+      </method>
+    </type>
+    <type name="C+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__2()">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="C+&lt;Test&gt;c__AnonStorey2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>69</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>8</size>
+      </method>
+      <method name="Void &lt;&gt;m__4()">
+        <size>3</size>
+      </method>
+    </type>
+    <type name="C+&lt;Test&gt;c__AnonStorey2+&lt;Test&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__3()">
+        <size>20</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-89.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+      <method name="System.Object get_GdkWindow()">
+        <size>2</size>
+      </method>
+      <method name="Void set_GdkWindow(System.Object)">
+        <size>1</size>
+      </method>
+      <method name="Void Invoke(C+D)">
+        <size>1</size>
+      </method>
+      <method name="Void Test()">
+        <size>69</size>
+      </method>
+    </type>
+    <type name="C+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C+&lt;Test&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>108</size>
+      </method>
+      <method name="Void &lt;&gt;m__3()">
+        <size>29</size>
+      </method>
+    </type>
+    <type name="C+&lt;Test&gt;c__AnonStorey0+&lt;Test&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>18</size>
+      </method>
+      <method name="Void &lt;&gt;m__2()">
+        <size>49</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-anon-90.cs">
+    <type name="C">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>12</size>
+      </method>
+      <method name="Void Foo()">
+        <size>27</size>
+      </method>
+    </type>
+    <type name="C+D">
+      <method name="Void .ctor(Object, IntPtr)">
+        <size>0</size>
+      </method>
+      <method name="Void Invoke()">
+        <size>0</size>
+      </method>
+      <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+        <size>0</size>
+      </method>
+      <method name="Void EndInvoke(IAsyncResult)">
+        <size>0</size>
+      </method>
+    </type>
+    <type name="C+&lt;Foo&gt;c__AnonStorey0">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__0()">
+        <size>66</size>
+      </method>
+    </type>
+    <type name="C+&lt;Foo&gt;c__AnonStorey0+&lt;Foo&gt;c__AnonStorey1">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="C+&lt;Foo&gt;c__AnonStorey0+&lt;Foo&gt;c__AnonStorey2">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Void &lt;&gt;m__1()">
+        <size>32</size>
+      </method>
+    </type>
+  </test>
   <test name="test-cls-00.cs">
     <type name="CLSCLass_6">
       <method name="Void .ctor()">