From 192c2058aa5ee1b482d0574e64a393ce4a3eea03 Mon Sep 17 00:00:00 2001 From: Youssef1313 Date: Wed, 8 Oct 2025 17:24:33 +0200 Subject: [PATCH] xunit.v3 --- Directory.Build.props | 2 ++ Directory.Build.targets | 8 +++++--- eng/Versions.props | 6 +----- .../FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj | 3 +-- .../FSharp.Compiler.ComponentTests.fsproj | 3 +-- .../FSharp.Compiler.LanguageServer.Tests.fsproj | 1 + .../FSharp.Compiler.Private.Scripting.UnitTests.fsproj | 3 +-- .../FSharp.Compiler.Service.Tests.fsproj | 2 +- tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj | 3 +-- tests/FSharp.Test.Utilities/Compiler.fs | 1 - tests/FSharp.Test.Utilities/DirectoryAttribute.fs | 1 + tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj | 3 +-- tests/FSharp.Test.Utilities/FileInlineDataAttribute.fs | 3 +-- tests/FSharp.Test.Utilities/XunitHelpers.fs | 2 +- tests/fsharp/FSharpSuite.Tests.fsproj | 3 +-- tests/service/data/CSharp_Analysis/CSharp_Analysis.csproj | 1 - .../FSharp.Editor.IntegrationTests.csproj | 1 + .../tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj | 1 + .../tests/UnitTests/VisualFSharp.UnitTests.fsproj | 2 +- 19 files changed, 22 insertions(+), 27 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 6f7f345831e..990abbe1a42 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -10,6 +10,8 @@ $(DotNetBuildSourceOnly) false + + XUnitV3 - false true true @@ -188,9 +186,7 @@ 1.0.0-beta2-dev3 2.22.11 2.12.87 - 2.9.0 - 2.8.2 - 3.1.17 + 7.0.1 2.2.0 diff --git a/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj b/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj index 07585566210..b2b009f1faf 100644 --- a/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj +++ b/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj @@ -5,9 +5,8 @@ net472;$(FSharpNetCoreProductTargetFramework) $(FSharpNetCoreProductTargetFramework) - Library + Exe true - xunit diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 960057baf98..57e5f745d85 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -5,10 +5,9 @@ net472;$(FSharpNetCoreProductTargetFramework) $(FSharpNetCoreProductTargetFramework) - Library + Exe false true - xunit true true false diff --git a/tests/FSharp.Compiler.LanguageServer.Tests/FSharp.Compiler.LanguageServer.Tests.fsproj b/tests/FSharp.Compiler.LanguageServer.Tests/FSharp.Compiler.LanguageServer.Tests.fsproj index 046357aafe6..05b94d18bb8 100644 --- a/tests/FSharp.Compiler.LanguageServer.Tests/FSharp.Compiler.LanguageServer.Tests.fsproj +++ b/tests/FSharp.Compiler.LanguageServer.Tests/FSharp.Compiler.LanguageServer.Tests.fsproj @@ -12,6 +12,7 @@ false $(OtherFlags) --warnon:1182 $(NoWarn);FS0988 + Exe diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj index e0d064e12f9..cb54022ee96 100644 --- a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj +++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj @@ -4,9 +4,8 @@ net472;$(FSharpNetCoreProductTargetFramework) $(FSharpNetCoreProductTargetFramework) - Library + Exe true - xunit true $(NoWarn);44 diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj index d411f07b520..5158fcf5c95 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj @@ -7,7 +7,7 @@ true true true - xunit + Exe diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj b/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj index 16e45542174..30f33e02648 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj @@ -5,7 +5,7 @@ $(FSharpNetCoreProductTargetFramework);net472 $(FSharpNetCoreProductTargetFramework) - Library + Exe FSharp.Core.UnitTests Microsoft.FSharp.Core.UnitTests @@ -14,7 +14,6 @@ preview true true - xunit true true MIT diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs index 111f683188e..e16b5929b8a 100644 --- a/tests/FSharp.Test.Utilities/Compiler.fs +++ b/tests/FSharp.Test.Utilities/Compiler.fs @@ -13,7 +13,6 @@ open FSharp.Test.ScriptHelpers open Microsoft.CodeAnalysis open Microsoft.CodeAnalysis.CSharp open Xunit -open Xunit.Abstractions open System open System.Collections.Immutable open System.IO diff --git a/tests/FSharp.Test.Utilities/DirectoryAttribute.fs b/tests/FSharp.Test.Utilities/DirectoryAttribute.fs index f641ea870d4..92700ac699d 100644 --- a/tests/FSharp.Test.Utilities/DirectoryAttribute.fs +++ b/tests/FSharp.Test.Utilities/DirectoryAttribute.fs @@ -10,6 +10,7 @@ open FSharp.Compiler.IO open FSharp.Test.Compiler open FSharp.Test.Utilities open TestFramework +open Xunit.v3 /// Attribute to use with Xunit's TheoryAttribute. /// Takes a directory, relative to current test suite's root. diff --git a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj index 484f8acfbb0..bf93116c8ac 100644 --- a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj +++ b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj @@ -6,9 +6,8 @@ win-x86;win-x64;linux-x64;osx-x64 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81 true - Library + Exe true - xunit true $(OtherFlags) --realsig- true diff --git a/tests/FSharp.Test.Utilities/FileInlineDataAttribute.fs b/tests/FSharp.Test.Utilities/FileInlineDataAttribute.fs index f0262560cf9..2b505d7ebb6 100644 --- a/tests/FSharp.Test.Utilities/FileInlineDataAttribute.fs +++ b/tests/FSharp.Test.Utilities/FileInlineDataAttribute.fs @@ -8,8 +8,7 @@ open System.Reflection open System.Runtime.CompilerServices open System.Runtime.InteropServices -open Xunit -open Xunit.Abstractions +open Xunit.v3 open Xunit.Sdk open FSharp.Compiler.IO diff --git a/tests/FSharp.Test.Utilities/XunitHelpers.fs b/tests/FSharp.Test.Utilities/XunitHelpers.fs index 7e907492e65..344112a07e0 100644 --- a/tests/FSharp.Test.Utilities/XunitHelpers.fs +++ b/tests/FSharp.Test.Utilities/XunitHelpers.fs @@ -6,7 +6,6 @@ namespace FSharp.Test open System open Xunit.Sdk -open Xunit.Abstractions open TestFramework @@ -16,6 +15,7 @@ open FSharp.Compiler.Diagnostics open OpenTelemetry.Resources open OpenTelemetry.Trace open OpenTelemetry.Metrics +open Xunit.v3 /// Disables custom internal parallelization added with XUNIT_EXTRAS. /// Execute test cases in a class or a module one by one instead of all at once. Allow other collections to run simultaneously. diff --git a/tests/fsharp/FSharpSuite.Tests.fsproj b/tests/fsharp/FSharpSuite.Tests.fsproj index b4540de0b33..4d6a2203ccc 100644 --- a/tests/fsharp/FSharpSuite.Tests.fsproj +++ b/tests/fsharp/FSharpSuite.Tests.fsproj @@ -7,12 +7,11 @@ win-x86;win-x64 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81 true - Library + Exe true false false $(OtherFlags) --langversion:preview - xunit 3186 diff --git a/tests/service/data/CSharp_Analysis/CSharp_Analysis.csproj b/tests/service/data/CSharp_Analysis/CSharp_Analysis.csproj index 2053b1138bb..7d3c50f2546 100644 --- a/tests/service/data/CSharp_Analysis/CSharp_Analysis.csproj +++ b/tests/service/data/CSharp_Analysis/CSharp_Analysis.csproj @@ -4,7 +4,6 @@ netstandard2.0 1.0.0.0 - none $(NoWarn);0067;1591 true diff --git a/vsintegration/tests/FSharp.Editor.IntegrationTests/FSharp.Editor.IntegrationTests.csproj b/vsintegration/tests/FSharp.Editor.IntegrationTests/FSharp.Editor.IntegrationTests.csproj index edb61309d7b..f6787b86bca 100644 --- a/vsintegration/tests/FSharp.Editor.IntegrationTests/FSharp.Editor.IntegrationTests.csproj +++ b/vsintegration/tests/FSharp.Editor.IntegrationTests/FSharp.Editor.IntegrationTests.csproj @@ -9,6 +9,7 @@ false true VSTHRD200;CS1591 + XUnit diff --git a/vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj b/vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj index c084fc6f06a..c8c8cbe4cf4 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj +++ b/vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj @@ -8,6 +8,7 @@ true $(NoWarn);FS3511 true + Exe diff --git a/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj b/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj index 96fde123dcc..d69f6326ad3 100644 --- a/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj +++ b/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj @@ -5,7 +5,7 @@ net472 x86 - Library + Exe $(NoWarn);44;58;75;3005 true true