From 4c0c652b846e248d076739a6e2f00a3a3d9a414f Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 20 Jul 2009 18:55:44 +0200 Subject: Use QVERIFY in benchmarks, insteads of returning silently in case of error --- tests/benchmarks/qdir/tst_qdir.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/benchmarks/qdir/tst_qdir.cpp b/tests/benchmarks/qdir/tst_qdir.cpp index edb2811..7977e28 100644 --- a/tests/benchmarks/qdir/tst_qdir.cpp +++ b/tests/benchmarks/qdir/tst_qdir.cpp @@ -87,8 +87,7 @@ private slots: WIN32_FIND_DATA fd; HANDLE hSearch = FindFirstFileW(appendedPath, &fd); - if (hSearch != INVALID_HANDLE_VALUE) - return; + QVERIFY(hSearch == INVALID_HANDLE_VALUE); QBENCHMARK { do { @@ -99,8 +98,7 @@ private slots: #else QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); DIR *dir = opendir(qPrintable(testdir.absolutePath())); - if (!dir) - return; + QVERIFY(dir); QVERIFY(!chdir(qPrintable(testdir.absolutePath()))); QBENCHMARK { -- cgit v0.12