* Disable Media test on NETFX
* Fix S.R.E for Uapaot
* Disable varargs for PN
* missing method 'AssemblyLoadContext..ctor(bool)
* IO test
* Fix UapAot RuntimeInformation tests
* Set correct tfm for AppDomainTests
* Merge driveonly tests into one
* Revert math
Commit migrated from https://github.com/dotnet/corefx/commit/
0a751af9afe28042a720411925e6e6c55bdc10cc
}
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInAppContainer))] // Can't read root in appcontainer
- [SkipOnTargetFramework(TargetFrameworkMonikers.Netcoreapp)]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Different behavior on Desktop
[PlatformSpecific(TestPlatforms.Windows)] // Drive letter only
- public void DriveOnlyReturnsPeriod_Windows_Desktop()
+ public void DriveOnlyReturnsDrive_Windows()
{
string path = @"C:";
var info = new DirectoryInfo(path);
- Assert.Equal(".", info.ToString());
- }
-
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.Netcoreapp)]
- [PlatformSpecific(TestPlatforms.Windows)] // Drive letter only
- public void DriveOnlyReturnsPeriod_Windows_Core()
- {
- // This was likely a limited trust hack that was strangely implemented.
- // Getting the current directory for a specified drive relative path
- // doesn't make a lot of sense. There is no reason to hide original paths
- // when in full trust.
- string path = @"C:";
- var info = new DirectoryInfo(path);
- Assert.Equal("C:", info.ToString());
+ Assert.Equal(path, info.ToString());
}
-
}
}
[Fact]
public void TargetFrameworkTest()
{
- // On Uap we use the Microsoft.DotNet.XUnitRunnerUap instead of the RemoteExecutorConsoleApp
- string targetFrameworkName = PlatformDetection.IsUap ? ".NETCore,Version=v5.0" : "DUMMY-TFA";
+ string targetFrameworkName = "DUMMY-TFA";
+ if (PlatformDetection.IsInAppContainer)
+ {
+ targetFrameworkName = ".NETCore,Version=v5.0";
+ }
+ if (PlatformDetection.IsNetNative)
+ {
+ targetFrameworkName = ".NETCoreApp,Version=v2.0";
+ }
+
RemoteInvoke((_targetFrameworkName) => {
Assert.Contains(_targetFrameworkName, AppContext.TargetFrameworkName);
}, targetFrameworkName).Dispose();
Console.WriteLine($@"### CONFIGURATION: {dvs} OS={osd} OSVer={osv} OSArch={osa} Arch={pra} Framework={frd} LibcRelease={lcr} LibcVersion={lcv}");
- string binariesLocation = Path.GetDirectoryName(typeof(object).Assembly.Location);
- string binariesLocationFormat = PlatformDetection.IsInAppContainer ? "Unknown" : new DriveInfo(binariesLocation).DriveFormat;
- Console.WriteLine($"### BINARIES: {binariesLocation} (drive format {binariesLocationFormat})");
+ if (!PlatformDetection.IsNetNative)
+ {
+ string binariesLocation = Path.GetDirectoryName(typeof(object).Assembly.Location);
+ Console.WriteLine("location: " + binariesLocation);
+ string binariesLocationFormat = PlatformDetection.IsInAppContainer ? "Unknown" : new DriveInfo(binariesLocation).DriveFormat;
+ Console.WriteLine($"### BINARIES: {binariesLocation} (drive format {binariesLocationFormat})");
+ }
string tempPathLocation = Path.GetTempPath();
string tempPathLocationFormat = PlatformDetection.IsInAppContainer ? "Unknown" : new DriveInfo(tempPathLocation).DriveFormat;
<Compile Include="System\ComponentModel\DefaultValueAttributeTests.netcoreapp.cs" />
<Compile Include="System\Reflection\BindingFlagsDoNotWrap.netcoreapp.cs" />
<Compile Include="System\Reflection\InvokeRefReturn.netcoreapp.cs" />
- <Compile Include="System\Reflection\IsCollectibleTests.cs" />
+ <Compile Include="System\Reflection\IsCollectibleTests.cs" Condition="'$(TargetGroup)' != 'uapaot'"/><!-- missing method 'AssemblyLoadContext..ctor(bool) -->
<Compile Include="System\Reflection\MethodBaseTests.netcoreapp.cs" />
<Compile Include="System\Reflection\SignatureTypes.netcoreapp.cs" />
<Compile Include="System\Reflection\TypeDelegatorTests.netcoreapp.cs" />
namespace System.Tests
{
+ [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "varargs calling convention not supported on .NET Native")]
public static class ArgIteratorTests
{
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsArgIteratorSupported))]
objArgs[1] = arg1;
objArgs[2] = arg2;
objArgs[3] = arg3;
-
+
// Walk all of the args in the variable part of the argument list.
for (int i = 4; i < argCount; i++)
{
}
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "AssemblyLoadContext not available in NetFx")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFrom() is not supported on UapAot")]
public class IsCollectibleTests : RemoteExecutorTestBase
{
static public string asmNameString = "TestCollectibleAssembly";
Assert.Null(ea.UserState);
}
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "netfx hangs")]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsSoundPlaySupported))]
[MemberData(nameof(Play_String_TestData))]
[OuterLoop]