From ecab54e9af3f768c2704876e695a685671eab605 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Mon, 7 Sep 2009 11:56:58 +1000 Subject: Unit tests for QGLFormat option constructor Reviewed-by: trustme --- tests/auto/qgl/tst_qgl.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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()); -- cgit v0.12