From 3d223d3c55e07c110b5ebb0bc7ecb225e168da15 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Wed, 25 Jul 2018 18:14:04 +0200 Subject: [PATCH 1/6] Make BaseIntermediateOutputPath project specific Set BaseIntermediateOutputPath and IntermediateOutputPath accordingly in proj/depprojs and add TargetFramework* props for various configurations. --- BuildToolsVersion.txt | 2 +- Directory.Build.props | 20 ++++-- external/Directory.Build.props | 1 - external/dir.proj | 2 +- init-tools.msbuild | 14 ++++- src/Common/perf/PerfRunner/PerfRunner.csproj | 2 + src/Directory.Build.props | 10 ++- src/Directory.Build.targets | 9 --- .../AssemblyResolveTests.csproj | 2 +- .../tests/System/AppDomainTests.cs | 8 +-- .../tests/TestApp/TestApp.csproj | 4 +- .../TestAppOutsideOfTPA.csproj | 4 +- .../VoidMainWithExitCodeApp.csproj | 4 +- .../tests/MTAMain/MTAMain.csproj | 4 +- .../tests/STAMain/STAMain.csproj | 4 +- src/shims/ApiCompat.proj | 2 +- src/shims/Directory.Build.props | 6 +- src/shims/shims.proj | 2 +- tools-local/targetgroups.props | 63 +++++++++++++++++++ 19 files changed, 124 insertions(+), 39 deletions(-) diff --git a/BuildToolsVersion.txt b/BuildToolsVersion.txt index 5d33180292be..4cf02efdb1fa 100644 --- a/BuildToolsVersion.txt +++ b/BuildToolsVersion.txt @@ -1 +1 @@ -2.2.0-preview1-03116-01 +2.2.0-preview1-03116-01 \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props index c7f9f43c51e3..199bd3d13cd5 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -19,7 +19,8 @@ 10.0.16300 - UAP,Version=v$(UAPvNextVersion) + UAP + $(UAPvNextTFI),Version=v$(UAPvNextVersion) uap$(UAPvNextVersion) @@ -45,9 +46,7 @@ $(ProjectDir)bin/ - - $(BinDir)obj/ - $(ObjDir) + $(BinDir)tests/ $(BinDir)packages_noship/ $(BinDir)packages/ @@ -260,6 +259,15 @@ + + false + + + true + $(OSGroup).$(Platform).$(ConfigurationGroup) $(TargetGroup)/ @@ -268,8 +276,8 @@ /Compat $(BaseOutputPath)$(OSPlatformConfig)/$(MSBuildProjectName)/$(TargetOutputRelPath)$(OutputPathSubfolder) - $(BaseIntermediateOutputPath)$(OSPlatformConfig)/ - $(IntermediateOutputRootPath)$(MSBuildProjectName)/$(TargetOutputRelPath) + $(RootIntermediateOutputPath)$(OSPlatformConfig)/$(MSBuildProjectName)/ + $(BaseIntermediateOutputPath)$(TargetOutputRelPath) $(BinDir)runtime/$(BuildConfiguration)/ $(BinDir)shimsTargetRuntime/ diff --git a/external/Directory.Build.props b/external/Directory.Build.props index 674adbbd6923..a78417ede411 100644 --- a/external/Directory.Build.props +++ b/external/Directory.Build.props @@ -1,7 +1,6 @@ - $(IntermediateOutputPath)$(OSGroup)-$(ArchGroup)/ None true diff --git a/external/dir.proj b/external/dir.proj index 03ea6dea60e9..d422e7d5a0d4 100644 --- a/external/dir.proj +++ b/external/dir.proj @@ -1,4 +1,4 @@ - + diff --git a/init-tools.msbuild b/init-tools.msbuild index 934ae478ab76..c16d51aa77b9 100644 --- a/init-tools.msbuild +++ b/init-tools.msbuild @@ -1,14 +1,22 @@ - + + + + $(MSBuildThisFileDirectory)Tools/$(BuildToolsPackageVersion)/ + + + + netcoreapp1.0 false true - $(MSBuildThisFileDirectory)Tools/$(BuildToolsPackageVersion) - + + + diff --git a/src/Common/perf/PerfRunner/PerfRunner.csproj b/src/Common/perf/PerfRunner/PerfRunner.csproj index 0d6a6a78bee1..cbf0215701fd 100644 --- a/src/Common/perf/PerfRunner/PerfRunner.csproj +++ b/src/Common/perf/PerfRunner/PerfRunner.csproj @@ -2,6 +2,8 @@ {F5E941C8-AF2F-47AB-A066-FF25470CE382} Exe + + .exe PerfRunner PerfRunner true diff --git a/src/Directory.Build.props b/src/Directory.Build.props index aaf979d489d2..4ecb27758dc2 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -6,10 +6,14 @@ true true + + false + false + $(AssemblySearchPaths);$(RefPath);{RawFileName} diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index cb0ba0d01ca5..1596afd41cf0 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -12,9 +12,6 @@ - - - @@ -57,10 +54,4 @@ - - - - - $(TargetGroup) - diff --git a/src/System.Runtime.Extensions/tests/AssemblyResolveTests/AssemblyResolveTests.csproj b/src/System.Runtime.Extensions/tests/AssemblyResolveTests/AssemblyResolveTests.csproj index 528a3e2abd68..2869f0d72eb7 100644 --- a/src/System.Runtime.Extensions/tests/AssemblyResolveTests/AssemblyResolveTests.csproj +++ b/src/System.Runtime.Extensions/tests/AssemblyResolveTests/AssemblyResolveTests.csproj @@ -1,4 +1,4 @@ - + {E60AFAE8-2EA7-471C-9E24-52A99453B26B} true diff --git a/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs b/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs index 60a5d4f43fd5..1676df403484 100644 --- a/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs +++ b/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs @@ -271,7 +271,7 @@ public void ExecuteAssembly() { CopyTestAssemblies(); - string name = Path.Combine(Environment.CurrentDirectory, "TestAppOutsideOfTPA", "TestAppOutsideOfTPA.exe"); + string name = Path.Combine(Environment.CurrentDirectory, "TestAppOutsideOfTPA.exe"); AssertExtensions.Throws("assemblyFile", () => AppDomain.CurrentDomain.ExecuteAssembly(null)); Assert.Throws(() => AppDomain.CurrentDomain.ExecuteAssembly("NonExistentFile.exe")); @@ -589,7 +589,7 @@ public void AssemblyResolve() RemoteInvoke(() => { ResolveEventHandler handler = (sender, e) => { - return Assembly.LoadFile(Path.Combine(Environment.CurrentDirectory, "AssemblyResolveTests", "AssemblyResolveTests.dll")); + return Assembly.LoadFile(Path.Combine(Environment.CurrentDirectory, "AssemblyResolveTests.exe")); }; AppDomain.CurrentDomain.AssemblyResolve += handler; @@ -607,12 +607,12 @@ public void AssemblyResolve_RequestingAssembly() CopyTestAssemblies(); RemoteInvoke(() => { - Assembly a = Assembly.LoadFile(Path.Combine(Environment.CurrentDirectory, "TestAppOutsideOfTPA", "TestAppOutsideOfTPA.exe")); + Assembly a = Assembly.LoadFile(Path.Combine(Environment.CurrentDirectory, "TestAppOutsideOfTPA.exe")); ResolveEventHandler handler = (sender, e) => { Assert.Equal(e.RequestingAssembly, a); - return Assembly.LoadFile(Path.Combine(Environment.CurrentDirectory, "AssemblyResolveTests", "AssemblyResolveTests.dll")); + return Assembly.LoadFile(Path.Combine(Environment.CurrentDirectory, "AssemblyResolveTests.exe")); }; AppDomain.CurrentDomain.AssemblyResolve += handler; diff --git a/src/System.Runtime.Extensions/tests/TestApp/TestApp.csproj b/src/System.Runtime.Extensions/tests/TestApp/TestApp.csproj index 5cb195182007..0dd6f884ccd1 100644 --- a/src/System.Runtime.Extensions/tests/TestApp/TestApp.csproj +++ b/src/System.Runtime.Extensions/tests/TestApp/TestApp.csproj @@ -1,7 +1,9 @@ - + {24BCEC6B-B9D2-47BC-9D66-725BD6B526FA} Exe + + .exe true netstandard-Debug;netstandard-Release diff --git a/src/System.Runtime.Extensions/tests/TestAppOutsideOfTPA/TestAppOutsideOfTPA.csproj b/src/System.Runtime.Extensions/tests/TestAppOutsideOfTPA/TestAppOutsideOfTPA.csproj index a729a2a93f31..29f7c12a9a7c 100644 --- a/src/System.Runtime.Extensions/tests/TestAppOutsideOfTPA/TestAppOutsideOfTPA.csproj +++ b/src/System.Runtime.Extensions/tests/TestAppOutsideOfTPA/TestAppOutsideOfTPA.csproj @@ -1,7 +1,9 @@ - + {C44B33E3-F89F-40B9-B353-D380C1524988} Exe + + .exe true netstandard-Debug;netstandard-Release diff --git a/src/System.Runtime.Extensions/tests/VoidMainWithExitCodeApp/VoidMainWithExitCodeApp.csproj b/src/System.Runtime.Extensions/tests/VoidMainWithExitCodeApp/VoidMainWithExitCodeApp.csproj index 5682a4fc3cc5..17f3eba5a501 100644 --- a/src/System.Runtime.Extensions/tests/VoidMainWithExitCodeApp/VoidMainWithExitCodeApp.csproj +++ b/src/System.Runtime.Extensions/tests/VoidMainWithExitCodeApp/VoidMainWithExitCodeApp.csproj @@ -1,7 +1,9 @@ - + {9F312D76-9AF1-4E90-B3B0-815A1EC6C346} Exe + + .exe true netstandard-Debug;netstandard-Release diff --git a/src/System.Threading.Thread/tests/MTAMain/MTAMain.csproj b/src/System.Threading.Thread/tests/MTAMain/MTAMain.csproj index de77a67fdd69..02070c64e50a 100644 --- a/src/System.Threading.Thread/tests/MTAMain/MTAMain.csproj +++ b/src/System.Threading.Thread/tests/MTAMain/MTAMain.csproj @@ -1,6 +1,8 @@ - + Exe + + .exe true {06B19C7D-9EBE-420F-BD33-137DB18A1FEB} netstandard-Debug;netstandard-Release diff --git a/src/System.Threading.Thread/tests/STAMain/STAMain.csproj b/src/System.Threading.Thread/tests/STAMain/STAMain.csproj index 4d5789081f36..eb71806e8325 100644 --- a/src/System.Threading.Thread/tests/STAMain/STAMain.csproj +++ b/src/System.Threading.Thread/tests/STAMain/STAMain.csproj @@ -1,6 +1,8 @@ - + Exe + + .exe true {8045E634-C181-4C6C-AE48-71AC18D1C637} netstandard-Debug;netstandard-Release diff --git a/src/shims/ApiCompat.proj b/src/shims/ApiCompat.proj index 56405fe178a1..fa0122e1d6ff 100644 --- a/src/shims/ApiCompat.proj +++ b/src/shims/ApiCompat.proj @@ -92,7 +92,7 @@ - + diff --git a/src/shims/Directory.Build.props b/src/shims/Directory.Build.props index f583307ae92a..770b3656f7d4 100644 --- a/src/shims/Directory.Build.props +++ b/src/shims/Directory.Build.props @@ -19,7 +19,7 @@ - $(BaseIntermediateOutputPath)shims/$(TargetGroup)/ - $(BaseIntermediateOutputPath)shims/$(TargetGroup)/facades/ + + $(RootIntermediateOutputPath)shims/$(TargetGroup)/ - \ No newline at end of file + diff --git a/src/shims/shims.proj b/src/shims/shims.proj index b60eff3675cb..bdea01463b3c 100644 --- a/src/shims/shims.proj +++ b/src/shims/shims.proj @@ -78,7 +78,7 @@ - + diff --git a/tools-local/targetgroups.props b/tools-local/targetgroups.props index a0525fd3fb99..6785f672fc90 100644 --- a/tools-local/targetgroups.props +++ b/tools-local/targetgroups.props @@ -2,6 +2,9 @@ + netcore50 + .NETCore + v5.0 Microsoft.TargetingPack.Private.NetNative .NETCore,Version=v5.0 netcore50 @@ -9,6 +12,9 @@ netstandard1.4 + netcore50 + .NETCore + v5.0 aot Microsoft.TargetingPack.Private.NetNative .NETCore,Version=v5.0 @@ -18,6 +24,9 @@ netstandard1.4 + uap10.0.16299 + UAP + 10.0.16299 aot UAP,Version=v10.0.16299 uap10.0.16299 @@ -26,6 +35,9 @@ uap10.0.16299;netstandard + uap10.0.16299 + UAP + 10.0.16299 UAP,Version=v10.0.16299 uap10.0.16299 true @@ -33,6 +45,9 @@ netstandard + $(UAPvNextTFM) + $(UAPvNextTFI) + $(UAPvNextVersion) aot $(UAPvNextTFMFull) $(UAPvNextTFM) @@ -41,6 +56,9 @@ uapvnext;netstandard2.0 + $(UAPvNextTFM) + $(UAPvNextTFI) + $(UAPvNextVersion) $(UAPvNextTFMFull) $(UAPvNextTFM) true @@ -49,6 +67,9 @@ + $(UAPvNextTFM) + $(UAPvNextTFI) + $(UAPvNextVersion) $(UAPvNextTFMFull) $(UAPvNextTFM) true @@ -57,6 +78,9 @@ + $(UAPvNextTFM) + $(UAPvNextTFI) + $(UAPvNextVersion) aot $(UAPvNextTFMFull) $(UAPvNextTFM) @@ -65,6 +89,7 @@ uap;netstandard + netstandard1.0 .NETStandard,Version=v1.0 netstandard1.0 + netstandard2.0 .NETStandard,Version=v2.0 netstandard2.0 + netcoreapp2.1 .NETCoreApp,Version=v2.1 netcoreapp2.1 netcoreapp2.1 netstandard + netcoreapp1.2 .NETCoreApp,Version=v1.2 netcoreapp1.2 + netcoreapp2.1 aot .NETCoreApp,Version=v2.1 netcoreapp2.1 @@ -172,6 +211,7 @@ netstandard + netcoreapp2.1 aot .NETCoreApp,Version=v2.1 netcoreapp2.1 @@ -179,12 +219,14 @@ netstandard + net45 Microsoft.TargetingPack.NETFramework.v4.5 .NETFramework,Version=v4.5 net45 netstandard1.1 + net451 Microsoft.TargetingPack.NETFramework.v4.5.1 .NETFramework,Version=v4.5.1 net451 @@ -192,6 +234,7 @@ netstandard1.2 + net46 Microsoft.TargetingPack.NETFramework.v4.6 .NETFramework,Version=v4.6 net46 @@ -199,6 +242,7 @@ netstandard1.3 + net461 Microsoft.TargetingPack.NETFramework.v4.6.1 .NETFramework,Version=v4.6.1 net461 @@ -206,6 +250,7 @@ netstandard + net462 Microsoft.TargetingPack.NETFramework.v4.6.2 .NETFramework,Version=v4.6.2 net462 @@ -213,6 +258,7 @@ netstandard + net463 Microsoft.TargetingPack.NETFramework.v4.6.3 .NETFramework,Version=v4.6.3 net463 @@ -220,6 +266,7 @@ netstandard + net47 Microsoft.TargetingPack.NETFramework.v4.7 .NETFramework,Version=v4.7 net47 @@ -227,6 +274,7 @@ netstandard + net471 Microsoft.TargetingPack.NETFramework.v4.7.1 .NETFramework,Version=v4.7.1 net471 @@ -234,6 +282,7 @@ netstandard + net472 Microsoft.TargetingPack.NETFramework.v4.7.2 .NETFramework,Version=v4.7.2 net472 @@ -242,6 +291,7 @@ + net472 Microsoft.TargetingPack.NETFramework.v4.7.2 .NETFramework,Version=v4.7.2 net472 @@ -249,21 +299,33 @@ netstandard + win8 + Windows + v8.0 Windows,Version=v8.0 win8 netstandard1.1 + wpa81 + WindowsPhoneApp + v8.1 WindowsPhoneApp,Version=v8.1 wpa81 netstandard1.2 + portable-net45+win8+sl5 + .NETPortable + v0.0 Microsoft.TargetingPack.Portable.v4.0.Profile47 .NETPortable,Version=v0.0,Profile=Profile47 portable-net45+win8+sl5 + portable-net40+sl4+win8+wp8 + .NETPortable + v0.0 Microsoft.TargetingPack.Portable.v4.0.Profile36 .NETPortable,Version=v0.0,Profile=Profile36 portable-net40+sl4+win8+wp8 @@ -273,6 +335,7 @@ build when specified directly or BuildAllConfigurations is set to True. --> + net463 .NETFramework,Version=v4.6.3 net463 From f528b668fcd06efbde72a9510feb189e3988d795 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Mon, 23 Jul 2018 02:28:16 +0200 Subject: [PATCH 2/6] Update xunit to official 2.4.0 runner Add necessary Test SDK assemblies Enable test sdk props & targets only for netcoreapp --- BuildToolsVersion.txt | 2 +- Directory.Build.props | 3 +- Directory.Build.targets | 11 + Documentation/debugging/unix-instructions.md | 2 +- .../debugging/windows-instructions.md | 2 +- Documentation/project-docs/developer-guide.md | 10 +- dependencies.props | 32 ++- external/test-runtime/Configurations.props | 1 + external/test-runtime/XUnit.Runtime.depproj | 219 +++++++++++++----- .../tests/Performance/BenchmarkFilter.cs | 4 +- .../RemoteExecutorConsoleApp.csproj | 2 + .../System/Xml/XmlCoreTest/XmlCoreTest.csproj | 1 + .../src/CoreFx.Private.TestUtilities.csproj | 4 +- src/Directory.Build.props | 1 + ...osoft.XmlSerializer.Generator.Tests.csproj | 2 +- .../SharedFrameworkValidation.proj | 2 +- .../tests/WindowAndCursorProps.cs | 2 +- ...ostics.FileVersionInfo.TestAssembly.csproj | 9 +- .../tests/ProcessTests.Unix.cs | 2 +- .../Performance/CustomAssemblyAttributes.cs | 2 +- .../Performance/Perf_Graphics_DrawBeziers.cs | 2 +- .../Performance/Perf_Graphics_Transforms.cs | 2 +- .../tests/Performance/Perf_Image_Load.cs | 2 +- ...ion.CalendarsWithConfigSwitch.Tests.csproj | 4 +- ....json => xunit.console.runtimeconfig.json} | 0 .../CharUnicodeInfo/CharUnicodeInfoTests.cs | 2 +- .../tests/Invariant/Invariant.Tests.csproj | 6 +- ....json => xunit.console.runtimeconfig.json} | 2 +- .../ZipArchiveEntry.ExtractToDirectory.cs | 2 +- .../ZipFile.ExtractToDirectoryFiltered.cs | 2 +- .../tests/ZipArchive/zip_CreateTests.cs | 2 +- .../tests/Directory/Delete.cs | 2 +- src/System.IO.FileSystem/tests/File/Delete.cs | 2 +- ...ipeTest.CurrentUserOnly.netcoreapp.Unix.cs | 2 +- .../tests/SerialPort/ReadByte_Generic.cs | 2 +- .../tests/SerialPort/ReadChar_Generic.cs | 2 +- .../tests/SerialPort/ReadLine_Generic.cs | 2 +- .../tests/SerialPort/ReadTo_Generic.cs | 2 +- .../SerialPort/Read_byte_int_int_Generic.cs | 2 +- .../SerialPort/Read_char_int_int_Generic.cs | 2 +- .../tests/SerialPort/WriteLine_Generic.cs | 2 +- .../SerialPort/Write_byte_int_int_Generic.cs | 2 +- .../SerialPort/Write_char_int_int_Generic.cs | 2 +- .../tests/SerialPort/Write_str_Generic.cs | 2 +- .../tests/SerialStream/ReadByte_Generic.cs | 2 +- .../tests/SerialStream/ReadTimeout.cs | 2 +- .../SerialStream/Read_byte_int_int_Generic.cs | 2 +- .../tests/SerialStream/WriteByte_Generic.cs | 2 +- .../tests/SerialStream/WriteTimeout.cs | 2 +- .../Write_byte_int_int_Generic.cs | 2 +- .../System.Linq.Expressions.Tests.csproj | 6 - .../NegotiateStreamTest.Linux.cs | 2 +- .../tests/CustomAssemblyTests.cs | 6 - src/System.Reflection/tests/AssemblyTests.cs | 4 +- .../tests/System/EnvironmentTests.cs | 2 +- .../tests/System/IO/PathTests.netcoreapp.cs | 2 +- ...ocess.ServiceController.TestService.csproj | 4 +- src/shims/manual/mscorlib.csproj | 2 +- 58 files changed, 253 insertions(+), 152 deletions(-) rename src/System.Globalization.Calendars/tests/CalendarTestWithConfigSwitch/{xunit.console.netcore.runtimeconfig.json => xunit.console.runtimeconfig.json} (100%) rename src/System.Globalization/tests/Invariant/{xunit.console.netcore.runtimeconfig.json => xunit.console.runtimeconfig.json} (99%) diff --git a/BuildToolsVersion.txt b/BuildToolsVersion.txt index 4cf02efdb1fa..0100d180f327 100644 --- a/BuildToolsVersion.txt +++ b/BuildToolsVersion.txt @@ -1 +1 @@ -2.2.0-preview1-03116-01 \ No newline at end of file +2.2.0-preview1-03122-06 \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props index 199bd3d13cd5..36929d31c36a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -165,9 +165,8 @@ true true - true - true true + true true diff --git a/Directory.Build.targets b/Directory.Build.targets index c0195bd907e4..db81c59fcf74 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -131,6 +131,17 @@ + + + + + + diff --git a/Documentation/debugging/unix-instructions.md b/Documentation/debugging/unix-instructions.md index 70998ad1d99f..20d37c820357 100644 --- a/Documentation/debugging/unix-instructions.md +++ b/Documentation/debugging/unix-instructions.md @@ -75,6 +75,6 @@ lldb-3.9 -O "settings set target.exec-search-paths /home/parallels/Downloads/Sys - set `cwd` to the test bin directory. - using the System.Net.Sockets example, it should be something like `corefx/bin/tests/System.Net.Sockets.Tests/netcoreapp-Linux-{Configuration}-{Architecture}`, plus the full path to your corefx directory. - set `args` to the command line arguments to pass to the test - - something like: `[ "xunit.console.netcore.exe", ".dll", "-notrait", .... ]` + - something like: `[ "xunit.console.dll", ".dll", "-notrait", .... ]` - to run a specific test, you can append something like: `[ "method", "System.Net.Sockets.Tests.{ClassName}.{TestMethodName}", ...]` - Set a breakpoint and launch the debugger, inspecting variables and call stacks will now work diff --git a/Documentation/debugging/windows-instructions.md b/Documentation/debugging/windows-instructions.md index d5ec4a0248ff..f96f5620d8e4 100644 --- a/Documentation/debugging/windows-instructions.md +++ b/Documentation/debugging/windows-instructions.md @@ -41,7 +41,7 @@ Assuming that your repo is at `C:\corefx`: ``` cd C:\corefx\bin\tests\Windows_NT.AnyCPU.Debug\System.Net.Sockets.Tests\netcoreapp1.0 -C:\corefx\bin\tests\Windows_NT.AnyCPU.Debug\System.Net.Sockets.Tests\netcoreapp1.0\CoreRun.exe xunit.console.netcore.exe System.Net.Sockets.Tests.dll -xml testResults.xml -notrait category=nonwindowstests -notrait category=OuterLoop -notrait category=failing +C:\corefx\bin\tests\Windows_NT.AnyCPU.Debug\System.Net.Sockets.Tests\netcoreapp1.0\CoreRun.exe xunit.console.dll System.Net.Sockets.Tests.dll -xml testResults.xml -notrait category=nonwindowstests -notrait category=OuterLoop -notrait category=failing ``` * If the test crashes or encounteres a `Debugger.Launch()` method call, WinDBG will automatically start and attach to the `CoreRun.exe` process diff --git a/Documentation/project-docs/developer-guide.md b/Documentation/project-docs/developer-guide.md index 36f2713c0060..085d1d9cb40e 100644 --- a/Documentation/project-docs/developer-guide.md +++ b/Documentation/project-docs/developer-guide.md @@ -270,7 +270,7 @@ msbuild System.Runtime.Tests.csproj /p:TargetGroup=netfx #### Filtering tests using traits -The tests can also be filtered based on xunit trait attributes defined in [`xunit.netcore.extensions`](https://github.com/dotnet/buildtools/tree/master/src/xunit.netcore.extensions). These attributes are specified above the test method's definition. The available attributes are: +The tests can also be filtered based on xunit trait attributes defined in [`Microsoft.DotNet.XUnitExtensions`](https://github.com/dotnet/arcade/tree/master/src/Microsoft.DotNet.XUnitExtensions). These attributes are specified above the test method's definition. The available attributes are: #### OuterloopAttribute @@ -298,7 +298,7 @@ Use this attribute on test methods to specify that this test may only be run on - `nonlinuxtests` for tests that don't run on Linux - `nonosxtests` for tests that don't run on OS X -**[Available Test Platforms](https://github.com/dotnet/buildtools/blob/master/src/xunit.netcore.extensions/TestPlatforms.cs#L10)** +**[Available Test Platforms](https://github.com/dotnet/buildtools/blob/master/src/Microsoft.DotNet.XUnitExtensions/TestPlatforms.cs#L10)** When running tests by building a test project, tests that don't apply to the `OSGroup` are not run. For example, to run Linux-specific tests on a Linux box, use the following command line: ```sh @@ -350,7 +350,7 @@ Use this attribute over test methods to skip tests only on the specific target f If it needs to be skipped in multiple frameworks and the reasons are different please use two attributes on the same test so that you can specify different reasons for each framework. -**Currently this are the [Framework Monikers](https://github.com/dotnet/buildtools/blob/master/src/xunit.netcore.extensions/TargetFrameworkMonikers.cs#L23-L26) that we support through our test execution infrastructure** +**Currently this are the [Framework Monikers](https://github.com/dotnet/buildtools/blob/master/src/Microsoft.DotNet.XUnitExtensions/TargetFrameworkMonikers.cs#L23-L26) that we support through our test execution infrastructure** #### ConditionalFactAttribute Use this attribute to run the test only when a condition is `true`. This attribute is used when `ActiveIssueAttribute` or `SkipOnTargetFrameworkAttribute` are not flexible enough due to needing to run a custom logic at test time. This test behaves as a `[Fact]` test that has no test data passed in as a parameter. @@ -431,7 +431,7 @@ msbuild /t:BuildAndTest /p:OSGroup=Windows_NT Alternatively, you can directly invoke the XUnit executable by changing your working directory to the test execution directory at `bin\tests\{OSPlatformConfig)\{Project}.Tests\{TargetGroup}.{TestTFM}\` which is created when the test project is built. For example, the following command runs all Linux-supported inner-loop tests: ```sh -./corerun xunit.console.netcore.exe -notrait category=nonlinuxtests -notrait category=OuterLoop +./corerun xunit.console.dll -notrait category=nonlinuxtests -notrait category=OuterLoop ``` ### Code Coverage @@ -460,7 +460,7 @@ cd src\Microsoft.CSharp\tests ::TODO: The exact properties needed for .NET Native tests runs after engineering work is TBD msbuild /t:BuildAndTest /p:TargetGroup=uap /p:UseDotNetNativeToolchain=true ``` -If native compilation succeeds, the test will build and run as a native executable named "xunit.console.netcore.exe" in a folder named "native" in the test execution folder. Note many tests in CoreFX are not ready to run though native compilation yet. +If native compilation succeeds, the test will build and run as a native executable named "xunit.console.dll" in a folder named "native" in the test execution folder. Note many tests in CoreFX are not ready to run though native compilation yet. A slight variation on these arguments will allow you to build and run against `uap`, the managed version of the UWP Framework subset, used when debugging UWP applications in Visual Studio: ```cmd diff --git a/dependencies.props b/dependencies.props index af66cd3c3141..84a4f21ae68e 100644 --- a/dependencies.props +++ b/dependencies.props @@ -17,7 +17,7 @@ 5c21cc5e3582fcdb9e62598974045d17efffbc48 8bd1ec5fac9f0eec34ff6b34b1d878b4359e02dd 9004703a1923e5c5582ceb8d79712df777412446 - e0c1d36d8a19fed21cadfff4890e027bd4c2c214 + 86816ae37b15ad3631014e96783a3fab70c0e912 @@ -44,10 +44,13 @@ 4.4.0 - 2.2.0-preview1-02915-01 - 1.0.0-beta-build0019 + + 15.8.0 + 2.4.0 + 1.0.0-beta-build0020 2.0.5 - 2.2.0-preview1-03116-01 + 2.4.0-prerelease-63123-07 + 1.0.19 4.6.0-alpha-00001 @@ -183,11 +186,6 @@ $(MSBuildThisFileDirectory)tools-local/ILAsmVersion.txt Microsoft.NETCore.ILAsm - - $(MSBuildThisFileFullPath) - XunitNetcoreExtensionsVersion - Microsoft.xunit.netcore.extensions - $(MSBuildThisFileFullPath) FeedTasksPackageVersion @@ -196,7 +194,6 @@ - 2.3.0-beta1-build3642 2.1.0 @@ -223,8 +220,12 @@ $(XUnitPackageVersion) - - $(XunitNetcoreExtensionsVersion) + + $(MicrosoftDotNetXUnitExtensionsVersion) + + + + $(MicrosoftDotNetTestSdkVersion) @@ -232,18 +233,13 @@ - $(XunitPerfAnalysisPackageVersion) + $(XUnitPerformancePackageVersion) %(Identity) true - - - microsoft.xunit.runner.uwp - $(AppXRunnerVersion) - diff --git a/external/test-runtime/Configurations.props b/external/test-runtime/Configurations.props index 10a9c0e1fed2..3b11f75e394c 100644 --- a/external/test-runtime/Configurations.props +++ b/external/test-runtime/Configurations.props @@ -7,6 +7,7 @@ netcoreappaot; netstandard; netfx; + netcoreapp; diff --git a/external/test-runtime/XUnit.Runtime.depproj b/external/test-runtime/XUnit.Runtime.depproj index 03d79cdcdab0..222410ea0faa 100644 --- a/external/test-runtime/XUnit.Runtime.depproj +++ b/external/test-runtime/XUnit.Runtime.depproj @@ -9,56 +9,65 @@ win10-arm true $(RuntimePath) - xunit.console.netcore - xunit.runner.console - .NETStandard,Version=v2.0 - netstandard2.0 - .NETStandard,Version=v2.0 - netstandard2.0 + xunit.runner.console + xunit.console + xunit.runner.visualstudio + xunit.runner.visualstudio.dotnetcore.testadapter + xunit.runner.visualstudio.uwp.testadapter + xunit.runner.visualstudio.testadapter + microsoft.testplatform.testhost + testhost + .NETStandard,Version=v2.0 + netstandard2.0 coverlet.msbuild 2.2.1 + + unknown $(NoWarn);NU1603 + - - $(AppXRunnerVersion) + + + $(XUnitPackageVersion) - - $(XunitNetcoreExtensionsVersion) + + $(MicrosoftDotNetXUnitExtensionsVersion) - - $(XunitNetcoreExtensionsVersion) + + + $(XUnitPackageVersion) - - $(XunitPerfAnalysisPackageVersion) + + $(XUnitPackageVersion) - - $(XunitPerfAnalysisPackageVersion) + + + + $(MicrosoftDotNetTestSdkVersion) - - $(XunitPerfAnalysisPackageVersion) + + $(MicrosoftDotNetTestSdkVersion) - - $(XunitPerfAnalysisPackageVersion) + + $(MicrosoftDotNetTestSdkVersion) - - $(TraceEventPackageVersion) + + 2.0.4 + + $(MicrosoftDotNetTestSdkVersion) + + 1.5.0 - - 0.10.0-alpha-experimental - 2.0.4 - - 2.1.1-beta - 9.0.1 @@ -74,6 +83,8 @@ 3.0.1 + + 1.0.6-prerelease @@ -93,22 +104,61 @@ 1.0.2 - - - $(XUnitPackageVersion) + + + + + $(XUnitPerformancePackageVersion) + + + $(XUnitPerformancePackageVersion) + + $(XUnitPerformancePackageVersion) + + + $(XUnitPerformancePackageVersion) + + + $(TraceEventPackageVersion) + + + 0.10.1 + + + 2.3.1 + + + + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + - @@ -128,10 +178,6 @@ SkipUnchangedFiles="true" /> - - 1.0.17 - - $(UAPToolsPackageVersion) @@ -148,15 +194,6 @@ - - - - - - - - - @@ -221,19 +258,85 @@ - - + + + + + + false + $(XUnitRunnerPackageId) + $(XUnitPackageVersion) + + + false + $(XUnitTestAdapterPackageId) + $(XUnitPackageVersion) + + + false + $(TestPlatformHostPackageId) + $(MicrosoftDotNetTestSdkVersion) + + + + + + + + + + + false + $(XUnitRunnerPackageId) + $(XUnitPackageVersion) + + + false + $(XUnitTestAdapterPackageId) + $(XUnitPackageVersion) + + + false + $(TestPlatformHostPackageId) + $(MicrosoftDotNetTestSdkVersion) + + + + + + + false $(XUnitRunnerPackageId) $(XUnitPackageVersion) + + false + $(XUnitTestAdapterPackageId) + $(XUnitPackageVersion) + diff --git a/src/Common/tests/Performance/BenchmarkFilter.cs b/src/Common/tests/Performance/BenchmarkFilter.cs index f85f148ef13b..2c1843d13a84 100644 --- a/src/Common/tests/Performance/BenchmarkFilter.cs +++ b/src/Common/tests/Performance/BenchmarkFilter.cs @@ -8,9 +8,9 @@ using Xunit.Abstractions; using Xunit.Sdk; -// Usage: [assembly: TestCaseOrderer("Xunit.NetCore.Extensions.BenchmarkFilter", "System.Drawing.Common.Performance.Tests")] +// Usage: [assembly: TestCaseOrderer("Microsoft.DotNet.XUnitExtensions.BenchmarkFilter", "System.Drawing.Common.Performance.Tests")] -namespace Xunit.NetCore.Extensions +namespace Microsoft.DotNet.XUnitExtensions { public class BenchmarkFilter : ITestCaseOrderer { diff --git a/src/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/RemoteExecutorConsoleApp.csproj b/src/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/RemoteExecutorConsoleApp.csproj index c99ec33e7546..c8cb09bb5cd5 100644 --- a/src/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/RemoteExecutorConsoleApp.csproj +++ b/src/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/RemoteExecutorConsoleApp.csproj @@ -2,6 +2,8 @@ {8DE22889-A6CB-41EC-B807-D44A2C184719} Exe + + .exe RemoteExecutorConsoleApp RemoteExecutorConsoleApp true diff --git a/src/Common/tests/System/Xml/XmlCoreTest/XmlCoreTest.csproj b/src/Common/tests/System/Xml/XmlCoreTest/XmlCoreTest.csproj index 0b2ab6a61647..4dba97c2c04b 100644 --- a/src/Common/tests/System/Xml/XmlCoreTest/XmlCoreTest.csproj +++ b/src/Common/tests/System/Xml/XmlCoreTest/XmlCoreTest.csproj @@ -1,6 +1,7 @@ {89701565-F68B-46D9-BD78-95B0F052C50B} + Exe XmlCoreTest XmlCoreTest.Common netstandard-Debug;netstandard-Release diff --git a/src/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj b/src/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj index 7fd3421d45a1..3279b25772d6 100644 --- a/src/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj +++ b/src/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj @@ -1,4 +1,4 @@ - + CoreFx.Private.TestUtilities {EBDB0247-CA43-4226-B7A1-8FEF21061D09} @@ -94,7 +94,7 @@ - + diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 4ecb27758dc2..c431e35aeed4 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -9,6 +9,7 @@ false false + false - $(ToolsDir)xunit.console.netcore.runtimeconfig.json + $(ToolsDir)xunit.console.runtimeconfig.json $(TestHostRootPath) diff --git a/src/SharedFrameworkValidation/SharedFrameworkValidation.proj b/src/SharedFrameworkValidation/SharedFrameworkValidation.proj index 52a0068546ec..29b7292c9ffc 100644 --- a/src/SharedFrameworkValidation/SharedFrameworkValidation.proj +++ b/src/SharedFrameworkValidation/SharedFrameworkValidation.proj @@ -131,7 +131,7 @@ - + diff --git a/src/System.Console/tests/WindowAndCursorProps.cs b/src/System.Console/tests/WindowAndCursorProps.cs index b3b41e28d8a0..02d76738df97 100644 --- a/src/System.Console/tests/WindowAndCursorProps.cs +++ b/src/System.Console/tests/WindowAndCursorProps.cs @@ -7,7 +7,7 @@ using System.IO; using System.Runtime.InteropServices; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; public class WindowAndCursorProps : RemoteExecutorTestBase { diff --git a/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.TestAssembly/System.Diagnostics.FileVersionInfo.TestAssembly.csproj b/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.TestAssembly/System.Diagnostics.FileVersionInfo.TestAssembly.csproj index 4b03de15b856..5bb344091479 100644 --- a/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.TestAssembly/System.Diagnostics.FileVersionInfo.TestAssembly.csproj +++ b/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.TestAssembly/System.Diagnostics.FileVersionInfo.TestAssembly.csproj @@ -1,12 +1,11 @@ - Windows_Debug - netstandard-Debug;netstandard-Release - - - System.Diagnostics.FileVersionInfo.TestAssembly {28EB14BE-3BC9-4543-ABA6-A932424DFBD0} + Exe + System.Diagnostics.FileVersionInfo.TestAssembly false + Windows_Debug + netstandard-Debug;netstandard-Release diff --git a/src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs b/src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs index 02411eb2139d..dfce8f1ff60f 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs @@ -13,7 +13,7 @@ using System.Threading.Tasks; using System.Security; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.Diagnostics.Tests { diff --git a/src/System.Drawing.Common/tests/Performance/CustomAssemblyAttributes.cs b/src/System.Drawing.Common/tests/Performance/CustomAssemblyAttributes.cs index a3439b23ae0d..dd785f68586a 100644 --- a/src/System.Drawing.Common/tests/Performance/CustomAssemblyAttributes.cs +++ b/src/System.Drawing.Common/tests/Performance/CustomAssemblyAttributes.cs @@ -4,4 +4,4 @@ using Xunit; -[assembly: TestCaseOrderer("Xunit.NetCore.Extensions.BenchmarkFilter", "System.Drawing.Common.Performance.Tests")] +[assembly: TestCaseOrderer("Microsoft.DotNet.XUnitExtensions.BenchmarkFilter", "System.Drawing.Common.Performance.Tests")] diff --git a/src/System.Drawing.Common/tests/Performance/Perf_Graphics_DrawBeziers.cs b/src/System.Drawing.Common/tests/Performance/Perf_Graphics_DrawBeziers.cs index 2fa66118d3d1..a3a8ee54fba2 100644 --- a/src/System.Drawing.Common/tests/Performance/Perf_Graphics_DrawBeziers.cs +++ b/src/System.Drawing.Common/tests/Performance/Perf_Graphics_DrawBeziers.cs @@ -4,7 +4,7 @@ using System.Diagnostics; using Microsoft.Xunit.Performance; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.Drawing.Tests { diff --git a/src/System.Drawing.Common/tests/Performance/Perf_Graphics_Transforms.cs b/src/System.Drawing.Common/tests/Performance/Perf_Graphics_Transforms.cs index 133e94a439ca..02ba9fd6e7b5 100644 --- a/src/System.Drawing.Common/tests/Performance/Perf_Graphics_Transforms.cs +++ b/src/System.Drawing.Common/tests/Performance/Perf_Graphics_Transforms.cs @@ -5,7 +5,7 @@ using System.Diagnostics; using System.Drawing.Drawing2D; using Microsoft.Xunit.Performance; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.Drawing.Tests { diff --git a/src/System.Drawing.Common/tests/Performance/Perf_Image_Load.cs b/src/System.Drawing.Common/tests/Performance/Perf_Image_Load.cs index 95ab641a65c1..7d08fb246efa 100644 --- a/src/System.Drawing.Common/tests/Performance/Perf_Image_Load.cs +++ b/src/System.Drawing.Common/tests/Performance/Perf_Image_Load.cs @@ -6,7 +6,7 @@ using System.Drawing.Imaging; using System.IO; using Microsoft.Xunit.Performance; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.Drawing.Tests { diff --git a/src/System.Globalization.Calendars/tests/CalendarTestWithConfigSwitch/System.Globalization.CalendarsWithConfigSwitch.Tests.csproj b/src/System.Globalization.Calendars/tests/CalendarTestWithConfigSwitch/System.Globalization.CalendarsWithConfigSwitch.Tests.csproj index fc6cdb308dcf..c912ef5915c5 100644 --- a/src/System.Globalization.Calendars/tests/CalendarTestWithConfigSwitch/System.Globalization.CalendarsWithConfigSwitch.Tests.csproj +++ b/src/System.Globalization.Calendars/tests/CalendarTestWithConfigSwitch/System.Globalization.CalendarsWithConfigSwitch.Tests.csproj @@ -14,11 +14,11 @@ true - + PreserveNewest - + PreserveNewest diff --git a/src/System.Globalization.Calendars/tests/CalendarTestWithConfigSwitch/xunit.console.netcore.runtimeconfig.json b/src/System.Globalization.Calendars/tests/CalendarTestWithConfigSwitch/xunit.console.runtimeconfig.json similarity index 100% rename from src/System.Globalization.Calendars/tests/CalendarTestWithConfigSwitch/xunit.console.netcore.runtimeconfig.json rename to src/System.Globalization.Calendars/tests/CalendarTestWithConfigSwitch/xunit.console.runtimeconfig.json diff --git a/src/System.Globalization/tests/CharUnicodeInfo/CharUnicodeInfoTests.cs b/src/System.Globalization/tests/CharUnicodeInfo/CharUnicodeInfoTests.cs index 74f09fac2fe3..99b48bd1d8e4 100644 --- a/src/System.Globalization/tests/CharUnicodeInfo/CharUnicodeInfoTests.cs +++ b/src/System.Globalization/tests/CharUnicodeInfo/CharUnicodeInfoTests.cs @@ -84,7 +84,7 @@ public void GetNumericValue() } [Theory] - [InlineData("\uFFFF", -1)] + [InlineData('\uFFFF', -1)] public void GetNumericValue(char ch, double expected) { double actual = CharUnicodeInfo.GetNumericValue(ch); diff --git a/src/System.Globalization/tests/Invariant/Invariant.Tests.csproj b/src/System.Globalization/tests/Invariant/Invariant.Tests.csproj index 0653abcd757a..b45a5cb50eda 100644 --- a/src/System.Globalization/tests/Invariant/Invariant.Tests.csproj +++ b/src/System.Globalization/tests/Invariant/Invariant.Tests.csproj @@ -1,4 +1,4 @@ - + {9A8926D9-1D4C-4069-8965-A626F6CA8C29} netcoreapp-Debug;netcoreapp-Release @@ -12,11 +12,11 @@ - + PreserveNewest - + PreserveNewest diff --git a/src/System.Globalization/tests/Invariant/xunit.console.netcore.runtimeconfig.json b/src/System.Globalization/tests/Invariant/xunit.console.runtimeconfig.json similarity index 99% rename from src/System.Globalization/tests/Invariant/xunit.console.netcore.runtimeconfig.json rename to src/System.Globalization/tests/Invariant/xunit.console.runtimeconfig.json index 2ea1b4ac5481..db2c754a2c40 100644 --- a/src/System.Globalization/tests/Invariant/xunit.console.netcore.runtimeconfig.json +++ b/src/System.Globalization/tests/Invariant/xunit.console.runtimeconfig.json @@ -8,4 +8,4 @@ "version": "9.9.9" } } -} \ No newline at end of file +} diff --git a/src/System.IO.Compression.ZipFile/tests/ZipArchiveEntry.ExtractToDirectory.cs b/src/System.IO.Compression.ZipFile/tests/ZipArchiveEntry.ExtractToDirectory.cs index 5aa725fb9da2..3b19ab1f6849 100644 --- a/src/System.IO.Compression.ZipFile/tests/ZipArchiveEntry.ExtractToDirectory.cs +++ b/src/System.IO.Compression.ZipFile/tests/ZipArchiveEntry.ExtractToDirectory.cs @@ -7,7 +7,7 @@ using System.Threading; using System.Threading.Tasks; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.IO.Compression.Tests { diff --git a/src/System.IO.Compression.ZipFile/tests/ZipFile.ExtractToDirectoryFiltered.cs b/src/System.IO.Compression.ZipFile/tests/ZipFile.ExtractToDirectoryFiltered.cs index 54e73a96bae1..06018eb296aa 100644 --- a/src/System.IO.Compression.ZipFile/tests/ZipFile.ExtractToDirectoryFiltered.cs +++ b/src/System.IO.Compression.ZipFile/tests/ZipFile.ExtractToDirectoryFiltered.cs @@ -7,7 +7,7 @@ using System.Threading; using System.Threading.Tasks; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; using System.Linq; namespace System.IO.Compression.Tests { diff --git a/src/System.IO.Compression/tests/ZipArchive/zip_CreateTests.cs b/src/System.IO.Compression/tests/ZipArchive/zip_CreateTests.cs index e8e08c7ae8a1..d77bdd453cd5 100644 --- a/src/System.IO.Compression/tests/ZipArchive/zip_CreateTests.cs +++ b/src/System.IO.Compression/tests/ZipArchive/zip_CreateTests.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Threading.Tasks; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.IO.Compression.Tests { diff --git a/src/System.IO.FileSystem/tests/Directory/Delete.cs b/src/System.IO.FileSystem/tests/Directory/Delete.cs index 52f5b9dfad46..c4bee30e20a9 100644 --- a/src/System.IO.FileSystem/tests/Directory/Delete.cs +++ b/src/System.IO.FileSystem/tests/Directory/Delete.cs @@ -4,7 +4,7 @@ using System.Text; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.IO.Tests { diff --git a/src/System.IO.FileSystem/tests/File/Delete.cs b/src/System.IO.FileSystem/tests/File/Delete.cs index 1dd95f604053..162bd6712617 100644 --- a/src/System.IO.FileSystem/tests/File/Delete.cs +++ b/src/System.IO.FileSystem/tests/File/Delete.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.IO.Tests { diff --git a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CurrentUserOnly.netcoreapp.Unix.cs b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CurrentUserOnly.netcoreapp.Unix.cs index efe976c97421..ee4d54d3171f 100644 --- a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CurrentUserOnly.netcoreapp.Unix.cs +++ b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CurrentUserOnly.netcoreapp.Unix.cs @@ -6,7 +6,7 @@ using System.Threading; using System.Threading.Tasks; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.IO.Pipes.Tests { diff --git a/src/System.IO.Ports/tests/SerialPort/ReadByte_Generic.cs b/src/System.IO.Ports/tests/SerialPort/ReadByte_Generic.cs index f728c54cc052..b9f10dc64dbb 100644 --- a/src/System.IO.Ports/tests/SerialPort/ReadByte_Generic.cs +++ b/src/System.IO.Ports/tests/SerialPort/ReadByte_Generic.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using Legacy.Support; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.IO.Ports.Tests { diff --git a/src/System.IO.Ports/tests/SerialPort/ReadChar_Generic.cs b/src/System.IO.Ports/tests/SerialPort/ReadChar_Generic.cs index 8df85fefd410..b7d5c43294ae 100644 --- a/src/System.IO.Ports/tests/SerialPort/ReadChar_Generic.cs +++ b/src/System.IO.Ports/tests/SerialPort/ReadChar_Generic.cs @@ -10,7 +10,7 @@ using System.Threading.Tasks; using Legacy.Support; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.IO.Ports.Tests { diff --git a/src/System.IO.Ports/tests/SerialPort/ReadLine_Generic.cs b/src/System.IO.Ports/tests/SerialPort/ReadLine_Generic.cs index f5586fb25e77..4e0908e31f6e 100644 --- a/src/System.IO.Ports/tests/SerialPort/ReadLine_Generic.cs +++ b/src/System.IO.Ports/tests/SerialPort/ReadLine_Generic.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using Legacy.Support; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.IO.Ports.Tests { diff --git a/src/System.IO.Ports/tests/SerialPort/ReadTo_Generic.cs b/src/System.IO.Ports/tests/SerialPort/ReadTo_Generic.cs index 2a9f4ebd9437..87aeee270400 100644 --- a/src/System.IO.Ports/tests/SerialPort/ReadTo_Generic.cs +++ b/src/System.IO.Ports/tests/SerialPort/ReadTo_Generic.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using Legacy.Support; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.IO.Ports.Tests { diff --git a/src/System.IO.Ports/tests/SerialPort/Read_byte_int_int_Generic.cs b/src/System.IO.Ports/tests/SerialPort/Read_byte_int_int_Generic.cs index 50abe566281e..a10c8aa8d4bd 100644 --- a/src/System.IO.Ports/tests/SerialPort/Read_byte_int_int_Generic.cs +++ b/src/System.IO.Ports/tests/SerialPort/Read_byte_int_int_Generic.cs @@ -10,7 +10,7 @@ using System.Threading.Tasks; using Legacy.Support; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.IO.Ports.Tests { diff --git a/src/System.IO.Ports/tests/SerialPort/Read_char_int_int_Generic.cs b/src/System.IO.Ports/tests/SerialPort/Read_char_int_int_Generic.cs index b96f8b2d15b4..c99cefe83e5d 100644 --- a/src/System.IO.Ports/tests/SerialPort/Read_char_int_int_Generic.cs +++ b/src/System.IO.Ports/tests/SerialPort/Read_char_int_int_Generic.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using Legacy.Support; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.IO.Ports.Tests { diff --git a/src/System.IO.Ports/tests/SerialPort/WriteLine_Generic.cs b/src/System.IO.Ports/tests/SerialPort/WriteLine_Generic.cs index 9fee788b4593..18095e5c0839 100644 --- a/src/System.IO.Ports/tests/SerialPort/WriteLine_Generic.cs +++ b/src/System.IO.Ports/tests/SerialPort/WriteLine_Generic.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using Legacy.Support; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.IO.Ports.Tests { diff --git a/src/System.IO.Ports/tests/SerialPort/Write_byte_int_int_Generic.cs b/src/System.IO.Ports/tests/SerialPort/Write_byte_int_int_Generic.cs index 42fb8a486463..6517ac1660b8 100644 --- a/src/System.IO.Ports/tests/SerialPort/Write_byte_int_int_Generic.cs +++ b/src/System.IO.Ports/tests/SerialPort/Write_byte_int_int_Generic.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using Legacy.Support; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.IO.Ports.Tests { diff --git a/src/System.IO.Ports/tests/SerialPort/Write_char_int_int_Generic.cs b/src/System.IO.Ports/tests/SerialPort/Write_char_int_int_Generic.cs index dc61a4569cfe..6867d95485f0 100644 --- a/src/System.IO.Ports/tests/SerialPort/Write_char_int_int_Generic.cs +++ b/src/System.IO.Ports/tests/SerialPort/Write_char_int_int_Generic.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using Legacy.Support; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.IO.Ports.Tests { diff --git a/src/System.IO.Ports/tests/SerialPort/Write_str_Generic.cs b/src/System.IO.Ports/tests/SerialPort/Write_str_Generic.cs index b2a230e5e206..8a91ee3cb802 100644 --- a/src/System.IO.Ports/tests/SerialPort/Write_str_Generic.cs +++ b/src/System.IO.Ports/tests/SerialPort/Write_str_Generic.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using Legacy.Support; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.IO.Ports.Tests { diff --git a/src/System.IO.Ports/tests/SerialStream/ReadByte_Generic.cs b/src/System.IO.Ports/tests/SerialStream/ReadByte_Generic.cs index f4060fbab1eb..01f3d6d376e3 100644 --- a/src/System.IO.Ports/tests/SerialStream/ReadByte_Generic.cs +++ b/src/System.IO.Ports/tests/SerialStream/ReadByte_Generic.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using Legacy.Support; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.IO.Ports.Tests { diff --git a/src/System.IO.Ports/tests/SerialStream/ReadTimeout.cs b/src/System.IO.Ports/tests/SerialStream/ReadTimeout.cs index 63f149973a9d..9bcaf2fbc3ab 100644 --- a/src/System.IO.Ports/tests/SerialStream/ReadTimeout.cs +++ b/src/System.IO.Ports/tests/SerialStream/ReadTimeout.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; using Legacy.Support; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.IO.Ports.Tests { diff --git a/src/System.IO.Ports/tests/SerialStream/Read_byte_int_int_Generic.cs b/src/System.IO.Ports/tests/SerialStream/Read_byte_int_int_Generic.cs index 1b8184d48570..971af5faf753 100644 --- a/src/System.IO.Ports/tests/SerialStream/Read_byte_int_int_Generic.cs +++ b/src/System.IO.Ports/tests/SerialStream/Read_byte_int_int_Generic.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using Legacy.Support; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.IO.Ports.Tests { diff --git a/src/System.IO.Ports/tests/SerialStream/WriteByte_Generic.cs b/src/System.IO.Ports/tests/SerialStream/WriteByte_Generic.cs index b6b846d4152b..59cae887885c 100644 --- a/src/System.IO.Ports/tests/SerialStream/WriteByte_Generic.cs +++ b/src/System.IO.Ports/tests/SerialStream/WriteByte_Generic.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using Legacy.Support; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.IO.Ports.Tests { diff --git a/src/System.IO.Ports/tests/SerialStream/WriteTimeout.cs b/src/System.IO.Ports/tests/SerialStream/WriteTimeout.cs index e01e2bafd086..e6cf92533de3 100644 --- a/src/System.IO.Ports/tests/SerialStream/WriteTimeout.cs +++ b/src/System.IO.Ports/tests/SerialStream/WriteTimeout.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; using Legacy.Support; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.IO.Ports.Tests { diff --git a/src/System.IO.Ports/tests/SerialStream/Write_byte_int_int_Generic.cs b/src/System.IO.Ports/tests/SerialStream/Write_byte_int_int_Generic.cs index 3d7ca41107c0..d915f19250a9 100644 --- a/src/System.IO.Ports/tests/SerialStream/Write_byte_int_int_Generic.cs +++ b/src/System.IO.Ports/tests/SerialStream/Write_byte_int_int_Generic.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using Legacy.Support; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.IO.Ports.Tests { diff --git a/src/System.Linq.Expressions/tests/System.Linq.Expressions.Tests.csproj b/src/System.Linq.Expressions/tests/System.Linq.Expressions.Tests.csproj index 66f2528acc0c..e3c3cf155242 100644 --- a/src/System.Linq.Expressions/tests/System.Linq.Expressions.Tests.csproj +++ b/src/System.Linq.Expressions/tests/System.Linq.Expressions.Tests.csproj @@ -18,12 +18,6 @@ - - - - - - diff --git a/src/System.Net.Security/tests/FunctionalTests/NegotiateStreamTest.Linux.cs b/src/System.Net.Security/tests/FunctionalTests/NegotiateStreamTest.Linux.cs index 3cbbcb3af95d..11da2367f82a 100644 --- a/src/System.Net.Security/tests/FunctionalTests/NegotiateStreamTest.Linux.cs +++ b/src/System.Net.Security/tests/FunctionalTests/NegotiateStreamTest.Linux.cs @@ -15,7 +15,7 @@ using Xunit; using Xunit.Abstractions; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.Net.Security.Tests { diff --git a/src/System.Reflection.Context/tests/CustomAssemblyTests.cs b/src/System.Reflection.Context/tests/CustomAssemblyTests.cs index c05a543d9ff1..779185c2f02d 100644 --- a/src/System.Reflection.Context/tests/CustomAssemblyTests.cs +++ b/src/System.Reflection.Context/tests/CustomAssemblyTests.cs @@ -62,12 +62,6 @@ public void IsDefinedTest() Assert.False(_customAssembly.IsDefined(typeof(DataContractAttribute), false)); } - [Fact] - public void EntryPoint() - { - Assert.Null(_customAssembly.EntryPoint); - } - [Fact] public void GetExportedTypesTest() { diff --git a/src/System.Reflection/tests/AssemblyTests.cs b/src/System.Reflection/tests/AssemblyTests.cs index 632310fb16ad..cade5749cfc5 100644 --- a/src/System.Reflection/tests/AssemblyTests.cs +++ b/src/System.Reflection/tests/AssemblyTests.cs @@ -123,8 +123,8 @@ public void GetEntryAssembly() { Assert.NotNull(Assembly.GetEntryAssembly()); string assembly = Assembly.GetEntryAssembly().ToString(); - bool correct = assembly.IndexOf("xunit.console.netcore", StringComparison.OrdinalIgnoreCase) != -1 || - assembly.IndexOf("XUnit.Runner.Uap", StringComparison.OrdinalIgnoreCase) != -1; + bool correct = assembly.IndexOf("xunit.console", StringComparison.OrdinalIgnoreCase) != -1 || + assembly.IndexOf("Microsoft.DotNet.XUnitRunnerUap", StringComparison.OrdinalIgnoreCase) != -1; Assert.True(correct, $"Unexpected assembly name {assembly}"); } diff --git a/src/System.Runtime.Extensions/tests/System/EnvironmentTests.cs b/src/System.Runtime.Extensions/tests/System/EnvironmentTests.cs index d981c6b9069c..63eeab3215e4 100644 --- a/src/System.Runtime.Extensions/tests/System/EnvironmentTests.cs +++ b/src/System.Runtime.Extensions/tests/System/EnvironmentTests.cs @@ -12,7 +12,7 @@ using System.Threading; using System.Threading.Tasks; using Xunit; -using Xunit.NetCore.Extensions; +using Microsoft.DotNet.XUnitExtensions; namespace System.Tests { diff --git a/src/System.Runtime.Extensions/tests/System/IO/PathTests.netcoreapp.cs b/src/System.Runtime.Extensions/tests/System/IO/PathTests.netcoreapp.cs index 373838763e3a..b1926f9a333b 100644 --- a/src/System.Runtime.Extensions/tests/System/IO/PathTests.netcoreapp.cs +++ b/src/System.Runtime.Extensions/tests/System/IO/PathTests.netcoreapp.cs @@ -207,7 +207,7 @@ public static void GetFullPath_UNC_Invalid(string path) [Theory, MemberData(nameof(TestData_Wildcards)), MemberData(nameof(TestData_ExtendedWildcards))] - public void GetFullPath_Wildcards(char wildcard) + public void GetFullPath_Wildcards(string wildcard) { string path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName() + wildcard + "ing"); Assert.Equal(path, Path.GetFullPath(path)); diff --git a/src/System.ServiceProcess.ServiceController/tests/System.ServiceProcess.ServiceController.TestService/System.ServiceProcess.ServiceController.TestService.csproj b/src/System.ServiceProcess.ServiceController/tests/System.ServiceProcess.ServiceController.TestService/System.ServiceProcess.ServiceController.TestService.csproj index b0fb80e7bd98..06d5a3c7ce6a 100644 --- a/src/System.ServiceProcess.ServiceController/tests/System.ServiceProcess.ServiceController.TestService/System.ServiceProcess.ServiceController.TestService.csproj +++ b/src/System.ServiceProcess.ServiceController/tests/System.ServiceProcess.ServiceController.TestService/System.ServiceProcess.ServiceController.TestService.csproj @@ -1,8 +1,8 @@ - + {E62B874D-1A0D-41BC-8CFC-9E09D0860A77} true - exe + Exe netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release diff --git a/src/shims/manual/mscorlib.csproj b/src/shims/manual/mscorlib.csproj index c14ef9ebcaba..5bcd1779d128 100644 --- a/src/shims/manual/mscorlib.csproj +++ b/src/shims/manual/mscorlib.csproj @@ -5,7 +5,7 @@ - + From bfb6d9c2261dc65a6b9ba7fa96e4543cae05b946 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Mon, 23 Jul 2018 02:45:56 +0200 Subject: [PATCH 3/6] Remove uap specific RemoteExecutor code --- .../src/CoreFx.Private.TestUtilities.csproj | 1 - .../RemoteExecutorTestBase.Process.cs | 80 ------------------ .../Diagnostics/RemoteExecutorTestBase.aot.cs | 8 +- .../Diagnostics/RemoteExecutorTestBase.cs | 81 +++++++++++++++---- .../RemoteExecutorTestBase.netcore.cs | 2 +- .../Diagnostics/RemoteExecutorTestBase.uap.cs | 67 +-------------- 6 files changed, 74 insertions(+), 165 deletions(-) delete mode 100644 src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.Process.cs diff --git a/src/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj b/src/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj index 3279b25772d6..46963d09bd81 100644 --- a/src/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj +++ b/src/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj @@ -19,7 +19,6 @@ - diff --git a/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.Process.cs b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.Process.cs deleted file mode 100644 index c608daafe4a7..000000000000 --- a/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.Process.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.IO; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; -using Xunit; - -namespace System.Diagnostics -{ - /// Base class used for all tests that need to spawn a remote process. - public abstract partial class RemoteExecutorTestBase : FileCleanupTestBase - { - /// Invokes the method from this assembly in another process using the specified arguments. - /// The method to invoke. - /// The arguments to pass to the method. - /// true if this function should Start the Process; false if that responsibility is left up to the caller. - /// The ProcessStartInfo to use, or null for a default. - /// true if this function should paste the arguments (e.g. surrounding with quotes); false if that responsibility is left up to the caller. - private static RemoteInvokeHandle RemoteInvoke(MethodInfo method, string[] args, RemoteInvokeOptions options, bool pasteArguments = true) - { - options = options ?? new RemoteInvokeOptions(); - - // Verify the specified method returns an int (the exit code) or nothing, - // and that if it accepts any arguments, they're all strings. - Assert.True(method.ReturnType == typeof(void) || method.ReturnType == typeof(int) || method.ReturnType == typeof(Task)); - Assert.All(method.GetParameters(), pi => Assert.Equal(typeof(string), pi.ParameterType)); - - // And make sure it's in this assembly. This isn't critical, but it helps with deployment to know - // that the method to invoke is available because we're already running in this assembly. - Type t = method.DeclaringType; - Assembly a = t.GetTypeInfo().Assembly; - - // Start the other process and return a wrapper for it to handle its lifetime and exit checking. - var psi = options.StartInfo; - psi.UseShellExecute = false; - - if (!options.EnableProfiling) - { - // Profilers / code coverage tools doing coverage of the test process set environment - // variables to tell the targeted process what profiler to load. We don't want the child process - // to be profiled / have code coverage, so we remove these environment variables for that process - // before it's started. - psi.Environment.Remove("Cor_Profiler"); - psi.Environment.Remove("Cor_Enable_Profiling"); - psi.Environment.Remove("CoreClr_Profiler"); - psi.Environment.Remove("CoreClr_Enable_Profiling"); - } - - // If we need the host (if it exists), use it, otherwise target the console app directly. - string metadataArgs = PasteArguments.Paste(new string[] { a.FullName, t.FullName, method.Name, options.ExceptionFile }, pasteFirstArgumentUsingArgV0Rules: false); - string passedArgs = pasteArguments ? PasteArguments.Paste(args, pasteFirstArgumentUsingArgV0Rules: false) : string.Join(" ", args); - string testConsoleAppArgs = ExtraParameter + " " + metadataArgs + " " + passedArgs; - - if (!File.Exists(HostRunner)) - throw new IOException($"{HostRunner} test app isn't present in the test runtime directory."); - - if (options.RunAsSudo) - { - psi.FileName = "sudo"; - psi.Arguments = HostRunner + " " + testConsoleAppArgs; - } - else - { - psi.FileName = HostRunner; - psi.Arguments = testConsoleAppArgs; - } - - // Return the handle to the process, which may or not be started - return new RemoteInvokeHandle(options.Start ? - Process.Start(psi) : - new Process() { StartInfo = psi }, options, - a.FullName, t.FullName, method.Name - ); - } - } -} diff --git a/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.aot.cs b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.aot.cs index adc0b6af273d..7faa3ce470c3 100644 --- a/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.aot.cs +++ b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.aot.cs @@ -3,16 +3,16 @@ // See the LICENSE file in the project root for more information. using System.IO; +using System.Runtime.InteropServices; namespace System.Diagnostics { /// Base class used for all tests that need to spawn a remote process. public abstract partial class RemoteExecutorTestBase : FileCleanupTestBase { - protected static readonly string HostRunnerName = "xunit.console.netcore.exe"; - protected static readonly string HostRunner = TestConsoleApp; + protected static readonly string HostRunnerName = PlatformDetection.IsWindows ? "dotnet.exe" : "dotnet"; + protected static readonly string HostRunner = Process.GetCurrentProcess().MainModule.FileName; - private static readonly string ExtraParameter = ""; + private static readonly string ExtraParameter = TestConsoleApp; } - } diff --git a/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.cs b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.cs index b67fb8862b71..71d07b6c1ccb 100644 --- a/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.cs +++ b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.cs @@ -228,6 +228,70 @@ public static RemoteInvokeHandle RemoteInvokeRaw(Delegate method, string unparse return RemoteInvoke(GetMethodInfo(method), new[] { unparsedArg }, options, pasteArguments: false); } + /// Invokes the method from this assembly in another process using the specified arguments. + /// The method to invoke. + /// The arguments to pass to the method. + /// true if this function should Start the Process; false if that responsibility is left up to the caller. + /// The ProcessStartInfo to use, or null for a default. + /// true if this function should paste the arguments (e.g. surrounding with quotes); false if that responsibility is left up to the caller. + private static RemoteInvokeHandle RemoteInvoke(MethodInfo method, string[] args, RemoteInvokeOptions options, bool pasteArguments = true) + { + options = options ?? new RemoteInvokeOptions(); + + // Verify the specified method returns an int (the exit code) or nothing, + // and that if it accepts any arguments, they're all strings. + Assert.True(method.ReturnType == typeof(void) || method.ReturnType == typeof(int) || method.ReturnType == typeof(Task)); + Assert.All(method.GetParameters(), pi => Assert.Equal(typeof(string), pi.ParameterType)); + + // And make sure it's in this assembly. This isn't critical, but it helps with deployment to know + // that the method to invoke is available because we're already running in this assembly. + Type t = method.DeclaringType; + Assembly a = t.GetTypeInfo().Assembly; + + // Start the other process and return a wrapper for it to handle its lifetime and exit checking. + ProcessStartInfo psi = options.StartInfo; + psi.UseShellExecute = false; + + if (!options.EnableProfiling) + { + // Profilers / code coverage tools doing coverage of the test process set environment + // variables to tell the targeted process what profiler to load. We don't want the child process + // to be profiled / have code coverage, so we remove these environment variables for that process + // before it's started. + psi.Environment.Remove("Cor_Profiler"); + psi.Environment.Remove("Cor_Enable_Profiling"); + psi.Environment.Remove("CoreClr_Profiler"); + psi.Environment.Remove("CoreClr_Enable_Profiling"); + } + + // If we need the host (if it exists), use it, otherwise target the console app directly. + string metadataArgs = PasteArguments.Paste(new string[] { a.FullName, t.FullName, method.Name, options.ExceptionFile }, pasteFirstArgumentUsingArgV0Rules: false); + string passedArgs = pasteArguments ? PasteArguments.Paste(args, pasteFirstArgumentUsingArgV0Rules: false) : string.Join(" ", args); + string testConsoleAppArgs = ExtraParameter + " " + metadataArgs + " " + passedArgs; + + // Uap console app is globally registered. + if (!File.Exists(HostRunner) && !PlatformDetection.IsUap) + throw new IOException($"{HostRunner} test app isn't present in the test runtime directory."); + + if (options.RunAsSudo) + { + psi.FileName = "sudo"; + psi.Arguments = HostRunner + " " + testConsoleAppArgs; + } + else + { + psi.FileName = HostRunner; + psi.Arguments = testConsoleAppArgs; + } + + // Return the handle to the process, which may or not be started + return new RemoteInvokeHandle(options.Start ? + Process.Start(psi) : + new Process() { StartInfo = psi }, options, + a.FullName, t.FullName, method.Name + ); + } + private static MethodInfo GetMethodInfo(Delegate d) { // RemoteInvoke doesn't support marshaling state on classes associated with @@ -262,25 +326,12 @@ public RemoteInvokeHandle(Process process, RemoteInvokeOptions options, string a MethodName = methodName; } - private int _exitCode; public int ExitCode { get { - if (!PlatformDetection.IsUap) - { - Process.WaitForExit(); - return Process.ExitCode; - } - return _exitCode; - } - internal set - { - if (!PlatformDetection.IsUap) - { - throw new PlatformNotSupportedException("ExitCode property can only be set in UWP"); - } - _exitCode = value; + Process.WaitForExit(); + return Process.ExitCode; } } public Process Process { get; set; } diff --git a/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.netcore.cs b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.netcore.cs index d0b9aa043b9d..c89032496114 100644 --- a/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.netcore.cs +++ b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.netcore.cs @@ -10,7 +10,7 @@ namespace System.Diagnostics /// Base class used for all tests that need to spawn a remote process. public abstract partial class RemoteExecutorTestBase : FileCleanupTestBase { - protected static readonly string HostRunnerName = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet"; + protected static readonly string HostRunnerName = PlatformDetection.IsWindows ? "dotnet.exe" : "dotnet"; protected static readonly string HostRunner = Process.GetCurrentProcess().MainModule.FileName; private static readonly string ExtraParameter = TestConsoleApp; diff --git a/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.uap.cs b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.uap.cs index a90e0c3270d3..8bfc10ebb221 100644 --- a/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.uap.cs +++ b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.uap.cs @@ -2,77 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Xunit; using System.IO; -using System.Reflection; -using System.Threading.Tasks; -using Windows.ApplicationModel; -using Windows.Foundation.Collections; -using Windows.ApplicationModel.AppService; namespace System.Diagnostics { /// Base class used for all tests that need to spawn a remote process. public abstract partial class RemoteExecutorTestBase : FileCleanupTestBase { - protected static readonly string HostRunnerName = "xunit.runner.uap.exe"; - protected static readonly string HostRunner = "xunit.runner.uap"; + protected static readonly string HostRunnerName = "Microsoft.DotNet.XUnitRunnerUap.exe"; + protected static readonly string HostRunner = "Microsoft.DotNet.XUnitRunnerUap.exe"; - /// Invokes the method from this assembly in another process using the specified arguments. - /// The method to invoke. - /// The arguments to pass to the method. - /// The options to execute the remote process. - /// Unused in UAP. - private static RemoteInvokeHandle RemoteInvoke(MethodInfo method, string[] args, RemoteInvokeOptions options, bool pasteArguments = false) - { - options = options ?? new RemoteInvokeOptions(); - - // Verify the specified method returns an int (the exit code) or nothing, - // and that if it accepts any arguments, they're all strings. - Assert.True(method.ReturnType == typeof(void) || method.ReturnType == typeof(int) || method.ReturnType == typeof(Task)); - Assert.All(method.GetParameters(), pi => Assert.Equal(typeof(string), pi.ParameterType)); - - // And make sure it's in this assembly. This isn't critical, but it helps with deployment to know - // that the method to invoke is available because we're already running in this assembly. - Type t = method.DeclaringType; - Assembly a = t.GetTypeInfo().Assembly; - int exitCode; - - using (AppServiceConnection remoteExecutionService = new AppServiceConnection()) - { - // Here, we use the app service name defined in the app service provider's Package.appxmanifest file in the section. - remoteExecutionService.AppServiceName = "com.microsoft.corefxuaptests"; - remoteExecutionService.PackageFamilyName = Package.Current.Id.FamilyName; - - AppServiceConnectionStatus status = remoteExecutionService.OpenAsync().GetAwaiter().GetResult(); - if (status != AppServiceConnectionStatus.Success) - { - throw new IOException($"RemoteInvoke cannot open the remote service. Open Service Status: {status}"); - } - - ValueSet message = new ValueSet(); - - message.Add("AssemblyName", a.FullName); - message.Add("TypeName", t.FullName); - message.Add("MethodName", method.Name); - - int i = 0; - foreach (string arg in args) - { - message.Add("Arg" + i, arg); - i++; - } - - AppServiceResponse response = remoteExecutionService.SendMessageAsync(message).GetAwaiter().GetResult(); - - Assert.True(response.Status == AppServiceResponseStatus.Success, $"response.Status = {response.Status}"); - exitCode = (int)response.Message["Results"]; - Assert.True(!options.CheckExitCode || exitCode == options.ExpectedExitCode, (string)response.Message["Log"] + Environment.NewLine + $"Returned Error code: {exitCode}"); - } - // RemoteInvokeHandle is not really needed in the UAP scenario but we use it just to have consistent interface as non UAP - var handle = new RemoteInvokeHandle(null, options, null, null, null); - handle.ExitCode = exitCode; - return handle; - } + private static readonly string ExtraParameter = "remote"; } } From 1b33f6c57bdcb4a2be715a8eaf7ec2483dc5c6c0 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 14 Aug 2018 02:40:55 +0200 Subject: [PATCH 4/6] Enable netfx perf runs and promote to netstandard --- Documentation/project-docs/performance-tests.md | 6 +++--- config.json | 12 ++++++++++-- src/Common/perf/PerfRunner/PerfRunner.csproj | 3 ++- .../Performance/Common.Performance.Tests.csproj | 3 +-- src/Common/tests/Performance/Configurations.props | 2 +- .../tests/Performance/Configurations.props | 2 +- ....Collections.Concurrent.Performance.Tests.csproj | 4 +--- .../tests/Performance/Configurations.props | 2 +- ....Collections.NonGeneric.Performance.Tests.csproj | 3 +-- .../tests/Performance/Configurations.props | 2 +- .../System.Collections.Performance.Tests.csproj | 3 +-- .../tests/Performance/Configurations.props | 1 + .../tests/Performance/Perf.TypeDescriptorTests.cs | 2 ++ ...nentModel.TypeConverter.Performance.Tests.csproj | 7 ++----- .../tests/Performance/Configurations.props | 2 +- .../System.Console.Performance.Tests.csproj | 6 +----- .../tests/Performance/Configurations.props | 2 +- ...tem.Diagnostics.Process.Performance.Tests.csproj | 9 +-------- .../tests/Performance/Configurations.props | 2 +- .../System.Drawing.Common.Performance.Tests.csproj | 13 ++----------- .../tests/Performance/Configurations.props | 2 +- .../System.Globalization.Performance.Tests.csproj | 3 +-- ...m.IO.Compression.Brotli.Performance.Tests.csproj | 2 -- .../tests/Performance/Configurations.props | 2 +- .../System.IO.Compression.Performance.Tests.csproj | 4 +--- .../System.IO.FileSystem.Performance.Tests.csproj | 8 -------- ...em.IO.MemoryMappedFiles.Performance.Tests.csproj | 7 ------- .../System.IO.Pipes.Performance.Tests.csproj | 8 -------- .../tests/Performance/Configurations.props | 2 +- .../System.Linq.Parallel.Performance.Tests.csproj | 10 ++-------- .../tests/Performance/Configurations.props | 2 +- .../System.Linq.Performance.Tests.csproj | 3 +-- .../tests/Performance/Configurations.props | 1 + .../tests/Performance/Perf.Base64EncodeDecode.cs | 2 ++ .../tests/Performance/Perf.Span.IndexOf.cs | 2 ++ .../System.Memory.Performance.Tests.csproj | 7 ++----- .../System.Net.Http.Performance.Tests.csproj | 5 ----- .../System.Net.Primitives.Performance.Tests.csproj | 1 - ...ystem.Net.Sockets.Async.Performance.Tests.csproj | 3 --- .../tests/Performance/Configurations.props | 1 + .../tests/Performance/Perf.Socket.SendReceive.cs | 2 ++ .../System.Net.Sockets.Performance.Tests.csproj | 8 ++------ .../tests/Performance/Configurations.props | 1 + .../Constructor/GenericVectorConstructorTests.cs | 3 ++- ...System.Numerics.Vectors.Performance.Tests.csproj | 9 ++------- .../XmlDocument/Performance/Configurations.props | 2 +- .../System.Xml.XmlDocument.Performance.Tests.csproj | 5 +---- .../XmlDocument/System.Xml.XmlDocument.Tests.csproj | 7 ------- .../XmlSerializer/Performance/Configurations.props | 1 - ...ystem.Xml.XmlSerializer.Performance.Tests.csproj | 3 +-- ...em.Xml.XmlSerializer.ReflectionOnly.Tests.csproj | 2 -- .../tests/Performance/Configurations.props | 2 +- ...stem.Runtime.Extensions.Performance.Tests.csproj | 12 +----------- .../tests/Performance/Configurations.props | 1 + .../{BigInteger => Performance}/PerformanceTests.cs | 0 ...System.Runtime.Numerics.Performance.Tests.csproj | 4 ++-- .../tests/System.Runtime.Numerics.Tests.csproj | 1 - .../tests/Performance/Configurations.props | 1 - ...time.Serialization.Json.Performance.Tests.csproj | 3 +-- .../tests/Performance/Configurations.props | 1 - ...ntime.Serialization.Xml.Performance.Tests.csproj | 4 +--- .../tests/Performance/Configurations.props | 1 + ...Perf.HashCode.cs => Perf.HashCode.netcoreapp.cs} | 0 src/System.Runtime/tests/Performance/Perf.Int32.cs | 4 ++++ src/System.Runtime/tests/Performance/Perf.Int64.cs | 4 ++++ src/System.Runtime/tests/Performance/Perf.UInt32.cs | 4 ++++ src/System.Runtime/tests/Performance/Perf.UInt64.cs | 4 ++++ .../System.Runtime.Performance.Tests.csproj | 11 ++++------- ...Cryptography.Primitives.Performance.Tests.csproj | 6 +----- .../tests/Performance/Configurations.props | 2 +- .../System.Text.Encoding.Performance.Tests.csproj | 3 +-- .../tests/Performance/Configurations.props | 2 +- ...Text.RegularExpressions.Performance.Tests.csproj | 4 +--- ...stem.Threading.Channels.Performance.Tests.csproj | 2 -- ...eading.Tasks.Extensions.Performance.Tests.csproj | 2 -- .../tests/Performance/Configurations.props | 2 +- .../System.Threading.Performance.Tests.csproj | 10 +--------- src/tests.builds | 6 +++--- 78 files changed, 102 insertions(+), 198 deletions(-) rename src/System.Runtime.Numerics/tests/{BigInteger => Performance}/PerformanceTests.cs (100%) rename src/System.Runtime/tests/Performance/{Perf.HashCode.cs => Perf.HashCode.netcoreapp.cs} (100%) diff --git a/Documentation/project-docs/performance-tests.md b/Documentation/project-docs/performance-tests.md index 50fa84eb32db..02ce6a9ff5d8 100644 --- a/Documentation/project-docs/performance-tests.md +++ b/Documentation/project-docs/performance-tests.md @@ -12,10 +12,10 @@ Performance test files (if present) are stored within a library's ```tests/Perfo **Step # 2:** Change directory to the performance tests directory: ```cd path/to/library/tests/Performance``` **Step # 3:** Build and run the tests: - - Windows (using admin command shell): ```msbuild /t:BuildAndTest /p:Performance=true /p:ConfigurationGroup=Release /p:TargetOS=Windows_NT``` - - Linux: ```/Tools/msbuild.sh /t:BuildAndTest /p:Performance=true /p:ConfigurationGroup=Release /p:TargetOS=Linux``` + - Windows (using admin command shell): ```msbuild /t:BuildAndTest /p:ConfigurationGroup=Release``` + - Linux: ```/Tools/msbuild.sh /t:BuildAndTest /p:ConfigurationGroup=Release``` -**Note: Because build-tests.cmd/sh runs tests concurrently, do not use it for executing performance tests.** +**Note: Because build-tests.cmd/sh runs tests concurrently, do not use it for executing performance tests. If you still want to run them concurrently you need to pass the flag `/p:Performance=true` to it: `build-tests -release -- /p:Performance=true`.** The results files will be dropped in corefx/bin/tests/FLAVOR/TESTLIBRARY/TARGETFRAMEWORK. The console output will also specify the location of these files. diff --git a/config.json b/config.json index 3f2f57f35541..4d0c1567b11e 100644 --- a/config.json +++ b/config.json @@ -246,6 +246,12 @@ "values": [], "defaultValue": "" }, + "Performance": { + "description": "Enables/Disables performance test execution.", + "valueType": "property", + "values": ["True", "False"], + "defaultValue": false + }, }, "commands": { "build-directory": { @@ -334,14 +340,16 @@ "tests": { "description": "Builds src and then builds and runs the tests for the given configuration.", "settings": { - "BuildTests": true + "BuildTests": true, + "Performance": "default" } }, "testsOnly": { "description": "Builds and runs the tests for the given configuration.", "settings": { "Project": "src/tests.builds", - "MsBuildLogging":"/flp:v=normal;LogFile=build-tests.log" + "MsBuildLogging":"/flp:v=normal;LogFile=build-tests.log", + "Performance": "default" } }, "debug": { diff --git a/src/Common/perf/PerfRunner/PerfRunner.csproj b/src/Common/perf/PerfRunner/PerfRunner.csproj index cbf0215701fd..4fa4ccba451d 100644 --- a/src/Common/perf/PerfRunner/PerfRunner.csproj +++ b/src/Common/perf/PerfRunner/PerfRunner.csproj @@ -10,6 +10,7 @@ false 0436 true + true netstandard-Debug;netstandard-Release;netstandard1.3-Debug;netstandard1.3-Release @@ -22,7 +23,7 @@ - + PreserveNewest diff --git a/src/Common/tests/Performance/Common.Performance.Tests.csproj b/src/Common/tests/Performance/Common.Performance.Tests.csproj index 2eb574d6ff10..a1889dc75ef5 100644 --- a/src/Common/tests/Performance/Common.Performance.Tests.csproj +++ b/src/Common/tests/Performance/Common.Performance.Tests.csproj @@ -1,9 +1,8 @@ - true {B96198F5-9BF7-42DE-83E8-3EE39DA25F43} true - netcoreapp-Debug;netcoreapp-Release + netstandard-Debug;netstandard-Release diff --git a/src/Common/tests/Performance/Configurations.props b/src/Common/tests/Performance/Configurations.props index 2845c11c541d..c398e42e8994 100644 --- a/src/Common/tests/Performance/Configurations.props +++ b/src/Common/tests/Performance/Configurations.props @@ -2,7 +2,7 @@ - netcoreapp; + netstandard; \ No newline at end of file diff --git a/src/System.Collections.Concurrent/tests/Performance/Configurations.props b/src/System.Collections.Concurrent/tests/Performance/Configurations.props index 2845c11c541d..c398e42e8994 100644 --- a/src/System.Collections.Concurrent/tests/Performance/Configurations.props +++ b/src/System.Collections.Concurrent/tests/Performance/Configurations.props @@ -2,7 +2,7 @@ - netcoreapp; + netstandard; \ No newline at end of file diff --git a/src/System.Collections.Concurrent/tests/Performance/System.Collections.Concurrent.Performance.Tests.csproj b/src/System.Collections.Concurrent/tests/Performance/System.Collections.Concurrent.Performance.Tests.csproj index 2c2a80dd1a72..6429a3b944f9 100644 --- a/src/System.Collections.Concurrent/tests/Performance/System.Collections.Concurrent.Performance.Tests.csproj +++ b/src/System.Collections.Concurrent/tests/Performance/System.Collections.Concurrent.Performance.Tests.csproj @@ -1,10 +1,8 @@ - true {16568C86-E97E-42C6-B683-65A1B5AF2EC8} - netcoreapp-Debug;netcoreapp-Release + netstandard-Debug;netstandard-Release - diff --git a/src/System.Collections.NonGeneric/tests/Performance/Configurations.props b/src/System.Collections.NonGeneric/tests/Performance/Configurations.props index 2845c11c541d..c398e42e8994 100644 --- a/src/System.Collections.NonGeneric/tests/Performance/Configurations.props +++ b/src/System.Collections.NonGeneric/tests/Performance/Configurations.props @@ -2,7 +2,7 @@ - netcoreapp; + netstandard; \ No newline at end of file diff --git a/src/System.Collections.NonGeneric/tests/Performance/System.Collections.NonGeneric.Performance.Tests.csproj b/src/System.Collections.NonGeneric/tests/Performance/System.Collections.NonGeneric.Performance.Tests.csproj index d73f45f58e13..b61d5e183aab 100644 --- a/src/System.Collections.NonGeneric/tests/Performance/System.Collections.NonGeneric.Performance.Tests.csproj +++ b/src/System.Collections.NonGeneric/tests/Performance/System.Collections.NonGeneric.Performance.Tests.csproj @@ -1,8 +1,7 @@ - true {93AB3799-BC91-4B27-B526-28FFFF0DB1B1} - netcoreapp-Debug;netcoreapp-Release + netstandard-Debug;netstandard-Release diff --git a/src/System.Collections/tests/Performance/Configurations.props b/src/System.Collections/tests/Performance/Configurations.props index 2845c11c541d..c398e42e8994 100644 --- a/src/System.Collections/tests/Performance/Configurations.props +++ b/src/System.Collections/tests/Performance/Configurations.props @@ -2,7 +2,7 @@ - netcoreapp; + netstandard; \ No newline at end of file diff --git a/src/System.Collections/tests/Performance/System.Collections.Performance.Tests.csproj b/src/System.Collections/tests/Performance/System.Collections.Performance.Tests.csproj index e991783f9961..62cc8dd442af 100644 --- a/src/System.Collections/tests/Performance/System.Collections.Performance.Tests.csproj +++ b/src/System.Collections/tests/Performance/System.Collections.Performance.Tests.csproj @@ -1,9 +1,8 @@ - true {F2B47C9D-477E-4EB2-B7F9-D7563FCED117} true - netcoreapp-Debug;netcoreapp-Release + netstandard-Debug;netstandard-Release diff --git a/src/System.ComponentModel.TypeConverter/tests/Performance/Configurations.props b/src/System.ComponentModel.TypeConverter/tests/Performance/Configurations.props index 2845c11c541d..8b803e0772f2 100644 --- a/src/System.ComponentModel.TypeConverter/tests/Performance/Configurations.props +++ b/src/System.ComponentModel.TypeConverter/tests/Performance/Configurations.props @@ -3,6 +3,7 @@ netcoreapp; + netstandard; \ No newline at end of file diff --git a/src/System.ComponentModel.TypeConverter/tests/Performance/Perf.TypeDescriptorTests.cs b/src/System.ComponentModel.TypeConverter/tests/Performance/Perf.TypeDescriptorTests.cs index af1187c2a4ca..5d6993c267c9 100644 --- a/src/System.ComponentModel.TypeConverter/tests/Performance/Perf.TypeDescriptorTests.cs +++ b/src/System.ComponentModel.TypeConverter/tests/Performance/Perf.TypeDescriptorTests.cs @@ -45,7 +45,9 @@ public class Perf_TypeDescriptorTests [InlineData(typeof(ClassIBase), typeof(IBaseConverter))] [InlineData(typeof(ClassIDerived), typeof(IBaseConverter))] [InlineData(typeof(Uri), typeof(UriTypeConverter))] +#if netcoreapp [InlineData(typeof(Version), typeof(VersionConverter))] +#endif public static void GetConverter(Type typeToConvert, Type expectedConverter) { const int innerIterations = 100; diff --git a/src/System.ComponentModel.TypeConverter/tests/Performance/System.ComponentModel.TypeConverter.Performance.Tests.csproj b/src/System.ComponentModel.TypeConverter/tests/Performance/System.ComponentModel.TypeConverter.Performance.Tests.csproj index 1a06f3750801..bfdf3b1ea566 100644 --- a/src/System.ComponentModel.TypeConverter/tests/Performance/System.ComponentModel.TypeConverter.Performance.Tests.csproj +++ b/src/System.ComponentModel.TypeConverter/tests/Performance/System.ComponentModel.TypeConverter.Performance.Tests.csproj @@ -1,13 +1,10 @@ - true $(DefineConstants);PERFORMANCE_TESTS {89C76728-ECAF-4905-A33F-BD6BFED5E91D} 9.9.9.9 - netcoreapp-Debug;netcoreapp-Release - - - {2E36F1D4-B23C-435D-AB41-18E608940038} + $(DefineConstants);netcoreapp + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release diff --git a/src/System.Console/tests/Performance/Configurations.props b/src/System.Console/tests/Performance/Configurations.props index 2845c11c541d..c398e42e8994 100644 --- a/src/System.Console/tests/Performance/Configurations.props +++ b/src/System.Console/tests/Performance/Configurations.props @@ -2,7 +2,7 @@ - netcoreapp; + netstandard; \ No newline at end of file diff --git a/src/System.Console/tests/Performance/System.Console.Performance.Tests.csproj b/src/System.Console/tests/Performance/System.Console.Performance.Tests.csproj index 3c20273d14a4..a76a6a3e1590 100644 --- a/src/System.Console/tests/Performance/System.Console.Performance.Tests.csproj +++ b/src/System.Console/tests/Performance/System.Console.Performance.Tests.csproj @@ -1,9 +1,8 @@ true - true {14BE0BA2-28BC-467A-AA76-C6B86D21FDAE} - netcoreapp-Debug;netcoreapp-Release + netstandard-Debug;netstandard-Release @@ -11,9 +10,6 @@ Common\System\PerfUtils.cs - - - {69e46a6f-9966-45a5-8945-2559fe337827} diff --git a/src/System.Diagnostics.Process/tests/Performance/Configurations.props b/src/System.Diagnostics.Process/tests/Performance/Configurations.props index 2845c11c541d..c398e42e8994 100644 --- a/src/System.Diagnostics.Process/tests/Performance/Configurations.props +++ b/src/System.Diagnostics.Process/tests/Performance/Configurations.props @@ -2,7 +2,7 @@ - netcoreapp; + netstandard; \ No newline at end of file diff --git a/src/System.Diagnostics.Process/tests/Performance/System.Diagnostics.Process.Performance.Tests.csproj b/src/System.Diagnostics.Process/tests/Performance/System.Diagnostics.Process.Performance.Tests.csproj index 570abf57762e..200c0063df51 100644 --- a/src/System.Diagnostics.Process/tests/Performance/System.Diagnostics.Process.Performance.Tests.csproj +++ b/src/System.Diagnostics.Process/tests/Performance/System.Diagnostics.Process.Performance.Tests.csproj @@ -1,9 +1,8 @@ true - true {4E05E43A-1DC9-47C7-8280-13CF4EF741EA} - netcoreapp-Debug;netcoreapp-Release + netstandard-Debug;netstandard-Release @@ -24,12 +23,6 @@ Common\System\ShouldNotBeInvokedException.cs - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - {69e46a6f-9966-45a5-8945-2559fe337827} diff --git a/src/System.Drawing.Common/tests/Performance/Configurations.props b/src/System.Drawing.Common/tests/Performance/Configurations.props index d3ac8a63c74a..78953dfc8851 100644 --- a/src/System.Drawing.Common/tests/Performance/Configurations.props +++ b/src/System.Drawing.Common/tests/Performance/Configurations.props @@ -2,7 +2,7 @@ - netcoreapp; + netstandard; diff --git a/src/System.Drawing.Common/tests/Performance/System.Drawing.Common.Performance.Tests.csproj b/src/System.Drawing.Common/tests/Performance/System.Drawing.Common.Performance.Tests.csproj index 2b7c8bf34040..5b62da57f807 100644 --- a/src/System.Drawing.Common/tests/Performance/System.Drawing.Common.Performance.Tests.csproj +++ b/src/System.Drawing.Common/tests/Performance/System.Drawing.Common.Performance.Tests.csproj @@ -1,20 +1,14 @@ - - + InnerLoop;OuterLoop - true {E66FFA55-0975-4F0D-8A18-24B2687FEDEA} - netcoreapp-Debug;netcoreapp-Release + netstandard-Debug;netstandard-Release - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - Common\System\PerfUtils.cs @@ -31,7 +25,4 @@ PerfRunner - - - \ No newline at end of file diff --git a/src/System.Globalization/tests/Performance/Configurations.props b/src/System.Globalization/tests/Performance/Configurations.props index 2845c11c541d..c398e42e8994 100644 --- a/src/System.Globalization/tests/Performance/Configurations.props +++ b/src/System.Globalization/tests/Performance/Configurations.props @@ -2,7 +2,7 @@ - netcoreapp; + netstandard; \ No newline at end of file diff --git a/src/System.Globalization/tests/Performance/System.Globalization.Performance.Tests.csproj b/src/System.Globalization/tests/Performance/System.Globalization.Performance.Tests.csproj index 47e404b4c1ab..ad35fcefe7b0 100644 --- a/src/System.Globalization/tests/Performance/System.Globalization.Performance.Tests.csproj +++ b/src/System.Globalization/tests/Performance/System.Globalization.Performance.Tests.csproj @@ -1,8 +1,7 @@ - true {0BA6851E-0E75-453D-9D2A-CEB94E4DE975} - netcoreapp-Debug;netcoreapp-Release + netstandard-Debug;netstandard-Release diff --git a/src/System.IO.Compression.Brotli/tests/Performance/System.IO.Compression.Brotli.Performance.Tests.csproj b/src/System.IO.Compression.Brotli/tests/Performance/System.IO.Compression.Brotli.Performance.Tests.csproj index 55a45a075f1d..19aa55a4b45c 100644 --- a/src/System.IO.Compression.Brotli/tests/Performance/System.IO.Compression.Brotli.Performance.Tests.csproj +++ b/src/System.IO.Compression.Brotli/tests/Performance/System.IO.Compression.Brotli.Performance.Tests.csproj @@ -1,7 +1,5 @@ - System.IO.Compression.Brotli.Performance.Tests - true {1341F8C8-637A-49A1-BE0F-13867A634929} netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release diff --git a/src/System.IO.Compression/tests/Performance/Configurations.props b/src/System.IO.Compression/tests/Performance/Configurations.props index 2845c11c541d..c398e42e8994 100644 --- a/src/System.IO.Compression/tests/Performance/Configurations.props +++ b/src/System.IO.Compression/tests/Performance/Configurations.props @@ -2,7 +2,7 @@ - netcoreapp; + netstandard; \ No newline at end of file diff --git a/src/System.IO.Compression/tests/Performance/System.IO.Compression.Performance.Tests.csproj b/src/System.IO.Compression/tests/Performance/System.IO.Compression.Performance.Tests.csproj index dbc6e6adc94b..a0bd49ae3548 100644 --- a/src/System.IO.Compression/tests/Performance/System.IO.Compression.Performance.Tests.csproj +++ b/src/System.IO.Compression/tests/Performance/System.IO.Compression.Performance.Tests.csproj @@ -1,9 +1,7 @@ - System.IO.Compression.Performance.Tests - true {13C0F956-FB7B-4882-A411-39B8E22463D2} - netcoreapp-Debug;netcoreapp-Release + netstandard-Debug;netstandard-Release diff --git a/src/System.IO.FileSystem/tests/Performance/System.IO.FileSystem.Performance.Tests.csproj b/src/System.IO.FileSystem/tests/Performance/System.IO.FileSystem.Performance.Tests.csproj index fc2a4f51410c..5b7b0cd835cf 100644 --- a/src/System.IO.FileSystem/tests/Performance/System.IO.FileSystem.Performance.Tests.csproj +++ b/src/System.IO.FileSystem/tests/Performance/System.IO.FileSystem.Performance.Tests.csproj @@ -1,15 +1,10 @@ InnerLoop;OuterLoop - true {3C42F714-82AF-4A43-9B9C-744DE31B5C5D} netstandard-Debug;netstandard-Release - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - @@ -34,7 +29,4 @@ PerfRunner - - - \ No newline at end of file diff --git a/src/System.IO.MemoryMappedFiles/tests/Performance/System.IO.MemoryMappedFiles.Performance.Tests.csproj b/src/System.IO.MemoryMappedFiles/tests/Performance/System.IO.MemoryMappedFiles.Performance.Tests.csproj index d1cfb5257118..3b9bd34ec287 100644 --- a/src/System.IO.MemoryMappedFiles/tests/Performance/System.IO.MemoryMappedFiles.Performance.Tests.csproj +++ b/src/System.IO.MemoryMappedFiles/tests/Performance/System.IO.MemoryMappedFiles.Performance.Tests.csproj @@ -1,7 +1,6 @@ true - true {41CAE9F4-0FFB-4FD1-9413-039C3C561DEE} netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release @@ -20,12 +19,6 @@ Common\System\PerfUtils.cs - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - {69e46a6f-9966-45a5-8945-2559fe337827} diff --git a/src/System.IO.Pipes/tests/Performance/System.IO.Pipes.Performance.Tests.csproj b/src/System.IO.Pipes/tests/Performance/System.IO.Pipes.Performance.Tests.csproj index 9cf9a24e5af0..aeca59879bae 100644 --- a/src/System.IO.Pipes/tests/Performance/System.IO.Pipes.Performance.Tests.csproj +++ b/src/System.IO.Pipes/tests/Performance/System.IO.Pipes.Performance.Tests.csproj @@ -1,11 +1,9 @@ true - true {7A8B72D7-FACD-4E96-8390-F2D2FE269687} netstandard-Debug;netstandard-Release - @@ -15,12 +13,6 @@ Common\System\PerfUtils.cs - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - {69e46a6f-9966-45a5-8945-2559fe337827} diff --git a/src/System.Linq.Parallel/tests/Performance/Configurations.props b/src/System.Linq.Parallel/tests/Performance/Configurations.props index 2845c11c541d..c398e42e8994 100644 --- a/src/System.Linq.Parallel/tests/Performance/Configurations.props +++ b/src/System.Linq.Parallel/tests/Performance/Configurations.props @@ -2,7 +2,7 @@ - netcoreapp; + netstandard; \ No newline at end of file diff --git a/src/System.Linq.Parallel/tests/Performance/System.Linq.Parallel.Performance.Tests.csproj b/src/System.Linq.Parallel/tests/Performance/System.Linq.Parallel.Performance.Tests.csproj index 41cf18576ddf..a83b93f051fb 100644 --- a/src/System.Linq.Parallel/tests/Performance/System.Linq.Parallel.Performance.Tests.csproj +++ b/src/System.Linq.Parallel/tests/Performance/System.Linq.Parallel.Performance.Tests.csproj @@ -1,11 +1,8 @@ - - + - true {11ABE2F8-4FB9-48AC-91AA-D04503059550} - netcoreapp-Debug;netcoreapp-Release + netstandard-Debug;netstandard-Release - Common\System\PerfUtils.cs @@ -38,7 +35,4 @@ PerfRunner - - - \ No newline at end of file diff --git a/src/System.Linq/tests/Performance/Configurations.props b/src/System.Linq/tests/Performance/Configurations.props index 2845c11c541d..c398e42e8994 100644 --- a/src/System.Linq/tests/Performance/Configurations.props +++ b/src/System.Linq/tests/Performance/Configurations.props @@ -2,7 +2,7 @@ - netcoreapp; + netstandard; \ No newline at end of file diff --git a/src/System.Linq/tests/Performance/System.Linq.Performance.Tests.csproj b/src/System.Linq/tests/Performance/System.Linq.Performance.Tests.csproj index e0968310b5e2..64d6d289504e 100644 --- a/src/System.Linq/tests/Performance/System.Linq.Performance.Tests.csproj +++ b/src/System.Linq/tests/Performance/System.Linq.Performance.Tests.csproj @@ -1,8 +1,7 @@ - true {28FB26C9-E425-4E50-9D1D-08F34560E86E} - netcoreapp-Debug;netcoreapp-Release + netstandard-Debug;netstandard-Release diff --git a/src/System.Memory/tests/Performance/Configurations.props b/src/System.Memory/tests/Performance/Configurations.props index 2845c11c541d..8b803e0772f2 100644 --- a/src/System.Memory/tests/Performance/Configurations.props +++ b/src/System.Memory/tests/Performance/Configurations.props @@ -3,6 +3,7 @@ netcoreapp; + netstandard; \ No newline at end of file diff --git a/src/System.Memory/tests/Performance/Perf.Base64EncodeDecode.cs b/src/System.Memory/tests/Performance/Perf.Base64EncodeDecode.cs index b5375e08b8d1..a2e8cbb9130f 100644 --- a/src/System.Memory/tests/Performance/Perf.Base64EncodeDecode.cs +++ b/src/System.Memory/tests/Performance/Perf.Base64EncodeDecode.cs @@ -128,6 +128,7 @@ private static void Base64DecodeDetinationTooSmall(int numberOfBytes) } } +#if netcoreapp [Benchmark(InnerIterationCount = InnerCount)] [InlineData(10)] [InlineData(100)] @@ -148,6 +149,7 @@ private static void Base64DecodeBaseline(int numberOfBytes) } } } +#endif [Benchmark(InnerIterationCount = InnerCount)] [InlineData(10)] diff --git a/src/System.Memory/tests/Performance/Perf.Span.IndexOf.cs b/src/System.Memory/tests/Performance/Perf.Span.IndexOf.cs index 211a93ea17e7..9f124d33a1ba 100644 --- a/src/System.Memory/tests/Performance/Perf.Span.IndexOf.cs +++ b/src/System.Memory/tests/Performance/Perf.Span.IndexOf.cs @@ -210,6 +210,7 @@ public void SpanIndexOfSpanComparison(string input, string value, StringComparis } } +#if netcoreapp [Benchmark] [MemberData(nameof(s_indexTestData))] public void SpanLastIndexOfSpanComparison(string input, string value, StringComparison comparisonType) @@ -223,5 +224,6 @@ public void SpanLastIndexOfSpanComparison(string input, string value, StringComp inputSpan.LastIndexOf(valueSpan, comparisonType); } } +#endif } } diff --git a/src/System.Memory/tests/Performance/System.Memory.Performance.Tests.csproj b/src/System.Memory/tests/Performance/System.Memory.Performance.Tests.csproj index a1e7cdea7f57..346dd503b9e3 100644 --- a/src/System.Memory/tests/Performance/System.Memory.Performance.Tests.csproj +++ b/src/System.Memory/tests/Performance/System.Memory.Performance.Tests.csproj @@ -1,9 +1,9 @@ - true true {18482C55-6B57-41E8-BBC4-383B9E2C7AA2} - netcoreapp-Debug;netcoreapp-Release + $(DefineConstants);netcoreapp + netstandard-Debug;netstandard-Release @@ -48,7 +48,4 @@ PerfRunner - - - \ No newline at end of file diff --git a/src/System.Net.Http/tests/Performance/System.Net.Http.Performance.Tests.csproj b/src/System.Net.Http/tests/Performance/System.Net.Http.Performance.Tests.csproj index 7e695d6c82cf..e530cfbc710b 100644 --- a/src/System.Net.Http/tests/Performance/System.Net.Http.Performance.Tests.csproj +++ b/src/System.Net.Http/tests/Performance/System.Net.Http.Performance.Tests.csproj @@ -1,10 +1,8 @@ - true {981FC867-9071-444D-9388-BC5826609F76} netcoreapp-Debug;netcoreapp-Release - @@ -23,7 +21,4 @@ - - - \ No newline at end of file diff --git a/src/System.Net.Primitives/tests/PerformanceTests/System.Net.Primitives.Performance.Tests.csproj b/src/System.Net.Primitives/tests/PerformanceTests/System.Net.Primitives.Performance.Tests.csproj index f6778d188e7b..373295be6a0e 100644 --- a/src/System.Net.Primitives/tests/PerformanceTests/System.Net.Primitives.Performance.Tests.csproj +++ b/src/System.Net.Primitives/tests/PerformanceTests/System.Net.Primitives.Performance.Tests.csproj @@ -1,7 +1,6 @@ {86256B36-4C78-4A71-A80A-CCA35C4AE758} - true netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release diff --git a/src/System.Net.Sockets/tests/ManualPerformanceTests/System.Net.Sockets.Async.Performance.Tests.csproj b/src/System.Net.Sockets/tests/ManualPerformanceTests/System.Net.Sockets.Async.Performance.Tests.csproj index 64119ab67059..30dcbf2ce708 100644 --- a/src/System.Net.Sockets/tests/ManualPerformanceTests/System.Net.Sockets.Async.Performance.Tests.csproj +++ b/src/System.Net.Sockets/tests/ManualPerformanceTests/System.Net.Sockets.Async.Performance.Tests.csproj @@ -63,7 +63,4 @@ PerfRunner - - - \ No newline at end of file diff --git a/src/System.Net.Sockets/tests/Performance/Configurations.props b/src/System.Net.Sockets/tests/Performance/Configurations.props index 2845c11c541d..8b803e0772f2 100644 --- a/src/System.Net.Sockets/tests/Performance/Configurations.props +++ b/src/System.Net.Sockets/tests/Performance/Configurations.props @@ -3,6 +3,7 @@ netcoreapp; + netstandard; \ No newline at end of file diff --git a/src/System.Net.Sockets/tests/Performance/Perf.Socket.SendReceive.cs b/src/System.Net.Sockets/tests/Performance/Perf.Socket.SendReceive.cs index ac8ed2c9924b..c9a119ab284e 100644 --- a/src/System.Net.Sockets/tests/Performance/Perf.Socket.SendReceive.cs +++ b/src/System.Net.Sockets/tests/Performance/Perf.Socket.SendReceive.cs @@ -12,6 +12,7 @@ namespace System.Net.Sockets.Tests { public class SocketSendReceivePerfTest { +#if netcoreapp [Benchmark(InnerIterationCount = 10_000), MeasureGCAllocations] public async Task SendAsyncThenReceiveAsync_Task() { @@ -56,6 +57,7 @@ await OpenLoopbackConnectionAsync(async (client, server) => } }); } +#endif [Benchmark(InnerIterationCount = 10_000), MeasureGCAllocations] public async Task SendAsyncThenReceiveAsync_SocketAsyncEventArgs() diff --git a/src/System.Net.Sockets/tests/Performance/System.Net.Sockets.Performance.Tests.csproj b/src/System.Net.Sockets/tests/Performance/System.Net.Sockets.Performance.Tests.csproj index 5a66c47653e8..f483f3b2253b 100644 --- a/src/System.Net.Sockets/tests/Performance/System.Net.Sockets.Performance.Tests.csproj +++ b/src/System.Net.Sockets/tests/Performance/System.Net.Sockets.Performance.Tests.csproj @@ -1,10 +1,9 @@ - true {02092D8A-E8C4-414A-B6FB-470BD1EC9242} - netcoreapp-Debug;netcoreapp-Release + $(DefineConstants);netcoreapp + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release - @@ -17,7 +16,4 @@ PerfRunner - - - \ No newline at end of file diff --git a/src/System.Numerics.Vectors/tests/Performance/Configurations.props b/src/System.Numerics.Vectors/tests/Performance/Configurations.props index 2845c11c541d..8b803e0772f2 100644 --- a/src/System.Numerics.Vectors/tests/Performance/Configurations.props +++ b/src/System.Numerics.Vectors/tests/Performance/Configurations.props @@ -3,6 +3,7 @@ netcoreapp; + netstandard; \ No newline at end of file diff --git a/src/System.Numerics.Vectors/tests/Performance/Constructor/GenericVectorConstructorTests.cs b/src/System.Numerics.Vectors/tests/Performance/Constructor/GenericVectorConstructorTests.cs index e0f9d1efae6e..a887935a6e62 100644 --- a/src/System.Numerics.Vectors/tests/Performance/Constructor/GenericVectorConstructorTests.cs +++ b/src/System.Numerics.Vectors/tests/Performance/Constructor/GenericVectorConstructorTests.cs @@ -19,6 +19,7 @@ public static class Constructor public const int DefaultInnerIterationsCount = 100000000; +#if netcoreapp [Benchmark(InnerIterationCount = DefaultInnerIterationsCount)] public static void ConstructorBenchmark_Byte() { @@ -159,7 +160,6 @@ public static void ConstructorBenchmark_Double() } } - public static void Construct(Span values) where T : struct { for (var iteration = 0; iteration < Benchmark.InnerIterationCount; iteration++) @@ -167,6 +167,7 @@ public static void Construct(Span values) where T : struct Vector vect = new Vector(values); } } +#endif [Benchmark(InnerIterationCount = DefaultInnerIterationsCount)] public static void SpanCastBenchmark_Byte() diff --git a/src/System.Numerics.Vectors/tests/Performance/System.Numerics.Vectors.Performance.Tests.csproj b/src/System.Numerics.Vectors/tests/Performance/System.Numerics.Vectors.Performance.Tests.csproj index 0e888957c99d..655d7a8f38ab 100644 --- a/src/System.Numerics.Vectors/tests/Performance/System.Numerics.Vectors.Performance.Tests.csproj +++ b/src/System.Numerics.Vectors/tests/Performance/System.Numerics.Vectors.Performance.Tests.csproj @@ -1,11 +1,10 @@ - Properties true - true {D9906F1A-A41A-43CD-81D2-BA94CF0001C9} true - netcoreapp-Debug;netcoreapp-Release + $(DefineConstants);netcoreapp + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release @@ -65,10 +64,6 @@ GenericVectorConstructorTests.cs - - - - Util.cs diff --git a/src/System.Private.Xml/tests/XmlDocument/Performance/Configurations.props b/src/System.Private.Xml/tests/XmlDocument/Performance/Configurations.props index 2845c11c541d..c398e42e8994 100644 --- a/src/System.Private.Xml/tests/XmlDocument/Performance/Configurations.props +++ b/src/System.Private.Xml/tests/XmlDocument/Performance/Configurations.props @@ -2,7 +2,7 @@ - netcoreapp; + netstandard; \ No newline at end of file diff --git a/src/System.Private.Xml/tests/XmlDocument/Performance/System.Xml.XmlDocument.Performance.Tests.csproj b/src/System.Private.Xml/tests/XmlDocument/Performance/System.Xml.XmlDocument.Performance.Tests.csproj index 97bcd51aedee..e6180fca53b6 100644 --- a/src/System.Private.Xml/tests/XmlDocument/Performance/System.Xml.XmlDocument.Performance.Tests.csproj +++ b/src/System.Private.Xml/tests/XmlDocument/Performance/System.Xml.XmlDocument.Performance.Tests.csproj @@ -1,12 +1,9 @@ {8A7370E5-BF89-4BCF-ACCD-BA298869055B} - netcoreapp-Debug;netcoreapp-Release + netstandard-Debug;netstandard-Release - - true - diff --git a/src/System.Private.Xml/tests/XmlDocument/System.Xml.XmlDocument.Tests.csproj b/src/System.Private.Xml/tests/XmlDocument/System.Xml.XmlDocument.Tests.csproj index 22d5b09acff0..085be276488f 100644 --- a/src/System.Private.Xml/tests/XmlDocument/System.Xml.XmlDocument.Tests.csproj +++ b/src/System.Private.Xml/tests/XmlDocument/System.Xml.XmlDocument.Tests.csproj @@ -94,13 +94,6 @@ - - - - - - Common\System\PerfUtils.cs - diff --git a/src/System.Private.Xml/tests/XmlSerializer/Performance/Configurations.props b/src/System.Private.Xml/tests/XmlSerializer/Performance/Configurations.props index 77a4b65bc94a..c398e42e8994 100644 --- a/src/System.Private.Xml/tests/XmlSerializer/Performance/Configurations.props +++ b/src/System.Private.Xml/tests/XmlSerializer/Performance/Configurations.props @@ -3,7 +3,6 @@ netstandard; - netcoreapp; \ No newline at end of file diff --git a/src/System.Private.Xml/tests/XmlSerializer/Performance/System.Xml.XmlSerializer.Performance.Tests.csproj b/src/System.Private.Xml/tests/XmlSerializer/Performance/System.Xml.XmlSerializer.Performance.Tests.csproj index dc1062a45afd..dd868c77b557 100644 --- a/src/System.Private.Xml/tests/XmlSerializer/Performance/System.Xml.XmlSerializer.Performance.Tests.csproj +++ b/src/System.Private.Xml/tests/XmlSerializer/Performance/System.Xml.XmlSerializer.Performance.Tests.csproj @@ -1,9 +1,8 @@ Properties - true {9891F9AC-9A0A-47DF-8D96-92B21AFC3B93} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netstandard-Debug;netstandard-Release diff --git a/src/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/System.Xml.XmlSerializer.ReflectionOnly.Tests.csproj b/src/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/System.Xml.XmlSerializer.ReflectionOnly.Tests.csproj index 2233aed3c5d5..1f211f499cfd 100644 --- a/src/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/System.Xml.XmlSerializer.ReflectionOnly.Tests.csproj +++ b/src/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/System.Xml.XmlSerializer.ReflectionOnly.Tests.csproj @@ -9,10 +9,8 @@ - - diff --git a/src/System.Runtime.Extensions/tests/Performance/Configurations.props b/src/System.Runtime.Extensions/tests/Performance/Configurations.props index 2845c11c541d..c398e42e8994 100644 --- a/src/System.Runtime.Extensions/tests/Performance/Configurations.props +++ b/src/System.Runtime.Extensions/tests/Performance/Configurations.props @@ -2,7 +2,7 @@ - netcoreapp; + netstandard; \ No newline at end of file diff --git a/src/System.Runtime.Extensions/tests/Performance/System.Runtime.Extensions.Performance.Tests.csproj b/src/System.Runtime.Extensions/tests/Performance/System.Runtime.Extensions.Performance.Tests.csproj index a25d8fb4d303..733a6bfae1b1 100644 --- a/src/System.Runtime.Extensions/tests/Performance/System.Runtime.Extensions.Performance.Tests.csproj +++ b/src/System.Runtime.Extensions/tests/Performance/System.Runtime.Extensions.Performance.Tests.csproj @@ -1,9 +1,8 @@ true - true {978FA427-F87B-46E2-B276-F5B727C50A01} - netcoreapp-Debug;netcoreapp-Release + netstandard-Debug;netstandard-Release @@ -15,19 +14,10 @@ - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - {69e46a6f-9966-45a5-8945-2559fe337827} PerfRunner - - - \ No newline at end of file diff --git a/src/System.Runtime.Numerics/tests/Performance/Configurations.props b/src/System.Runtime.Numerics/tests/Performance/Configurations.props index 2845c11c541d..8b803e0772f2 100644 --- a/src/System.Runtime.Numerics/tests/Performance/Configurations.props +++ b/src/System.Runtime.Numerics/tests/Performance/Configurations.props @@ -3,6 +3,7 @@ netcoreapp; + netstandard; \ No newline at end of file diff --git a/src/System.Runtime.Numerics/tests/BigInteger/PerformanceTests.cs b/src/System.Runtime.Numerics/tests/Performance/PerformanceTests.cs similarity index 100% rename from src/System.Runtime.Numerics/tests/BigInteger/PerformanceTests.cs rename to src/System.Runtime.Numerics/tests/Performance/PerformanceTests.cs diff --git a/src/System.Runtime.Numerics/tests/Performance/System.Runtime.Numerics.Performance.Tests.csproj b/src/System.Runtime.Numerics/tests/Performance/System.Runtime.Numerics.Performance.Tests.csproj index 7dc458018cae..fd64c88e47a4 100644 --- a/src/System.Runtime.Numerics/tests/Performance/System.Runtime.Numerics.Performance.Tests.csproj +++ b/src/System.Runtime.Numerics/tests/Performance/System.Runtime.Numerics.Performance.Tests.csproj @@ -1,11 +1,11 @@ - true {3842BE38-1A99-41B2-81B5-186E64077B95} true - netcoreapp-Debug;netcoreapp-Release + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + diff --git a/src/System.Runtime.Numerics/tests/System.Runtime.Numerics.Tests.csproj b/src/System.Runtime.Numerics/tests/System.Runtime.Numerics.Tests.csproj index fdb2db958baa..8938a34d05b4 100644 --- a/src/System.Runtime.Numerics/tests/System.Runtime.Numerics.Tests.csproj +++ b/src/System.Runtime.Numerics/tests/System.Runtime.Numerics.Tests.csproj @@ -44,7 +44,6 @@ - diff --git a/src/System.Runtime.Serialization.Json/tests/Performance/Configurations.props b/src/System.Runtime.Serialization.Json/tests/Performance/Configurations.props index 77a4b65bc94a..c398e42e8994 100644 --- a/src/System.Runtime.Serialization.Json/tests/Performance/Configurations.props +++ b/src/System.Runtime.Serialization.Json/tests/Performance/Configurations.props @@ -3,7 +3,6 @@ netstandard; - netcoreapp; \ No newline at end of file diff --git a/src/System.Runtime.Serialization.Json/tests/Performance/System.Runtime.Serialization.Json.Performance.Tests.csproj b/src/System.Runtime.Serialization.Json/tests/Performance/System.Runtime.Serialization.Json.Performance.Tests.csproj index 16060175cae0..19d4b4c80abb 100644 --- a/src/System.Runtime.Serialization.Json/tests/Performance/System.Runtime.Serialization.Json.Performance.Tests.csproj +++ b/src/System.Runtime.Serialization.Json/tests/Performance/System.Runtime.Serialization.Json.Performance.Tests.csproj @@ -1,8 +1,7 @@ - Properties {F6836E5C-BFA0-4E92-ADEE-87E797D7C90C} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netstandard-Debug;netstandard-Release diff --git a/src/System.Runtime.Serialization.Xml/tests/Performance/Configurations.props b/src/System.Runtime.Serialization.Xml/tests/Performance/Configurations.props index 77a4b65bc94a..c398e42e8994 100644 --- a/src/System.Runtime.Serialization.Xml/tests/Performance/Configurations.props +++ b/src/System.Runtime.Serialization.Xml/tests/Performance/Configurations.props @@ -3,7 +3,6 @@ netstandard; - netcoreapp; \ No newline at end of file diff --git a/src/System.Runtime.Serialization.Xml/tests/Performance/System.Runtime.Serialization.Xml.Performance.Tests.csproj b/src/System.Runtime.Serialization.Xml/tests/Performance/System.Runtime.Serialization.Xml.Performance.Tests.csproj index 5b376121a29e..006d4840d2b7 100644 --- a/src/System.Runtime.Serialization.Xml/tests/Performance/System.Runtime.Serialization.Xml.Performance.Tests.csproj +++ b/src/System.Runtime.Serialization.Xml/tests/Performance/System.Runtime.Serialization.Xml.Performance.Tests.csproj @@ -1,9 +1,7 @@ - Properties - true {122A5432-C5B7-4293-AFDA-B24F4D54FDEF} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netstandard-Debug;netstandard-Release diff --git a/src/System.Runtime/tests/Performance/Configurations.props b/src/System.Runtime/tests/Performance/Configurations.props index 2845c11c541d..8b803e0772f2 100644 --- a/src/System.Runtime/tests/Performance/Configurations.props +++ b/src/System.Runtime/tests/Performance/Configurations.props @@ -3,6 +3,7 @@ netcoreapp; + netstandard; \ No newline at end of file diff --git a/src/System.Runtime/tests/Performance/Perf.HashCode.cs b/src/System.Runtime/tests/Performance/Perf.HashCode.netcoreapp.cs similarity index 100% rename from src/System.Runtime/tests/Performance/Perf.HashCode.cs rename to src/System.Runtime/tests/Performance/Perf.HashCode.netcoreapp.cs diff --git a/src/System.Runtime/tests/Performance/Perf.Int32.cs b/src/System.Runtime/tests/Performance/Perf.Int32.cs index 310d32ec4774..66d1b30e3349 100644 --- a/src/System.Runtime/tests/Performance/Perf.Int32.cs +++ b/src/System.Runtime/tests/Performance/Perf.Int32.cs @@ -13,7 +13,9 @@ public class Perf_Int32 private const int InnerCount = 500_000; private static string s_resultString; +#if netcoreapp private static int s_resultInt32; +#endif public static object[][] Int32Values => new[] { @@ -44,6 +46,7 @@ public void ToString(int value) } } +#if netcoreapp [Benchmark(InnerIterationCount = InnerCount)] [MemberData(nameof(Int32Values))] public void TryFormat(int value) @@ -83,5 +86,6 @@ private void Parse(int value, string format, NumberStyles styles) } } } +#endif } } diff --git a/src/System.Runtime/tests/Performance/Perf.Int64.cs b/src/System.Runtime/tests/Performance/Perf.Int64.cs index 3f6ccc0da3a1..f4eee80cec94 100644 --- a/src/System.Runtime/tests/Performance/Perf.Int64.cs +++ b/src/System.Runtime/tests/Performance/Perf.Int64.cs @@ -13,8 +13,10 @@ public class Perf_Int64 private const int InnerCount = 500_000; private static string s_resultString; +#if netcoreapp private static int s_resultInt32; private static long s_resultInt64; +#endif public static object[][] Int64Values => new[] { @@ -79,6 +81,7 @@ public void ToString(long value) } } +#if netcoreapp [Benchmark(InnerIterationCount = InnerCount)] [MemberData(nameof(Int64Values))] public void TryFormat(long value) @@ -118,5 +121,6 @@ private void Parse(long value, string format, NumberStyles styles) } } } +#endif } } diff --git a/src/System.Runtime/tests/Performance/Perf.UInt32.cs b/src/System.Runtime/tests/Performance/Perf.UInt32.cs index 37695897ab07..882d2fb1cad9 100644 --- a/src/System.Runtime/tests/Performance/Perf.UInt32.cs +++ b/src/System.Runtime/tests/Performance/Perf.UInt32.cs @@ -12,8 +12,10 @@ public class Perf_UInt32 private const int InnerCount = 500_000; private static string s_resultString; +#if netcoreapp private static int s_resultInt32; private static uint s_resultUInt32; +#endif public static object[][] UInt32Values => new[] { @@ -40,6 +42,7 @@ public void ToString(uint value) } } +#if netcoreapp [Benchmark(InnerIterationCount = InnerCount)] [MemberData(nameof(UInt32Values))] public void TryFormat(uint value) @@ -73,5 +76,6 @@ public void Parse(uint value) } } } +#endif } } diff --git a/src/System.Runtime/tests/Performance/Perf.UInt64.cs b/src/System.Runtime/tests/Performance/Perf.UInt64.cs index 30b903d24717..37a560461a8b 100644 --- a/src/System.Runtime/tests/Performance/Perf.UInt64.cs +++ b/src/System.Runtime/tests/Performance/Perf.UInt64.cs @@ -12,8 +12,10 @@ public class Perf_UInt64 private const int InnerCount = 100_000; private static string s_resultString; +#if netcoreapp private static int s_resultInt32; private static ulong s_resultUInt64; +#endif public static object[][] UInt64Values => new[] { @@ -59,6 +61,7 @@ public void ToString(ulong value) } } +#if netcoreapp [Benchmark(InnerIterationCount = InnerCount)] [MemberData(nameof(UInt64Values))] public void TryFormat(ulong value) @@ -92,5 +95,6 @@ public void Parse(ulong value) } } } +#endif } } diff --git a/src/System.Runtime/tests/Performance/System.Runtime.Performance.Tests.csproj b/src/System.Runtime/tests/Performance/System.Runtime.Performance.Tests.csproj index 8823fb701801..d4f9467f5e0e 100644 --- a/src/System.Runtime/tests/Performance/System.Runtime.Performance.Tests.csproj +++ b/src/System.Runtime/tests/Performance/System.Runtime.Performance.Tests.csproj @@ -2,9 +2,9 @@ true 1718 - true {E9560F70-79F5-453A-B518-0292CFE4A6AD} - netcoreapp-Debug;netcoreapp-Release + $(DefineConstants);netcoreapp + netstandard-Debug;netstandard-Release;netcoreapp-Debug;netcoreapp-Release @@ -14,7 +14,6 @@ - @@ -30,7 +29,8 @@ - + + @@ -38,7 +38,4 @@ PerfRunner - - - \ No newline at end of file diff --git a/src/System.Security.Cryptography.Primitives/tests/Performance/System.Security.Cryptography.Primitives.Performance.Tests.csproj b/src/System.Security.Cryptography.Primitives/tests/Performance/System.Security.Cryptography.Primitives.Performance.Tests.csproj index 000ec104a7d1..5013402fd5d5 100644 --- a/src/System.Security.Cryptography.Primitives/tests/Performance/System.Security.Cryptography.Primitives.Performance.Tests.csproj +++ b/src/System.Security.Cryptography.Primitives/tests/Performance/System.Security.Cryptography.Primitives.Performance.Tests.csproj @@ -1,18 +1,17 @@ - true {FB3EA273-567D-414F-B36D-3698BE8D198B} netcoreapp-Debug;netcoreapp-Release + Common\System\PerfUtils.cs CommonTest\System\Security\Cryptography\ByteUtils.cs - @@ -20,7 +19,4 @@ PerfRunner - - - \ No newline at end of file diff --git a/src/System.Text.Encoding/tests/Performance/Configurations.props b/src/System.Text.Encoding/tests/Performance/Configurations.props index 2845c11c541d..c398e42e8994 100644 --- a/src/System.Text.Encoding/tests/Performance/Configurations.props +++ b/src/System.Text.Encoding/tests/Performance/Configurations.props @@ -2,7 +2,7 @@ - netcoreapp; + netstandard; \ No newline at end of file diff --git a/src/System.Text.Encoding/tests/Performance/System.Text.Encoding.Performance.Tests.csproj b/src/System.Text.Encoding/tests/Performance/System.Text.Encoding.Performance.Tests.csproj index ca433d5e93fa..1c9affa37235 100644 --- a/src/System.Text.Encoding/tests/Performance/System.Text.Encoding.Performance.Tests.csproj +++ b/src/System.Text.Encoding/tests/Performance/System.Text.Encoding.Performance.Tests.csproj @@ -1,9 +1,8 @@ - true true {859C92CB-72FB-453C-A363-7CD025E29B1D} - netcoreapp-Debug;netcoreapp-Release + netstandard-Debug;netstandard-Release diff --git a/src/System.Text.RegularExpressions/tests/Performance/Configurations.props b/src/System.Text.RegularExpressions/tests/Performance/Configurations.props index 2845c11c541d..c398e42e8994 100644 --- a/src/System.Text.RegularExpressions/tests/Performance/Configurations.props +++ b/src/System.Text.RegularExpressions/tests/Performance/Configurations.props @@ -2,7 +2,7 @@ - netcoreapp; + netstandard; \ No newline at end of file diff --git a/src/System.Text.RegularExpressions/tests/Performance/System.Text.RegularExpressions.Performance.Tests.csproj b/src/System.Text.RegularExpressions/tests/Performance/System.Text.RegularExpressions.Performance.Tests.csproj index 2c32e01fd76f..bb6b7ff37166 100644 --- a/src/System.Text.RegularExpressions/tests/Performance/System.Text.RegularExpressions.Performance.Tests.csproj +++ b/src/System.Text.RegularExpressions/tests/Performance/System.Text.RegularExpressions.Performance.Tests.csproj @@ -1,10 +1,8 @@ - true {7F4B8C48-8692-4885-BF84-FEB7EA82E34B} - netcoreapp-Debug;netcoreapp-Release + netstandard-Debug;netstandard-Release - diff --git a/src/System.Threading.Channels/tests/Performance/System.Threading.Channels.Performance.Tests.csproj b/src/System.Threading.Channels/tests/Performance/System.Threading.Channels.Performance.Tests.csproj index ab3d65b14010..0eb4a5c7c5fc 100644 --- a/src/System.Threading.Channels/tests/Performance/System.Threading.Channels.Performance.Tests.csproj +++ b/src/System.Threading.Channels/tests/Performance/System.Threading.Channels.Performance.Tests.csproj @@ -1,10 +1,8 @@ - true {856BC941-58C3-4568-AAF2-238349DFA53E} netcoreapp-Debug;netcoreapp-Release - diff --git a/src/System.Threading.Tasks.Extensions/tests/Performance/System.Threading.Tasks.Extensions.Performance.Tests.csproj b/src/System.Threading.Tasks.Extensions/tests/Performance/System.Threading.Tasks.Extensions.Performance.Tests.csproj index 15f06164bea9..503ba554d196 100644 --- a/src/System.Threading.Tasks.Extensions/tests/Performance/System.Threading.Tasks.Extensions.Performance.Tests.csproj +++ b/src/System.Threading.Tasks.Extensions/tests/Performance/System.Threading.Tasks.Extensions.Performance.Tests.csproj @@ -1,10 +1,8 @@ - true {77E38A48-61ED-4D79-9136-D88617EE3558} netcoreapp-Debug;netcoreapp-Release - diff --git a/src/System.Threading/tests/Performance/Configurations.props b/src/System.Threading/tests/Performance/Configurations.props index 2845c11c541d..c398e42e8994 100644 --- a/src/System.Threading/tests/Performance/Configurations.props +++ b/src/System.Threading/tests/Performance/Configurations.props @@ -2,7 +2,7 @@ - netcoreapp; + netstandard; \ No newline at end of file diff --git a/src/System.Threading/tests/Performance/System.Threading.Performance.Tests.csproj b/src/System.Threading/tests/Performance/System.Threading.Performance.Tests.csproj index 4c117a6d0716..8e8a57336086 100644 --- a/src/System.Threading/tests/Performance/System.Threading.Performance.Tests.csproj +++ b/src/System.Threading/tests/Performance/System.Threading.Performance.Tests.csproj @@ -1,8 +1,7 @@ - true {7AB03FFA-7D4D-4248-9702-3D2785859C18} - netcoreapp-Debug;netcoreapp-Release + netstandard-Debug;netstandard-Release @@ -15,13 +14,6 @@ - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - - {69e46a6f-9966-45a5-8945-2559fe337827} diff --git a/src/tests.builds b/src/tests.builds index 158b51e3f1b7..553853940722 100644 --- a/src/tests.builds +++ b/src/tests.builds @@ -18,7 +18,7 @@ - + true @@ -26,8 +26,8 @@ - <_ProjectPattern Condition="'$(Performance)'!='true'">.Tests - <_ProjectPattern Condition="'$(Performance)'=='true'">.Performance.Tests + <_ProjectPattern Condition="'$(Performance)' != 'true'">.Tests + <_ProjectPattern Condition="'$(Performance)' == 'true'">.Performance.Tests From 591f0b5ba2c0ddcdad1a326eb327936cb2dd40d8 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 21 Aug 2018 15:48:23 +0200 Subject: [PATCH 5/6] Xunit 2.4 test changes --- Directory.Build.props | 1 + dependencies.props | 4 +- .../Microsoft.XmlSerializer.Generator.csproj | 2 - .../tests/ImmutableArrayTest.cs | 265 ++++++++---------- .../SortedSet/SortedSet.TreeSubSet.Tests.cs | 12 +- .../ValidationAttributeTestBase.cs | 3 + ...ostics.FileVersionInfo.TestAssembly.csproj | 8 - .../FileVersionInfoTest.Unix.cs | 4 +- .../FileVersionInfoTest.cs | 8 +- src/System.Drawing.Common/tests/IconTests.cs | 2 +- .../tests/Directory/CreateDirectory.cs | 7 +- src/System.IO.FileSystem/tests/File/Move.cs | 5 +- .../tests/ParallelEnumerableTests.cs | 6 +- .../QueryOperators/DefaultIfEmptyTests.cs | 2 + src/System.Linq/System.Linq.sln | 8 +- src/System.Linq/tests/CountTests.cs | 14 +- src/System.Linq/tests/DistinctTests.cs | 14 +- .../tests/GroupByTests.DebuggerAttributes.cs | 16 +- src/System.Linq/tests/ReverseTests.cs | 9 +- .../tests/ToLookupTests.DebuggerAttributes.cs | 18 +- .../tests/AssemblyNameTests.cs | 8 +- src/System.Reflection/tests/AssemblyTests.cs | 6 - ...m.Reflection.Tests.Assembly_1_0_0_0.csproj | 2 +- .../tests/System/AppDomainTests.cs | 2 +- src/System.Runtime/tests/System/ArrayTests.cs | 80 +++--- .../Reflection/InvokeRefReturn.netcoreapp.cs | 7 +- .../tests/ReferenceTest.cs | 11 +- .../tests/SignedXmlTest.cs | 15 +- .../tests/XmlDecryptionTransformTest.cs | 6 +- .../tests/ThreadTests.cs | 4 +- 30 files changed, 241 insertions(+), 308 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 36929d31c36a..f89d2cf48264 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -87,6 +87,7 @@ https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json; https://dotnet.myget.org/F/dotnet-core/api/v3/index.json; https://api.nuget.org/v3/index.json; + https://www.myget.org/F/xunit/api/v3/index.json; $(OverridePackageSource); $(RestoreSources) diff --git a/dependencies.props b/dependencies.props index 84a4f21ae68e..d08dc94045d8 100644 --- a/dependencies.props +++ b/dependencies.props @@ -46,10 +46,10 @@ 15.8.0 - 2.4.0 + 2.4.1-alpha.1.build4054 1.0.0-beta-build0020 2.0.5 - 2.4.0-prerelease-63123-07 + 2.4.0-beta.18420.3 1.0.19 diff --git a/src/Microsoft.XmlSerializer.Generator/src/Microsoft.XmlSerializer.Generator.csproj b/src/Microsoft.XmlSerializer.Generator/src/Microsoft.XmlSerializer.Generator.csproj index 3197be8ef508..c5aead60ffb1 100644 --- a/src/Microsoft.XmlSerializer.Generator/src/Microsoft.XmlSerializer.Generator.csproj +++ b/src/Microsoft.XmlSerializer.Generator/src/Microsoft.XmlSerializer.Generator.csproj @@ -5,10 +5,8 @@ true ..\..\System.Private.Xml\src\Resources\Strings.resx Exe - .dll netstandard-Debug;netstandard-Release - diff --git a/src/System.Collections.Immutable/tests/ImmutableArrayTest.cs b/src/System.Collections.Immutable/tests/ImmutableArrayTest.cs index dbe75bfd0766..925de264a21b 100644 --- a/src/System.Collections.Immutable/tests/ImmutableArrayTest.cs +++ b/src/System.Collections.Immutable/tests/ImmutableArrayTest.cs @@ -33,25 +33,10 @@ public static IEnumerable Int32EnumerableData() yield return new object[] { new[] { 2, 3, 5 } }; } - public static IEnumerable StrongBoxedInt32EnumerableData() + public static IEnumerable SpecialInt32ImmutableArrayData() { - // Once https://github.com/xunit/assert.xunit/pull/5 comes into corefx, all the StrongBox stuff can be removed. - - return Int32EnumerableData() - .Select(array => array[0]) - .Cast>() - .Select(enumerable => new object[] - { - new StrongBox>(enumerable) - }); - } - - public static IEnumerable StrongBoxedSpecialInt32ImmutableArrayData() - { - // Once https://github.com/xunit/assert.xunit/pull/5 comes into corefx, all the StrongBox stuff can be removed. - - yield return new object[] { new StrongBox>(s_emptyDefault) }; - yield return new object[] { new StrongBox>(s_empty) }; + yield return new object[] { s_emptyDefault }; + yield return new object[] { s_empty }; } [Theory] @@ -108,19 +93,18 @@ public void CreateRangeEmptyReturnsSingleton() } [Theory] + [ActiveIssue("https://github.com/xunit/xunit/issues/1794")] [MemberData(nameof(CreateRangeWithSelectorData))] - public void CreateRangeWithSelector(IEnumerable source, Func selector, TResult dummy) + public void CreateRangeWithSelector(IEnumerable source, Func selector) { - // Remove the dummy parameters once https://github.com/xunit/xunit/pull/965 makes it into corefx. - Assert.Equal(source.Select(selector), ImmutableArray.CreateRange(source.ToImmutableArray(), selector)); } public static IEnumerable CreateRangeWithSelectorData() { - yield return new object[] { new int[] { }, new Func(i => i), 0 }; - yield return new object[] { new[] { 4, 5, 6, 7 }, new Func(i => i + 0.5f), 0f }; - yield return new object[] { new[] { 4, 5, 6, 7 }, new Func(i => i + 1), 0 }; + yield return new object[] { new int[] { }, new Func(i => i) }; + yield return new object[] { new[] { 4, 5, 6, 7 }, new Func(i => i + 0.5f) }; + yield return new object[] { new[] { 4, 5, 6, 7 }, new Func(i => i + 1) }; } [Theory] @@ -134,21 +118,20 @@ public void CreateRangeWithSelectorInvalid(IEnumerable source) } [Theory] + [ActiveIssue("https://github.com/xunit/xunit/issues/1794")] [MemberData(nameof(CreateRangeWithSelectorAndArgumentData))] - public void CreateRangeWithSelectorAndArgument(IEnumerable source, Func selector, TArg arg, TArg dummy1, TResult dummy2) + public void CreateRangeWithSelectorAndArgument(IEnumerable source, Func selector, TArg arg) { - // Remove the dummy parameters once https://github.com/xunit/xunit/pull/965 makes it into corefx. - var expected = source.Zip(Enumerable.Repeat(arg, source.Count()), selector); Assert.Equal(expected, ImmutableArray.CreateRange(source.ToImmutableArray(), selector, arg)); } public static IEnumerable CreateRangeWithSelectorAndArgumentData() { - yield return new object[] { new int[] { }, new Func((x, y) => x + y), 0, 0, 0 }; - yield return new object[] { new[] { 4, 5, 6, 7 }, new Func((x, y) => x + y), 0.5f, 0f, 0f }; - yield return new object[] { new[] { 4, 5, 6, 7 }, new Func((x, y) => x + y), 1, 0, 0 }; - yield return new object[] { new[] { 4, 5, 6, 7 }, new Func((x, y) => x), null, new object(), 0 }; + yield return new object[] { new int[] { }, new Func((x, y) => x + y), 0 }; + yield return new object[] { new[] { 4, 5, 6, 7 }, new Func((x, y) => x + y), 0.5f }; + yield return new object[] { new[] { 4, 5, 6, 7 }, new Func((x, y) => x + y), 1 }; + yield return new object[] { new[] { 4, 5, 6, 7 }, new Func((x, y) => x), null }; } [Theory] @@ -162,26 +145,25 @@ public void CreateRangeWithSelectorAndArgumentInvalid(IEnumerable source) } [Theory] + [ActiveIssue("https://github.com/xunit/xunit/issues/1794")] [MemberData(nameof(CreateRangeSliceWithSelectorData))] - public void CreateRangeSliceWithSelector(IEnumerable source, int start, int length, Func selector, TResult dummy) + public void CreateRangeSliceWithSelector(IEnumerable source, int start, int length, Func selector) { - // Remove the dummy parameters once https://github.com/xunit/xunit/pull/965 makes it into corefx. - var expected = source.Skip(start).Take(length).Select(selector); Assert.Equal(expected, ImmutableArray.CreateRange(source.ToImmutableArray(), start, length, selector)); } public static IEnumerable CreateRangeSliceWithSelectorData() { - yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 0, new Func(i => i + 0.5f), 0f }; - yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 0, new Func(i => i + 0.5d), 0d }; - yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 0, new Func(i => i), 0 }; - yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 1, new Func(i => i * 2), 0 }; - yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 2, new Func(i => i + 1), 0 }; - yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 4, new Func(i => i), 0 }; - yield return new object[] { new[] { 4, 5, 6, 7 }, 3, 1, new Func(i => i), 0 }; - yield return new object[] { new[] { 4, 5, 6, 7 }, 3, 0, new Func(i => i), 0 }; - yield return new object[] { new[] { 4, 5, 6, 7 }, 4, 0, new Func(i => i), 0 }; + yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 0, new Func(i => i + 0.5f) }; + yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 0, new Func(i => i + 0.5d) }; + yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 0, new Func(i => i) }; + yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 1, new Func(i => i * 2) }; + yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 2, new Func(i => i + 1) }; + yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 4, new Func(i => i) }; + yield return new object[] { new[] { 4, 5, 6, 7 }, 3, 1, new Func(i => i) }; + yield return new object[] { new[] { 4, 5, 6, 7 }, 3, 0, new Func(i => i) }; + yield return new object[] { new[] { 4, 5, 6, 7 }, 4, 0, new Func(i => i) }; } [Theory] @@ -204,28 +186,27 @@ public void CreateRangeSliceWithSelectorInvalid(IEnumerable source) } [Theory] + [ActiveIssue("https://github.com/xunit/xunit/issues/1794")] [MemberData(nameof(CreateRangeSliceWithSelectorAndArgumentData))] - public void CreateRangeSliceWithSelectorAndArgument(IEnumerable source, int start, int length, Func selector, TArg arg, TArg dummy1, TResult dummy2) + public void CreateRangeSliceWithSelectorAndArgument(IEnumerable source, int start, int length, Func selector, TArg arg) { - // Remove the dummy parameters once https://github.com/xunit/xunit/pull/965 makes it into corefx. - var expected = source.Skip(start).Take(length).Zip(Enumerable.Repeat(arg, length), selector); Assert.Equal(expected, ImmutableArray.CreateRange(source.ToImmutableArray(), start, length, selector, arg)); } public static IEnumerable CreateRangeSliceWithSelectorAndArgumentData() { - yield return new object[] { new int[] { }, 0, 0, new Func((x, y) => x + y), 0, 0, 0 }; - yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 0, new Func((x, y) => x + y), 0.5f, 0f, 0f }; - yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 0, new Func((x, y) => x + y), 0.5d, 0d, 0d }; - yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 0, new Func((x, y) => x + y), 0, 0, 0 }; - yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 1, new Func((x, y) => x * y), 2, 0, 0 }; - yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 2, new Func((x, y) => x + y), 1, 0, 0 }; - yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 4, new Func((x, y) => x + y), 0, 0, 0 }; - yield return new object[] { new[] { 4, 5, 6, 7 }, 3, 1, new Func((x, y) => x + y), 0, 0, 0 }; - yield return new object[] { new[] { 4, 5, 6, 7 }, 3, 0, new Func((x, y) => x + y), 0, 0, 0 }; - yield return new object[] { new[] { 4, 5, 6, 7 }, 4, 0, new Func((x, y) => x + y), 0, 0, 0 }; - yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 1, new Func((x, y) => x), null, new object(), 0 }; + yield return new object[] { new int[] { }, 0, 0, new Func((x, y) => x + y), 0 }; + yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 0, new Func((x, y) => x + y), 0.5f }; + yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 0, new Func((x, y) => x + y), 0.5d }; + yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 0, new Func((x, y) => x + y), 0 }; + yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 1, new Func((x, y) => x * y), 2 }; + yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 2, new Func((x, y) => x + y), 1 }; + yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 4, new Func((x, y) => x + y), 0 }; + yield return new object[] { new[] { 4, 5, 6, 7 }, 3, 1, new Func((x, y) => x + y), 0 }; + yield return new object[] { new[] { 4, 5, 6, 7 }, 3, 0, new Func((x, y) => x + y), 0 }; + yield return new object[] { new[] { 4, 5, 6, 7 }, 4, 0, new Func((x, y) => x + y), 0 }; + yield return new object[] { new[] { 4, 5, 6, 7 }, 0, 1, new Func((x, y) => x), null }; } [Theory] @@ -500,7 +481,7 @@ public void ToImmutableArray(IEnumerable source) { var array = source.ToImmutableArray(); Assert.Equal(source, array); - Assert.True(array == array.ToImmutableArray()); // Compares referential equality. + Assert.True(array == array.ToImmutableArray()); } [Theory] @@ -596,19 +577,17 @@ public void ContainsInt32(IEnumerable source) [Theory] [MemberData(nameof(ContainsNullData))] - public void ContainsNull(IEnumerable source, T dummy) where T : class + public void ContainsNull(IEnumerable source) where T : class { - // Remove the dummy parameters once https://github.com/xunit/xunit/pull/965 makes it into corefx. - bool expected = source.Contains(null, EqualityComparer.Default); Assert.Equal(expected, source.ToImmutableArray().Contains(null)); } public static IEnumerable ContainsNullData() { - yield return new object[] { s_oneElementRefType, new GenericParameterHelper() }; - yield return new object[] { s_twoElementRefTypeWithNull, string.Empty }; - yield return new object[] { new[] { new object() }, new object() }; + yield return new object[] { s_oneElementRefType }; + yield return new object[] { s_twoElementRefTypeWithNull }; + yield return new object[] { new[] { new object() } }; } [Fact] @@ -735,10 +714,8 @@ public void EnumeratorStructTraversalDefaultInvalid() [Theory] [MemberData(nameof(EnumeratorTraversalNullData))] - public void EnumeratorTraversalNull(IEnumerable source, T dummy) where T : class + public void EnumeratorTraversalNull(IEnumerable source) where T : class { - // Remove the dummy parameters once https://github.com/xunit/xunit/pull/965 makes it into corefx. - var array = ForceLazy(source.ToImmutableArray()).ToArray(); Assert.Equal(source, array); Assert.Contains(null, array); @@ -746,19 +723,16 @@ public void EnumeratorTraversalNull(IEnumerable source, T dummy) where T : public static IEnumerable EnumeratorTraversalNullData() { - yield return new object[] { s_twoElementRefTypeWithNull, string.Empty }; - yield return new object[] { new[] { default(object) }, new object() }; - yield return new object[] { new[] { null, new object() }, new object() }; - yield return new object[] { new[] { null, string.Empty }, string.Empty }; + yield return new object[] { s_twoElementRefTypeWithNull }; + yield return new object[] { new[] { default(object) } }; + yield return new object[] { new[] { null, new object() } }; + yield return new object[] { new[] { null, string.Empty } }; } [Theory] [MemberData(nameof(EqualsData))] - public void Equals(StrongBox> firstBox, StrongBox> secondBox, bool expected) + public void Equals(ImmutableArray first, ImmutableArray second, bool expected) { - ImmutableArray first = firstBox.Value; - ImmutableArray second = secondBox.Value; - Assert.Equal(expected, first == second); Assert.NotEqual(expected, first != second); @@ -776,8 +750,6 @@ public void Equals(StrongBox> firstBox, StrongBox EqualsData() { - // Once https://github.com/xunit/assert.xunit/pull/5 comes into corefx, all the StrongBox stuff can be removed. - var enumerables = Int32EnumerableData() .Select(array => array[0]) .Cast>(); @@ -788,16 +760,16 @@ public static IEnumerable EqualsData() yield return new object[] { - new StrongBox>(array), - new StrongBox>(array), + array, + array, true }; // Reference equality, not content equality, should be compared. yield return new object[] { - new StrongBox>(array), - new StrongBox>(enumerable.ToImmutableArray()), + array, + enumerable.ToImmutableArray(), !enumerable.Any() || enumerable is ImmutableArray }; } @@ -805,25 +777,24 @@ public static IEnumerable EqualsData() // Empty and default ImmutableArrays should not be seen as equal. yield return new object[] { - new StrongBox>(s_empty), - new StrongBox>(s_emptyDefault), + s_empty, + s_emptyDefault, false }; yield return new object[] { - new StrongBox>(s_empty), - new StrongBox>(s_oneElement), + s_empty, + s_oneElement, false }; } [Theory] - [MemberData(nameof(StrongBoxedInt32EnumerableData))] - [MemberData(nameof(StrongBoxedSpecialInt32ImmutableArrayData))] - public void EqualsSelf(StrongBox> box) + [MemberData(nameof(Int32EnumerableData))] + [MemberData(nameof(SpecialInt32ImmutableArrayData))] + public void EqualsSelf(IEnumerable source) { - IEnumerable source = box.Value; var array = source.ToImmutableArray(); #pragma warning disable CS1718 // Comparison made to same variable @@ -837,24 +808,22 @@ public void EqualsSelf(StrongBox> box) } [Theory] - [MemberData(nameof(StrongBoxedInt32EnumerableData))] - [MemberData(nameof(StrongBoxedSpecialInt32ImmutableArrayData))] - public void EqualsNull(StrongBox> box) + [MemberData(nameof(Int32EnumerableData))] + [MemberData(nameof(SpecialInt32ImmutableArrayData))] + public void EqualsNull(IEnumerable source) { - IEnumerable source = box.Value; Assert.False(source.ToImmutableArray().Equals(null)); } [Theory] - [MemberData(nameof(StrongBoxedInt32EnumerableData))] - [MemberData(nameof(StrongBoxedSpecialInt32ImmutableArrayData))] - public void EqualsNullable(StrongBox> box) + [MemberData(nameof(Int32EnumerableData))] + [MemberData(nameof(SpecialInt32ImmutableArrayData))] + public void EqualsNullable(IEnumerable source) { // ImmutableArray overrides the equality operators for ImmutableArray?. // If one nullable with HasValue = false is compared to a nullable with HasValue = true, // but Value.IsDefault = true, the nullables will compare as equal. - IEnumerable source = box.Value; var array = source.ToImmutableArray(); ImmutableArray? nullable = array; @@ -866,11 +835,10 @@ public void EqualsNullable(StrongBox> box) } [Theory] - [MemberData(nameof(StrongBoxedInt32EnumerableData))] - [MemberData(nameof(StrongBoxedSpecialInt32ImmutableArrayData))] - public void GetHashCode(StrongBox> box) + [MemberData(nameof(Int32EnumerableData))] + [MemberData(nameof(SpecialInt32ImmutableArrayData))] + public void GetHashCode(IEnumerable source) { - IEnumerable source = box.Value; var array = source.ToImmutableArray(); // We must box once. Otherwise, the following assert would not have much purpose since @@ -1593,9 +1561,8 @@ public void CopyToDefaultInvalid(int destinationLength, int destinationIndex) [Theory] [MemberData(nameof(IsDefaultOrEmptyData))] - public void IsDefault(StrongBox> box, bool isDefault, bool isEmpty) + public void IsDefault(IEnumerable source, bool isDefault, bool isEmpty) { - IEnumerable source = box.Value; var array = source.ToImmutableArray(); Assert.Equal(isDefault, array.IsDefault); @@ -1603,9 +1570,8 @@ public void IsDefault(StrongBox> box, bool isDefault, bool isEm [Theory] [MemberData(nameof(IsDefaultOrEmptyData))] - public void IsDefaultOrEmpty(StrongBox> box, bool isDefault, bool isEmpty) + public void IsDefaultOrEmpty(IEnumerable source, bool isDefault, bool isEmpty) { - IEnumerable source = box.Value; var array = source.ToImmutableArray(); Assert.Equal(isDefault || isEmpty, array.IsDefaultOrEmpty); @@ -1613,11 +1579,9 @@ public void IsDefaultOrEmpty(StrongBox> box, bool isDefault, bo public static IEnumerable IsDefaultOrEmptyData() { - // Once https://github.com/xunit/assert.xunit/pull/5 comes into corefx, all the StrongBox stuff can be removed. - - yield return new object[] { new StrongBox>(s_emptyDefault), true, false }; - yield return new object[] { new StrongBox>(s_empty), false, true }; - yield return new object[] { new StrongBox>(s_oneElement), false, false }; + yield return new object[] { s_emptyDefault, true, false }; + yield return new object[] { s_empty, false, true }; + yield return new object[] { s_oneElement, false, false }; } [Theory] @@ -1673,10 +1637,8 @@ public void GetIndexerDefaultInvalid(int index) [Theory] [MemberData(nameof(SortData))] - public void Sort(IEnumerable source, int index, int count, IComparer comparer, T dummy) + public void Sort(IEnumerable source, int index, int count, IComparer comparer) { - // Remove the dummy parameters once https://github.com/xunit/xunit/pull/965 makes it into corefx. - var array = source.ToImmutableArray(); var expected = source.ToArray(); @@ -1709,14 +1671,14 @@ public static IEnumerable SortData() return SharedComparers().SelectMany(comparer => new[] { - new object[] { new[] { 2, 4, 1, 3 }, 0, 4, comparer, 0 }, - new object[] { new[] { 1 }, 0, 1, comparer, 0 }, - new object[] { new int[0], 0, 0, comparer, 0 }, - new object[] { new[] { 2, 4, 1, 3 }, 1, 2, comparer, 0 }, - new object[] { new[] { 2, 4, 1, 3 }, 4, 0, comparer, 0 }, - new object[] { new[] { "c", "B", "a" }, 0, 3, StringComparer.OrdinalIgnoreCase, string.Empty }, - new object[] { new[] { "c", "B", "a" }, 0, 3, StringComparer.Ordinal, string.Empty }, - new object[] { new[] { 1, 2, 3, 4, 6, 5, 7, 8, 9, 10 }, 4, 2, comparer, 0 } + new object[] { new[] { 2, 4, 1, 3 }, 0, 4, comparer }, + new object[] { new[] { 1 }, 0, 1, comparer }, + new object[] { new int[0], 0, 0, comparer }, + new object[] { new[] { 2, 4, 1, 3 }, 1, 2, comparer }, + new object[] { new[] { 2, 4, 1, 3 }, 4, 0, comparer }, + new object[] { new[] { "c", "B", "a" }, 0, 3, StringComparer.OrdinalIgnoreCase }, + new object[] { new[] { "c", "B", "a" }, 0, 3, StringComparer.Ordinal }, + new object[] { new[] { 1, 2, 3, 4, 6, 5, 7, 8, 9, 10 }, 4, 2, comparer } }); } @@ -1829,12 +1791,9 @@ public void ToBuilder(IEnumerable source) [Theory] [MemberData(nameof(IStructuralEquatableEqualsData))] [MemberData(nameof(IStructuralEquatableEqualsNullComparerData))] - public void IStructuralEquatableEquals(StrongBox> firstBox, StrongBox secondBox, IEqualityComparer comparer, bool expected) + public void IStructuralEquatableEquals(IEnumerable source, object second, IEqualityComparer comparer, bool expected) { - // Once https://github.com/xunit/assert.xunit/pull/5 comes into corefx, all the StrongBox stuff can be removed. - - ImmutableArray first = firstBox.Value.ToImmutableArray(); - object second = secondBox.Value; + ImmutableArray first = source.ToImmutableArray(); Assert.Equal(expected, ((IStructuralEquatable)first).Equals(second, comparer)); @@ -1869,25 +1828,25 @@ public static IEnumerable IStructuralEquatableEqualsData() foreach (IEqualityComparer comparer in optimisticComparers) { - yield return new object[] { new StrongBox>(s_empty), new StrongBox(s_empty), comparer, true }; - yield return new object[] { new StrongBox>(s_emptyDefault), new StrongBox(s_emptyDefault), comparer, true }; - yield return new object[] { new StrongBox>(new[] { 1, 2, 3 }), new StrongBox(new[] { 1, 2, 3 }), comparer, true }; - yield return new object[] { new StrongBox>(new[] { 1, 2, 3 }), new StrongBox(ImmutableArray.Create(1, 2, 3)), comparer, true }; - yield return new object[] { new StrongBox>(new[] { 1, 2, 3 }), new StrongBox(new object[] { 1, 2, 3 }), comparer, true }; - yield return new object[] { new StrongBox>(new[] { 1, 2, 3 }), new StrongBox(ImmutableArray.Create(1, 2, 3)), comparer, true }; + yield return new object[] { s_empty, s_empty, comparer, true }; + yield return new object[] { s_emptyDefault, s_emptyDefault, comparer, true }; + yield return new object[] { new[] { 1, 2, 3 }, new[] { 1, 2, 3 }, comparer, true }; + yield return new object[] { new[] { 1, 2, 3 }, ImmutableArray.Create(1, 2, 3), comparer, true }; + yield return new object[] { new[] { 1, 2, 3 }, new object[] { 1, 2, 3 }, comparer, true }; + yield return new object[] { new[] { 1, 2, 3 }, ImmutableArray.Create(1, 2, 3), comparer, true }; } foreach (IEqualityComparer comparer in pessimisticComparers) { - yield return new object[] { new StrongBox>(s_emptyDefault), new StrongBox(s_empty), comparer, false }; - yield return new object[] { new StrongBox>(s_emptyDefault), new StrongBox(s_oneElement), comparer, false }; - yield return new object[] { new StrongBox>(new[] { 1, 2, 3 }), new StrongBox(new List { 1, 2, 3 }), comparer, false }; - yield return new object[] { new StrongBox>(new[] { 1, 2, 3 }), new StrongBox(new object()), comparer, false }; - yield return new object[] { new StrongBox>(new[] { 1, 2, 3 }), new StrongBox(null), comparer, false }; - yield return new object[] { new StrongBox>(new[] { 1, 2, 3 }), new StrongBox(new[] { 1, 2, 4 }), comparer, false }; - yield return new object[] { new StrongBox>(new[] { 1, 2, 3 }), new StrongBox(ImmutableArray.Create(1, 2, 4)), comparer, false }; - yield return new object[] { new StrongBox>(new[] { 1, 2, 3 }), new StrongBox(new string[3]), comparer, false }; - yield return new object[] { new StrongBox>(new[] { 1, 2, 3 }), new StrongBox(ImmutableArray.Create(new string[3])), comparer, false }; + yield return new object[] { s_emptyDefault, s_empty, comparer, false }; + yield return new object[] { s_emptyDefault, s_oneElement, comparer, false }; + yield return new object[] { new[] { 1, 2, 3 }, new List { 1, 2, 3 }, comparer, false }; + yield return new object[] { new[] { 1, 2, 3 }, new object(), comparer, false }; + yield return new object[] { new[] { 1, 2, 3 }, null, comparer, false }; + yield return new object[] { new[] { 1, 2, 3 }, new[] { 1, 2, 4 }, comparer, false }; + yield return new object[] { new[] { 1, 2, 3 }, ImmutableArray.Create(1, 2, 4), comparer, false }; + yield return new object[] { new[] { 1, 2, 3 }, new string[3], comparer, false }; + yield return new object[] { new[] { 1, 2, 3 }, ImmutableArray.Create(new string[3]), comparer, false }; } } @@ -1898,14 +1857,14 @@ public static IEnumerable IStructuralEquatableEqualsNullComparerData() // if Array's IStructuralEquatable.Equals implementation (which it calls under the cover) short-circuits before // trying to use the comparer. - yield return new object[] { new StrongBox>(s_emptyDefault), new StrongBox(s_emptyDefault), null, true }; - yield return new object[] { new StrongBox>(s_emptyDefault), new StrongBox(ImmutableArray.Create(1, 2, 3)), null, false }; + yield return new object[] { s_emptyDefault, s_emptyDefault, null, true }; + yield return new object[] { s_emptyDefault, ImmutableArray.Create(1, 2, 3), null, false }; - yield return new object[] { new StrongBox>(new int[0]), new StrongBox(null), null, false }; // Array short-circuits because `other` is null - yield return new object[] { new StrongBox>(s_empty), new StrongBox(s_empty), null, true }; // Array short-circuits because the arrays are reference-equal - yield return new object[] { new StrongBox>(new int[0]), new StrongBox(new List()), null, false }; // Array short-circuits because `other` is not an array - yield return new object[] { new StrongBox>(new int[0]), new StrongBox(new int[1]), null, false }; // Array short-circuits because `other.Length` isn't equal - yield return new object[] { new StrongBox>(new int[0]), new StrongBox(new int[0]), null, true }; // For zero-element arrays, Array doesn't have to use the comparer + yield return new object[] { new int[0], null, null, false }; // Array short-circuits because `other` is null + yield return new object[] { s_empty, s_empty, null, true }; // Array short-circuits because the arrays are reference-equal + yield return new object[] { new int[0], new List(), null, false }; // Array short-circuits because `other` is not an array + yield return new object[] { new int[0], new int[1], null, false }; // Array short-circuits because `other.Length` isn't equal + yield return new object[] { new int[0], new int[0], null, true }; // For zero-element arrays, Array doesn't have to use the comparer } [Fact] @@ -1987,11 +1946,7 @@ public void IStructuralComparableCompareToDefaultAndNonDefaultInvalid(IEnumerabl [MemberData(nameof(IStructuralComparableCompareToNullComparerArgumentInvalidData))] public void IStructuralComparableCompareToNullComparerArgumentInvalid(IEnumerable source, object other) { - // Because of https://github.com/xunit/assert.xunit/pull/5 we cannot pass in a default ImmutableArray directly, - // so a null source is used as a sentinel value to represent that here. Once that change makes it into corefx, - // just pass in a default array from the MemberData. - - var array = source?.ToImmutableArray() ?? s_emptyDefault; + var array = source.ToImmutableArray(); AssertExtensions.Throws("other", () => ((IStructuralComparable)array).CompareTo(other, comparer: null)); if (other is Array || IsImmutableArray(other)) @@ -2002,8 +1957,8 @@ public void IStructuralComparableCompareToNullComparerArgumentInvalid(IEnumerabl public static IEnumerable IStructuralComparableCompareToNullComparerArgumentInvalidData() { - yield return new object[] { null, null }; - yield return new object[] { null, ImmutableArray.Create(1, 2, 3) }; + yield return new object[] { ImmutableArray.Create(), null }; + yield return new object[] { ImmutableArray.Create(), ImmutableArray.Create(1, 2, 3) }; yield return new object[] { new[] { 1, 2, 3 }, null }; } diff --git a/src/System.Collections/tests/Generic/SortedSet/SortedSet.TreeSubSet.Tests.cs b/src/System.Collections/tests/Generic/SortedSet/SortedSet.TreeSubSet.Tests.cs index bd1848d28737..27cc8122f296 100644 --- a/src/System.Collections/tests/Generic/SortedSet/SortedSet.TreeSubSet.Tests.cs +++ b/src/System.Collections/tests/Generic/SortedSet/SortedSet.TreeSubSet.Tests.cs @@ -27,6 +27,8 @@ public class SortedSet_TreeSubset_String_Tests : SortedSet_TreeSubset_Tests 0.ToString().PadLeft(10); protected override string Max => int.MaxValue.ToString().PadLeft(10); + protected override bool CanAddDefaultValue => false; + protected override string CreateT(int seed) { return seed.ToString().PadLeft(10); @@ -38,7 +40,7 @@ public override void ICollection_Generic_Remove_DefaultValueContainedInCollectio { int seed = count * 21; ICollection collection = GenericICollectionFactory(count); - AssertExtensions.Throws("item", () => collection.Remove(default(string))); + Assert.False(collection.Remove(default(string))); } } @@ -47,7 +49,7 @@ public override void ICollection_Generic_Contains_DefaultValueOnCollectionContai if (DefaultValueAllowed && !IsReadOnly && !AddRemoveClear_ThrowsNotSupported) { ICollection collection = GenericICollectionFactory(count); - AssertExtensions.Throws("item", () => collection.Add(default(string))); + AssertExtensions.Throws("item", null, () => collection.Add(default(string))); } } } @@ -56,6 +58,8 @@ public abstract class SortedSet_TreeSubset_Tests : SortedSet_Generic_Tests { protected abstract T Min { get; } protected abstract T Max { get; } + protected virtual bool CanAddDefaultValue => true; + private SortedSet OriginalSet { get; set; } protected override ISet GenericISetFactory() @@ -67,11 +71,11 @@ protected override ISet GenericISetFactory() public override void ICollection_Generic_Add_DefaultValue(int count) { // Adding an item to a TreeSubset does nothing - it updates the parent. - if (DefaultValueAllowed && !IsReadOnly && !AddRemoveClear_ThrowsNotSupported) + if (DefaultValueAllowed && !IsReadOnly && !AddRemoveClear_ThrowsNotSupported && CanAddDefaultValue) { ICollection collection = GenericICollectionFactory(count); collection.Add(default(T)); - Assert.Equal(count, collection.Count); + Assert.Equal(count + 1, collection.Count); // collection is also updated. Assert.Equal(count + 1, OriginalSet.Count); } } diff --git a/src/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/ValidationAttributeTestBase.cs b/src/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/ValidationAttributeTestBase.cs index 2889e17285ba..d5c8228cb62a 100644 --- a/src/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/ValidationAttributeTestBase.cs +++ b/src/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/ValidationAttributeTestBase.cs @@ -24,6 +24,7 @@ public void Validate_Valid() } [Fact] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "EmailAddressAttribute in the .NET Framework has a bug with values that are null or not string type")] public void Validate_Invalid() { Assert.All(InvalidValues(), test => Validate(test.Attribute, test.Value, test.ValidationContext, isValid: false)); @@ -59,6 +60,7 @@ public void Validate(ValidationAttribute attribute, object value, ValidationCont } [Fact] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "EmailAddressAttribute in the .NET Framework has a bug with values that are null or not string type")] public void ErrorMessage_Invalid_Throws() { if (InvalidValues().Count() == 0) @@ -76,6 +78,7 @@ public void ErrorMessage_Invalid_Throws() } [Fact] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "EmailAddressAttribute in the .NET Framework has a bug with values that are null or not string type")] public void ErrorMessage_Valid() { if (!RespectsErrorMessage || InvalidValues().Count() == 0) diff --git a/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.TestAssembly/System.Diagnostics.FileVersionInfo.TestAssembly.csproj b/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.TestAssembly/System.Diagnostics.FileVersionInfo.TestAssembly.csproj index 5bb344091479..087c715c4904 100644 --- a/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.TestAssembly/System.Diagnostics.FileVersionInfo.TestAssembly.csproj +++ b/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.TestAssembly/System.Diagnostics.FileVersionInfo.TestAssembly.csproj @@ -2,18 +2,10 @@ {28EB14BE-3BC9-4543-ABA6-A932424DFBD0} Exe - System.Diagnostics.FileVersionInfo.TestAssembly false - Windows_Debug netstandard-Debug;netstandard-Release - - - - - - \ No newline at end of file diff --git a/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/FileVersionInfoTest.Unix.cs b/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/FileVersionInfoTest.Unix.cs index 2b7422aec2db..d7d546dc9901 100644 --- a/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/FileVersionInfoTest.Unix.cs +++ b/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/FileVersionInfoTest.Unix.cs @@ -40,7 +40,7 @@ public void Symlink_ValidFile_Succeeds() FileName = linkPath, FilePrivatePart = 1, FileVersion = "4.3.2.1", - InternalName = OriginalTestAssemblyFileName, + InternalName = OriginalTestAssemblyInternalName, IsDebug = false, IsPatched = false, IsPrivateBuild = false, @@ -50,7 +50,7 @@ public void Symlink_ValidFile_Succeeds() Language2 = null, LegalCopyright = "Copyright, you betcha!", LegalTrademarks = "TM", - OriginalFilename = OriginalTestAssemblyFileName, + OriginalFilename = OriginalTestAssemblyInternalName, PrivateBuild = "", ProductBuildPart = 3, ProductMajorPart = 1, diff --git a/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/FileVersionInfoTest.cs b/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/FileVersionInfoTest.cs index a1592e6ba414..8f09ed442fb7 100644 --- a/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/FileVersionInfoTest.cs +++ b/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/FileVersionInfoTest.cs @@ -13,6 +13,10 @@ public partial class FileVersionInfoTest : FileCleanupTestBase // The extension is ".ildll" rather than ".dll" to prevent ILC from treating TestAssembly.dll as IL to subsume into executable. private const string TestAssemblyFileName = "System.Diagnostics.FileVersionInfo.TestAssembly.ildll"; private const string OriginalTestAssemblyFileName = "System.Diagnostics.FileVersionInfo.TestAssembly.dll"; + // On Unix the internal name's extension is .exe if OutputType is exe even though the TargetExt is .dll. + private readonly string OriginalTestAssemblyInternalName = PlatformDetection.IsWindows ? + "System.Diagnostics.FileVersionInfo.TestAssembly.dll" : + "System.Diagnostics.FileVersionInfo.TestAssembly.exe"; private const string TestCsFileName = "Assembly1.cs"; private const string TestNotFoundFileName = "notfound.dll"; @@ -31,7 +35,7 @@ public void FileVersionInfo_CustomManagedAssembly() FileName = Path.Combine(Directory.GetCurrentDirectory(), TestAssemblyFileName), FilePrivatePart = 1, FileVersion = "4.3.2.1", - InternalName = OriginalTestAssemblyFileName, + InternalName = OriginalTestAssemblyInternalName, IsDebug = false, IsPatched = false, IsPrivateBuild = false, @@ -40,7 +44,7 @@ public void FileVersionInfo_CustomManagedAssembly() Language = GetFileVersionLanguage(0x0000), LegalCopyright = "Copyright, you betcha!", LegalTrademarks = "TM", - OriginalFilename = OriginalTestAssemblyFileName, + OriginalFilename = OriginalTestAssemblyInternalName, PrivateBuild = "", ProductBuildPart = 3, ProductMajorPart = 1, diff --git a/src/System.Drawing.Common/tests/IconTests.cs b/src/System.Drawing.Common/tests/IconTests.cs index c54e818581a3..b50b3451333b 100644 --- a/src/System.Drawing.Common/tests/IconTests.cs +++ b/src/System.Drawing.Common/tests/IconTests.cs @@ -263,7 +263,7 @@ public void Ctor_InvalidHandle_Success() using (var stream = new MemoryStream()) { Exception ex = Assert.ThrowsAny(() => icon.Save(stream)); - Assert.True(ex is COMException || ex is ObjectDisposedException, $"{ex.GetType().ToString()} was thrown."); + Assert.True(ex is COMException || ex is ObjectDisposedException || ex is FileNotFoundException, $"{ex.GetType().ToString()} was thrown."); AssertExtensions.Throws(null, () => icon.ToBitmap()); Assert.Equal(Size.Empty, icon.Size); diff --git a/src/System.IO.FileSystem/tests/Directory/CreateDirectory.cs b/src/System.IO.FileSystem/tests/Directory/CreateDirectory.cs index 02244e0f008b..adaaf8859907 100644 --- a/src/System.IO.FileSystem/tests/Directory/CreateDirectory.cs +++ b/src/System.IO.FileSystem/tests/Directory/CreateDirectory.cs @@ -251,7 +251,7 @@ public void DirectoryWithComponentLongerThanMaxComponentAsPath_ThrowsException(s [Theory, MemberData(nameof(PathsWithInvalidColons))] [PlatformSpecific(TestPlatforms.Windows)] [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void PathWithInvalidColons_ThrowsNotSupportedException_Desktop(string invalidPath) + public void PathWithInvalidColons_Throws_Desktop(string invalidPath) { if (PathFeatures.IsUsingLegacyPathNormalization()) { @@ -259,7 +259,10 @@ public void PathWithInvalidColons_ThrowsNotSupportedException_Desktop(string inv } else { - Assert.Throws(() => Create(invalidPath)); + if (invalidPath.Contains('|')) + Assert.Throws(() => Create(invalidPath)); + else + Assert.Throws(() => Create(invalidPath)); } } diff --git a/src/System.IO.FileSystem/tests/File/Move.cs b/src/System.IO.FileSystem/tests/File/Move.cs index 277ce487042d..d10a8f1cf49f 100644 --- a/src/System.IO.FileSystem/tests/File/Move.cs +++ b/src/System.IO.FileSystem/tests/File/Move.cs @@ -257,7 +257,10 @@ public void WindowsPathWithIllegalColons_Desktop(string invalidPath) } else { - Assert.Throws(() => Move(testFile.FullName, invalidPath)); + if (invalidPath.Contains('|')) + Assert.Throws(() => Move(testFile.FullName, invalidPath)); + else + Assert.Throws(() => Move(testFile.FullName, invalidPath)); } } diff --git a/src/System.Linq.Parallel/tests/ParallelEnumerableTests.cs b/src/System.Linq.Parallel/tests/ParallelEnumerableTests.cs index 475399b9ba8d..f809e85e8d54 100644 --- a/src/System.Linq.Parallel/tests/ParallelEnumerableTests.cs +++ b/src/System.Linq.Parallel/tests/ParallelEnumerableTests.cs @@ -179,7 +179,8 @@ public static IEnumerable RepeatData() yield return new object[] { element, count }; yield return new object[] { (long)element, count }; yield return new object[] { (double)element, count }; - yield return new object[] { (decimal)element, count }; + // [ActiveIssue("https://github.com/xunit/xunit/issues/1771")] + //yield return new object[] { (decimal)element, count }; yield return new object[] { "" + element, count }; } yield return new object[] { (object)null, count }; @@ -252,7 +253,8 @@ public static IEnumerable EmptyData() yield return new object[] { default(int) }; yield return new object[] { default(long) }; yield return new object[] { default(double) }; - yield return new object[] { default(decimal) }; + // [ActiveIssue("https://github.com/xunit/xunit/issues/1771")] + //yield return new object[] { default(decimal) }; yield return new object[] { default(string) }; yield return new object[] { default(object) }; } diff --git a/src/System.Linq.Parallel/tests/QueryOperators/DefaultIfEmptyTests.cs b/src/System.Linq.Parallel/tests/QueryOperators/DefaultIfEmptyTests.cs index 19d0b3b9f1b6..a27b5302d869 100644 --- a/src/System.Linq.Parallel/tests/QueryOperators/DefaultIfEmptyTests.cs +++ b/src/System.Linq.Parallel/tests/QueryOperators/DefaultIfEmptyTests.cs @@ -110,6 +110,7 @@ public static void DefaultIfEmpty_NotEmpty_NotPipelined_Longrunning(Labeled(Labeled> labeled, T def) { ParallelQuery notEmpty = labeled.Item.DefaultIfEmpty(); @@ -125,6 +126,7 @@ public static void DefaultIfEmpty_Empty(Labeled> labeled, T [Theory] [MemberData(nameof(EmptyData))] + [ActiveIssue("https://github.com/xunit/xunit/issues/1771")] public static void DefaultIfEmpty_Empty_NotPipelined(Labeled> labeled, T def) { IList notEmpty = labeled.Item.DefaultIfEmpty().ToList(); diff --git a/src/System.Linq/System.Linq.sln b/src/System.Linq/System.Linq.sln index 6677343fb41c..4055f96c2762 100644 --- a/src/System.Linq/System.Linq.sln +++ b/src/System.Linq/System.Linq.sln @@ -35,10 +35,10 @@ Global {7C70BB15-870B-4946-8098-625DACD645A6}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU {7C70BB15-870B-4946-8098-625DACD645A6}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU {7C70BB15-870B-4946-8098-625DACD645A6}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU - {28FB26C9-E425-4E50-9D1D-08F34560E86E}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU - {28FB26C9-E425-4E50-9D1D-08F34560E86E}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU - {28FB26C9-E425-4E50-9D1D-08F34560E86E}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU - {28FB26C9-E425-4E50-9D1D-08F34560E86E}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU + {28FB26C9-E425-4E50-9D1D-08F34560E86E}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU + {28FB26C9-E425-4E50-9D1D-08F34560E86E}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU + {28FB26C9-E425-4E50-9D1D-08F34560E86E}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU + {28FB26C9-E425-4E50-9D1D-08F34560E86E}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU {CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU {CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU {CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU diff --git a/src/System.Linq/tests/CountTests.cs b/src/System.Linq/tests/CountTests.cs index e0db4af30764..ce9f6cca2507 100644 --- a/src/System.Linq/tests/CountTests.cs +++ b/src/System.Linq/tests/CountTests.cs @@ -81,25 +81,23 @@ public void NullableIntArray_IncludesNullObjects() [Theory] [MemberData(nameof(CountsAndTallies))] - public void CountMatchesTally(T unusedArgumentToForceTypeInference, int count, TEn enumerable) - where TEn : IEnumerable + public void CountMatchesTally(int count, IEnumerable enumerable) { Assert.Equal(count, enumerable.Count()); } [Theory, MemberData(nameof(CountsAndTallies))] - public void RunOnce(T unusedArgumentToForceTypeInference, int count, TEn enumerable) - where TEn : IEnumerable + public void RunOnce(int count, IEnumerable enumerable) { Assert.Equal(count, enumerable.RunOnce().Count()); } private static IEnumerable EnumerateCollectionTypesAndCounts(int count, IEnumerable enumerable) { - yield return new object[] { default(T), count, enumerable }; - yield return new object[] { default(T), count, enumerable.ToArray() }; - yield return new object[] { default(T), count, enumerable.ToList() }; - yield return new object[] { default(T), count, new Stack(enumerable) }; + yield return new object[] { count, enumerable }; + yield return new object[] { count, enumerable.ToArray() }; + yield return new object[] { count, enumerable.ToList() }; + yield return new object[] { count, new Stack(enumerable) }; } public static IEnumerable CountsAndTallies() diff --git a/src/System.Linq/tests/DistinctTests.cs b/src/System.Linq/tests/DistinctTests.cs index 9d0ee070f93c..2000d73334bf 100644 --- a/src/System.Linq/tests/DistinctTests.cs +++ b/src/System.Linq/tests/DistinctTests.cs @@ -179,7 +179,7 @@ public void CustomEqualityComparerRunOnce() } [Theory, MemberData(nameof(SequencesWithDuplicates))] - public void FindDistinctAndValidate(T unusedArgumentToForceTypeInference, IEnumerable original) + public void FindDistinctAndValidate(IEnumerable original) { // Convert to list to avoid repeated enumerations of the enumerables. var originalList = original.ToList(); @@ -198,13 +198,13 @@ public void FindDistinctAndValidate(T unusedArgumentToForceTypeInference, IEn public static IEnumerable SequencesWithDuplicates() { // Validate an array of different numeric data types. - yield return new object[] { 0, new int[] { 1, 1, 1, 2, 3, 5, 5, 6, 6, 10 } }; - yield return new object[] { 0L, new long[] { 1, 1, 1, 2, 3, 5, 5, 6, 6, 10 } }; - yield return new object[] { 0F, new float[] { 1, 1, 1, 2, 3, 5, 5, 6, 6, 10 } }; - yield return new object[] { 0.0, new double[] { 1, 1, 1, 2, 3, 5, 5, 6, 6, 10 } }; - yield return new object[] { 0M, new decimal[] { 1, 1, 1, 2, 3, 5, 5, 6, 6, 10 } }; + yield return new object[] { new int[] { 1, 1, 1, 2, 3, 5, 5, 6, 6, 10 } }; + yield return new object[] { new long[] { 1, 1, 1, 2, 3, 5, 5, 6, 6, 10 } }; + yield return new object[] { new float[] { 1, 1, 1, 2, 3, 5, 5, 6, 6, 10 } }; + yield return new object[] { new double[] { 1, 1, 1, 2, 3, 5, 5, 6, 6, 10 } }; + yield return new object[] { new decimal[] { 1, 1, 1, 2, 3, 5, 5, 6, 6, 10 } }; // Try strings - yield return new object[] { "", new [] + yield return new object[] { new [] { "add", "add", diff --git a/src/System.Linq/tests/GroupByTests.DebuggerAttributes.cs b/src/System.Linq/tests/GroupByTests.DebuggerAttributes.cs index 1f5614541f5d..39dff0f3131b 100644 --- a/src/System.Linq/tests/GroupByTests.DebuggerAttributes.cs +++ b/src/System.Linq/tests/GroupByTests.DebuggerAttributes.cs @@ -14,9 +14,8 @@ public partial class GroupByTests : EnumerableTests [Theory] [MemberData(nameof(DebuggerAttributesValid_Data))] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Grouping doesn't have a Debugger proxy in the full .NET Framework. See https://github.com/dotnet/corefx/issues/14790.")] - public void DebuggerAttributesValid(IGrouping grouping, string keyString, TKey dummy1, TElement dummy2) + public void DebuggerAttributesValid(IGrouping grouping, string keyString) { - // The dummy parameters can be removed once https://github.com/dotnet/buildtools/pull/1300 is brought in. Assert.Equal($"Key = {keyString}", DebuggerAttributes.ValidateDebuggerDisplayReferences(grouping)); object proxyObject = DebuggerAttributes.GetProxyObject(grouping); @@ -44,15 +43,12 @@ public void DebuggerAttributesValid(IGrouping gr public static IEnumerable DebuggerAttributesValid_Data() { IEnumerable source = new[] { 1 }; - yield return new object[] { source.GroupBy(i => i).Single(), "1", 0, 0 }; - yield return new object[] { source.GroupBy(i => i.ToString(), i => i).Single(), @"""1""", string.Empty, 0 }; - yield return new object[] { source.GroupBy(i => TimeSpan.FromSeconds(i), i => i).Single(), "{00:00:01}", TimeSpan.Zero, 0 }; + yield return new object[] { source.GroupBy(i => i).Single(), "1" }; + yield return new object[] { source.GroupBy(i => i.ToString(), i => i).Single(), @"""1""" }; + yield return new object[] { source.GroupBy(i => TimeSpan.FromSeconds(i), i => i).Single(), "{00:00:01}" }; - yield return new object[] { new string[] { null }.GroupBy(x => x).Single(), "null", string.Empty, string.Empty }; - // This test won't even work with the work-around because nullables lose their type once boxed, so xUnit sees an `int` and thinks - // we're trying to pass an IGrouping rather than an IGrouping. - // However, it should also be fixed once that PR is brought in, so leaving in this comment. - // yield return new object[] { new int?[] { null }.GroupBy(x => x).Single(), "null", new int?(0), new int?(0) }; + yield return new object[] { new string[] { null }.GroupBy(x => x).Single(), "null" }; + yield return new object[] { new int?[] { null }.GroupBy(x => x).Single(), "null" }; } } } diff --git a/src/System.Linq/tests/ReverseTests.cs b/src/System.Linq/tests/ReverseTests.cs index 826a39add996..ab2ef9e78db2 100644 --- a/src/System.Linq/tests/ReverseTests.cs +++ b/src/System.Linq/tests/ReverseTests.cs @@ -17,7 +17,7 @@ public void InvalidArguments() [Theory] [MemberData(nameof(ReverseData))] - public void Reverse(IEnumerable source, T dummy) + public void Reverse(IEnumerable source) { T[] expected = source.ToArray(); Array.Reverse(expected); @@ -50,7 +50,7 @@ public void Reverse(IEnumerable source, T dummy) } [Theory, MemberData(nameof(ReverseData))] - public void RunOnce(IEnumerable source, T dummy) + public void RunOnce(IEnumerable source) { T[] expected = source.ToArray(); Array.Reverse(expected); @@ -70,11 +70,10 @@ public static IEnumerable ReverseData() new[] { -10, 0, 5, 0, 9, 100, 9 }, // Some repeating elements. }; - // TODO: Remove workarounds when xUnit is updated to include xunit/xunit#965. return integers - .Select(collection => new object[] { collection, 0 }) + .Select(collection => new object[] { collection }) .Concat( - integers.Select(c => new object[] { c.Select(i => i.ToString()), string.Empty }) + integers.Select(c => new object[] { c.Select(i => i.ToString()) }) ); } diff --git a/src/System.Linq/tests/ToLookupTests.DebuggerAttributes.cs b/src/System.Linq/tests/ToLookupTests.DebuggerAttributes.cs index 896474becbfc..09d839030e15 100644 --- a/src/System.Linq/tests/ToLookupTests.DebuggerAttributes.cs +++ b/src/System.Linq/tests/ToLookupTests.DebuggerAttributes.cs @@ -15,9 +15,8 @@ public partial class ToLookupTests : EnumerableTests [Theory] [MemberData(nameof(DebuggerAttributesValid_Data))] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Lookup doesn't have a Debugger proxy in the full .NET framework. See https://github.com/dotnet/corefx/issues/14790.")] - public void DebuggerAttributesValid(ILookup lookup, TKey dummy1, TElement dummy2) + public void DebuggerAttributesValid(ILookup lookup) { - // The dummy parameters can be removed once https://github.com/dotnet/buildtools/pull/1300 is brought in. Assert.Equal($"Count = {lookup.Count}", DebuggerAttributes.ValidateDebuggerDisplayReferences(lookup)); object proxyObject = DebuggerAttributes.GetProxyObject(lookup); @@ -46,15 +45,12 @@ public void DebuggerAttributesValid(ILookup look public static IEnumerable DebuggerAttributesValid_Data() { IEnumerable source = new[] { 1 }; - yield return new object[] { source.ToLookup(i => i), 0, 0 }; - yield return new object[] { source.ToLookup(i => i.ToString(), i => i), string.Empty, 0 }; - yield return new object[] { source.ToLookup(i => TimeSpan.FromSeconds(i), i => i), TimeSpan.Zero, 0 }; - - yield return new object[] { new string[] { null }.ToLookup(x => x), string.Empty, string.Empty }; - // This test won't even work with the work-around because nullables lose their type once boxed, so xUnit sees an `int` and thinks - // we're trying to pass an ILookup rather than an ILookup. - // However, it should also be fixed once that PR is brought in, so leaving in this comment. - // yield return new object[] { new int?[] { null }.ToLookup(x => x), new int?(0), new int?(0) }; + yield return new object[] { source.ToLookup(i => i) }; + yield return new object[] { source.ToLookup(i => i.ToString(), i => i) }; + yield return new object[] { source.ToLookup(i => TimeSpan.FromSeconds(i), i => i) }; + + yield return new object[] { new string[] { null }.ToLookup(x => x) }; + yield return new object[] { new int?[] { null }.ToLookup(x => x) }; } } } diff --git a/src/System.Reflection/tests/AssemblyNameTests.cs b/src/System.Reflection/tests/AssemblyNameTests.cs index 1d1b49c6ed8d..e0c3e438c835 100644 --- a/src/System.Reflection/tests/AssemblyNameTests.cs +++ b/src/System.Reflection/tests/AssemblyNameTests.cs @@ -437,22 +437,22 @@ public static void Constructor_String_LoadVersionTest() string assemblyNamePrefix = "System.Reflection.Tests.Assembly_"; // Requested version 1.0 does not load 0.0.0.0, but loads 1.2.0.0, 3.0.0.0 - Assert.Throws(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "0_0_0_0, Version=1.0"))); + Assert.Throws(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "0_0_0_0, Version=1.0"))); Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_2_0_0, Version=1.0"))); Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "3_0_0_0, Version=1.0"))); // Requested version 1.1 does not load 1.0.0.0, but loads 1.1.2.0, 1.3.0.0 - Assert.Throws(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_0_0_0, Version=1.1"))); + Assert.Throws(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_0_0_0, Version=1.1"))); Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_2_0, Version=1.1"))); Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_3_0_0, Version=1.1"))); // Requested version 1.1.1 does not load 1.1.0.0, but loads 1.1.1.2, 1.1.3.0 - Assert.Throws(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_0_0, Version=1.1.1"))); + Assert.Throws(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_0_0, Version=1.1.1"))); Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_1_2, Version=1.1.1"))); Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_3_0, Version=1.1.1"))); // Requested version 1.1.1.1 does not load 1.1.1.0, but loads 1.1.1.3 - Assert.Throws(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_1_0, Version=1.1.1.1"))); + Assert.Throws(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_1_0, Version=1.1.1.1"))); Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_1_3, Version=1.1.1.1"))); Constructor_String_LoadVersionTest_ReferenceVersionAssemblies(); diff --git a/src/System.Reflection/tests/AssemblyTests.cs b/src/System.Reflection/tests/AssemblyTests.cs index cade5749cfc5..dcd026bee728 100644 --- a/src/System.Reflection/tests/AssemblyTests.cs +++ b/src/System.Reflection/tests/AssemblyTests.cs @@ -82,12 +82,6 @@ public void EmbeddedFiles(string resource, bool exists) Assert.Equal(exists, resourceStream != null); } - [Fact] - public void EntryPoint_ExecutingAssembly_IsNull() - { - Assert.Null(Helpers.ExecutingAssembly.EntryPoint); - } - public static IEnumerable Equals_TestData() { yield return new object[] { Assembly.Load(new AssemblyName(typeof(int).GetTypeInfo().Assembly.FullName)), Assembly.Load(new AssemblyName(typeof(int).GetTypeInfo().Assembly.FullName)), true }; diff --git a/src/System.Reflection/tests/AssemblyVersion/System.Reflection.Tests.Assembly_1_0_0_0.csproj b/src/System.Reflection/tests/AssemblyVersion/System.Reflection.Tests.Assembly_1_0_0_0.csproj index f296c670b7dc..b3095fddd093 100644 --- a/src/System.Reflection/tests/AssemblyVersion/System.Reflection.Tests.Assembly_1_0_0_0.csproj +++ b/src/System.Reflection/tests/AssemblyVersion/System.Reflection.Tests.Assembly_1_0_0_0.csproj @@ -1,4 +1,4 @@ - + {80696796-DE63-42CA-ACB0-A83E5AA7AE06} 1.0.0.0 diff --git a/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs b/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs index 1676df403484..05926170986e 100644 --- a/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs +++ b/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs @@ -117,7 +117,7 @@ public void FriendlyName() string expected = Assembly.GetEntryAssembly()?.GetName()?.Name; // GetEntryAssembly may be null (i.e. desktop) - if (expected == null) + if (expected == null || PlatformDetection.IsFullFramework) expected = Assembly.GetExecutingAssembly().GetName().Name; Assert.Equal(expected, s); diff --git a/src/System.Runtime/tests/System/ArrayTests.cs b/src/System.Runtime/tests/System/ArrayTests.cs index 80200ce904de..dda73e34317a 100644 --- a/src/System.Runtime/tests/System/ArrayTests.cs +++ b/src/System.Runtime/tests/System/ArrayTests.cs @@ -432,23 +432,23 @@ public static void BinarySearch_MultiDimensionalArray_ThrowsRankException() public static IEnumerable BinarySearch_TypesNotComparable_TestData() { // Different types - yield return new object[] { new int[] { 0 }, "", 0 }; + yield return new object[] { new int[] { 0 }, "" }; // Type does not implement IComparable - yield return new object[] { new object[] { new object() }, new object(), new object() }; + yield return new object[] { new object[] { new object() }, new object() }; // IntPtr and UIntPtr are not supported - yield return new object[] { new IntPtr[] { IntPtr.Zero }, IntPtr.Zero, IntPtr.Zero }; - yield return new object[] { new UIntPtr[] { UIntPtr.Zero }, UIntPtr.Zero, UIntPtr.Zero }; + yield return new object[] { new IntPtr[] { IntPtr.Zero }, IntPtr.Zero }; + yield return new object[] { new UIntPtr[] { UIntPtr.Zero }, UIntPtr.Zero }; // Conversion between primitives is not allowed - yield return new object[] { new sbyte[] { 0 }, 0, (sbyte)0 }; - yield return new object[] { new char[] { '\0' }, (ushort)0, '\0' }; + yield return new object[] { new sbyte[] { 0 }, 0 }; + yield return new object[] { new char[] { '\0' }, (ushort)0 }; } [Theory] [MemberData(nameof(BinarySearch_TypesNotComparable_TestData))] - public static void BinarySearch_TypesNotIComparable_ThrowsInvalidOperationException(T[] array, object value, T dummy) + public static void BinarySearch_TypesNotIComparable_ThrowsInvalidOperationException(T[] array, object value) { Assert.Throws(() => Array.BinarySearch(array, value)); Assert.Throws(() => Array.BinarySearch(array, value, null)); @@ -997,7 +997,7 @@ public static IEnumerable Copy_Array_UnreliableConversion_CanPerform_T yield return new object[] { intRank2Array, 0, new long[2, 3], 0, 6, new long[,] { { 1, 2, 3 }, { 4, 5, 6 } } }; // int[,] -> object[,] - yield return new object[] { intRank2Array, 0, new object[2, 3], 0, 6, new object[,] { { 1, 2 }, { 3, 4 }, { 5, 6 } } }; + //yield return new object[] { intRank2Array, 0, new object[2, 3], 0, 6, new object[,] { { 1, 2 }, { 3, 4 }, { 5, 6 } } }; yield return new object[] { intRank2Array, 0, new object[3, 2], 0, 6, new object[,] { { 1, 2 }, { 3, 4 }, { 5, 6 } } }; yield return new object[] { intRank2Array, 1, new object[2, 3], 2, 3, new object[,] { { null, null, 2 }, { 3, 4, null } } }; @@ -2038,23 +2038,25 @@ public static IEnumerable IndexOf_SZArray_TestData() yield return new object[] { new double[] { 1, 2, 3, 3 }, (double)1, 0, 0, -1 }; yield return new object[] { new double[0], (double)1, 0, 0, -1 }; + // [ActiveIssue("https://github.com/xunit/xunit/issues/1771")] // IntPtr - yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3 }, (IntPtr)1, 0, 4, 0 }; - yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3 }, (IntPtr)3, 0, 4, 2 }; - yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3 }, (IntPtr)2, 1, 2, 1 }; - yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3 }, (IntPtr)1, 1, 2, -1 }; - yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3 }, (IntPtr)1, 4, 0, -1 }; - yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3 }, (IntPtr)1, 0, 0, -1 }; - yield return new object[] { new IntPtr[0], (IntPtr)1, 0, 0, -1 }; - + //yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3 }, (IntPtr)1, 0, 4, 0 }; + //yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3 }, (IntPtr)3, 0, 4, 2 }; + //yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3 }, (IntPtr)2, 1, 2, 1 }; + //yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3 }, (IntPtr)1, 1, 2, -1 }; + //yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3 }, (IntPtr)1, 4, 0, -1 }; + //yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3 }, (IntPtr)1, 0, 0, -1 }; + //yield return new object[] { new IntPtr[0], (IntPtr)1, 0, 0, -1 }; + + // [ActiveIssue("https://github.com/xunit/xunit/issues/1771")] // UIntPtr - yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3 }, (UIntPtr)1, 0, 4, 0 }; - yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3 }, (UIntPtr)3, 0, 4, 2 }; - yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3 }, (UIntPtr)2, 1, 2, 1 }; - yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3 }, (UIntPtr)1, 1, 2, -1 }; - yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3 }, (UIntPtr)1, 4, 0, -1 }; - yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3 }, (UIntPtr)1, 0, 0, -1 }; - yield return new object[] { new UIntPtr[0], (UIntPtr)1, 0, 0, -1 }; + //yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3 }, (UIntPtr)1, 0, 4, 0 }; + //yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3 }, (UIntPtr)3, 0, 4, 2 }; + //yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3 }, (UIntPtr)2, 1, 2, 1 }; + //yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3 }, (UIntPtr)1, 1, 2, -1 }; + //yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3 }, (UIntPtr)1, 4, 0, -1 }; + //yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3 }, (UIntPtr)1, 0, 0, -1 }; + //yield return new object[] { new UIntPtr[0], (UIntPtr)1, 0, 0, -1 }; // String var stringArray = new string[] { null, null, "Hello", "Hello", "Goodbye", "Goodbye", null, null }; @@ -2414,23 +2416,25 @@ public static IEnumerable LastIndexOf_SZArray_TestData() yield return new object[] { new double[] { 1, 2, 3, 3, 4 }, (double)3, 0, 0, -1 }; yield return new object[] { new double[] { 1, 2, 3, 3, 4 }, (double)3, 3, 0, -1 }; + // [ActiveIssue("https://github.com/xunit/xunit/issues/1771")] // IntPtr - yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3, (IntPtr)4 }, (IntPtr)1, 4, 5, 0 }; - yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3, (IntPtr)4 }, (IntPtr)3, 4, 5, 3 }; - yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3, (IntPtr)4 }, (IntPtr)2, 2, 3, 1 }; - yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3, (IntPtr)4 }, (IntPtr)4, 2, 3, -1 }; - yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3, (IntPtr)4 }, (IntPtr)5, 4, 5, -1 }; - yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3, (IntPtr)4 }, (IntPtr)3, 0, 0, -1 }; - yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3, (IntPtr)4 }, (IntPtr)3, 3, 0, -1 }; - + //yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3, (IntPtr)4 }, (IntPtr)1, 4, 5, 0 }; + //yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3, (IntPtr)4 }, (IntPtr)3, 4, 5, 3 }; + //yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3, (IntPtr)4 }, (IntPtr)2, 2, 3, 1 }; + //yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3, (IntPtr)4 }, (IntPtr)4, 2, 3, -1 }; + //yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3, (IntPtr)4 }, (IntPtr)5, 4, 5, -1 }; + //yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3, (IntPtr)4 }, (IntPtr)3, 0, 0, -1 }; + //yield return new object[] { new IntPtr[] { (IntPtr)1, (IntPtr)2, (IntPtr)3, (IntPtr)3, (IntPtr)4 }, (IntPtr)3, 3, 0, -1 }; + + // [ActiveIssue("https://github.com/xunit/xunit/issues/1771")] // UIntPtr - yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3, (UIntPtr)4 }, (UIntPtr)1, 4, 5, 0 }; - yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3, (UIntPtr)4 }, (UIntPtr)3, 4, 5, 3 }; - yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3, (UIntPtr)4 }, (UIntPtr)2, 2, 3, 1 }; - yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3, (UIntPtr)4 }, (UIntPtr)4, 2, 3, -1 }; - yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3, (UIntPtr)4 }, (UIntPtr)5, 4, 5, -1 }; - yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3, (UIntPtr)4 }, (UIntPtr)3, 0, 0, -1 }; - yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3, (UIntPtr)4 }, (UIntPtr)3, 3, 0, -1 }; + //yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3, (UIntPtr)4 }, (UIntPtr)1, 4, 5, 0 }; + //yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3, (UIntPtr)4 }, (UIntPtr)3, 4, 5, 3 }; + //yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3, (UIntPtr)4 }, (UIntPtr)2, 2, 3, 1 }; + //yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3, (UIntPtr)4 }, (UIntPtr)4, 2, 3, -1 }; + //yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3, (UIntPtr)4 }, (UIntPtr)5, 4, 5, -1 }; + //yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3, (UIntPtr)4 }, (UIntPtr)3, 0, 0, -1 }; + //yield return new object[] { new UIntPtr[] { (UIntPtr)1, (UIntPtr)2, (UIntPtr)3, (UIntPtr)3, (UIntPtr)4 }, (UIntPtr)3, 3, 0, -1 }; // String var stringArray = new string[] { null, null, "Hello", "Hello", "Goodbye", "Goodbye", null, null }; diff --git a/src/System.Runtime/tests/System/Reflection/InvokeRefReturn.netcoreapp.cs b/src/System.Runtime/tests/System/Reflection/InvokeRefReturn.netcoreapp.cs index 0f5836181131..caef83ebb715 100644 --- a/src/System.Runtime/tests/System/Reflection/InvokeRefReturn.netcoreapp.cs +++ b/src/System.Runtime/tests/System/Reflection/InvokeRefReturn.netcoreapp.cs @@ -114,9 +114,10 @@ public static IEnumerable RefReturnInvokeTestData yield return new object[] { 42L }; yield return new object[] { 43.67f }; yield return new object[] { 43.67 }; - yield return new object[] { new IntPtr(42) }; - yield return new object[] { new UIntPtr(42) }; - yield return new object[] { 232953453454m }; + // [ActiveIssue("https://github.com/xunit/xunit/issues/1771")] + //yield return new object[] { new IntPtr(42) }; + //yield return new object[] { new UIntPtr(42) }; + //yield return new object[] { 232953453454m }; yield return new object[] { BindingFlags.IgnoreCase }; yield return new object[] { "Hello" }; yield return new object[] { new object() }; diff --git a/src/System.Security.Cryptography.Xml/tests/ReferenceTest.cs b/src/System.Security.Cryptography.Xml/tests/ReferenceTest.cs index 0cbec07cff8a..6ae18269e6e2 100644 --- a/src/System.Security.Cryptography.Xml/tests/ReferenceTest.cs +++ b/src/System.Security.Cryptography.Xml/tests/ReferenceTest.cs @@ -46,10 +46,7 @@ public void Ctor_Uri(string uri) { Reference reference = new Reference(uri); - if (PlatformDetection.IsFullFramework) - Assert.Equal("http://www.w3.org/2000/09/xmldsig#sha1", reference.DigestMethod); - else - Assert.Equal("http://www.w3.org/2001/04/xmlenc#sha256", reference.DigestMethod); + Assert.Equal("http://www.w3.org/2001/04/xmlenc#sha256", reference.DigestMethod); Assert.Null(reference.DigestValue); Assert.Null(reference.Id); @@ -68,10 +65,8 @@ public void Ctor_Stream(string data) using (MemoryStream memoryStream = data != null ? new MemoryStream(Encoding.UTF8.GetBytes(data)) : null) { Reference reference = new Reference(memoryStream); - if (PlatformDetection.IsFullFramework) - Assert.Equal("http://www.w3.org/2000/09/xmldsig#sha1", reference.DigestMethod); - else - Assert.Equal("http://www.w3.org/2001/04/xmlenc#sha256", reference.DigestMethod); + + Assert.Equal("http://www.w3.org/2001/04/xmlenc#sha256", reference.DigestMethod); Assert.Null(reference.DigestValue); Assert.Null(reference.Id); diff --git a/src/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs b/src/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs index 4e7ddf68c4b5..1c6bbe837164 100644 --- a/src/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs +++ b/src/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs @@ -191,10 +191,7 @@ public void AsymmetricRSASignature() Assert.Null(signedXml.SigningKeyName); - if (PlatformDetection.IsFullFramework) - Assert.Equal("http://www.w3.org/2000/09/xmldsig#rsa-sha1", signedXml.SignatureMethod); - else - Assert.Equal("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", signedXml.SignatureMethod); + Assert.Equal("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", signedXml.SignatureMethod); Assert.Equal(key.KeySize / 8, signedXml.SignatureValue.Length); Assert.Null(signedXml.SigningKeyName); @@ -1575,7 +1572,6 @@ public void VerifyHMAC_HMACOutputLength_Invalid() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/corefx/issues/18690")] public void CoreFxSignedXmlUsesSha256ByDefault() { const string expectedSignatureMethod = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"; @@ -1583,15 +1579,6 @@ public void CoreFxSignedXmlUsesSha256ByDefault() ValidateSignedXmlDefaultHashAlgorithms(expectedSignatureMethod, expectedDigestMethod); } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/corefx/issues/18690")] - public void NetFxSignedXmlUsesSha1ByDefault() - { - const string expectedSignatureMethod = "http://www.w3.org/2000/09/xmldsig#rsa-sha1"; - const string expectedDigestMethod = "http://www.w3.org/2000/09/xmldsig#sha1"; - ValidateSignedXmlDefaultHashAlgorithms(expectedSignatureMethod, expectedDigestMethod); - } - private void ValidateSignedXmlDefaultHashAlgorithms(string expectedSignatureMethod, string expectedDigestMethod) { const string xml = @" diff --git a/src/System.Security.Cryptography.Xml/tests/XmlDecryptionTransformTest.cs b/src/System.Security.Cryptography.Xml/tests/XmlDecryptionTransformTest.cs index 70d86a8ceafa..1557e9c44e93 100644 --- a/src/System.Security.Cryptography.Xml/tests/XmlDecryptionTransformTest.cs +++ b/src/System.Security.Cryptography.Xml/tests/XmlDecryptionTransformTest.cs @@ -136,7 +136,6 @@ public void LoadInnerXml_XmlValidUriForExcept() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/corefx/issues/16798")] public void LoadStreamInput_CorrectXml() { XmlDocument doc = new XmlDocument(); @@ -169,7 +168,6 @@ public void GetOutput_WrongType() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/corefx/issues/16798")] public void GetOutput_XmlNoEncryptedData() { XmlDocument doc = new XmlDocument(); @@ -183,7 +181,7 @@ public void GetOutput_XmlNoEncryptedData() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/corefx/issues/16798")] + public void GetOutput_XmlWithEncryptedData() { XmlDocument doc = new XmlDocument(); @@ -197,7 +195,6 @@ public void GetOutput_XmlWithEncryptedData() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/corefx/issues/16798")] public void GetOutput_XmlWithEncryptedDataInRoot() { XmlDocument doc = new XmlDocument(); @@ -211,7 +208,6 @@ public void GetOutput_XmlWithEncryptedDataInRoot() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/corefx/issues/16798")] public void GetOutput_XmlWithEncryptedDataAndExcept() { XmlDocument doc = new XmlDocument(); diff --git a/src/System.Threading.Thread/tests/ThreadTests.cs b/src/System.Threading.Thread/tests/ThreadTests.cs index 1a2505210995..737a47dce444 100644 --- a/src/System.Threading.Thread/tests/ThreadTests.cs +++ b/src/System.Threading.Thread/tests/ThreadTests.cs @@ -162,8 +162,8 @@ private static IEnumerable ApartmentStateTest_MemberData() [InlineData("STAMain.exe", "WaitAllNotSupportedOnSta_Test1")] [InlineData("MTAMain.exe", "GetApartmentStateTest")] [InlineData("MTAMain.exe", "SetApartmentStateTest")] - [InlineData("DefaultApartmentStateMain.exe", "GetApartmentStateTest")] - [InlineData("DefaultApartmentStateMain.exe", "SetApartmentStateTest")] + [InlineData("DefaultApartmentStateMain.dll", "GetApartmentStateTest")] + [InlineData("DefaultApartmentStateMain.dll", "SetApartmentStateTest")] [ActiveIssue(20766, TargetFrameworkMonikers.Uap)] public static void ApartmentState_AttributePresent(string appName, string testName) { From c54d4a20c315730cd76fb7688c15d0a85837f3ce Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Wed, 22 Aug 2018 16:32:54 +0200 Subject: [PATCH 6/6] Add uap test leg to CI Disable/Enable tests for clean uap CI leg --- buildpipeline/windows.groovy | 4 ++-- .../tests/ConsoleEncoding.Windows.cs | 2 -- src/System.Console/tests/ConsoleEncoding.cs | 1 - src/System.Console/tests/NegativeTesting.cs | 12 ---------- src/System.Console/tests/ReadAndWrite.cs | 2 -- .../tests/WindowAndCursorProps.cs | 5 ----- .../tests/ProcessStartInfoTests.cs | 1 + .../tests/ProcessTests.cs | 1 + .../tests/ProcessTests.netcoreapp.cs | 1 + .../tests/ProcessWaitingTests.cs | 6 +++++ .../tests/File/EncryptDecrypt.cs | 2 ++ .../tests/FileStream/ctor_sfh_fa.cs | 4 +++- .../tests/FileStream/ctor_sfh_fa_buffer.cs | 4 +++- src/System.Linq/tests/ConcatTests.cs | 2 +- .../tests/AssemblyNameTests.cs | 21 ++++++++++++++---- .../tests/System/AppDomainTests.cs | 8 ++++--- .../Marshal/GetComObjectDataTests.Windows.cs | 1 + .../Marshal/SetComObjectDataTests.Windows.cs | 2 ++ .../tests/BinaryFormatterTestData.cs | 22 ++++++++++++++----- .../tests/System/ActivatorTests.netcoreapp.cs | 1 + .../tests/WindowsIdentityTests.cs | 1 + .../tests/ThreadTests.cs | 5 +++-- .../tests/AsyncTransactionScopeTests.cs | 2 +- 23 files changed, 67 insertions(+), 43 deletions(-) diff --git a/buildpipeline/windows.groovy b/buildpipeline/windows.groovy index 1535b6aaeb5b..a5f311002ef5 100644 --- a/buildpipeline/windows.groovy +++ b/buildpipeline/windows.groovy @@ -8,7 +8,7 @@ // TestOuter - If true, runs outerloop, if false runs just innerloop def submittedHelixJson = null -def submitToHelix = (params.TGroup == 'netcoreapp' || params.TGroup == 'netfx') +def submitToHelix = (params.TGroup == 'netcoreapp' || params.TGroup == 'netfx' || params.TGroup == 'uap') simpleNode('windows.10.amd64.clientrs4.devex.open') { stage ('Checkout source') { @@ -46,7 +46,7 @@ simpleNode('windows.10.amd64.clientrs4.devex.open') { if (submitToHelix) { archiveTests = 'true' } - if (submitToHelix || params.TGroup == 'uap' || params.TGroup == 'uapaot') { + if (submitToHelix || params.TGroup == 'uapaot') { additionalArgs += ' -SkipTests' } if (params.TGroup != 'all') { diff --git a/src/System.Console/tests/ConsoleEncoding.Windows.cs b/src/System.Console/tests/ConsoleEncoding.Windows.cs index 35cbe30ff582..002cc9538dc8 100644 --- a/src/System.Console/tests/ConsoleEncoding.Windows.cs +++ b/src/System.Console/tests/ConsoleEncoding.Windows.cs @@ -11,7 +11,6 @@ public partial class ConsoleEncoding { [Fact] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "https://github.com/dotnet/corefx/issues/21483")] public void InputEncoding_SetDefaultEncoding_Success() { RemoteInvoke(() => @@ -45,7 +44,6 @@ public void InputEncoding_SetUnicodeEncoding_SilentlyIgnoredInternally() [Fact] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "https://github.com/dotnet/corefx/issues/21483")] public void OutputEncoding_SetDefaultEncoding_Success() { RemoteInvoke(() => diff --git a/src/System.Console/tests/ConsoleEncoding.cs b/src/System.Console/tests/ConsoleEncoding.cs index fdcd385ae309..99fa225478f3 100644 --- a/src/System.Console/tests/ConsoleEncoding.cs +++ b/src/System.Console/tests/ConsoleEncoding.cs @@ -79,7 +79,6 @@ public void TestEncoding(string inputString) } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "https://github.com/dotnet/corefx/issues/21483")] public void TestValidEncodings() { Action check = encoding => diff --git a/src/System.Console/tests/NegativeTesting.cs b/src/System.Console/tests/NegativeTesting.cs index 9315e76a4b2a..bba8756e8a05 100644 --- a/src/System.Console/tests/NegativeTesting.cs +++ b/src/System.Console/tests/NegativeTesting.cs @@ -8,18 +8,6 @@ public class NegativeTesting { - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsInAppContainer))] // In appcontainer, the stream cannot be opened: there is no Console - public static void OpenStandardOutNegativeTests_Uap() - { - Assert.Same(Stream.Null, Console.OpenStandardOutput()); - } - - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsInAppContainer))] // In appcontainer, the stream cannot be opened: there is no Console - public static void OpenStandardErrorNegativeTests_Uap() - { - Assert.Same(Stream.Null, Console.OpenStandardError()); - } - [Fact] public static void StreamNullTests() { diff --git a/src/System.Console/tests/ReadAndWrite.cs b/src/System.Console/tests/ReadAndWrite.cs index a8e890f98b0c..9d19c8db64ed 100644 --- a/src/System.Console/tests/ReadAndWrite.cs +++ b/src/System.Console/tests/ReadAndWrite.cs @@ -261,7 +261,6 @@ public static unsafe void ValidateConsoleEncoding(Encoding encoding) [Fact] // On the full framework it is not guaranteed to eat the preamble bytes [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "https://github.com/dotnet/corefx/issues/21483")] public static unsafe void OutputEncodingPreamble() { Encoding curEncoding = Console.OutputEncoding; @@ -284,7 +283,6 @@ public static unsafe void OutputEncodingPreamble() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "https://github.com/dotnet/corefx/issues/21483")] public static unsafe void OutputEncoding() { Encoding curEncoding = Console.OutputEncoding; diff --git a/src/System.Console/tests/WindowAndCursorProps.cs b/src/System.Console/tests/WindowAndCursorProps.cs index 02d76738df97..fab7e15024c8 100644 --- a/src/System.Console/tests/WindowAndCursorProps.cs +++ b/src/System.Console/tests/WindowAndCursorProps.cs @@ -222,7 +222,6 @@ public static void Title_SetUnix_Success() [Fact] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "In appcontainer, the stream cannot be opened: there is no Console")] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "// NETFX does not have the fix https://github.com/dotnet/corefx/pull/28905")] public static void Title_GetWindows_ReturnsNonNull() { @@ -231,7 +230,6 @@ public static void Title_GetWindows_ReturnsNonNull() [Fact] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "In appcontainer, the stream cannot be opened: there is no Console")] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "// NETFX does not have the fix https://github.com/dotnet/corefx/pull/28905")] public static void Title_Get_Windows_NoNulls() { @@ -261,7 +259,6 @@ public static void Title_Get_Windows_NoNulls() [InlineData(513)] [InlineData(1024)] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // In appcontainer, the stream cannot be opened: there is no Console public static void Title_Set_Windows(int lengthOfTitle) { // Try to set the title to some other value. @@ -283,13 +280,11 @@ public static void Title_Set_Windows(int lengthOfTitle) }, lengthOfTitle.ToString()).Dispose(); } - [SkipOnTargetFramework(~TargetFrameworkMonikers.Uap)] // In appcontainer, the stream cannot be opened: there is no Console public static void Title_GetWindowsUap_ThrowsIOException() { Assert.Throws(() => Console.Title); } - [SkipOnTargetFramework(~TargetFrameworkMonikers.Uap)] // In appcontainer, the stream cannot be opened: there is no Console public static void Title_SetWindowsUap_ThrowsIOException(int lengthOfTitle) { Assert.Throws(() => Console.Title = "x"); diff --git a/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs b/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs index 91d9cc11b088..3b3f4487de8e 100644 --- a/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs @@ -19,6 +19,7 @@ namespace System.Diagnostics.Tests { + [ActiveIssue(31908, TargetFrameworkMonikers.Uap)] public partial class ProcessStartInfoTests : ProcessTestBase { [Fact] diff --git a/src/System.Diagnostics.Process/tests/ProcessTests.cs b/src/System.Diagnostics.Process/tests/ProcessTests.cs index b7f47486c0c8..9b51d9fe712f 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTests.cs @@ -16,6 +16,7 @@ namespace System.Diagnostics.Tests { + [ActiveIssue(31908, TargetFrameworkMonikers.Uap)] public partial class ProcessTests : ProcessTestBase { private class FinalizingProcess : Process diff --git a/src/System.Diagnostics.Process/tests/ProcessTests.netcoreapp.cs b/src/System.Diagnostics.Process/tests/ProcessTests.netcoreapp.cs index f0bbd00d17c7..747fcff56a7a 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTests.netcoreapp.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTests.netcoreapp.cs @@ -96,6 +96,7 @@ public void StartProcessWithSameArgumentList() } [Fact] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")] public void BothArgumentCtorAndArgumentListSet() { ProcessStartInfo psi = new ProcessStartInfo(GetCurrentProcessName(), "arg3"); diff --git a/src/System.Diagnostics.Process/tests/ProcessWaitingTests.cs b/src/System.Diagnostics.Process/tests/ProcessWaitingTests.cs index 96c24cce0d34..8f95bdea213a 100644 --- a/src/System.Diagnostics.Process/tests/ProcessWaitingTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessWaitingTests.cs @@ -13,6 +13,7 @@ namespace System.Diagnostics.Tests public class ProcessWaitingTests : ProcessTestBase { [Fact] + [ActiveIssue(31908, TargetFrameworkMonikers.Uap)] public void MultipleProcesses_StartAllKillAllWaitAll() { const int Iters = 10; @@ -24,6 +25,7 @@ public void MultipleProcesses_StartAllKillAllWaitAll() } [Fact] + [ActiveIssue(31908, TargetFrameworkMonikers.Uap)] public void MultipleProcesses_SerialStartKillWait() { const int Iters = 10; @@ -37,6 +39,7 @@ public void MultipleProcesses_SerialStartKillWait() } [Fact] + [ActiveIssue(31908, TargetFrameworkMonikers.Uap)] public void MultipleProcesses_ParallelStartKillWait() { const int Tasks = 4, ItersPerTask = 10; @@ -62,6 +65,7 @@ public void CurrentProcess_WaitNeverCompletes(int milliseconds) } [Fact] + [ActiveIssue(31908, TargetFrameworkMonikers.Uap)] public void SingleProcess_TryWaitMultipleTimesBeforeCompleting() { Process p = CreateProcessLong(); @@ -84,6 +88,7 @@ public void SingleProcess_TryWaitMultipleTimesBeforeCompleting() [Theory] [InlineData(false)] [InlineData(true)] + [ActiveIssue(31908, TargetFrameworkMonikers.Uap)] public async Task SingleProcess_WaitAfterExited(bool addHandlerBeforeStart) { Process p = CreateProcessLong(); @@ -125,6 +130,7 @@ public async Task SingleProcess_EnableRaisingEvents_CorrectExitCode(int exitCode } [Fact] + [ActiveIssue(31908, TargetFrameworkMonikers.Uap)] public void SingleProcess_CopiesShareExitInformation() { Process p = CreateProcessLong(); diff --git a/src/System.IO.FileSystem/tests/File/EncryptDecrypt.cs b/src/System.IO.FileSystem/tests/File/EncryptDecrypt.cs index 7fdf9fa32440..4e5a5c1079f9 100644 --- a/src/System.IO.FileSystem/tests/File/EncryptDecrypt.cs +++ b/src/System.IO.FileSystem/tests/File/EncryptDecrypt.cs @@ -13,6 +13,7 @@ public class EncryptDecrypt : FileSystemTest [Fact] [PlatformSpecific(TestPlatforms.Windows)] [SkipOnTargetFramework(TargetFrameworkMonikers.NetcoreCoreRT)] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "File encryption is not supported on this platform.")] public static void NullArg_ThrowsException() { AssertExtensions.Throws("path", () => File.Encrypt(null)); @@ -32,6 +33,7 @@ public static void EncryptDecrypt_NotSupported() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "File encryption is not supported on this platform.")] [PlatformSpecific(TestPlatforms.Windows)] public static void EncryptDecrypt_Read() { diff --git a/src/System.IO.FileSystem/tests/FileStream/ctor_sfh_fa.cs b/src/System.IO.FileSystem/tests/FileStream/ctor_sfh_fa.cs index 3f319f894617..5a7a21d63e10 100644 --- a/src/System.IO.FileSystem/tests/FileStream/ctor_sfh_fa.cs +++ b/src/System.IO.FileSystem/tests/FileStream/ctor_sfh_fa.cs @@ -24,6 +24,7 @@ public void InvalidHandle_Throws() } [Fact] + [ActiveIssue(31909, TargetFrameworkMonikers.Uap)] public void InvalidAccess_Throws() { using (var handle = new SafeFileHandle(new IntPtr(1), ownsHandle: false)) @@ -32,8 +33,9 @@ public void InvalidAccess_Throws() } } - [ActiveIssue(20797, TargetFrameworkMonikers.NetFramework)] // This fails on desktop [Fact] + [ActiveIssue(20797, TargetFrameworkMonikers.NetFramework)] + [ActiveIssue(31909, TargetFrameworkMonikers.Uap)] public void InvalidAccess_DoesNotCloseHandle() { using (var handle = new SafeFileHandle(new IntPtr(1), ownsHandle: false)) diff --git a/src/System.IO.FileSystem/tests/FileStream/ctor_sfh_fa_buffer.cs b/src/System.IO.FileSystem/tests/FileStream/ctor_sfh_fa_buffer.cs index f98efa02510c..1663f0171b34 100644 --- a/src/System.IO.FileSystem/tests/FileStream/ctor_sfh_fa_buffer.cs +++ b/src/System.IO.FileSystem/tests/FileStream/ctor_sfh_fa_buffer.cs @@ -23,6 +23,7 @@ protected virtual FileStream CreateFileStream(SafeFileHandle handle, FileAccess [Theory, InlineData(0), InlineData(-1)] + [ActiveIssue(31909, TargetFrameworkMonikers.Uap)] public void InvalidBufferSize_Throws(int size) { using (var handle = new SafeFileHandle(new IntPtr(1), ownsHandle: false)) @@ -31,8 +32,9 @@ public void InvalidBufferSize_Throws(int size) } } - [ActiveIssue(20797, TargetFrameworkMonikers.NetFramework)] // This fails on desktop [Fact] + [ActiveIssue(20797, TargetFrameworkMonikers.NetFramework)] // This fails on desktop + [ActiveIssue(31909, TargetFrameworkMonikers.Uap)] public void InvalidBufferSize_DoesNotCloseHandle() { using (var handle = new SafeFileHandle(new IntPtr(1), ownsHandle: false)) diff --git a/src/System.Linq/tests/ConcatTests.cs b/src/System.Linq/tests/ConcatTests.cs index 5c75f3de92ea..022997e83b09 100644 --- a/src/System.Linq/tests/ConcatTests.cs +++ b/src/System.Linq/tests/ConcatTests.cs @@ -256,7 +256,7 @@ public void CountOfConcatIteratorShouldThrowExceptionOnIntegerOverflow() { // The full .NET Framework uses unsigned arithmetic summing up collection counts. // See https://github.com/dotnet/corefx/pull/11492. - if (!PlatformDetection.IsNetCore) + if (PlatformDetection.IsFullFramework || PlatformDetection.IsUap) { testCode(); } diff --git a/src/System.Reflection/tests/AssemblyNameTests.cs b/src/System.Reflection/tests/AssemblyNameTests.cs index e0c3e438c835..3bc0df75f2ab 100644 --- a/src/System.Reflection/tests/AssemblyNameTests.cs +++ b/src/System.Reflection/tests/AssemblyNameTests.cs @@ -437,22 +437,35 @@ public static void Constructor_String_LoadVersionTest() string assemblyNamePrefix = "System.Reflection.Tests.Assembly_"; // Requested version 1.0 does not load 0.0.0.0, but loads 1.2.0.0, 3.0.0.0 - Assert.Throws(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "0_0_0_0, Version=1.0"))); + if (PlatformDetection.IsUap) + Assert.Throws(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "0_0_0_0, Version=1.0"))); + else + Assert.Throws(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "0_0_0_0, Version=1.0"))); + Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_2_0_0, Version=1.0"))); Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "3_0_0_0, Version=1.0"))); // Requested version 1.1 does not load 1.0.0.0, but loads 1.1.2.0, 1.3.0.0 - Assert.Throws(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_0_0_0, Version=1.1"))); + if (PlatformDetection.IsUap) + Assert.Throws(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_0_0_0, Version=1.1"))); + else + Assert.Throws(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_0_0_0, Version=1.1"))); Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_2_0, Version=1.1"))); Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_3_0_0, Version=1.1"))); // Requested version 1.1.1 does not load 1.1.0.0, but loads 1.1.1.2, 1.1.3.0 - Assert.Throws(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_0_0, Version=1.1.1"))); + if (PlatformDetection.IsUap) + Assert.Throws(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_0_0, Version=1.1.1"))); + else + Assert.Throws(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_0_0, Version=1.1.1"))); Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_1_2, Version=1.1.1"))); Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_3_0, Version=1.1.1"))); // Requested version 1.1.1.1 does not load 1.1.1.0, but loads 1.1.1.3 - Assert.Throws(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_1_0, Version=1.1.1.1"))); + if (PlatformDetection.IsUap) + Assert.Throws(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_1_0, Version=1.1.1.1"))); + else + Assert.Throws(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_1_0, Version=1.1.1.1"))); Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_1_3, Version=1.1.1.1"))); Constructor_String_LoadVersionTest_ReferenceVersionAssemblies(); diff --git a/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs b/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs index 05926170986e..9b9e2b7be88f 100644 --- a/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs +++ b/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs @@ -41,9 +41,11 @@ public void RelativeSearchPath_Is_Null() [Fact] public void TargetFrameworkTest() { - RemoteInvoke(() => { - Assert.Contains("DUMMY-TFA", AppContext.TargetFrameworkName); - }).Dispose(); + // On Uap we use the Microsoft.DotNet.XUnitRunnerUap instead of the RemoteExecutorConsoleApp + string targetFrameworkName = PlatformDetection.IsUap ? ".NETCore,Version=v5.0" : "DUMMY-TFA"; + RemoteInvoke((_targetFrameworkName) => { + Assert.Contains(_targetFrameworkName, AppContext.TargetFrameworkName); + }, targetFrameworkName).Dispose(); } [Fact] diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetComObjectDataTests.Windows.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetComObjectDataTests.Windows.cs index c95fc56f3f70..8cfa29ab5985 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetComObjectDataTests.Windows.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetComObjectDataTests.Windows.cs @@ -10,6 +10,7 @@ namespace System.Runtime.InteropServices.Tests public partial class GetComObjectDataTests { [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] + [ActiveIssue(31910, TargetFrameworkMonikers.Uap)] [PlatformSpecific(TestPlatforms.Windows)] public void GetComObjectData_ValidObject_ReturnsExpected() { diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/SetComObjectDataTests.Windows.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/SetComObjectDataTests.Windows.cs index e4001612d64e..42fb0b7dc5b9 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/SetComObjectDataTests.Windows.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/SetComObjectDataTests.Windows.cs @@ -10,6 +10,7 @@ namespace System.Runtime.InteropServices.Tests public partial class SetComObjectDataTests { [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] + [ActiveIssue(31910, TargetFrameworkMonikers.Uap)] [PlatformSpecific(TestPlatforms.Windows)] public void SetComObjectData_NonNullValue_Sucesss() { @@ -26,6 +27,7 @@ public void SetComObjectData_NonNullValue_Sucesss() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] + [ActiveIssue(31910, TargetFrameworkMonikers.Uap)] [PlatformSpecific(TestPlatforms.Windows)] public void SetComObjectData_NullValue_Sucesss() { diff --git a/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTestData.cs b/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTestData.cs index 7bf71f913dba..2e44a28a5b6f 100644 --- a/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTestData.cs +++ b/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTestData.cs @@ -1196,10 +1196,15 @@ private static IEnumerable SerializableObjects() yield return new object[] { new RectangleF(10.5f, 10.5f, 52.3f, 69.4f), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABlTeXN0ZW0uRHJhd2luZy5SZWN0YW5nbGVGBAAAAAF4AXkFd2lkdGgGaGVpZ2h0AAAAAAsLCwsCAAAAAAAoQQAAKEEzM1FCzcyKQgs=", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABlTeXN0ZW0uRHJhd2luZy5SZWN0YW5nbGVGBAAAAAF4AXkFd2lkdGgGaGVpZ2h0AAAAAAsLCwsCAAAAAAAoQQAAKEEzM1FCzcyKQgs=", TargetFrameworkMoniker.netfx461) } }; yield return new object[] { new Size(10, 45), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABNTeXN0ZW0uRHJhd2luZy5TaXplAgAAAAV3aWR0aAZoZWlnaHQAAAgIAgAAAAoAAAAtAAAACw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABNTeXN0ZW0uRHJhd2luZy5TaXplAgAAAAV3aWR0aAZoZWlnaHQAAAgIAgAAAAoAAAAtAAAACw==", TargetFrameworkMoniker.netfx461) } }; yield return new object[] { new SizeF(10.2f, 45.8f), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABRTeXN0ZW0uRHJhd2luZy5TaXplRgIAAAAFd2lkdGgGaGVpZ2h0AAALCwIAAAAzMyNBMzM3Qgs=", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABRTeXN0ZW0uRHJhd2luZy5TaXplRgIAAAAFd2lkdGgGaGVpZ2h0AAALCwIAAAAzMyNBMzM3Qgs=", TargetFrameworkMoniker.netfx461) } }; - yield return new object[] { GraphicsUnit.Pixel, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABtTeXN0ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAIAAAACAAAACw==", TargetFrameworkMoniker.netcoreapp21), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABtTeXN0ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAIAAAACAAAACw==", TargetFrameworkMoniker.netfx461) } }; - yield return new object[] { ContentAlignment.BottomCenter, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAAB9TeXN0ZW0uRHJhd2luZy5Db250ZW50QWxpZ25tZW50AQAAAAd2YWx1ZV9fAAgCAAAAAAIAAAs=", TargetFrameworkMoniker.netcoreapp21), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAAB9TeXN0ZW0uRHJhd2luZy5Db250ZW50QWxpZ25tZW50AQAAAAd2YWx1ZV9fAAgCAAAAAAIAAAs=", TargetFrameworkMoniker.netfx461) } }; - yield return new object[] { LinearGradientMode.BackwardDiagonal, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACtTeXN0ZW0uRHJhd2luZy5EcmF3aW5nMkQuTGluZWFyR3JhZGllbnRNb2RlAQAAAAd2YWx1ZV9fAAgCAAAAAwAAAAs=", TargetFrameworkMoniker.netcoreapp21), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACtTeXN0ZW0uRHJhd2luZy5EcmF3aW5nMkQuTGluZWFyR3JhZGllbnRNb2RlAQAAAAd2YWx1ZV9fAAgCAAAAAwAAAAs=", TargetFrameworkMoniker.netfx461) } }; - yield return new object[] { FontStyle.Bold, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABhTeXN0ZW0uRHJhd2luZy5Gb250U3R5bGUBAAAAB3ZhbHVlX18ACAIAAAABAAAACw==", TargetFrameworkMoniker.netcoreapp21), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABhTeXN0ZW0uRHJhd2luZy5Gb250U3R5bGUBAAAAB3ZhbHVlX18ACAIAAAABAAAACw==", TargetFrameworkMoniker.netfx461) } }; + + // [ActiveIssue(31912, "Blobs need to be updated for UAP")] + if (!PlatformDetection.IsUap) + { + yield return new object[] { GraphicsUnit.Pixel, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABtTeXN0ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAIAAAACAAAACw==", TargetFrameworkMoniker.netcoreapp21), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABtTeXN0ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAIAAAACAAAACw==", TargetFrameworkMoniker.netfx461) } }; + yield return new object[] { ContentAlignment.BottomCenter, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAAB9TeXN0ZW0uRHJhd2luZy5Db250ZW50QWxpZ25tZW50AQAAAAd2YWx1ZV9fAAgCAAAAAAIAAAs=", TargetFrameworkMoniker.netcoreapp21), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAAB9TeXN0ZW0uRHJhd2luZy5Db250ZW50QWxpZ25tZW50AQAAAAd2YWx1ZV9fAAgCAAAAAAIAAAs=", TargetFrameworkMoniker.netfx461) } }; + yield return new object[] { LinearGradientMode.BackwardDiagonal, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACtTeXN0ZW0uRHJhd2luZy5EcmF3aW5nMkQuTGluZWFyR3JhZGllbnRNb2RlAQAAAAd2YWx1ZV9fAAgCAAAAAwAAAAs=", TargetFrameworkMoniker.netcoreapp21), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACtTeXN0ZW0uRHJhd2luZy5EcmF3aW5nMkQuTGluZWFyR3JhZGllbnRNb2RlAQAAAAd2YWx1ZV9fAAgCAAAAAwAAAAs=", TargetFrameworkMoniker.netfx461) } }; + yield return new object[] { FontStyle.Bold, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABhTeXN0ZW0uRHJhd2luZy5Gb250U3R5bGUBAAAAB3ZhbHVlX18ACAIAAAABAAAACw==", TargetFrameworkMoniker.netcoreapp21), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABhTeXN0ZW0uRHJhd2luZy5Gb250U3R5bGUBAAAAB3ZhbHVlX18ACAIAAAABAAAACw==", TargetFrameworkMoniker.netfx461) } }; + } // Custom object var sealedObjectWithIntStringFields = new SealedObjectWithIntStringFields(); @@ -1298,7 +1303,13 @@ private static IEnumerable SerializableObjects() var observableCollection = new System.Collections.ObjectModel.ObservableCollection(Enumerable.Range(1, 5).ToArray()); yield return new object[] { observableCollection, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE5XaW5kb3dzQmFzZSwgVmVyc2lvbj0zLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTMxYmYzODU2YWQzNjRlMzUFAQAAAJIBU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLk9ic2VydmFibGVDb2xsZWN0aW9uYDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0CAAAACF9tb25pdG9yEkNvbGxlY3Rpb25gMStpdGVtcwQDoAFTeXN0ZW0uQ29sbGVjdGlvbnMuT2JqZWN0TW9kZWwuT2JzZXJ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ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQMAAAAGX2l0ZW1zBV9zaXplCF92ZXJzaW9uBwAACAgICQUAAAAFAAAABQAAAA8FAAAACAAAAAgBAAAAAgAAAAMAAAAEAAAABQAAAAAAAAAAAAAAAAAAAAs=", TargetFrameworkMoniker.netfx461) } }; yield return new object[] { new System.Collections.ObjectModel.ReadOnlyObservableCollection(observableCollection), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE5XaW5kb3dzQmFzZSwgVmVyc2lvbj0zLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTMxYmYzODU2YWQzNjRlMzUFAQAAAJoBU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLlJlYWRPbmx5T2JzZXJ2YWJsZUNvbGxlY3Rpb25gMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQEAAAAZUmVhZE9ubHlDb2xsZWN0aW9uYDErbGlzdASSAVN5c3RlbS5Db2xsZWN0aW9ucy5PYmplY3RNb2RlbC5PYnNlcnZhYmxlQ29sbGVjdGlvbmAxW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAgAAAAIAAAAJAwAAAAUDAAAAkgFTeXN0ZW0uQ29sbGVjdGlvbnMuT2JqZWN0TW9kZWwuT2JzZXJ2YWJsZUNvbGxlY3Rpb25gMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU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AAAflN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQIAAAAJBAAAAAkFAAAABQQAAACgAVN5c3RlbS5Db2xsZWN0aW9ucy5PYmplY3RNb2RlbC5PYnNlcnZhYmxlQ29sbGVjdGlvbmAxK1NpbXBsZU1vbml0b3JbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0BAAAACl9idXN5Q291bnQACAIAAAAAAAAABAUAAAB+U3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24HAAAICAgJBgAAAAUAAAAFAAAADwYAAAAIAAAACAEAAAACAAAAAwAAAAQAAAAFAAAAAAAAAAAAAAAAAAAACw==", TargetFrameworkMoniker.netfx461) } }; - yield return new object[] { new System.Collections.ObjectModel.ReadOnlyCollection(Enumerable.Range(1, 15).ToList()), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAJABU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLlJlYWRPbmx5Q29sbGVjdGlvbmAxW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA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VmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQMAAAAGX2l0ZW1zBV9zaXplCF92ZXJzaW9uBwAACAgICQMAAAAPAAAADwAAAA8DAAAAEAAAAAgBAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACwAAAAwAAAANAAAADgAAAA8AAAAAAAAACw==", TargetFrameworkMoniker.netfx461) } }; + + // [ActiveIssue(31912, "Blobs need to be updated for UAP")] + if (!PlatformDetection.IsUap) + { + yield return new object[] { new System.Collections.ObjectModel.ReadOnlyCollection(Enumerable.Range(1, 15).ToList()), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAJABU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLlJlYWRPbmx5Q29sbGVjdGlvbmAxW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAQAAAARsaXN0A35TeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0JAgAAAAQCAAAAflN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQMAAAAGX2l0ZW1zBV9zaXplCF92ZXJzaW9uBwAACAgICQMAAAAPAAAADwAAAA8DAAAADwAAAAgBAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACwAAAAwAAAANAAAADgAAAA8AAAAL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAJABU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLlJlYWRPbmx5Q29sbGVjdGlvbmAxW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAQAAAARsaXN0A35TeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0JAgAAAAQCAAAAflN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQMAAAAGX2l0ZW1zBV9zaXplCF92ZXJzaW9uBwAACAgICQMAAAAPAAAADwAAAA8DAAAAEAAAAAgBAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACwAAAAwAAAANAAAADgAAAA8AAAAAAAAACw==", TargetFrameworkMoniker.netfx461) } }; + yield return new object[] { new System.Collections.ObjectModel.Collection(Enumerable.Range(1, 20).ToList()), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAIgBU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLkNvbGxlY3Rpb25gMVtbU3lzdGVtLk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2MTkzNGUwODldXQkCAAAABAIAAAB+U3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24HAAAICAgJAwAAABQAAAAUAAAADwMAAAAgAAAACAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAABAAAAARAAAAEgAAABMAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACw==", TargetFrameworkMoniker.netfx461) } }; + } yield return new object[] { new System.Collections.ObjectModel.ReadOnlyDictionary(dictionary), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAO0BU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLlJlYWRPbmx5RGljdGlvbmFyeWAyW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV0sW1N5c3RlbS5TdHJpbmcsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAQAAAAxtX2RpY3Rpb25hcnkD4QFTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5EaWN0aW9uYXJ5YDJbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tl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zLkdlbmVyaWMuS2V5VmFsdWVQYWlyYDJbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XSxbU3lzdGVtLlN0cmluZywgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0CAAAAA2tleQV2YWx1ZQABCAEAAAAGBgAAAAR0ZXN0Afn////7////AgAAAAYIAAAADGFub3RoZXIgdGVzdAs=", TargetFrameworkMoniker.netfx461) } }; var simpleKeyedCollection = new SimpleKeyedCollection @@ -1306,7 +1317,6 @@ private static IEnumerable SerializableObjects() point }; yield return new object[] { simpleKeyedCollection, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAHBTeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLkZvcm1hdHRlcnMuVGVzdHMsIFZlcnNpb249NC4wLjMuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj05ZDc3Y2M3YWQzOWI2OGViBQEAAABDU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLlNpbXBsZUtleWVkQ29sbGVjdGlvbgUAAAAaS2V5ZWRDb2xsZWN0aW9uYDIrY29tcGFyZXIWS2V5ZWRDb2xsZWN0aW9uYDIrZGljdBpLZXllZENvbGxlY3Rpb25gMitrZXlDb3VudBtLZXllZENvbGxlY3Rpb25gMit0aHJlc2hvbGQSQ29sbGVjdGlvbmAxK2l0ZW1zAwMAAAORAVN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkdlbmVyaWNFcXVhbGl0eUNvbXBhcmVyYDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWI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1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV0sW1N5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cy5Qb2ludCwgU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLCBWZXJzaW9uPTQuMC4zLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49OWQ3N2NjN2FkMzliNjhlYl1dAgAAAANrZXkFdmFsdWUABAgzU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLlBvaW50AgAAAAIAAAAJCgAAAAcIAAAAAAEAAAAEAAAABDNTeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLkZvcm1hdHRlcnMuVGVzdHMuUG9pbnQCAAAACQoAAAANAwUKAAAAM1N5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cy5Qb2ludAIAAAABWAFZAAAICAIAAAABAAAAAgAAAAs=", TargetFrameworkMoniker.netfx461) } }; - yield return new object[] { new System.Collections.ObjectModel.Collection(Enumerable.Range(1, 20).ToList()), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAIgBU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLkNvbGxlY3Rpb25gMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQEAAAAFaXRlbXMDflN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tle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AAAAgAAAACAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAABAAAAARAAAAEgAAABMAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACw==", TargetFrameworkMoniker.netfx461) } }; // Graph without cycles yield return new object[] { new Tree(42, null, null), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAHBTeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLkZvcm1hdHRlcnMuVGVzdHMsIFZlcnNpb249NC4wLjMuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj05ZDc3Y2M3YWQzOWI2OGViBQEAAACRAVN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cy5UcmVlYDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0DAAAAFjxWYWx1ZT5rX19CYWNraW5nRmllbGQVPExlZnQ+a19fQmFja2luZ0ZpZWxkFjxSaWdodD5rX19CYWNraW5nRmllbGQABAQIkQFTeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLkZvcm1hdHRlcnMuVGVzdHMuVHJlZWAxW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAgAAAJEBU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLlRyZWVgMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj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ff --git a/src/System.Runtime/tests/System/ActivatorTests.netcoreapp.cs b/src/System.Runtime/tests/System/ActivatorTests.netcoreapp.cs index 9c425e17128a..0e41eec3d4ab 100644 --- a/src/System.Runtime/tests/System/ActivatorTests.netcoreapp.cs +++ b/src/System.Runtime/tests/System/ActivatorTests.netcoreapp.cs @@ -210,6 +210,7 @@ public PrivateType() { } } [Fact] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.LoadFile is not supported in AppX.")] public static void CreateInstanceAssemblyResolve() { RemoteInvoke(() => diff --git a/src/System.Security.Principal.Windows/tests/WindowsIdentityTests.cs b/src/System.Security.Principal.Windows/tests/WindowsIdentityTests.cs index e3dad3dd22d4..e572fc3dbc6d 100644 --- a/src/System.Security.Principal.Windows/tests/WindowsIdentityTests.cs +++ b/src/System.Security.Principal.Windows/tests/WindowsIdentityTests.cs @@ -72,6 +72,7 @@ public static void WindowsAccountTypeCtor() } [Fact] + [ActiveIssue(31911, TargetFrameworkMonikers.Uap)] public static void CloneAndProperties() { TestUsingAccessToken((logonToken) => diff --git a/src/System.Threading.Thread/tests/ThreadTests.cs b/src/System.Threading.Thread/tests/ThreadTests.cs index 737a47dce444..78538fc050bf 100644 --- a/src/System.Threading.Thread/tests/ThreadTests.cs +++ b/src/System.Threading.Thread/tests/ThreadTests.cs @@ -1018,12 +1018,13 @@ public static void MiscellaneousTest() [Fact] [PlatformSpecific(TestPlatforms.Windows)] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "SetPrincipal doesn't work on UAP.")] public static void WindowsPrincipalPolicyTest_Windows() { DummyClass.RemoteInvoke(() => { - AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal); - Assert.Equal(Environment.UserDomainName + @"\" + Environment.UserName, Thread.CurrentPrincipal.Identity.Name); + AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal); + Assert.Equal(Environment.UserDomainName + @"\" + Environment.UserName, Thread.CurrentPrincipal.Identity.Name); }).Dispose(); } diff --git a/src/System.Transactions.Local/tests/AsyncTransactionScopeTests.cs b/src/System.Transactions.Local/tests/AsyncTransactionScopeTests.cs index 9efadc40fe99..526bce389fbe 100644 --- a/src/System.Transactions.Local/tests/AsyncTransactionScopeTests.cs +++ b/src/System.Transactions.Local/tests/AsyncTransactionScopeTests.cs @@ -96,7 +96,7 @@ public void Dispose() [InlineData(52)] [InlineData(53)] [InlineData(54)] - + [ActiveIssue(31913, TargetFrameworkMonikers.Uap)] public async Task AsyncTSTest(int variation) { await Task.Run(delegate