Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@ -29,7 +29,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System;
using System.Collections;
@ -741,7 +740,7 @@ namespace MonoTests.System.Collections.Generic {
}
[Test]
[ExpectedException (typeof (ArgumentException))]
[ExpectedException (typeof (ArgumentNullException))]
public void IDictionary_Add_Null_2 ()
{
IDictionary d = new Dictionary<int, int> ();
@ -1130,7 +1129,6 @@ namespace MonoTests.System.Collections.Generic {
c.CopyTo (new MyClass [1], 0);
}
[Test, ExpectedException (typeof (ArgumentException))]
public void ICollectionCopyTo_ex1 ()
{
var d = new Dictionary<int, string> ();
@ -1232,4 +1230,3 @@ BgcAAAABMQEAAAAL";
}
}
#endif // NET_2_0

View File

@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System;
using System.Collections;
@ -63,4 +62,3 @@ namespace MonoTests.System.Collections.Generic {
}
}
#endif

View File

@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System.Collections.Generic;
@ -49,5 +48,4 @@ namespace MonoTests.System.Collections.Generic
}
}
}
#endif

View File

@ -195,7 +195,7 @@ namespace MonoTests.System.Collections.Generic {
list.Insert(0, new object());
}
[Test, ExpectedException(typeof (ArgumentException))]
[Test, ExpectedException(typeof (ArgumentNullException))]
public void IList_InsertInvalidType2 ()
{
IList list = _list1 as IList;
@ -209,7 +209,7 @@ namespace MonoTests.System.Collections.Generic {
list.Add(new object());
}
[Test, ExpectedException(typeof (ArgumentException))]
[Test, ExpectedException(typeof (ArgumentNullException))]
public void IList_AddInvalidType2()
{
IList list = _list1 as IList;
@ -623,6 +623,16 @@ namespace MonoTests.System.Collections.Generic {
Assert.AreEqual (418, i);
}
[Test]
public void ForEach_Modified ()
{
try {
_list1.ForEach (l => _list1.Add (0));
Assert.Fail ();
} catch (InvalidOperationException) {
}
}
[Test]
public void FindLastIndexTest ()
{
@ -1401,7 +1411,7 @@ namespace MonoTests.System.Collections.Generic {
x.CopyTo (Array.CreateInstance (typeof (int), new int [] { 10 }, new int[] { 1 }), 0);
Assert.Fail ("#7");
} catch (Exception e) {
Assert.IsTrue (e is ArgumentException, "#8");
Assert.IsTrue (e is ArgumentOutOfRangeException, "#8");
}
l.Add (10); l.Add (20);