aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2022-09-11 01:59:14 +0200
committerLinus Jahn <lnj@kaidan.im>2022-09-12 23:06:16 +0200
commit0c1311a8181b4b6bc7a40e622bc9811898569827 (patch)
treecbe1448f6d6fa871eaa7156441d1b6d41f60ec5f
parent0c4703e923280081280f366be3daec0ccdc8dc8f (diff)
downloadqxmpp-0c1311a8181b4b6bc7a40e622bc9811898569827.tar.gz
tests: util: wait: Check whether spy.wait() succeeded
-rw-r--r--tests/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/util.h b/tests/util.h
index 34cd0d6e..4f193d6a 100644
--- a/tests/util.h
+++ b/tests/util.h
@@ -100,7 +100,7 @@ T wait(const QFuture<T> &future)
auto watcher = std::make_unique<QFutureWatcher<T>>();
QSignalSpy spy(watcher.get(), &QFutureWatcherBase::finished);
watcher->setFuture(future);
- spy.wait();
+ [&]() { QVERIFY(spy.wait()); }();
if constexpr (!std::is_same_v<T, void>) {
return future.result();
}