Skip to content

Commit 3264ba0

Browse files
committed
Migrate tests except FSharp.Editor.IntegrationTests
1 parent 7b6dc6b commit 3264ba0

File tree

11 files changed

+25
-13
lines changed

11 files changed

+25
-13
lines changed

tests/Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
<PackageReference Include="Microsoft.Testing.Extensions.HangDump" Version="$(MicrosoftTestingExtensionsHangDumpVersion)" />
1717
</ItemGroup>
1818

19+
<!-- Enable Microsoft.Testing.Platform runner for all test projects -->
20+
<PropertyGroup Condition="($(MSBuildProjectName.EndsWith('.Tests')) OR $(MSBuildProjectName.EndsWith('.ComponentTests')) OR $(MSBuildProjectName.EndsWith('.UnitTests'))) AND '$(ExcludeFromTestPackageReferences)' != 'true'">
21+
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
22+
</PropertyGroup>
23+
1924
<PropertyGroup>
2025
<NoOptimizationData>false</NoOptimizationData>
2126
<NoInterfaceData>false</NoInterfaceData>

tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
<!-- xUnit3 requires test projects to be executable -->
99
<OutputType>Exe</OutputType>
1010
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
11-
<!-- Enable Microsoft.Testing.Platform runner (MTP Migration - Phase 2 Pilot) -->
12-
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
1311
</PropertyGroup>
1412

1513
<ItemGroup>

tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
<ExcludeFromSourceOnlyBuild>true</ExcludeFromSourceOnlyBuild>
1414
<Optimize>false</Optimize>
1515
<Tailcalls>false</Tailcalls>
16-
<!-- Enable Microsoft.Testing.Platform runner (MTP Migration - Phase 3) -->
17-
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
1816
<NoWarn>$(NoWarn);FS0988</NoWarn> <!-- "program does nothing" warning -->
1917
<DefineConstants Condition="'$(Configuration)'=='release'">$(DefineConstants);RELEASE</DefineConstants>
2018
<DefineConstants Condition="'$(Configuration)'=='debug'">$(DefineConstants);DEBUG</DefineConstants>

tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
1010
<ExcludeFromSourceOnlyBuild>true</ExcludeFromSourceOnlyBuild>
1111
<NoWarn>$(NoWarn);44</NoWarn> <!-- Obsolete -->
12-
<!-- Enable Microsoft.Testing.Platform runner (MTP Migration - Phase 3) -->
13-
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
1412
</PropertyGroup>
1513

1614
<ItemGroup>

tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1010
<TolerateUnusedBindings>true</TolerateUnusedBindings>
1111
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
12-
<!-- Enable Microsoft.Testing.Platform runner (MTP Migration - Phase 3) -->
13-
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
1412
</PropertyGroup>
1513

1614
<PropertyGroup Condition="'$(BUILDING_USING_DOTNET)' == 'true'">

tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
<!-- xUnit3 requires test projects to be executable -->
99
<OutputType>Exe</OutputType>
1010
<IsTestProject>true</IsTestProject>
11-
<!-- Enable Microsoft.Testing.Platform runner (MTP Migration - Phase 3) -->
12-
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
1311

1412
<AssemblyName>FSharp.Core.UnitTests</AssemblyName>
1513
<PackageId>Microsoft.FSharp.Core.UnitTests</PackageId>

tests/fsharp/FSharpSuite.Tests.fsproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
<Tailcalls>false</Tailcalls>
1414
<OtherFlags>$(OtherFlags) --langversion:preview</OtherFlags>
1515
<NoWarn>3186</NoWarn>
16-
<!-- Enable Microsoft.Testing.Platform runner (MTP Migration - Phase 3) -->
17-
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
1816
</PropertyGroup>
1917

2018
<ItemGroup>

vsintegration/tests/FSharp.Editor.IntegrationTests/FSharp.Editor.IntegrationTests.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<GenerateProgramFile>false</GenerateProgramFile>
1010
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1111
<NoWarn>VSTHRD200;CS1591</NoWarn>
12+
<!-- Exclude from automatic xUnit3/MTP package references since this uses VS Extensibility Testing (xUnit2) -->
13+
<ExcludeFromTestPackageReferences>true</ExcludeFromTestPackageReferences>
1214
</PropertyGroup>
1315

1416
<ItemGroup>

vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
<PropertyGroup>
44
<TargetFramework>net472</TargetFramework>
5-
<OutputType>Library</OutputType>
5+
<OutputType>Exe</OutputType>
66
<IsPackable>false</IsPackable>
77
<GenerateProgramFile>false</GenerateProgramFile>
88
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
99
<NoWarn>$(NoWarn);FS3511</NoWarn> <!-- This state machine is not statically compilable. -->
1010
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
11+
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
1112
</PropertyGroup>
1213

1314
<ItemGroup>
@@ -108,4 +109,11 @@
108109
<ProjectReference Include="..\..\src\FSharp.Editor\FSharp.Editor.fsproj" />
109110
</ItemGroup>
110111

112+
<ItemGroup>
113+
<PackageReference Include="xunit.v3" Version="$(XunitVersion)" />
114+
<PackageReference Include="xunit.v3.runner.console" Version="$(XunitRunnerConsoleVersion)" />
115+
<PackageReference Include="Microsoft.TestPlatform" Version="$(MicrosoftTestPlatformVersion)" />
116+
<PackageReference Include="Microsoft.Testing.Extensions.HangDump" Version="$(MicrosoftTestingExtensionsHangDumpVersion)" />
117+
</ItemGroup>
118+
111119
</Project>

vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
1111
<UsePackageTargetFallbackHack>true</UsePackageTargetFallbackHack>
1212
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
13+
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
1314
</PropertyGroup>
1415

1516
<ItemGroup>
@@ -61,6 +62,9 @@
6162
<PackageReference Include="Microsoft.Internal.VisualStudio.Shell.Framework" Version="$(MicrosoftInternalVisualStudioShellFrameworkVersion)" />
6263
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="$(MicrosoftVisualStudioThreadingVersion)" />
6364
<PackageReference Include="xunit.v3" Version="$(XunitVersion)" />
65+
<PackageReference Include="xunit.v3.runner.console" Version="$(XunitRunnerConsoleVersion)" />
66+
<PackageReference Include="Microsoft.TestPlatform" Version="$(MicrosoftTestPlatformVersion)" />
67+
<PackageReference Include="Microsoft.Testing.Extensions.HangDump" Version="$(MicrosoftTestingExtensionsHangDumpVersion)" />
6468
</ItemGroup>
6569

6670
</Project>

0 commit comments

Comments
 (0)