提交 d08a5ff1 编写于 作者: A Abel Braaksma 提交者: Don Syme

Fixing JaroWinkler tests with InvariantCulture and fixing async tests by...

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
上级 01eab694
......@@ -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 =
[<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)>]
......
......@@ -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>]
......@@ -408,4 +407,4 @@ type AsyncType() =
cts.Cancel()
ewh.WaitOne(10000) |> ignore
#endif
\ No newline at end of file
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册