summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgl
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-11-16 12:37:25 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-11-16 12:37:25 (GMT)
commit116af8e05ffae348c8236f02bcc9b642f156d3e8 (patch)
tree97942f4e3e72cc31dd6772a162344683bac46441 /tests/auto/qgl
parentde43f6f89e1344045f0fb5a319a44e5d604d414e (diff)
parent7e1f19c3e3036f166a84dbaa916ec1da1cc818c6 (diff)
downloadQt-116af8e05ffae348c8236f02bcc9b642f156d3e8.zip
Qt-116af8e05ffae348c8236f02bcc9b642f156d3e8.tar.gz
Qt-116af8e05ffae348c8236f02bcc9b642f156d3e8.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6
Diffstat (limited to 'tests/auto/qgl')
-rw-r--r--tests/auto/qgl/tst_qgl.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp
index ccb08c3..5dc072d 100644
--- a/tests/auto/qgl/tst_qgl.cpp
+++ b/tests/auto/qgl/tst_qgl.cpp
@@ -1842,6 +1842,7 @@ void tst_QGL::shareRegister()
QVERIFY(qt_shared_test()->value(glw1->context()) == res1);
// Create another context that shares with the first.
+ QVERIFY(!glw1->isSharing());
QGLWidget *glw2 = new QGLWidget(0, glw1);
if (!glw2->isSharing()) {
delete glw2;
@@ -1880,6 +1881,7 @@ void tst_QGL::shareRegister()
// Create a third context, not sharing with the others.
QGLWidget *glw3 = new QGLWidget();
+ QVERIFY(!glw3->isSharing());
// Create a guard on the standalone context.
QGLSharedResourceGuard guard3(glw3->context());
@@ -1928,6 +1930,9 @@ void tst_QGL::shareRegister()
// Delete the first context.
delete glw1;
+ // The second context should no longer register as sharing.
+ QVERIFY(!glw2->isSharing());
+
// The first context's resource should transfer to the second context.
QCOMPARE(tst_QGLResource::deletions, 0);
QVERIFY(qt_shared_test()->value(glw2->context()) == res1);