summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qgl/tst_qgl.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp
index 6c444e4..0fefbf3 100644
--- a/tests/auto/qgl/tst_qgl.cpp
+++ b/tests/auto/qgl/tst_qgl.cpp
@@ -485,6 +485,20 @@ void tst_QGL::getSetCheck()
QVERIFY(format1 == format2);
QVERIFY(!(format1 != format2));
+ // Copy constructor and assignment for QGLFormat.
+ QGLFormat format3(format1);
+ QGLFormat format4;
+ QVERIFY(format1 == format3);
+ QVERIFY(format1 != format4);
+ format4 = format1;
+ QVERIFY(format1 == format4);
+
+ // Check that modifying a copy doesn't affect the original.
+ format3.setRedBufferSize(16);
+ format4.setPlane(16);
+ QCOMPARE(format1.redBufferSize(), 8);
+ QCOMPARE(format1.plane(), 8);
+
MyGLContext obj2(obj1);
// bool QGLContext::windowCreated()
// void QGLContext::setWindowCreated(bool)