summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/qopengl/tst_qopengl.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-01-26 11:27:37 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2016-01-26 11:27:37 +0000
commit0a1af55a9b69f7fd58dbce43a0d4c1faf0143838 (patch)
tree26da168e740734d168be37803abec2f8739b213d /tests/auto/gui/qopengl/tst_qopengl.cpp
parentb8fb0ee999d32401157be8d86e5a03185aadbb9e (diff)
parent158a3a4159bdc5a49caecd63e021dacbc06cf23c (diff)
Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev
Diffstat (limited to 'tests/auto/gui/qopengl/tst_qopengl.cpp')
-rw-r--r--tests/auto/gui/qopengl/tst_qopengl.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp
index 601553e2e7..15244744bf 100644
--- a/tests/auto/gui/qopengl/tst_qopengl.cpp
+++ b/tests/auto/gui/qopengl/tst_qopengl.cpp
@@ -34,6 +34,7 @@
#include <QtGui/QOpenGLVertexArrayObject>
#include <QtGui/QOpenGLBuffer>
#include <QtGui/QOpenGLPaintDevice>
+#include <QtGui/QOpenGLTexture>
#include <QtGui/QPainter>
#include <QtGui/QScreen>
#include <QtGui/QWindow>
@@ -94,8 +95,8 @@ private slots:
void textureblitterFullTargetRectTransform();
void textureblitterPartTargetRectTransform();
void defaultSurfaceFormat();
-
void imageFormatPainting();
+ void nullTextureInitializtion();
#ifdef USE_GLX
void glxContextWrap();
@@ -1519,6 +1520,18 @@ void tst_QOpenGL::bufferMapRange()
ctx->doneCurrent();
}
+void tst_QOpenGL::nullTextureInitializtion()
+{
+ QScopedPointer<QSurface> surface(createSurface(QSurface::Window));
+ QOpenGLContext ctx;
+ ctx.create();
+ ctx.makeCurrent(surface.data());
+
+ QImage i;
+ QOpenGLTexture t(i);
+ QVERIFY(!t.isCreated());
+}
+
QTEST_MAIN(tst_QOpenGL)
#include "tst_qopengl.moc"