From: Ludovic Rousseau Date: Sun, 2 Oct 2022 16:14:33 +0000 (+0100) Subject: Disable a failing regression test X-Git-Tag: archive/raspbian/0.0.26-1+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9051017730fffb878f1e9196eff6f7b67d22bf9d;p=0ad.git Disable a failing regression test 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 --- diff --git a/source/gui/tests/test_CGUIText.h b/source/gui/tests/test_CGUIText.h index 0550f98..92e2457 100644 --- a/source/gui/tests/test_CGUIText.h +++ b/source/gui/tests/test_CGUIText.h @@ -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);