Imported Upstream version 5.10.0.47

Former-commit-id: d0813289fa2d35e1f8ed77530acb4fb1df441bc0
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-01-24 17:04:36 +00:00
parent 88ff76fe28
commit e46a49ecf1
5927 changed files with 226314 additions and 129848 deletions

View File

@@ -21,9 +21,6 @@
<Compile Include="System\Runtime\InteropServices\WindowsRuntime\InterfaceImplementedInVersionAttributeTests.cs" />
<Compile Include="System\Runtime\InteropServices\WindowsRuntime\ReturnValueNameAttributeTests.cs" />
<Compile Include="System\Runtime\InteropServices\WindowsRuntime\WindowsRuntimeMarshalTests.cs" />
<Compile Include="$(CommonTestPath)\System\PlatformDetection.cs">
<Link>Common\System\PlatformDetection.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup Condition="'$(TargetsWindows)' == 'false'">
<Compile Include="System\Runtime\InteropServices\WindowsRuntime\UnixTests.cs" />

View File

@@ -257,7 +257,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime.Tests
AssertExtensions.Throws<ArgumentNullException>("removeMethod", () => WindowsRuntimeMarshal.RemoveAllEventHandlers(null));
}
[ConditionalTheory(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsWinRTSupported))]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsWinRTSupported))]
[InlineData("")]
[InlineData("HString")]
public void StringToHString_PtrToHString_ReturnsExpected(string s)
@@ -281,25 +281,25 @@ namespace System.Runtime.InteropServices.WindowsRuntime.Tests
}
}
[ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsWinRTSupported))]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsWinRTSupported))]
public void StringToHString_NullString_ThrowsArgumentNullException()
{
AssertExtensions.Throws<ArgumentNullException>("s", () => WindowsRuntimeMarshal.StringToHString(null));
}
[ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWinRTSupported))]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWinRTSupported))]
public void StringToHString_WinRTNotSupported_ThrowsPlatformNotSupportedException()
{
Assert.Throws<PlatformNotSupportedException>(() => WindowsRuntimeMarshal.StringToHString(null));
}
[ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWinRTSupported))]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWinRTSupported))]
public void PtrToStringHString_WinRTNotSupported_ThrowsPlatformNotSupportedException()
{
Assert.Throws<PlatformNotSupportedException>(() => WindowsRuntimeMarshal.PtrToStringHString(IntPtr.Zero));
}
[ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWinRTSupported))]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWinRTSupported))]
public void FreeHString_WinRTNotSupported_ThrowsPlatformNotSupportedException()
{
Assert.Throws<PlatformNotSupportedException>(() => WindowsRuntimeMarshal.FreeHString(IntPtr.Zero));