2005-09-26 Marek Safar <marek.safar@seznam.cz>
authorMarek Safar <marek.safar@gmail.com>
Mon, 26 Sep 2005 16:59:32 +0000 (16:59 -0000)
committerMarek Safar <marek.safar@gmail.com>
Mon, 26 Sep 2005 16:59:32 +0000 (16:59 -0000)
* test-294.cs: Added new tests.
* test-457.cs: New test.

svn path=/trunk/mcs/; revision=50791

mcs/tests/ChangeLog
mcs/tests/known-issues-gmcs
mcs/tests/test-294.cs
mcs/tests/test-457.cs [new file with mode: 0644]

index 0c654212a70e3703aa6a2e45cd375645507a2448..239c1c335855e1bed6926a1c4dcc22378aa84e9f 100644 (file)
@@ -1,3 +1,8 @@
+2005-09-26  Marek Safar <marek.safar@seznam.cz>
+
+       * test-294.cs: Added new tests.
+       * test-457.cs: New test.
+       
 2005-09-26  Raja R Harinath  <rharinath@novell.com>
 
        * test-456.cs: New test from #76133.
index 1f331a534109a93a637ff1761b7637b4080dbdda..bc5a1fb0f6a4eb791cb43d0f30429be192d9c387 100644 (file)
@@ -17,3 +17,4 @@ test-67.cs IGNORE     # Windows-only test
 test-anon-27.cs
 test-xml-027.cs
 test-iter-12.cs
+test-294.cs
\ No newline at end of file
index 0d672e774864ac40b6528977a027de975345654b..1f4750e0e9fee1004b0be2cd33c1cf96cd330b84 100644 (file)
@@ -36,15 +36,18 @@ public class DerivedTest : Test
         ObsoleteClass member;
     
         [Obsolete]
-       public DerivedTest(string a) : base(a, false)
+               public DerivedTest(string a) : base(a, false)
         {
-               Name = a;
-       }
+                       Name = a;
+               }
         
         public string Method ()
         {
             return base.Name;
         }
+               
+               [Obsolete]
+               public void T2 () {}
         
         public static void Main () {}
 }
@@ -54,13 +57,25 @@ class ObsoleteClass2: ObsoleteClass
 {
 }
 
+
 class ObsoleteClass3
 {
-       public static readonly double XSmall = 0.6444444444444;
+       public static readonly double XSmall = 0.6444444444444;
 
        [Obsolete ("E1")]
        public readonly double X_Small = XSmall;
 
        [Obsolete ("E2")]
        public static readonly double X_Small2 = XSmall;
+}
+
+
+class ObsoleteClass4
+{
+       [Obsolete]
+       public void T ()
+       {
+               lock (typeof (ObsoleteClass4)) {}
+               lock (typeof (ObsoleteClass2)) {}
+       }
 }
\ No newline at end of file
diff --git a/mcs/tests/test-457.cs b/mcs/tests/test-457.cs
new file mode 100644 (file)
index 0000000..ca8b4aa
--- /dev/null
@@ -0,0 +1,31 @@
+// (note, this is taken from `13.2.5 Interface member access')
+interface IInteger {
+       void Add(int i);
+}
+
+interface IDouble {
+       void Add(double d);
+}
+
+interface INumber: IInteger, IDouble {}
+
+class Number : INumber {
+       void IDouble.Add (double d)
+       {
+               System.Console.WriteLine ("IDouble.Add (double d)");
+       }
+       void IInteger.Add (int d)
+       {
+               System.Console.WriteLine ("IInteger.Add (int d)");
+       }
+       
+       static int Main ()
+       {
+               INumber n = new Number ();
+               n.Add(1);               
+               n.Add(1.0);             
+               ((IInteger)n).Add(1);   
+               ((IDouble)n).Add(1);    
+               return 0;
+       }
+}