summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorSarah Smith <sarah.j.smith@nokia.com>2012-05-01 16:23:34 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-02 04:00:29 +0200
commit2c34850b965a0c33a7e7b91f9c0416b014924313 (patch)
treed9077591b5089a1cd87eaf8719b62d65edb1b79b /tests/auto
parent41f15122654d3cb2862b6676671720fb2b120b17 (diff)
Fix mac test crash.
Looks like Mac display logic got changed. Task-number: QTBUG-25463 Change-Id: Ia2ab92d2cf563b6d8904acf3204a314e259a270c Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/threed/qglmaterial/qglmaterial.pro1
-rw-r--r--tests/auto/threed/qglmaterial/tst_qglmaterial.cpp8
2 files changed, 6 insertions, 3 deletions
diff --git a/tests/auto/threed/qglmaterial/qglmaterial.pro b/tests/auto/threed/qglmaterial/qglmaterial.pro
index 66be936b3..819b23fa5 100644
--- a/tests/auto/threed/qglmaterial/qglmaterial.pro
+++ b/tests/auto/threed/qglmaterial/qglmaterial.pro
@@ -5,4 +5,3 @@ QT += testlib 3d
CONFIG += warn_on
SOURCES += tst_qglmaterial.cpp
-macx: CONFIG+=insignificant_test
diff --git a/tests/auto/threed/qglmaterial/tst_qglmaterial.cpp b/tests/auto/threed/qglmaterial/tst_qglmaterial.cpp
index 04693ab21..c5ac17024 100644
--- a/tests/auto/threed/qglmaterial/tst_qglmaterial.cpp
+++ b/tests/auto/threed/qglmaterial/tst_qglmaterial.cpp
@@ -239,8 +239,12 @@ void tst_QGLMaterial::initTestCase()
{
widget = new TestWidget();
widget->show();
- if (widget->context() == 0)
+ QOpenGLContext *ctx = widget->context();
+ if (!ctx || !ctx->isValid())
QSKIP("Could not create valid GL context");
+
+ // TODO: if there is no context the whole thing gets skipped. We should at
+ // least be able to test for properties, setters & getters and so on.
}
void tst_QGLMaterial::cleanupTestCase()
@@ -708,7 +712,7 @@ void tst_QGLMaterial::standardMaterialDraw()
{
QSKIP("not currently working");
- if (!widget->context()->isValid())
+ if (!widget->context() || !widget->context()->isValid())
QSKIP("GL Implementation not valid");
QGLMaterial mat1;