diff options
author | Charles Yin <charles.yin@nokia.com> | 2011-05-16 13:49:56 +1000 |
---|---|---|
committer | Charles Yin <charles.yin@nokia.com> | 2011-05-17 14:55:32 +1000 |
commit | 7740c4c9a1a3cba3fec26e8995bfc8af9f94cd06 (patch) | |
tree | 0f117df6edacfba191ddc86ecb46e96c85e389d0 /tests/auto/declarative/qsgpathview | |
parent | ab858bc8e650f1120495f968379f37257c774b5f (diff) |
skip unit tests if no required OpenGL 2.0 feature on this platform
Change-Id: I68feb5938339f327b45cf66b7aec1c582753f18d
Diffstat (limited to 'tests/auto/declarative/qsgpathview')
-rw-r--r-- | tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp b/tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp index df8057c4c4..5b95acec68 100644 --- a/tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp +++ b/tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp @@ -55,6 +55,7 @@ #include <QStringListModel> #include <QStandardItemModel> #include <QFile> +#include <QtOpenGL/QGLShaderProgram> #include "../../../shared/util.h" @@ -89,6 +90,8 @@ public: tst_QSGPathView(); private slots: + void initTestCase(); + void cleanupTestCase(); void initValues(); void items(); void dataModel(); @@ -121,6 +124,18 @@ private: QList<T*> findItems(QSGItem *parent, const QString &objectName); }; +void tst_QSGPathView::initTestCase() +{ + QSGView canvas; + if (!QGLShaderProgram::hasOpenGLShaderPrograms(canvas.context())) + QSKIP("PathView needs OpenGL 2.0", SkipAll); +} + +void tst_QSGPathView::cleanupTestCase() +{ + +} + class TestObject : public QObject { Q_OBJECT |