Skip to content

Commit

Permalink
Fixing JaroWinkler tests with InvariantCulture and fixing async tests…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
abelbraaksma authored and dsyme committed Sep 25, 2017
1 parent 01eab69 commit d08a5ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/fsharp/FSharp.Compiler.Unittests/EditDistance.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace FSharp.Compiler.Unittests

open System
open System.Globalization
open System.Text
open NUnit.Framework
open Microsoft.FSharp.Compiler
Expand All @@ -16,7 +17,7 @@ module EditDistance =
[<TestCase("DWAYNE", "DUANE", ExpectedResult = "0.840")>]
[<TestCase("DIXON", "DICKSONX", ExpectedResult = "0.813")>]
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)

[<Test>]
[<TestCase("RICK", "RICK", ExpectedResult = 0)>]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")

[<Test>]
Expand Down Expand Up @@ -408,4 +407,4 @@ type AsyncType() =
cts.Cancel()
ewh.WaitOne(10000) |> ignore

#endif
#endif

0 comments on commit d08a5ff

Please sign in to comment.