summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgl
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-03-10 14:25:38 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-03-10 14:27:46 (GMT)
commit1ceb2ec18056c41c040e3087f79860b7eb7b9d3f (patch)
tree890f182bc074393bcd82f494ad89ec35fe7e920d /tests/auto/qgl
parent9bf426a2af27ad5bfdb35706c3ed48e77f654f4d (diff)
downloadQt-1ceb2ec18056c41c040e3087f79860b7eb7b9d3f.zip
Qt-1ceb2ec18056c41c040e3087f79860b7eb7b9d3f.tar.gz
Qt-1ceb2ec18056c41c040e3087f79860b7eb7b9d3f.tar.bz2
Update tst_QGL::getSetCheck to check for new (correct) behaviour
Reviewed-By: Trond
Diffstat (limited to 'tests/auto/qgl')
-rw-r--r--tests/auto/qgl/tst_qgl.cpp13
1 files 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));