summaryrefslogtreecommitdiffstats
path: root/tests/auto/mng/tst_qmng.cpp
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@theqtcompany.com>2015-11-25 11:27:03 +0100
committeraavit <eirik.aavitsland@theqtcompany.com>2015-11-25 11:18:32 +0000
commit6a7f3bfcb81b56a29814f50e684620fc3daeb431 (patch)
treec6b896bf4e5705aaafb4d989cc1a78b520f1b142 /tests/auto/mng/tst_qmng.cpp
parent2ca54cf19660ded8be8225a7181d8f6930c4d9e8 (diff)
Skip (pass) each autotest if the corresponding handler not present
Add a check at initialization of each autotest, skipping it if the relevant plugin is not installed. This is the same as in the qtimagereader autotest in qtbase (SKIP_IF_UNSUPPORTED macro). Reason for change: Not all format handlers are supported on all platforms. Hence, the suite of autotests ("make check") should not fail on account of a missing plugin. Change-Id: Ic0f4da68a9527831f017db0f326afe6e631efd9e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Diffstat (limited to 'tests/auto/mng/tst_qmng.cpp')
-rw-r--r--tests/auto/mng/tst_qmng.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/mng/tst_qmng.cpp b/tests/auto/mng/tst_qmng.cpp
index 7e37d97..b82ece1 100644
--- a/tests/auto/mng/tst_qmng.cpp
+++ b/tests/auto/mng/tst_qmng.cpp
@@ -39,12 +39,19 @@ class tst_qmng: public QObject
Q_OBJECT
private slots:
+ void initTestCase();
void readImage_data();
void readImage();
void readCorruptImage_data();
void readCorruptImage();
};
+void tst_qmng::initTestCase()
+{
+ if (!QImageReader::supportedImageFormats().contains("mng"))
+ QSKIP("The image format handler is not installed.");
+}
+
void tst_qmng::readImage_data()
{
QTest::addColumn<QString>("fileName");