diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-09-28 10:32:19 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-28 12:49:03 +0200 |
commit | 3dd0f608444d83974f6d49027f60d0a1845447bd (patch) | |
tree | 703a585db3109bc24429fa085235e0c17c79ddd3 /tests | |
parent | 85569dfdff1caec2efb714a1a9cdc64094893ec1 (diff) |
Don't do run svg tests when no svg is available
Change-Id: I6625a9e1542ffc962d5b2c414832575e450a9e61
Reviewed-on: http://codereview.qt-project.org/5690
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/qsgimage/tst_qsgimage.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/declarative/qsgimage/tst_qsgimage.cpp b/tests/auto/declarative/qsgimage/tst_qsgimage.cpp index a5f135f205..ccea5ca1f5 100644 --- a/tests/auto/declarative/qsgimage/tst_qsgimage.cpp +++ b/tests/auto/declarative/qsgimage/tst_qsgimage.cpp @@ -54,6 +54,7 @@ #include <QtDeclarative/qdeclarativeexpression.h> #include <QtTest/QSignalSpy> #include <QtGui/QPainter> +#include <QtGui/QImageReader> #include "../../../shared/util.h" #include "../shared/testhttpserver.h" @@ -140,7 +141,9 @@ void tst_qsgimage::imageSource_data() << true << true << "file::2:1: QML Image: Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/no-such-file-1.png").toString(); QTest::newRow("remote") << SERVER_ADDR "/colors.png" << 120.0 << 120.0 << true << false << true << ""; QTest::newRow("remote redirected") << SERVER_ADDR "/oldcolors.png" << 120.0 << 120.0 << true << false << false << ""; - QTest::newRow("remote svg") << SERVER_ADDR "/heart.svg" << 550.0 << 500.0 << true << false << false << ""; + if (QImageReader::supportedImageFormats().contains("svg")) + QTest::newRow("remote svg") << SERVER_ADDR "/heart.svg" << 550.0 << 500.0 << true << false << false << ""; + QTest::newRow("remote not found") << SERVER_ADDR "/no-such-file.png" << 0.0 << 0.0 << true << false << true << "file::2:1: QML Image: Error downloading " SERVER_ADDR "/no-such-file.png - server replied: Not found"; @@ -353,6 +356,9 @@ void tst_qsgimage::mirror() void tst_qsgimage::svg() { + if (!QImageReader::supportedImageFormats().contains("svg")) + QSKIP("svg support not available", SkipAll); + QString src = QUrl::fromLocalFile(SRCDIR "/data/heart.svg").toString(); QString componentStr = "import QtQuick 2.0\nImage { source: \"" + src + "\"; sourceSize.width: 300; sourceSize.height: 300 }"; QDeclarativeComponent component(&engine); |