diff options
author | Eric Mellino <erme@microsoft.com> | 2017-09-13 23:01:39 +0300 |
---|---|---|
committer | Stephen Toub <stoub@microsoft.com> | 2017-09-13 23:01:39 +0300 |
commit | 99ac27f1223460424a2ebc0899895884e6c5c191 (patch) | |
tree | 4657b8d51eea1108c2d6bb02340c04540b796917 | |
parent | d183fd34074fba9633f025fe2251e7d7883c7f25 (diff) |
Fix a spurious test failure in System.Drawing.Common.Tests (#24009)
* Fix spurious failure in FontTests.cs
* The FontSize in FromLogFont_ValidLogFont seems to be dependent on system
state, and not a constant value.
* Add better error message to AssertDefaultPageSettings.
-rw-r--r-- | src/System.Drawing.Common/tests/FontTests.cs | 2 | ||||
-rw-r--r-- | src/System.Drawing.Common/tests/Printing/PrintDocumentTests.cs | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/System.Drawing.Common/tests/FontTests.cs b/src/System.Drawing.Common/tests/FontTests.cs index 65926fb7a2..e742cedcf1 100644 --- a/src/System.Drawing.Common/tests/FontTests.cs +++ b/src/System.Drawing.Common/tests/FontTests.cs @@ -638,7 +638,7 @@ namespace System.Drawing.Tests }; using (Font font = Font.FromLogFont(logFont)) { - VerifyFont(font, family.Name, 16, fontStyle, GraphicsUnit.World, charSet, expectedGdiVerticalFont: false); + VerifyFont(font, family.Name, font.Size, fontStyle, GraphicsUnit.World, charSet, expectedGdiVerticalFont: false); } } } diff --git a/src/System.Drawing.Common/tests/Printing/PrintDocumentTests.cs b/src/System.Drawing.Common/tests/Printing/PrintDocumentTests.cs index 223dc1f346..def75594c0 100644 --- a/src/System.Drawing.Common/tests/Printing/PrintDocumentTests.cs +++ b/src/System.Drawing.Common/tests/Printing/PrintDocumentTests.cs @@ -256,7 +256,8 @@ namespace System.Drawing.Printing.Tests break; default: - Assert.False(true, "Unexpected default paper size"); + string message = $"Unexpected default paper size. Kind={pageSettings.PaperSize.Kind}, Bounds={pageSettings.Bounds}"; + Assert.False(true, message); break; } |