From 78d73c2417cdc7df70ea7d770c51023ad7df5083 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 26 Oct 2024 14:54:43 +0200 Subject: [PATCH] only leave generic font test comparison wiggle room for KNI, and make it 10% --- Tests/FontTests.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Tests/FontTests.cs b/Tests/FontTests.cs index bb4ebb2..3d3bfb9 100644 --- a/Tests/FontTests.cs +++ b/Tests/FontTests.cs @@ -124,8 +124,12 @@ public class FontTests : GameTestFixture { var spriteFont = ((GenericSpriteFont) this.Font).Font.MeasureString(s); var genericFont = this.Font.MeasureString(s); Assert.AreEqual(spriteFont.X, genericFont.X); - // we leave a bit of room for the Y value since sprite fonts sometimes increase line height for specific characters, which generic fonts don't - Assert.AreEqual(spriteFont.Y, genericFont.Y, 10); + Assert.AreEqual(spriteFont.Y, genericFont.Y +#if KNI + // we leave a bit of room for the Y value since KNI's sprite fonts sometimes increase line height for specific characters, which generic fonts don't + , spriteFont.Y / 10 +#endif + ); } CompareSizes("This is a very simple test string");