From 216b5a4b232f6d8117e08e0b76a9b520a7ee717d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 25 Dec 2023 15:16:40 +0100 Subject: [PATCH] Also use WaitForEventAt() in Grid::SortClick test case Abandon this test too if the mouse moves for whatever reason. --- tests/controls/gridtest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/controls/gridtest.cpp b/tests/controls/gridtest.cpp index 80907c9f03..4beb91becb 100644 --- a/tests/controls/gridtest.cpp +++ b/tests/controls/gridtest.cpp @@ -662,10 +662,10 @@ TEST_CASE_METHOD(GridTestCase, "Grid::SortClick", "[grid]") wxYield(); sim.MouseClick(); - WaitFor("mouse click to be processed", [&]() { - return sort.GetCount() != 0; - }); - + if ( !WaitForEventAt(pos, "mouse click to be processed", [&]() { + return sort.GetCount() != 0; + }) ) + return; CHECK(sort.GetCount() == 1); #endif }