question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test System.Data.Tests.SqlTypes.SqlDoubleTest.Conversions fails on non english culture

See original GitHub issue

The test is failing on this line (and I believe this will be the same).

Failing message is:

Assert.Equal() Failure Expected: 6.4E+65 Actual: 6,4E+65

The value is the same, but notice the difference in decimal separator. My Windows’ culture is Slovak and we have comma as a decimal separator. The method of SqlDouble.ToString() and its conversion to SqlString is done without specifying the culture, so it uses the system’s one, hence the difference.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
initramcommented, Sep 22, 2020

I think this should have been moved to the dotnet/runtime repo, but it seems that the issue does not exist there anymore. https://github.com/dotnet/runtime/blob/6072e4d3a7a2a1493f514cdf4be75a3d56580e84/src/libraries/System.Data.Common/tests/System/Data/SqlTypes/SqlDoubleTest.cs#L274 They are now using ToString on a double literal instead of using a string literal, this will ensure that the string has the correct format for the local culture.

So I think this case can just be closed.

0reactions
cheenamalhotracommented, Sep 22, 2020

Great, thanks @initram !

Read more comments on GitHub >

github_iconTop Results From Across the Web

SQL Server Data Type Conversion Methods and ...
This artcile explores the SQL Server Data type conversion method and their performance comparison.
Read more >
What is A/B Testing? A Practical Guide With Examples
A/B testing (also called split testing) is comparing two versions of a web page to figure out the better performing variation. Learn more...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found