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

@ -37,9 +37,7 @@ using System.Reflection.Emit;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
#if NET_2_0
using System.Collections.Generic;
#endif
namespace A.B.C {
// Disable expected warning
@ -97,7 +95,6 @@ namespace MonoTests.System.Reflection
}
}
#if NET_2_0
[Test]
public void PseudoCustomAttributes ()
{
@ -135,7 +132,6 @@ namespace MonoTests.System.Reflection
Assert.IsTrue (mi.ReturnTypeCustomAttributes.GetCustomAttributes (typeof (MarshalAsAttribute), true).Length == 1);
}
#endif
public static int foo (int i, int j)
{
@ -173,9 +169,6 @@ namespace MonoTests.System.Reflection
}
[Test]
#if ONLY_1_1
[Category ("NotDotNet")] // #A2 fails on MS.NET 1.x
#endif
public void ByrefVtypeInvoke ()
{
MethodInfo mi = typeof (MethodInfoTest).GetMethod ("ByrefVtype");
@ -215,18 +208,10 @@ namespace MonoTests.System.Reflection
method.Invoke (null, new object [0]);
Assert.Fail ("#1");
}
#if NET_2_0
catch (ThreadAbortException ex) {
Thread.ResetAbort ();
Assert.IsNull (ex.InnerException, "#2");
}
#else
catch (TargetInvocationException ex) {
Thread.ResetAbort ();
Assert.IsNotNull (ex.InnerException, "#2");
Assert.AreEqual (typeof (ThreadAbortException), ex.InnerException.GetType (), "#3");
}
#endif
}
public static void AbortIt ()
@ -316,7 +301,6 @@ namespace MonoTests.System.Reflection
Assert.AreSame (inheritedMethod, baseMethod);
}
#if NET_2_0
[Test]
public void GetMethodBody_Abstract ()
{
@ -740,7 +724,6 @@ namespace MonoTests.System.Reflection
{
}
}
#endif
#if NET_4_0
interface IMethodInvoke<out T>
{
@ -826,7 +809,6 @@ namespace MonoTests.System.Reflection
#endif
}
#if NET_2_0
// Helper class
class RefOnlyMethodClass
{
@ -850,5 +832,4 @@ namespace MonoTests.System.Reflection
set { _myList = value; }
}
}
#endif
}