}
#endregion
+
+#if NET_2_0
+ // https://bugzilla.novell.com/show_bug.cgi?id=322248
+ [Test]
+ public void ResetMove ()
+ {
+ int[] array = new int[] { 1, 2, 3};
+ IEnumerator<int> e = ((IEnumerable<int>)array).GetEnumerator ();
+ // no exception is thrown
+ e.Reset ();
+ e.MoveNext ();
+ AssertEquals ("1", 1, e.Current);
+ }
+
+ [Test]
+ [ExpectedException (typeof (InvalidOperationException))]
+ public void MoveReset ()
+ {
+ int[] array = new int[] { 1, 2, 3 };
+ IEnumerator<int> e = ((IEnumerable<int>)array).GetEnumerator ();
+ e.MoveNext ();
+ e.Reset ();
+ // exception is thrown
+ AssertEquals ("1", 1, e.Current);
+ }
+#endif
}
}
+2007-11-05 Sebastien Pouliot <sebastien@ximian.com>
+
+ * ArrayTest.cs: Add test cases for Enumerator<T>.Reset (#322248).
+
2007-11-05 Rodrigo Kumpera <rkumpera@novell.com>
* TypeTest.cs: Added tests for bug #331199.