1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
Description: Disable a failing regression test
In TestCGUIText::test_regression_rP26522:
./source/gui/tests/test_CGUIText.h:319: Error: Expected ((g_VFS->Mount(L"", DataDir() / "mods" / "mod" / "", VFS_MOUNT_MUST_EXIST)) == INFO::OK), found (-110100 != 0)
ERROR: Failed to open font file fonts/sans-bold-13.fnt
ERROR: Failed to open font file fonts/sans-10.fnt
./source/gui/tests/test_CGUIText.h:332: Error: Expected (text.GetSize().Height == 14 + 9 + 8 * 2), found (22.0000 != 39)
.............................................................................................................................................................................................................................................Skipping globalscripts tests (can't find binaries/data/mods/public/globalscripts/tests/)
.Skipping component scripts tests (can't find binaries/data/mods/public/simulation/components/tests/setup.js)
................................................................................................................
Failed 1 and Skipped 0 of 391 tests
Success rate: 99%
Author: Ludovic Rousseau <rousseau@debian.org>
Forwarded: https://trac.wildfiregames.com/ticket/6630
Last-Update: 2025-02-01
--- a/source/gui/tests/test_CGUIText.h
+++ b/source/gui/tests/test_CGUIText.h
@@ -316,24 +316,6 @@
TS_ASSERT_EQUALS(text.GetSize().Height, lineHeight + padding * 2);
}
- void test_regression_rP26522()
- {
- TS_ASSERT_OK(g_VFS->Mount(L"", DataDir() / "mods" / "mod" / "", VFS_MOUNT_MUST_EXIST));
-
- CGUI gui{*g_ScriptContext};
-
- const CStrW font = L"sans-bold-13";
- CGUIString string;
- CGUIText text;
-
- // rP26522 introduced a bug that triggered in rare cases with word-wrapping.
- string.SetValue(L"90–120 min");
- text = CGUIText(gui, string, L"sans-bold-13", 53, 8.f, EAlign::LEFT, nullptr);
-
- TS_ASSERT_EQUALS(text.GetTextCalls().size(), 2);
- TS_ASSERT_EQUALS(text.GetSize().Height, 14 + 9 + 8 * 2);
- }
-
void test_multiple_blank_spaces()
{
CGUI gui{*g_ScriptContext};
|