Author: martin
Date: 2005-04-29 05:09:46 -0400 (Fri, 29 Apr 2005)
New Revision: 43777

Modified:
   trunk/mcs/tests/ChangeLog
   trunk/mcs/tests/gen-115.cs
   trunk/mcs/tests/gen-73.cs
Log:
2005-04-29  Martin Baulig  <[EMAIL PROTECTED]>

        * gen-73.cs, gen-115.cs: Reflect latest API changes.



Modified: trunk/mcs/tests/ChangeLog
===================================================================
--- trunk/mcs/tests/ChangeLog   2005-04-29 09:06:38 UTC (rev 43776)
+++ trunk/mcs/tests/ChangeLog   2005-04-29 09:09:46 UTC (rev 43777)
@@ -1,3 +1,7 @@
+2005-04-29  Martin Baulig  <[EMAIL PROTECTED]>
+
+       * gen-73.cs, gen-115.cs: Reflect latest API changes.
+
 2005-04-27  Marek Safar <[EMAIL PROTECTED]>
 
        * test-294.cs: Add test based on #74378

Modified: trunk/mcs/tests/gen-115.cs
===================================================================
--- trunk/mcs/tests/gen-115.cs  2005-04-29 09:06:38 UTC (rev 43776)
+++ trunk/mcs/tests/gen-115.cs  2005-04-29 09:09:46 UTC (rev 43777)
@@ -10,6 +10,7 @@
 
 using System;
 using System.IO;                        // TextWriter
+using System.Collections;
 using System.Collections.Generic;       // IEnumerable<T>, IEnumerator<T>
 
 public delegate R Mapper<A,R>(A x);
@@ -171,6 +172,10 @@
     return new LinkedListEnumerator(this);
   }
 
+  IEnumerator IEnumerable.GetEnumerator() {
+    return new LinkedListEnumerator(this);
+  }
+
   private class LinkedListEnumerator : IEnumerator<T> {
     T curr;                     // The enumerator's current element
     bool valid;                 // Is the current element valid?
@@ -188,6 +193,10 @@
           throw new InvalidOperationException();
       }
     }
+
+    object IEnumerator.Current {
+      get { return Current; }
+    }
     
     public bool MoveNext() {
       if (next != null)  {
@@ -197,6 +206,10 @@
       return valid;
     }
 
+    public void Reset() {
+      throw new NotImplementedException ();
+    }
+
     public void Dispose() {
       curr = default(T); next = null; valid = false;
     }

Modified: trunk/mcs/tests/gen-73.cs
===================================================================
--- trunk/mcs/tests/gen-73.cs   2005-04-29 09:06:38 UTC (rev 43776)
+++ trunk/mcs/tests/gen-73.cs   2005-04-29 09:09:46 UTC (rev 43777)
@@ -1,4 +1,5 @@
 using System;
+using System.Collections;
 using System.Collections.Generic;
 
 class MyList<T> : IEnumerable<T>
@@ -7,6 +8,11 @@
        {
                yield break;
        }
+
+       IEnumerator IEnumerable.GetEnumerator ()
+       {
+               return GetEnumerator ();
+       }
 }
 
 struct Foo<T>

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to