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

@ -17,7 +17,6 @@ namespace MonoTests.System
[TestFixture]
public class DelegateTest
{
#if NET_2_0
public class GenericClass<T> {
public void Method<K> (T t, K k) {}
@ -51,7 +50,6 @@ namespace MonoTests.System
Assert.IsNotNull (method, "#1");
Assert.AreEqual (target, method, "#2");
}
#endif
[Test] // CreateDelegate (Type, MethodInfo)
public void CreateDelegate1_Method_Static ()
@ -73,25 +71,11 @@ namespace MonoTests.System
{
C c = new C ();
MethodInfo mi = typeof (C).GetMethod ("M");
#if NET_2_0
Delegate dg = Delegate.CreateDelegate (typeof (D), mi);
Assert.AreSame (mi, dg.Method, "#1");
Assert.IsNull (dg.Target, "#2");
D d = (D) dg;
d (c);
#else
try {
Delegate.CreateDelegate (typeof (D), mi);
Assert.Fail ("#1");
} catch (ArgumentException ex) {
// Method must be a static method
Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
Assert.IsNotNull (ex.ParamName, "#5");
Assert.AreEqual ("method", ex.ParamName, "#6");
}
#endif
}
[Test] // CreateDelegate (Type, MethodInfo)
@ -584,7 +568,6 @@ namespace MonoTests.System
}
}
#if NET_2_0
[Test] // CreateDelegate (Type, Object, String, Boolean, Boolean)
public void CreateDelegate9 ()
{
@ -1177,7 +1160,6 @@ namespace MonoTests.System
throw new NotSupportedException ();
}
#endif
public static void CreateDelegateOfStaticMethodBoundToNull_Helper (object[] args) {}
[Test]