summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2010-09-17 10:19:01 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2010-09-17 10:25:43 (GMT)
commit0f6dbb14ede58ebe86c1042dab5a0f086635770f (patch)
tree569992e9d3e78aaed22952f094047422078b2476 /tests/auto
parenta4920cd2c10d4fb0420b629d8b40c8d368b791ca (diff)
downloadQt-0f6dbb14ede58ebe86c1042dab5a0f086635770f.zip
Qt-0f6dbb14ede58ebe86c1042dab5a0f086635770f.tar.gz
Qt-0f6dbb14ede58ebe86c1042dab5a0f086635770f.tar.bz2
Added autotest for QPixmap::size() with null pixmaps.
For change 82575a9f6123eed3e858 which fixed a behavioural regression. Reviewed-by: Olivier Goffart
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index 7e0f466..8005ec5 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -742,6 +742,11 @@ void tst_QPixmap::testMetrics()
QCOMPARE(bitmap.width(), 100);
QCOMPARE(bitmap.height(), 100);
QCOMPARE(bitmap.depth(), 1);
+
+ QPixmap null;
+
+ QCOMPARE(null.size().width(), null.width());
+ QCOMPARE(null.size().height(), null.height());
}
void tst_QPixmap::createMaskFromColor()