Skip to content

Error in test suite #463

Open
Open
@mconca-kube

Description

@mconca-kube

I found an error in the test suite for single/double values, here:

new object[] {Convert.ToSingle("10.5", CultureInfo.InvariantCulture).ToString(), 10.5},

and here:
new object[] {Convert.ToSingle("-2.8", CultureInfo.InvariantCulture).ToString(), -2.8},

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions