From 1ceb2ec18056c41c040e3087f79860b7eb7b9d3f Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Wed, 10 Mar 2010 15:25:38 +0100 Subject: Update tst_QGL::getSetCheck to check for new (correct) behaviour Reviewed-By: Trond --- tests/auto/qgl/tst_qgl.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp index d89e463..15c0b66 100644 --- a/tests/auto/qgl/tst_qgl.cpp +++ b/tests/auto/qgl/tst_qgl.cpp @@ -227,12 +227,12 @@ void tst_QGL::getSetCheck() QCOMPARE(false, obj1.alpha()); QVERIFY(!obj1.testOption(QGL::AlphaChannel)); QVERIFY(obj1.testOption(QGL::NoAlphaChannel)); - obj1.setAlphaBufferSize(0); + obj1.setAlphaBufferSize(1); QCOMPARE(true, obj1.alpha()); // setAlphaBufferSize() enables alpha. - QCOMPARE(0, obj1.alphaBufferSize()); + QCOMPARE(1, obj1.alphaBufferSize()); QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setAlphaBufferSize: Cannot set negative alpha buffer size -2147483648"); obj1.setAlphaBufferSize(TEST_INT_MIN); - QCOMPARE(0, obj1.alphaBufferSize()); // Makes no sense with a negative buffer size + QCOMPARE(1, obj1.alphaBufferSize()); // Makes no sense with a negative buffer size obj1.setAlphaBufferSize(3); QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setAlphaBufferSize: Cannot set negative alpha buffer size -1"); obj1.setAlphaBufferSize(-1); @@ -243,11 +243,11 @@ void tst_QGL::getSetCheck() // int QGLFormat::stencilBufferSize() // void QGLFormat::setStencilBufferSize(int) QCOMPARE(-1, obj1.stencilBufferSize()); - obj1.setStencilBufferSize(0); - QCOMPARE(0, obj1.stencilBufferSize()); + obj1.setStencilBufferSize(1); + QCOMPARE(1, obj1.stencilBufferSize()); QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setStencilBufferSize: Cannot set negative stencil buffer size -2147483648"); obj1.setStencilBufferSize(TEST_INT_MIN); - QCOMPARE(0, obj1.stencilBufferSize()); // Makes no sense with a negative buffer size + QCOMPARE(1, obj1.stencilBufferSize()); // Makes no sense with a negative buffer size obj1.setStencilBufferSize(3); QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setStencilBufferSize: Cannot set negative stencil buffer size -1"); obj1.setStencilBufferSize(-1); @@ -352,6 +352,7 @@ void tst_QGL::getSetCheck() // bool QGLFormat::accum() // void QGLFormat::setAccum(bool) + obj1.setAccumBufferSize(0); QCOMPARE(false, obj1.accum()); QVERIFY(!obj1.testOption(QGL::AccumBuffer)); QVERIFY(obj1.testOption(QGL::NoAccumBuffer)); -- cgit v0.12