aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qsgtextedit
diff options
context:
space:
mode:
authorCharles Yin <charles.yin@nokia.com>2011-05-16 13:49:56 +1000
committerCharles Yin <charles.yin@nokia.com>2011-05-17 14:55:32 +1000
commit7740c4c9a1a3cba3fec26e8995bfc8af9f94cd06 (patch)
tree0f117df6edacfba191ddc86ecb46e96c85e389d0 /tests/auto/declarative/qsgtextedit
parentab858bc8e650f1120495f968379f37257c774b5f (diff)
skip unit tests if no required OpenGL 2.0 feature on this platform
Diffstat (limited to 'tests/auto/declarative/qsgtextedit')
-rw-r--r--tests/auto/declarative/qsgtextedit/tst_qsgtextedit.cpp13
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"