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/qsgtextedit | |
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/qsgtextedit')
-rw-r--r-- | tests/auto/declarative/qsgtextedit/tst_qsgtextedit.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/declarative/qsgtextedit/tst_qsgtextedit.cpp b/tests/auto/declarative/qsgtextedit/tst_qsgtextedit.cpp index 5510701962..92053637c7 100644 --- a/tests/auto/declarative/qsgtextedit/tst_qsgtextedit.cpp +++ b/tests/auto/declarative/qsgtextedit/tst_qsgtextedit.cpp @@ -60,6 +60,7 @@ #include <QMimeData> #include <private/qapplication_p.h> #include <private/qtextcontrol_p.h> +#include <QtOpenGL/QGLShaderProgram> #ifdef Q_WS_MAC #include <Carbon/Carbon.h> @@ -97,6 +98,8 @@ public: tst_qsgtextedit(); private slots: + void initTestCase(); + void cleanupTestCase(); void text(); void width(); void wrap(); @@ -170,7 +173,17 @@ private: QDeclarativeEngine engine; }; +void tst_qsgtextedit::initTestCase() +{ + QSGView canvas; + if (!QGLShaderProgram::hasOpenGLShaderPrograms(canvas.context())) + QSKIP("TextEdit item needs OpenGL 2.0", SkipAll); +} +void tst_qsgtextedit::cleanupTestCase() +{ + +} tst_qsgtextedit::tst_qsgtextedit() { standard << "the quick brown fox jumped over the lazy dog" |