New tests.
authorMarek Safar <marek.safar@gmail.com>
Wed, 13 Jan 2010 12:58:29 +0000 (12:58 -0000)
committerMarek Safar <marek.safar@gmail.com>
Wed, 13 Jan 2010 12:58:29 +0000 (12:58 -0000)
svn path=/trunk/mcs/; revision=149458

mcs/tests/test-738-lib.cs [new file with mode: 0644]
mcs/tests/test-738.cs [new file with mode: 0644]
mcs/tests/test-739.cs [new file with mode: 0644]
mcs/tests/ver-il-gmcs.xml

diff --git a/mcs/tests/test-738-lib.cs b/mcs/tests/test-738-lib.cs
new file mode 100644 (file)
index 0000000..7731798
--- /dev/null
@@ -0,0 +1,26 @@
+// Compiler options: -t:library
+
+using System;
+
+namespace TestNamespace
+{
+       public abstract class Stream : IDisposable
+       {
+               public void Dispose ()
+               {
+                       Dispose(true);
+               }
+
+               protected virtual void Dispose (bool disposing)
+               {
+               }
+       }
+
+       public class NonClosingStream 
+               : TestNamespace.Stream, IDisposable
+       {
+               void  IDisposable.Dispose()
+               {
+               }
+       }
+}
diff --git a/mcs/tests/test-738.cs b/mcs/tests/test-738.cs
new file mode 100644 (file)
index 0000000..1e2aba1
--- /dev/null
@@ -0,0 +1,21 @@
+// Compiler options: -r:test-738-lib.dll
+
+using System;
+
+namespace TestNamespace
+{
+       public class ResumableInputStream
+       {
+               public ResumableInputStream()
+               {
+                       stream.Dispose();
+               }
+
+               private NonClosingStream stream;
+               
+               public static void Main ()
+               {
+               }
+       }
+}
+
diff --git a/mcs/tests/test-739.cs b/mcs/tests/test-739.cs
new file mode 100644 (file)
index 0000000..f9d312b
--- /dev/null
@@ -0,0 +1,28 @@
+// Compiler options: -warnaserror
+
+using System;
+using System.Reflection;
+
+sealed class X
+{
+       ~X ()
+       {
+               Foo ();
+       }
+       
+       public void Foo ()
+       {
+       }
+       
+       public static int Main ()
+       {
+               foreach (var m in typeof (X).GetMethods (BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.DeclaredOnly)) {
+                       Console.WriteLine (m.Name);
+                       Console.WriteLine (m.Attributes);
+                       if (m.Attributes != (MethodAttributes.Virtual | MethodAttributes.Family | MethodAttributes.HideBySig))
+                               return 1;
+               }
+               
+               return 0;
+       }
+}
index 5e2d2e576d574f0d273501eb92fce33923f02cd8..a48661b17435dc4cc47e5a69426a1fe61215d22d 100644 (file)
       </method>
     </type>
   </test>
+  <test name="test-737.cs">
+    <type name="Breaks">
+      <method name="Double get_Item(Int32, Int32)">
+        <size>7</size>
+      </method>
+      <method name="Void set_Item(Int32, Int32, Double)">
+        <size>8</size>
+      </method>
+      <method name="Void .ctor(Double)">
+        <size>8</size>
+      </method>
+    </type>
+    <type name="Tester">
+      <method name="Int32 Main()">
+        <size>80</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-738.cs">
+    <type name="TestNamespace.ResumableInputStream">
+      <method name="Void Main()">
+        <size>1</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>18</size>
+      </method>
+    </type>
+  </test>
+  <test name="test-739.cs">
+    <type name="X">
+      <method name="Void Finalize()">
+        <size>19</size>
+      </method>
+      <method name="Void Foo()">
+        <size>1</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>89</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="test-74.cs">
     <type name="X">
       <method name="Void .ctor()">