From c3eb9cbaa55114c88fea3960021e3a5e044e52e2 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek <7330332+a-wi@users.noreply.github.com> Date: Thu, 1 Dec 2022 19:26:13 +0100 Subject: [PATCH] Try to ensure that testing window is shown wxClientDC tests are reliable only if testing window is visible. --- tests/graphics/clippingbox.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/graphics/clippingbox.cpp b/tests/graphics/clippingbox.cpp index 7dc2e9a57f..851f608a22 100644 --- a/tests/graphics/clippingbox.cpp +++ b/tests/graphics/clippingbox.cpp @@ -3907,7 +3907,9 @@ TEST_CASE("ClippingBoxTestCase::wxSVGFileDC", "[clip][dc][svgdc]") TEST_CASE("ClippingBoxTestCase::wxClientDC", "[clip][dc][clientdc]") { wxBitmap bmp; // We need wxNullBitmap because we can't check the output - // Ensure window is large enough for testing + // Ensure window is shown and large enough for testing + wxTheApp->GetTopWindow()->Raise(); + REQUIRE(wxTheApp->GetTopWindow()->IsShown()); wxSize winSize = wxTheApp->GetTopWindow()->GetSize(); winSize.x = wxMax(winSize.x, s_dcSize.x + 50); winSize.y = wxMax(winSize.y, s_dcSize.y + 50);