You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You convert the string to a Single, using InvariantCulture: OK
After that you convert the Single value to string, using ToString(), but without specifying the culture.
It should be like this: new object[] {Convert.ToSingle("10.5", CultureInfo.InvariantCulture).ToString(CultureInfo.InvariantCulture), 10.5}
If you run this test on a machine that has a culture with a differente decimal separator like comma, the test would expect the query to be compiled with value "10,5". The query instead compiles correctly with "10.5" and the test fails.
The text was updated successfully, but these errors were encountered:
@mconca-kube I think you opened the merge request on the wrong repository ;)
Just a quick follow up on that: Wouldn't it be sufficient to just check for "10.5" and "-2.8" as a string, since the over complicated construct will always evaluate to these values, right?
I found an error in the test suite for single/double values, here:
querybuilder/QueryBuilder.Tests/ParameterTypeTests.cs
Line 25 in 422878c
and here:
querybuilder/QueryBuilder.Tests/ParameterTypeTests.cs
Line 27 in 422878c
You convert the string to a Single, using InvariantCulture: OK
After that you convert the Single value to string, using ToString(), but without specifying the culture.
It should be like this:
new object[] {Convert.ToSingle("10.5", CultureInfo.InvariantCulture).ToString(CultureInfo.InvariantCulture), 10.5}
If you run this test on a machine that has a culture with a differente decimal separator like comma, the test would expect the query to be compiled with value "10,5". The query instead compiles correctly with "10.5" and the test fails.
The text was updated successfully, but these errors were encountered: