Skip to content

Commit d08a5ff

Browse files
abelbraaksmadsyme
authored andcommitted
Fixing JaroWinkler tests with InvariantCulture and fixing async tests by removing Debugger.Break() (#3627)
* Fixing JaroWinkler tests to use InvariantCulture for number-to-string * Fixing the crashing of test runners because of a Debugger.Break() in a test
1 parent 01eab69 commit d08a5ff

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/fsharp/FSharp.Compiler.Unittests/EditDistance.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
namespace FSharp.Compiler.Unittests
33

44
open System
5+
open System.Globalization
56
open System.Text
67
open NUnit.Framework
78
open Microsoft.FSharp.Compiler
@@ -16,7 +17,7 @@ module EditDistance =
1617
[<TestCase("DWAYNE", "DUANE", ExpectedResult = "0.840")>]
1718
[<TestCase("DIXON", "DICKSONX", ExpectedResult = "0.813")>]
1819
let JaroWinklerTest (str1 : string, str2 : string) : string =
19-
String.Format("{0:0.000}", JaroWinklerDistance str1 str2)
20+
String.Format(CultureInfo.InvariantCulture, "{0:0.000}", JaroWinklerDistance str1 str2)
2021

2122
[<Test>]
2223
[<TestCase("RICK", "RICK", ExpectedResult = 0)>]

src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/AsyncType.fs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ type AsyncType() =
177177
match a.InnerException with
178178
| :? TaskCanceledException as t -> ()
179179
| _ -> reraise()
180-
System.Diagnostics.Debugger.Break() |> ignore
181180
Assert.IsTrue (t.IsCompleted, "Task is not completed")
182181

183182
[<Test>]
@@ -408,4 +407,4 @@ type AsyncType() =
408407
cts.Cancel()
409408
ewh.WaitOne(10000) |> ignore
410409

411-
#endif
410+
#endif

0 commit comments

Comments
 (0)