diff options
| author | Luís Pereira <luis.artur.pereira@gmail.com> | 2013-08-15 10:26:19 -0700 |
|---|---|---|
| committer | Luís Pereira <luis.artur.pereira@gmail.com> | 2013-08-28 14:26:25 +0200 |
| commit | b6aca5b5f361dc1a28b2a70b38b6cedc1cf85de4 (patch) | |
| tree | abbc9fd53ed2045d9b6abedbee416f66cf7d12e4 | |
| parent | 70489baf0c8ec07eb1fdcbf1b5ef47d95b5899b1 (diff) | |
Adapt to Qt4 QSKIP
From the C++ API changes at
http://qt-project.org/doc/qt-5.0/qtdoc/sourcebreaks.html#changes-to-qt-test
"The "mode" parameter in QSKIP macro is removed. This parameter caused
problems in test metrics calculation because of the SkipAll mode, which
hid information about the skipped test data. Calling QSKIP in a test
function now behaves like SkipSingle, which is skipping a non-data-driven
test function or skipping only the current data row of a data-driven test
function. Every skipped data row is now reported in the test log."
Change-Id: I6d07fb13f5949dda52a89438d84c86dcc54f8c6c
Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
| -rw-r--r-- | tests/auto/qmimedatabase/tst_qmimedatabase.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/qmimedatabase/tst_qmimedatabase.cpp b/tests/auto/qmimedatabase/tst_qmimedatabase.cpp index a92f0c4..fe0db2a 100644 --- a/tests/auto/qmimedatabase/tst_qmimedatabase.cpp +++ b/tests/auto/qmimedatabase/tst_qmimedatabase.cpp @@ -623,7 +623,7 @@ void tst_QMimeDatabase::findByFileName_data() QTest::addColumn<QString>("xFail"); if (m_testSuite.isEmpty()) - QSKIP("shared-mime-info test suite not available."); + QSKIP("shared-mime-info test suite not available.", SkipSingle); const QString prefix = m_testSuite + QLatin1Char('/'); const QString fileName = prefix + QLatin1String("list"); @@ -857,7 +857,7 @@ void tst_QMimeDatabase::installNewGlobalMimeType() QVERIFY(QDir(m_globalXdgDir).mkpath(destDir)); QVERIFY(QFile::copy(m_yastMimeTypes, destFile)); if (!waitAndRunUpdateMimeDatabase(mimeDir)) - QSKIP("shared-mime-info not found, skipping mime.cache test"); + QSKIP("shared-mime-info not found, skipping mime.cache test", SkipSingle); QCOMPARE(db.mimeTypeForFile(QLatin1String("foo.ymu"), QMimeDatabase::MatchExtension).name(), QString::fromLatin1("text/x-suse-ymu")); @@ -867,7 +867,7 @@ void tst_QMimeDatabase::installNewGlobalMimeType() // Now test removing it again QFile::remove(destFile); if (!waitAndRunUpdateMimeDatabase(mimeDir)) - QSKIP("shared-mime-info not found, skipping mime.cache test"); + QSKIP("shared-mime-info not found, skipping mime.cache test", SkipSingle); QCOMPARE(db.mimeTypeForFile(QLatin1String("foo.ymu"), QMimeDatabase::MatchExtension).name(), QString::fromLatin1("application/octet-stream")); QVERIFY(!db.mimeTypeForName(QLatin1String("text/x-suse-ymp")).isValid()); @@ -889,7 +889,7 @@ void tst_QMimeDatabase::installNewLocalMimeType() if (!runUpdateMimeDatabase(mimeDir)) { const QString skipWarning = QLatin1String("shared-mime-info not found, skipping mime.cache test (") + QDir::toNativeSeparators(mimeDir) + QLatin1Char(')'); - QSKIP(qPrintable(skipWarning)); + QSKIP(qPrintable(skipWarning), SkipSingle); } QCOMPARE(db.mimeTypeForFile(QLatin1String("foo.ymu"), QMimeDatabase::MatchExtension).name(), @@ -900,7 +900,7 @@ void tst_QMimeDatabase::installNewLocalMimeType() // Now test removing it again (note, this leaves a mostly-empty mime.cache file) QFile::remove(destFile); if (!waitAndRunUpdateMimeDatabase(mimeDir)) - QSKIP("shared-mime-info not found, skipping mime.cache test"); + QSKIP("shared-mime-info not found, skipping mime.cache test", SkipSingle); QCOMPARE(db.mimeTypeForFile(QLatin1String("foo.ymu"), QMimeDatabase::MatchExtension).name(), QString::fromLatin1("application/octet-stream")); QVERIFY(!db.mimeTypeForName(QLatin1String("text/x-suse-ymp")).isValid()); |
