summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgl
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-09-07 01:56:58 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-09-07 01:56:58 (GMT)
commitecab54e9af3f768c2704876e695a685671eab605 (patch)
tree05d4e33a2b7dea6c351933d1b0a2a5b3ea819580 /tests/auto/qgl
parent9409897cfb5e8add609164c250395529fef95086 (diff)
downloadQt-ecab54e9af3f768c2704876e695a685671eab605.zip
Qt-ecab54e9af3f768c2704876e695a685671eab605.tar.gz
Qt-ecab54e9af3f768c2704876e695a685671eab605.tar.bz2
Unit tests for QGLFormat option constructor
Reviewed-by: trustme
Diffstat (limited to 'tests/auto/qgl')
-rw-r--r--tests/auto/qgl/tst_qgl.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp
index e7d1367..535e6ae 100644
--- a/tests/auto/qgl/tst_qgl.cpp
+++ b/tests/auto/qgl/tst_qgl.cpp
@@ -500,6 +500,16 @@ void tst_QGL::getSetCheck()
QCOMPARE(format1.redBufferSize(), 8);
QCOMPARE(format1.plane(), 8);
+ // Check the QGLFormat constructor that takes an option list.
+ QGLFormat format5
+ (QGL::DepthBuffer | QGL::StereoBuffers | QGL::ColorIndex, 3);
+ QVERIFY(format5.depth());
+ QVERIFY(format5.stereo());
+ QVERIFY(format5.doubleBuffer()); // From defaultFormat()
+ QVERIFY(!format5.hasOverlay()); // From defaultFormat()
+ QVERIFY(!format5.rgba());
+ QCOMPARE(format5.plane(), 3);
+
// The default format should be the same as QGLFormat().
QVERIFY(QGLFormat::defaultFormat() == QGLFormat());