Disable a failing regression test
authorLudovic Rousseau <rousseau@debian.org>
Sun, 2 Oct 2022 16:14:33 +0000 (17:14 +0100)
committerLudovic Rousseau <rousseau@debian.org>
Sun, 2 Oct 2022 16:14:33 +0000 (17:14 +0100)
Forwarded: https://trac.wildfiregames.com/ticket/6630
Last-Update: 2022-10-02

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%

Gbp-Pq: Name Disable-test_regression_rP26522.patch

source/gui/tests/test_CGUIText.h

index 0550f98c4f89de9c4679c931537be4f2aa44af86..92e2457c894cd40d9df1a0c3ebb835015c7d9080 100644 (file)
@@ -314,24 +314,6 @@ public:
                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);