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

@ -173,6 +173,14 @@ namespace MonoTests.System.Runtime.InteropServices
Marshal.FreeHGlobal (ptr);
}
[Test]
public void AllocCoTaskMemZeroSize ()
{
IntPtr ptr = Marshal.AllocCoTaskMem (0);
Assert.IsTrue (ptr != IntPtr.Zero);
Marshal.FreeCoTaskMem (ptr);
}
public struct Foo {
public int a;
public static int b;
@ -497,7 +505,6 @@ namespace MonoTests.System.Runtime.InteropServices
Marshal.FreeCoTaskMem (ptr);
}
}
#if NET_2_0
private const string NotSupported = "Not supported before Windows 2000 Service Pack 3";
private static char[] PlainText = new char[] { 'a', 'b', 'c' };
private static byte[] AsciiPlainText = new byte[] { (byte) 'a', (byte) 'b', (byte) 'c' };
@ -663,7 +670,6 @@ namespace MonoTests.System.Runtime.InteropServices
Assert.Ignore (NotSupported);
}
}
#endif
#if !NET_2_1
[Test]
@ -780,7 +786,6 @@ namespace MonoTests.System.Runtime.InteropServices
Assert.IsNull (Marshal.PtrToStructure (IntPtr.Zero, typeof (SimpleStruct2)));
}
#if NET_2_0
[Test]
public void TestGetExceptionForHR ()
{
@ -793,7 +798,6 @@ namespace MonoTests.System.Runtime.InteropServices
ex = Marshal.GetExceptionForHR (E_INVALIDARG);
Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "E_INVALIDARG");
}
#endif
bool RunningOnUnix {
get {
int p = (int) Environment.OSVersion.Platform;