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

@@ -60,7 +60,7 @@ namespace System.IO.FileSystem.DriveInfoTests
Assert.Equal(invalidDriveName, invalidDrive.VolumeLabel); // VolumeLabel is equivalent to Name on Unix
}
[ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/dotnet/corefx/issues/11570
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/dotnet/corefx/issues/11570
[PlatformSpecific(TestPlatforms.AnyUnix)]
public void PropertiesOfValidDrive()
{

View File

@@ -80,7 +80,7 @@ namespace System.IO.FileSystem.DriveInfoTests
Assert.NotNull(validDrive.Name);
Assert.NotNull(validDrive.RootDirectory.Name);
if (PlatformDetection.IsWinRT)
if (PlatformDetection.IsInAppContainer)
{
Assert.Throws<UnauthorizedAccessException>(() => validDrive.AvailableFreeSpace);
Assert.Throws<UnauthorizedAccessException>(() => validDrive.DriveFormat);
@@ -218,7 +218,7 @@ namespace System.IO.FileSystem.DriveInfoTests
}
};
if (PlatformDetection.IsWinRT)
if (PlatformDetection.IsInAppContainer)
{
Assert.Throws<UnauthorizedAccessException>(() => DoDriveCheck());
}
@@ -234,7 +234,7 @@ namespace System.IO.FileSystem.DriveInfoTests
{
DriveInfo drive = DriveInfo.GetDrives().Where(d => d.DriveType == DriveType.Fixed).First();
// Inside an AppContainer access to VolumeLabel is denied.
if (PlatformDetection.IsWinRT)
if (PlatformDetection.IsInAppContainer)
{
Assert.Throws<UnauthorizedAccessException>(() => drive.VolumeLabel);
return;

View File

@@ -12,9 +12,6 @@
<ItemGroup>
<Compile Include="DriveInfo.Unix.Tests.cs" Condition="'$(TargetsUnix)' == 'true'" />
<Compile Include="DriveInfo.Windows.Tests.cs" Condition="'$(TargetsWindows)' == 'true'" />
<Compile Include="$(CommonTestPath)\System\PlatformDetection.cs">
<Link>Common\System\PlatformDetection.cs</Link>
</Compile>
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>