Closed
Description
There are four JaroWinkler distance tests. These fail when run on a computer with a different locale.
Repro steps
Run the tests under FSharp.Compiler.Unittests.EditDistance
on a German, Dutch or basically any non-US/UK computer and you will get four failing tests, because the output uses ToString
internally without taking care of the locale.
Suggested fix: add Culture.InvariantCulture
.
Expected behavior
Any unit test should run successfully irrespective of the environments locale settings.
Actual behavior
The following error is thrown:
String lengths are both 5. Strings differ at index 1.
Expected: "0.813"
But was: "0,813"
------------^
at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.TestActionCommand.Execute(TestExecutionContext context)
(this was one of the findings after starting investigating test coverage, see #3579)