diff --git a/tests/FSharp.Compiler.Service.Tests/AssemblyInfo.fs b/tests/FSharp.Compiler.Service.Tests/AssemblyInfo.fs deleted file mode 100644 index 3433f928ba4..00000000000 --- a/tests/FSharp.Compiler.Service.Tests/AssemblyInfo.fs +++ /dev/null @@ -1,7 +0,0 @@ -module FSharp.Compiler.Service.Tests.AssemblyInfo - -open Xunit - -[] - -do() 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 831143ba698..59094ee50da 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj @@ -19,7 +19,6 @@ Never - FsUnit.fs diff --git a/tests/FSharp.Compiler.Service.Tests/MultiProjectAnalysisTests.fs b/tests/FSharp.Compiler.Service.Tests/MultiProjectAnalysisTests.fs index 22c17f48871..ef753a6bc3e 100644 --- a/tests/FSharp.Compiler.Service.Tests/MultiProjectAnalysisTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/MultiProjectAnalysisTests.fs @@ -448,7 +448,8 @@ let z = Project1.x [] 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 diff --git a/tests/FSharp.Compiler.Service.Tests/ProjectAnalysisTests.fs b/tests/FSharp.Compiler.Service.Tests/ProjectAnalysisTests.fs index b52435e54a5..8bfc0a67e9a 100644 --- a/tests/FSharp.Compiler.Service.Tests/ProjectAnalysisTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/ProjectAnalysisTests.fs @@ -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 @@ -19,8 +20,6 @@ open FSharp.Compiler.Symbols open FSharp.Compiler.Symbols.FSharpExprPatterns open TestFramework -// Exculde because of some GC tests -[] module internal Project1 = let fileName1 = Path.ChangeExtension(getTemporaryFileName (), ".fs") @@ -110,6 +109,9 @@ let ``Test project1 whole project errors`` () = [] 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 diff --git a/tests/FSharp.Test.Utilities/XunitHelpers.fs b/tests/FSharp.Test.Utilities/XunitHelpers.fs index 07c3dd3df5c..72d6c40aa8a 100644 --- a/tests/FSharp.Test.Utilities/XunitHelpers.fs +++ b/tests/FSharp.Test.Utilities/XunitHelpers.fs @@ -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 @@ -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) =