diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-03-30 14:59:03 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-03-30 14:59:03 (GMT) |
commit | f9c434cd70663db2d1b1c32c8b68ae3ff85d6803 (patch) | |
tree | 32ba957e42491ae7634c6a8999485a43e5f68f42 /tests | |
parent | e20d18f1982dde2b0fa9bd262e5aadd1e451a7fa (diff) | |
parent | 097b3b3323ab6641c17318057e100543b60bca77 (diff) | |
download | Qt-f9c434cd70663db2d1b1c32c8b68ae3ff85d6803.zip Qt-f9c434cd70663db2d1b1c32c8b68ae3ff85d6803.tar.gz Qt-f9c434cd70663db2d1b1c32c8b68ae3ff85d6803.tar.bz2 |
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qlocale/tst_qlocale.cpp | 11 | ||||
-rw-r--r-- | tests/auto/qpainter/tst_qpainter.cpp | 21 |
2 files changed, 32 insertions, 0 deletions
diff --git a/tests/auto/qlocale/tst_qlocale.cpp b/tests/auto/qlocale/tst_qlocale.cpp index 5e3e334..b8f7c22 100644 --- a/tests/auto/qlocale/tst_qlocale.cpp +++ b/tests/auto/qlocale/tst_qlocale.cpp @@ -591,6 +591,17 @@ void tst_QLocale::long_long_conversion_data() QTest::newRow("de_DE 12345.67") << QString("de_DE") << "12345.67"<< false << (qlonglong) 0; QTest::newRow("de_DE 123456.7") << QString("de_DE") << "123456.7"<< false << (qlonglong) 0; QTest::newRow("de_DE 1.234.567") << QString("de_DE")<< "1.234.567"<< true << (qlonglong) 1234567; + QTest::newRow("de_DE 1.234.567 ldspcs") << QString("de_DE")<< " 1.234.567" << true << (qlonglong) 1234567; + QTest::newRow("de_DE 1.234.567 trspcs") << QString("de_DE")<< "1.234.567 "<< true << (qlonglong) 1234567; + QTest::newRow("de_DE 1.234.567 ldtrspcs") << QString("de_DE")<< " 1.234.567 "<< true << (qlonglong) 1234567; + + // test that space is also accepted whenever QLocale::groupSeparator() == 0xa0 (which looks like space). + QTest::newRow("nb_NO 123 groupsep") << QString("nb_NO")<< QString("1")+QChar(0xa0)+QString("234") << true << (qlonglong) 1234; + QTest::newRow("nb_NO 123 groupsep_space") << QString("nb_NO")<< QString("1")+QChar(0x20)+QString("234") << true << (qlonglong) 1234; + + QTest::newRow("nb_NO 123 ldspcs") << QString("nb_NO")<< " 123" << true << (qlonglong) 123; + QTest::newRow("nb_NO 123 trspcs") << QString("nb_NO")<< "123 "<< true << (qlonglong) 123; + QTest::newRow("nb_NO 123 ldtrspcs") << QString("nb_NO")<< " 123 "<< true << (qlonglong) 123; QTest::newRow("C 1234") << QString("C") << " 1234" << true << (qlonglong) 1234; QTest::newRow("C 1234 ") << QString("C") << "1234 " << true << (qlonglong) 1234; diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp index 2e1335c..a4c768d 100644 --- a/tests/auto/qpainter/tst_qpainter.cpp +++ b/tests/auto/qpainter/tst_qpainter.cpp @@ -203,6 +203,7 @@ private slots: void drawImage_task217400_data(); void drawImage_task217400(); void drawRect_task215378(); + void drawRect_task247505(); void drawImage_data(); void drawImage(); @@ -3589,6 +3590,26 @@ void tst_QPainter::drawRect_task215378() QVERIFY(img.pixel(0, 0) != img.pixel(1, 1)); } +void tst_QPainter::drawRect_task247505() +{ + QImage a(10, 10, QImage::Format_ARGB32_Premultiplied); + a.fill(0); + QImage b = a; + + QPainter p(&a); + p.setPen(Qt::NoPen); + p.setBrush(Qt::black); + p.drawRect(QRectF(10, 0, -10, 10)); + p.end(); + p.begin(&b); + p.setPen(Qt::NoPen); + p.setBrush(Qt::black); + p.drawRect(QRectF(0, 0, 10, 10)); + p.end(); + + QCOMPARE(a, b); +} + void tst_QPainter::drawImage_data() { QTest::addColumn<int>("x"); |