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/qsgtextinput | |
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/qsgtextinput')
-rw-r--r-- | tests/auto/declarative/qsgtextinput/tst_qsgtextinput.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/auto/declarative/qsgtextinput/tst_qsgtextinput.cpp b/tests/auto/declarative/qsgtextinput/tst_qsgtextinput.cpp index b349de9800..5f6884b2b9 100644 --- a/tests/auto/declarative/qsgtextinput/tst_qsgtextinput.cpp +++ b/tests/auto/declarative/qsgtextinput/tst_qsgtextinput.cpp @@ -51,6 +51,7 @@ #include <QStyle> #include <QInputContext> #include <private/qapplication_p.h> +#include <QtOpenGL/QGLShaderProgram> #ifdef Q_OS_SYMBIAN // In Symbian OS test data is located in applications private dir @@ -83,7 +84,8 @@ public: tst_qsgtextinput(); private slots: - + void initTestCase(); + void cleanupTestCase(); void text(); void width(); void font(); @@ -144,7 +146,17 @@ private: QStringList standard; QStringList colorStrings; }; +void tst_qsgtextinput::initTestCase() +{ + QSGView canvas; + if (!QGLShaderProgram::hasOpenGLShaderPrograms(canvas.context())) + QSKIP("TextInput item needs OpenGL 2.0", SkipAll); +} +void tst_qsgtextinput::cleanupTestCase() +{ + +} tst_qsgtextinput::tst_qsgtextinput() { standard << "the quick brown fox jumped over the lazy dog" |