From 779ca72f84ed9be17c9169cabec080e3f114529d Mon Sep 17 00:00:00 2001 From: 0101 <0101@innit.cz> Date: Wed, 20 Sep 2023 15:41:40 +0200 Subject: [PATCH 1/2] Better test error message --- .../FSharpChecker/CommonWorkflows.fs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/CommonWorkflows.fs b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/CommonWorkflows.fs index d13efc2169a..7b60d0e64cb 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/CommonWorkflows.fs +++ b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/CommonWorkflows.fs @@ -150,14 +150,14 @@ let GetAllUsesOfAllSymbols() = .Build() use _ = Activity.start "GetAllUsesOfAllSymbols" [ ] - - let result = - async { + + let result = + async { let project = makeTestProject() let checker = ProjectWorkflowBuilder(project, useGetSource=true, useChangeNotifications = true).Checker - do! saveProject project false checker + do! saveProject project false checker let options = project.GetProjectOptions checker - let! checkProjectResults = checker.ParseAndCheckProject(options) + let! checkProjectResults = checker.ParseAndCheckProject(options) return checkProjectResults.GetAllUsesOfAllSymbols() } |> Async.RunSynchronously @@ -165,4 +165,4 @@ let GetAllUsesOfAllSymbols() = traceProvider.ForceFlush() |> ignore traceProvider.Dispose() - Assert.Equal(80, result.Length) + if result.Length <> 80 then failwith $"Expected 80 symbolUses, got {result.Length}:\n%A{result}" From 9b2f01fefb3b22d15ac57a30cdcabfbee35dca2e Mon Sep 17 00:00:00 2001 From: Petr Pokorny <0101@innit.cz> Date: Fri, 24 Nov 2023 15:03:43 +0100 Subject: [PATCH 2/2] Update tests/FSharp.Compiler.ComponentTests/FSharpChecker/CommonWorkflows.fs Co-authored-by: Tomas Grosup --- .../FSharpChecker/CommonWorkflows.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/CommonWorkflows.fs b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/CommonWorkflows.fs index 460f94fb93c..73412c25365 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/CommonWorkflows.fs +++ b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/CommonWorkflows.fs @@ -165,4 +165,4 @@ let GetAllUsesOfAllSymbols() = traceProvider.ForceFlush() |> ignore traceProvider.Dispose() - if result.Length <> 79 then failwith $"Expected 80 symbolUses, got {result.Length}:\n%A{result}" + if result.Length <> 79 then failwith $"Expected 79 symbolUses, got {result.Length}:\n%A{result}"