Skip to content

CmdPal: Calc extension unit test fails in non-English culture #41715

@jiripolasek

Description

@jiripolasek

Microsoft PowerToys version

0.94.0

Installation method

PowerToys auto-update

Area(s) with issue?

Command Palette

Steps to reproduce

UT Microsoft.CmdPal.Ext.Calc.UnitTests.QueryTests.TrigModeSettingsTest
passes under en-US but fails under cultures that use different decimal point symbol. This suggests culture-sensitive parsing/formatting or string comparisons in either the test or the code under test.

[DataTestMethod]
[DataRow("sin(60)", "-0.30481", CalculateEngine.TrigMode.Radians)]
[DataRow("sin(60)", "0.866025", CalculateEngine.TrigMode.Degrees)]
[DataRow("sin(60)", "0.809016", CalculateEngine.TrigMode.Gradians)]
public void TrigModeSettingsTest(string input, string expected, CalculateEngine.TrigMode trigMode)
{

    Assert.IsTrue failed. Calc trigMode convert result isn't correct. Current result: -0,30481062110222

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

Additional Information

No response

Other Software

No response

Metadata

Metadata

Labels

CmdPal - CalculatorIssues related to the Calculator built-in extensionIssue-BugSomething isn't workingProduct-Command PaletteRefers to the Command Palette utility

Type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions