summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp')
-rw-r--r--tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
index 0f35089ff7..81cc66f045 100644
--- a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
+++ b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
@@ -169,7 +169,9 @@ void tst_QCryptographicHash::files()
QFETCH(QCryptographicHash::Algorithm, algorithm);
QFETCH(QByteArray, md5sum);
{
- QFile f(QString::fromLocal8Bit(SRCDIR) + filename);
+ QString testData = QFINDTESTDATA(filename);
+ QVERIFY2(!testData.isEmpty(), qPrintable(QString("Cannot find test data: %1").arg(filename)));
+ QFile f(testData);
QCryptographicHash hash(algorithm);
QVERIFY(! hash.addData(&f)); // file is not open for reading;
if (f.open(QIODevice::ReadOnly)) {