diff options
author | Liang Qi <liang.qi@qt.io> | 2019-09-30 12:57:57 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-09-30 20:07:25 +0200 |
commit | 6f9a215cc4c4fa87e5692174dd728b521513ecd2 (patch) | |
tree | 0f8d079536bdfbcd9f8c1c7213bb8a21945edd07 /tests | |
parent | 4bd6cd1992fdcdc933861ba646ea9da870670237 (diff) | |
parent | 99cdd5fc67386fb3361299b9ec493e081043097d (diff) |
Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp | 6 | ||||
-rw-r--r-- | tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp | 6 | ||||
-rw-r--r-- | tests/auto/corelib/tools/collections/BLACKLIST | 2 | ||||
-rw-r--r-- | tests/auto/gui/kernel/qopenglwindow/BLACKLIST | 6 | ||||
-rw-r--r-- | tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro | 2 | ||||
-rw-r--r-- | tests/auto/gui/text/qfont/tst_qfont.cpp | 21 | ||||
-rw-r--r-- | tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp | 9 | ||||
-rw-r--r-- | tests/manual/highdpi/main.cpp | 2 |
8 files changed, 36 insertions, 18 deletions
diff --git a/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp b/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp index e238be1de3..6f9dcc08f9 100644 --- a/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp +++ b/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp @@ -320,7 +320,7 @@ void tst_QRandomGenerator::generate32_data() QTest::newRow("fixed") << (RandomValue32 & RandomDataMask); QTest::newRow("global") << 0U; #ifdef QT_BUILD_INTERNAL - if (qt_has_hwrng()) + if (qHasHwrng()) QTest::newRow("hwrng") << uint(UseSystemRNG); QTest::newRow("system") << uint(UseSystemRNG | SkipHWRNG); # ifdef HAVE_FALLBACK_ENGINE @@ -755,7 +755,7 @@ void tst_QRandomGenerator::stdUniformIntDistribution_data() auto newRow = [&](quint32 max) { #ifdef QT_BUILD_INTERNAL - if (qt_has_hwrng()) + if (qHasHwrng()) QTest::addRow("hwrng:%u", max) << uint(UseSystemRNG) << max; QTest::addRow("system:%u", max) << uint(UseSystemRNG | SkipHWRNG) << max; # ifdef HAVE_FALLBACK_ENGINE @@ -868,7 +868,7 @@ void tst_QRandomGenerator::stdUniformRealDistribution_data() auto newRow = [&](double min, double sup) { #ifdef QT_BUILD_INTERNAL - if (qt_has_hwrng()) + if (qHasHwrng()) QTest::addRow("hwrng:%g-%g", min, sup) << uint(UseSystemRNG) << min << sup; QTest::addRow("system:%g-%g", min, sup) << uint(UseSystemRNG | SkipHWRNG) << min << sup; # ifdef HAVE_FALLBACK_ENGINE diff --git a/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp index 531ac2995f..99176dc68d 100644 --- a/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp @@ -3468,6 +3468,9 @@ void tst_QDateTime::timeZones() const void tst_QDateTime::systemTimeZoneChange() const { +#ifdef Q_OS_WINRT + QSKIP("UWP applications cannot change the system`s time zone (sandboxing)"); +#endif // Set the timezone to Brisbane time TimeZoneRollback useZone(QByteArray("AEST-10:00")); @@ -3485,9 +3488,6 @@ void tst_QDateTime::systemTimeZoneChange() const useZone.reset(QByteArray("IST-05:30")); QCOMPARE(localDate, QDateTime(QDate(2012, 6, 1), QTime(2, 15, 30), Qt::LocalTime)); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "WinRT gets this wrong, QTBUG-71185", Continue); -#endif QVERIFY(localMsecs != localDate.toMSecsSinceEpoch()); QCOMPARE(utcDate, QDateTime(QDate(2012, 6, 1), QTime(2, 15, 30), Qt::UTC)); QCOMPARE(utcDate.toMSecsSinceEpoch(), utcMsecs); diff --git a/tests/auto/corelib/tools/collections/BLACKLIST b/tests/auto/corelib/tools/collections/BLACKLIST deleted file mode 100644 index c6e289aadb..0000000000 --- a/tests/auto/corelib/tools/collections/BLACKLIST +++ /dev/null @@ -1,2 +0,0 @@ -[insert_remove_loop] -msvc-2019 diff --git a/tests/auto/gui/kernel/qopenglwindow/BLACKLIST b/tests/auto/gui/kernel/qopenglwindow/BLACKLIST new file mode 100644 index 0000000000..3ce78abee8 --- /dev/null +++ b/tests/auto/gui/kernel/qopenglwindow/BLACKLIST @@ -0,0 +1,6 @@ +[basic] +winrt +[resize] +winrt +[painter] +winrt diff --git a/tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro b/tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro index d09af5084b..759b608c93 100644 --- a/tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro +++ b/tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro @@ -4,5 +4,3 @@ TARGET = tst_qopenglwindow QT += core-private gui-private testlib SOURCES += tst_qopenglwindow.cpp - -win32:CONFIG+=insignificant_test # QTBUG-46452, QTBUG-49630 diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp index 1ee9105cd2..d722856366 100644 --- a/tests/auto/gui/text/qfont/tst_qfont.cpp +++ b/tests/auto/gui/text/qfont/tst_qfont.cpp @@ -66,6 +66,8 @@ private slots: void defaultFamily(); void toAndFromString(); void fromStringWithoutStyleName(); + void fromDegenerateString_data(); + void fromDegenerateString(); void sharing(); void familyNameWithCommaQuote_data(); @@ -604,6 +606,25 @@ void tst_QFont::fromStringWithoutStyleName() QCOMPARE(font2.toString(), str); } +void tst_QFont::fromDegenerateString_data() +{ + QTest::addColumn<QString>("string"); + + QTest::newRow("empty") << QString(); + QTest::newRow("justAComma") << ","; + QTest::newRow("commasAndSpaces") << " , , "; + QTest::newRow("spaces") << " "; + QTest::newRow("spacesTabsAndNewlines") << " \t \n"; +} + +void tst_QFont::fromDegenerateString() +{ + QFETCH(QString, string); + QFont f; + QTest::ignoreMessage(QtWarningMsg, QRegularExpression(".*Invalid description.*")); + QCOMPARE(f.fromString(string), false); + QCOMPARE(f, QFont()); +} void tst_QFont::sharing() { diff --git a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp index 243cb6483e..6091975acb 100644 --- a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp +++ b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp @@ -2712,13 +2712,8 @@ void tst_QWizard::taskQTBUG_46894_nextButtonShortcut() wizard.show(); QVERIFY(QTest::qWaitForWindowExposed(&wizard)); - if (wizard.button(QWizard::NextButton)->text() == "&Next") { - QCOMPARE(wizard.button(QWizard::NextButton)->shortcut(), - QKeySequence(Qt::ALT | Qt::Key_Right)); - } else { - QCOMPARE(wizard.button(QWizard::NextButton)->shortcut(), - QKeySequence::mnemonic(wizard.button(QWizard::NextButton)->text())); - } + QCOMPARE(wizard.button(QWizard::NextButton)->shortcut(), + QKeySequence::mnemonic(wizard.button(QWizard::NextButton)->text())); } } diff --git a/tests/manual/highdpi/main.cpp b/tests/manual/highdpi/main.cpp index 8884c5feed..51a7026e85 100644 --- a/tests/manual/highdpi/main.cpp +++ b/tests/manual/highdpi/main.cpp @@ -379,7 +379,7 @@ void TiledPixmapPainter::paintEvent(QPaintEvent *event) // large pixmap: 2 x 2 tiles // 2x pixmap : 4 x 4 tiles // - // On a 2x display the 2x pimxap tiles + // On a 2x display the 2x pixmap tiles // will be drawn in high resolution. p.drawTiledPixmap(QRect(xoff, yoff, tileAreaEdge, tileAreaEdge), pixmap1X); yoff += tiles * pixmapEdge + 10; |