From 4269aa19f488b177e6aaadfbc2d682b4de6c81de Mon Sep 17 00:00:00 2001 From: Abel Braaksma Date: Fri, 22 Sep 2017 22:03:03 +0200 Subject: [PATCH 1/2] Fixing JaroWinkler tests to use InvariantCulture for number-to-string --- src/fsharp/FSharp.Compiler.Unittests/EditDistance.fs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fsharp/FSharp.Compiler.Unittests/EditDistance.fs b/src/fsharp/FSharp.Compiler.Unittests/EditDistance.fs index 68b0c0595b..5e8d7f7275 100644 --- a/src/fsharp/FSharp.Compiler.Unittests/EditDistance.fs +++ b/src/fsharp/FSharp.Compiler.Unittests/EditDistance.fs @@ -2,6 +2,7 @@ namespace FSharp.Compiler.Unittests open System +open System.Globalization open System.Text open NUnit.Framework open Microsoft.FSharp.Compiler @@ -16,7 +17,7 @@ module EditDistance = [] [] let JaroWinklerTest (str1 : string, str2 : string) : string = - String.Format("{0:0.000}", JaroWinklerDistance str1 str2) + String.Format(CultureInfo.InvariantCulture, "{0:0.000}", JaroWinklerDistance str1 str2) [] [] From 45740a5a4838e35be3163bf4a161c7172f5d12fc Mon Sep 17 00:00:00 2001 From: Abel Braaksma Date: Fri, 22 Sep 2017 22:14:07 +0200 Subject: [PATCH 2/2] Fixing the crashing of test runners because of a Debugger.Break() in a test --- .../FSharp.Core/Microsoft.FSharp.Control/AsyncType.fs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/AsyncType.fs b/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/AsyncType.fs index 7310ef8847..c1cfe673bf 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/AsyncType.fs +++ b/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/AsyncType.fs @@ -177,7 +177,6 @@ type AsyncType() = match a.InnerException with | :? TaskCanceledException as t -> () | _ -> reraise() - System.Diagnostics.Debugger.Break() |> ignore Assert.IsTrue (t.IsCompleted, "Task is not completed") [] @@ -408,4 +407,4 @@ type AsyncType() = cts.Cancel() ewh.WaitOne(10000) |> ignore -#endif \ No newline at end of file +#endif