Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
majocha committed Oct 29, 2024
2 parents c8567d3 + dc139f4 commit db139aa
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
7 changes: 0 additions & 7 deletions tests/FSharp.Compiler.Service.Tests/AssemblyInfo.fs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<Content Include="expected-help-output.bsl">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Compile Include="AssemblyInfo.fs" />
<Compile Include="SurfaceArea.fs" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" />
<Compile Include="..\service\FsUnit.fs">
<Link>FsUnit.fs</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,8 @@ let z = Project1.x
[<InlineData(false)>]
let ``Test multi project symbols should pick up changes in dependent projects`` useTransparentCompiler =

let checker = if useTransparentCompiler then transparentCompilerChecker else checker
// A private checker because we subscribe to FileChecked.
let checker = FSharpChecker.Create(useTransparentCompiler = useTransparentCompiler)

// register to count the file checks
let count = ref 0
Expand Down
6 changes: 4 additions & 2 deletions tests/FSharp.Compiler.Service.Tests/ProjectAnalysisTests.fs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module FSharp.Compiler.Service.Tests.ProjectAnalysisTests

#nowarn "57" // Experimental stuff
open FSharp.Compiler.CodeAnalysis

let runningOnMono = try System.Type.GetType("Mono.Runtime") <> null with e -> false

Expand All @@ -19,8 +20,6 @@ open FSharp.Compiler.Symbols
open FSharp.Compiler.Symbols.FSharpExprPatterns
open TestFramework

// Exculde because of some GC tests
[<Collection(nameof DoNotRunInParallel)>]
module internal Project1 =

let fileName1 = Path.ChangeExtension(getTemporaryFileName (), ".fs")
Expand Down Expand Up @@ -110,6 +109,9 @@ let ``Test project1 whole project errors`` () =
[<Fact>]
let ``Test project1 and make sure TcImports gets cleaned up`` () =

// A private checker for this test.
let checker = FSharpChecker.Create(useTransparentCompiler = FSharp.Test.TestContext.UseTransparentCompiler)

let test () =
let _, checkFileAnswer = checker.ParseAndCheckFileInProject(Project1.fileName1, 0, Project1.fileSource1, Project1.options) |> Async.RunImmediate
match checkFileAnswer with
Expand Down
6 changes: 3 additions & 3 deletions tests/FSharp.Test.Utilities/XunitHelpers.fs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ open Xunit.Abstractions
type RunInSequenceAttribute() = inherit Attribute()

#if !XUNIT_EXTRAS
/// Installs console support for parallel test runs and conditionally enables optional xUnit customizations.
/// Installs console support for parallel test runs.
type FSharpXunitFramework(sink: IMessageSink) =
inherit XunitTestFramework(sink)
do
// Because xUnit v2 lacks assembly fixture, the next best place to ensure things get called
// right at the start of the test run is here in the constructor.
// This gets executed once per test assembly.
MessageSink.sinkWriter |> ignore
log "FSharpXunitFramework installing TestConsole redirection"
TestConsole.install()

#else
Expand Down Expand Up @@ -129,7 +129,7 @@ type FSharpXunitFramework(sink: IMessageSink) =
// Because xUnit v2 lacks assembly fixture, the next best place to ensure things get called
// right at the start of the test run is here in the constructor.
// This gets executed once per test assembly.
MessageSink.sinkWriter |> ignore
log "FSharpXunitFramework with XUNIT_EXTRAS installing TestConsole redirection"
TestConsole.install()

override this.CreateDiscoverer (assemblyInfo) =
Expand Down

0 comments on commit db139aa

Please sign in to comment.