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
{{ message }}
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
When the computer's current locale uses a comma for the decimal point, the "ToStringTests" in the "DebuggingToolsTests" fail because they call ToString on a tuple containing a double, which formats the double using a comma. However, the expected test output is hard-coded to expect a period. The test fails, for example, in the German (de-DE) locale.
To Reproduce
Change your computer's locale to one that uses commas as decimal points
Run the DebuggingToolsTests.ToStringTests test
Expected behavior
The tests should pass regardless of the current locale.
Actual behavior
Testname: Microsoft.Quantum.Simulation.Simulators.Tests.DebuggingToolsTests.ToStringTests
FullName für Test: Tests.Microsoft.Quantum.Simulation.Simulators.Microsoft.Quantum.Simulation.Simulators.Tests.DebuggingToolsTests.Microsoft.Quantum.Simulation.Simulators.Tests.DebuggingToolsTests.ToStringTests
Testquelle: C:\Users\samarsha\Source\Repos\microsoft\qsharp-runtime\src\Simulation\Simulators.Tests\DebuggingToolsTests.cs : Zeile 23
Testergebnis: Fehler
Testdauer: 0:00:00
Testname: Microsoft.Quantum.Simulation.Simulators.Tests.DebuggingToolsTests.ToStringTests
Testergebnis: Fehler
Ergebnis StackTrace:
at Microsoft.Quantum.Simulation.Simulators.Tests.DebuggingToolsTests.<>c.<ToStringTests>b__0_0(SimulatorBase qsim) in C:\Users\samarsha\Source\Repos\microsoft\qsharp-runtime\src\Simulation\Simulators.Tests\DebuggingToolsTests.cs:line 57
at Microsoft.Quantum.Simulation.Simulators.Tests.OperationsTestHelper.RunWithMultipleSimulators(Action`1 test) in C:\Users\samarsha\Source\Repos\microsoft\qsharp-runtime\src\Simulation\Simulators.Tests\OperationsTestHelper.cs:line 151
at Microsoft.Quantum.Simulation.Simulators.Tests.DebuggingToolsTests.ToStringTests() in C:\Users\samarsha\Source\Repos\microsoft\qsharp-runtime\src\Simulation\Simulators.Tests\DebuggingToolsTests.cs:line 25
Ergebnis Meldung:
Assert.Equal() Failure
↓ (pos 9)
Expected: T4((3, (1.1, False, One)))
Actual: T4((3, (1,1, False, One)))
↑ (pos 9)
Describe the bug
When the computer's current locale uses a comma for the decimal point, the "ToStringTests" in the "DebuggingToolsTests" fail because they call
ToStringon a tuple containing a double, which formats the double using a comma. However, the expected test output is hard-coded to expect a period. The test fails, for example, in the German (de-DE) locale.To Reproduce
Expected behavior
The tests should pass regardless of the current locale.
Actual behavior
System information
OS: Windows 10
.NET Core Version: 3.1.101
IQ# Version: N/A
Python Version (if applicable): 3.8.2
Additional context
The Q# compiler has a similar bug in its tests: microsoft/qsharp-compiler#363