I had 168 failing test due to my locale.
failed CommunityToolkit.Maui.UnitTests.Converters.ColorToCmykaStringConverterTests.ColorToCmykaStringConverterValidInputTest(red: 1, green: 0, blue: 0, alpha: 1, expectedResult: "CMYKA(0%,100%,100%,0%,1)") (1ms)
Assert.Equal() Failure: Values differ
Expected: CMYKA(0%,100%,100%,0%,1)
Actual: CMYKA(0 %,100 %,100 %,0 %,1)
at CommunityToolkit.Maui.UnitTests.Converters.ColorToCmykaStringConverterTests.ColorToCmykaStringConverterValidInputTest(Single red, Single green, Single blue, Single alpha, String expectedResult) in <redacted>\CommunityToolkit.Maui\src\CommunityToolkit.Maui.UnitTests\Converters\ColorToCmykaStringConverterTests.cs:148
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithManyArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
Not all tests for the color conversion fail. Some will generate the test data using my locale and not fail.
Both my locale and the Invariant locale are not creating the correct output as described in the annotation comment and tested for in the hardcoded test data.
The "en-US" locale will produce the correct output.
- .NET MAUI CommunityToolkit: 12.2.0
- OS: Windows 11
- .NET MAUI: -
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
I had 168 failing test due to my locale.
Not all tests for the color conversion fail. Some will generate the test data using my locale and not fail.
Both my locale and the Invariant locale are not creating the correct output as described in the annotation comment and tested for in the hardcoded test data.
The "en-US" locale will produce the correct output.
Expected Behavior
CommunityToolkit.Maui.Core.Extensions.ColorConversionExtensionsgenerate the same output on all locales.CommunityToolkit.Maui.Core.Extensions.ColorConversionExtensionsgenerate the output described in annotation comment.The Tests check for the output described in annotation comment using multiple locales.
Steps To Reproduce
Link to public reproduction project repository
Environment
Anything else?
No response