New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test for Complex32TextHandling fails on machine with culture "de-DE" #586

Open
TobiasGlaubach opened this Issue Jul 16, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@TobiasGlaubach
Copy link

TobiasGlaubach commented Jul 16, 2018

Test fails when running build.cmd from PowerShell (Windows 10). Issue came from this discussion.

Thats the error:

1) Failed : MathNet.Numerics.UnitTests.ComplexTests.Complex32TextHandlingTest.CanFormatComplexToStringWithCulture("de-DE","1,1")
  String lengths are both 8. Strings differ at index 2.
  Expected: "(1,1, 0)"
  But was:  "(1.1, 0)"
  -------------^
   at MathNet.Numerics.UnitTests.ComplexTests.Complex32TextHandlingTest.CanFormatComplexToStringWithCulture(String cultureName, String number) in C:\Users\#####\mathnet-numerics\src\Numerics.Tests\ComplexTests\Complex32Test.TextHandling.cs:line 96

Thats my System CurrentCulture:

Thread.CurrentThread.CurrentCulture
[de-DE]

Thats my NumberFormant:

Thread.CurrentThread.CurrentCulture.NumberFormat
NumberFormatInfo { CurrencyDecimalDigits=2, CurrencyDecimalSeparator=",", CurrencyGroupSeparator=".", CurrencyGroupSizes=int[1] { 3 }, CurrencyNegativePattern=8, CurrencyPositivePattern=3, CurrencySymbol="€", DigitSubstitution=None, IsReadOnly=true, NaNSymbol="NaN", NativeDigits=string[10] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" }, NegativeInfinitySymbol="-∞", NegativeSign="-", NumberDecimalDigits=2, NumberDecimalSeparator=".", NumberGroupSeparator=" ", NumberGroupSizes=int[1] { 3 }, NumberNegativePattern=1, PercentDecimalDigits=2, PercentDecimalSeparator=".", PercentGroupSeparator=" ", PercentGroupSizes=int[1] { 3 }, PercentNegativePattern=0, PercentPositivePattern=0, PercentSymbol="%", PerMilleSymbol="‰", PositiveInfinitySymbol="∞", PositiveSign="+" }
@TobiasGlaubach

This comment has been minimized.

Copy link

TobiasGlaubach commented Jul 16, 2018

Ok, when I run it in the VS-2017 Test Explorer, the test succedes. So it might be related to the culture of the Build script.

@TobiasGlaubach

This comment has been minimized.

Copy link

TobiasGlaubach commented Jul 16, 2018

I ran the build.cmd in PowerShell as well as in cmd.exe -> Both fail.

@cdrnet

This comment has been minimized.

Copy link
Member

cdrnet commented Jul 16, 2018

Thanks for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment