System.Drawing.Common.Tests fails 10 tests in non-English Windows
- Dominant language
- C#
- Stars
- 4.9k
- Forks
- 1.1k
- Avg merge
- 20h 23m
- Merged PRs (30d)
- 103
Description
System.Drawing.Common.Tests fails 10 tests in non-English Windows with next log:
```
Starting: System.Drawing.Common.Tests
System.Drawing.Tests.FontTests.ToLogFont_Invoke_ReturnsExpected(fontStyle: Bold, Italic, Strikeout, gdiCharSet: 1, gdiVerticalFont: True, expectedNamePrefix: \"@\", expectedWeight: 700) [FAIL]
Assert.Equal() Failure
Expected: 1
Actual: 204
Stack Trace:
C:\Code\corefx\src\System.Drawing.Common\tests\FontTests.cs(719,0): at System.Drawing.Tests.FontTests.ToLogFont_Invoke_ReturnsExpected(FontStyle fontStyle, Byte gdiCharSet, Boolean gdiVerticalFont, String expectedNamePrefix, Int32 expectedWeight)
System.Drawing.Tests.FontTests.ToLogFont_Invoke_ReturnsExpected(fontStyle: Regular, gdiCharSet: 0, gdiVerticalFont: False, expectedNamePrefix: \"\", expectedWeight: 400) [FAIL]
Assert.Equal() Failure
Expected: 0
Actual: 204
Stack Trace:
C:\Code\corefx\src\System.Drawing.Common\tests\FontTests.cs(719,0): at System.Drawing.Tests.FontTests.ToLogFont_Invoke_ReturnsExpected(FontStyle fontStyle, Byte gdiCharSet, Boolean gdiVerticalFont, String expectedNamePrefix, Int32 expectedWeight)
System.Drawing.Tests.FontTests.ToLogFont_Invoke_ReturnsExpected(fontStyle: Regular, gdiCharSet: 10, gdiVerticalFont: False, expectedNamePrefix: \"\", expectedWeight: 400) [FAIL]
Assert.Equal() Failure
Expected: 10
Actual: 204
Stack Trace:
C:\Code\corefx\src\System.Drawing.Common\tests\FontTests.cs(719,0): at System.Drawing.Tests.FontTests.ToLogFont_Invoke_ReturnsExpected(FontStyle fontStyle, Byte gdiCharSet, Boolean gdiVerticalFont, String expectedNamePrefix, Int32 expectedWeight)
System.Drawing.Tests.FontTests.ToLogFont_InvokeGraphics_ReturnsExpected(textRenderingHint: SystemDefault, expectedQuality: 0) [FAIL]
Assert.Equal() Failure
Expected: 1
Actual: 204
Stack Trace:
C:\Code\corefx\src\System.Drawing.Common\tests\FontTests.cs(756,0): at System.Drawing.Tests.FontTests.ToLogFont_InvokeGraphics_ReturnsExpected(TextRenderingHint textRenderingHint, Int32 expectedQuality)
System.Drawing.Tests.FontTests.ToLogFont_InvokeGraphics_ReturnsExpected(textRenderingHint: AntiAlias, expectedQuality: 3) [FAIL]
Assert.Equal() Failure
Expected: 1
Actual: 204
Stack Trace:
C:\Code\corefx\src\System.Drawing.Common\tests\FontTests.cs(756,0): at System.Drawing.Tests.FontTests.ToLogFont_InvokeGraphics_ReturnsExpected(TextRenderingHint textRenderingHint, Int32 expectedQuality)
System.Drawing.Tests.FontTests.ToLogFont_InvokeGraphics_ReturnsExpected(textRenderingHint: AntiAliasGridFit, expectedQuality: 3) [FAIL]
Assert.Equal() Failure
Expected: 1
Actual: 204
Stack Trace:
C:\Code\corefx\src\System.Drawing.Common\tests\FontTests.cs(756,0): at System.Drawing.Tests.FontTests.ToLogFont_InvokeGraphics_ReturnsExpected(TextRenderingHint textRenderingHint, Int32 expectedQuality)
System.Drawing.Tests.FontTests.ToLogFont_InvokeGraphics_ReturnsExpected(textRenderingHint: SingleBitPerPixel, expectedQuality: 3) [FAIL]
Assert.Equal() Failure
Expected: 1
Actual: 204
Stack Trace:
C:\Code\corefx\src\System.Drawing.Common\tests\FontTests.cs(756,0): at System.Drawing.Tests.FontTests.ToLogFont_InvokeGraphics_ReturnsExpected(TextRenderingHint textRenderingHint, Int32 expectedQuality)
System.Drawing.Tests.FontTests.ToLogFont_InvokeGraphics_ReturnsExpected(textRenderingHint: SingleBitPerPixelGridFit, expectedQuality: 3) [FAIL]
Assert.Equal() Failure
Expected: 1
Actual: 204
Stack Trace:
C:\Code\corefx\src\System.Drawing.Common\tests\FontTests.cs(756,0): at System.Drawing.Tests.FontTests.ToLogFont_InvokeGraphics_ReturnsExpected(TextRenderingHint textRenderingHint, Int32 expectedQuality)
System.Drawing.Tests.FontTests.ToLogFont_InvokeGraphics_ReturnsExpected(textRenderingHint: ClearTypeGridFit, expectedQuality: 5) [FAIL]
Assert.Equal() Failure
Expected: 1
Actual: 204
Stack Trace:
C:\Code\corefx\src\System.Drawing.Common\tests\FontTests.cs(756,0): at System.Drawing.Tests.FontTests.ToLogFont_InvokeGraphics_ReturnsExpected(TextRenderingHint textRenderingHint, Int32 expectedQuality)
System.Drawing.Imaging.Tests.MetafileTests.Ctor_StringIntPtrEmfType_Success(emfType: EmfPlusDual) [FAIL]
System.Runtime.InteropServices.ExternalException : A generic error occurred in GDI+.
Stack Trace:
C:\Code\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\Metafile.Windows.cs(264,0): at System.Drawing.Imaging.Metafile..ctor(String fileName, IntPtr referenceHdc, EmfType type, String description)
C:\Code\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\Metafile.Windows.cs(241,0): at System.Drawing.Imaging.Metafile..ctor(String fileName, IntPtr referenceHdc, EmfType type)
C:\Code\corefx\src\System.Drawing.Common\tests\Imaging\MetafileTests.cs(399,0): at System.Drawing.Imaging.Tests.MetafileTests.Ctor_StringIntPtrEmfType_Success(EmfType emfType)
Finished: System.Drawing.Common.Tests
```
On my computer `font.ToLogFont(logFont);` always set `logFont.lfCharSet` to 204.
Is it error in test or in implementation?
Contributor guide
Assessment
This issue has not been assessed yet.