Add test for #69918
authorJb Evain <jbevain@gmail.com>
Fri, 10 Jun 2011 09:09:35 +0000 (11:09 +0200)
committerJb Evain <jbevain@gmail.com>
Fri, 10 Jun 2011 09:11:45 +0000 (11:11 +0200)
mcs/class/corlib/Test/System.Collections.Generic/ListTest.cs

index 1a866586f59cedfe95f06ee86c0e1ebbcddccc7e..02c1cc4bed4641edcad9a3d6cea01c9ae235b540 100644 (file)
@@ -994,6 +994,17 @@ namespace MonoTests.System.Collections.Generic {
                        enumerator.MoveNext ();
                }
 
+               [Test, ExpectedException (typeof (InvalidOperationException))] // #699182
+               public void VersionCheck_Indexer ()
+               {
+                       var list = new List<int> () { 0, 2, 3 };
+                       var enumerator = list.GetEnumerator ();
+
+                       list [0] = 1;
+
+                       enumerator.MoveNext ();
+               }
+
                [Test]
                public void VersionCheck_Reverse ()
                {