Autotest: fix existence check after c8c68ec
.
The files were moved to a qrc resource, so the string is never empty, we need to use QFile::exists to make sure they exist. And the error message was wrong, pointing to current dir. Change-Id: I532bda9f6221fb5c69b779b8b48baac9ede90eba Reviewed-by: Rainer Keller <rainer.keller@theqtcompany.com>
This commit is contained in:
parent
edd555425a
commit
85712bae5b
@ -109,14 +109,11 @@ void tst_QMimeDatabase::initTestCase()
|
||||
if (m_testSuite.isEmpty())
|
||||
qWarning("%s", qPrintable(testSuiteWarning()));
|
||||
|
||||
const QString errorMessage = QString::fromLatin1("Cannot find '%1'");
|
||||
m_yastMimeTypes = QLatin1String(RESOURCE_PREFIX) + yastFileName;
|
||||
QVERIFY2(!m_yastMimeTypes.isEmpty(),
|
||||
qPrintable(QString::fromLatin1("Cannot find '%1' starting from '%2'").
|
||||
arg(yastFileName, QDir::currentPath())));
|
||||
QVERIFY2(QFile::exists(m_yastMimeTypes), qPrintable(errorMessage.arg(yastFileName)));
|
||||
m_qmlAgainFileName = QLatin1String(RESOURCE_PREFIX) + qmlAgainFileName;
|
||||
QVERIFY2(!m_qmlAgainFileName.isEmpty(),
|
||||
qPrintable(QString::fromLatin1("Cannot find '%1' starting from '%2'").
|
||||
arg(qmlAgainFileName, QDir::currentPath())));
|
||||
QVERIFY2(QFile::exists(m_qmlAgainFileName), qPrintable(errorMessage.arg(qmlAgainFileName)));
|
||||
|
||||
init();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user