summaryrefslogtreecommitdiffstats
path: root/tests/auto/qpixmap
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-10-15 09:05:43 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-10-15 09:11:31 (GMT)
commit3ef69b12f6d6905594ef3976b3e16787378dfe6a (patch)
tree1105fb45cddf0afca5929041e679e743e36a1772 /tests/auto/qpixmap
parent1745a0e7799774373ad6252a73d6e8af841db2a1 (diff)
parent9358d77fc1de64d2a8a06bfa4095dcde9f9b009b (diff)
downloadQt-3ef69b12f6d6905594ef3976b3e16787378dfe6a.zip
Qt-3ef69b12f6d6905594ef3976b3e16787378dfe6a.tar.gz
Qt-3ef69b12f6d6905594ef3976b3e16787378dfe6a.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: src/gui/painting/qpaintengine_raster.cpp tests/auto/declarative/qdeclarativetext/data/alignments_cb.png tests/auto/declarative/qdeclarativetext/data/alignments_cc.png tests/auto/declarative/qdeclarativetext/data/alignments_ct.png
Diffstat (limited to 'tests/auto/qpixmap')
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index 24cbb21..fdf8311 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -1160,6 +1160,8 @@ void tst_QPixmap::fromSymbianCFbsBitmap_data()
const int smallHeight = 20;
const int largeWidth = 240;
const int largeHeight = 320;
+ const int notAlignedWidth = 250;
+ const int notAlignedHeight = 250;
// Indexed Color Formats - Disabled since images seem to be blank -> no palette?
// QTest::newRow("EGray2 small") << EGray2 << smallWidth << smallHeight << QColor(Qt::black);
@@ -1172,14 +1174,19 @@ void tst_QPixmap::fromSymbianCFbsBitmap_data()
// Direct Color Formats
QTest::newRow("EColor4K small") << EColor4K << smallWidth << smallHeight << QColor(Qt::red);
QTest::newRow("EColor4K big") << EColor4K << largeWidth << largeHeight << QColor(Qt::red);
+ QTest::newRow("EColor4K not aligned") << EColor4K << notAlignedWidth << notAlignedHeight << QColor(Qt::red);
QTest::newRow("EColor64K small") << EColor64K << smallWidth << smallHeight << QColor(Qt::green);
QTest::newRow("EColor64K big") << EColor64K << largeWidth << largeHeight << QColor(Qt::green);
+ QTest::newRow("EColor64K not aligned") << EColor64K << notAlignedWidth << notAlignedHeight << QColor(Qt::green);
QTest::newRow("EColor16M small") << EColor16M << smallWidth << smallHeight << QColor(Qt::yellow);
QTest::newRow("EColor16M big") << EColor16M << largeWidth << largeHeight << QColor(Qt::yellow);
+ QTest::newRow("EColor16M not aligned") << EColor16M << notAlignedWidth << notAlignedHeight << QColor(Qt::yellow);
QTest::newRow("EColor16MU small") << EColor16MU << smallWidth << smallHeight << QColor(Qt::red);
QTest::newRow("EColor16MU big") << EColor16MU << largeWidth << largeHeight << QColor(Qt::red);
+ QTest::newRow("EColor16MU not aligned") << EColor16MU << notAlignedWidth << notAlignedHeight << QColor(Qt::red);
QTest::newRow("EColor16MA small opaque") << EColor16MA << smallWidth << smallHeight << QColor(255, 255, 0);
QTest::newRow("EColor16MA big opaque") << EColor16MA << largeWidth << largeHeight << QColor(255, 255, 0);
+ QTest::newRow("EColor16MA not aligned opaque") << EColor16MA << notAlignedWidth << notAlignedHeight << QColor(255, 255, 0);
// Semi-transparent Colors - Disabled for now, since the QCOMPARE fails, but visually confirmed to work
// QTest::newRow("EColor16MA small semi") << EColor16MA << smallWidth << smallHeight << QColor(255, 255, 0, 127);
@@ -1237,6 +1244,10 @@ void tst_QPixmap::fromSymbianCFbsBitmap()
QColor actualColor(image.pixel(1, 1));
QCOMPARE(actualColor, color);
+
+ QImage shouldBe(pixmap.width(), pixmap.height(), image.format());
+ shouldBe.fill(color.rgba());
+ QCOMPARE(image, shouldBe);
}
__UHEAP_MARKEND;