diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/corelib/tools/qlocale/tst_qlocale.cpp | 35 | ||||
-rw-r--r-- | tests/auto/gui/kernel/qwindow/BLACKLIST | 1 | ||||
-rw-r--r-- | tests/auto/gui/util/qtexturefilereader/qtexturefilereader.qrc | 1 | ||||
-rw-r--r-- | tests/auto/gui/util/qtexturefilereader/texturefiles/car_mips.ktx | bin | 0 -> 8088 bytes | |||
-rw-r--r-- | tests/auto/gui/util/qtexturefilereader/tst_qtexturefilereader.cpp | 36 | ||||
-rw-r--r-- | tests/auto/other/gestures/BLACKLIST | 1 | ||||
-rw-r--r-- | tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp | 20 | ||||
-rw-r--r-- | tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST | 1 | ||||
-rw-r--r-- | tests/auto/widgets/kernel/qapplication/BLACKLIST | 1 | ||||
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/BLACKLIST | 2 | ||||
-rw-r--r-- | tests/auto/widgets/widgets/qspinbox/BLACKLIST | 1 |
11 files changed, 68 insertions, 31 deletions
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp index 9364122593..ff36beadcb 100644 --- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -1802,24 +1802,23 @@ void tst_QLocale::macDefaultLocale() // Depending on the configured time zone, the time string might not // contain a GMT specifier. (Sometimes it just names the zone, like "CEST") - if (timeString.contains(QString("GMT"))) { - QString expectedGMTSpecifierBase("GMT"); - if (diff >= 0) - expectedGMTSpecifierBase.append(QLatin1Char('+')); - else - expectedGMTSpecifierBase.append(QLatin1Char('-')); - - QString expectedGMTSpecifier = expectedGMTSpecifierBase + QString("%1").arg(qAbs(diff)); - QString expectedGMTSpecifierZeroExtended - = expectedGMTSpecifierBase + QString("0%1").arg(qAbs(diff)); - - QVERIFY2(timeString.contains(expectedGMTSpecifier) - || timeString.contains(expectedGMTSpecifierZeroExtended), - qPrintable(QString("timeString `%1', expectedGMTSpecifier `%2' or `%3'") - .arg(timeString) - .arg(expectedGMTSpecifier) - .arg(expectedGMTSpecifierZeroExtended) - )); + QLatin1String gmt("GMT"); + if (timeString.contains(gmt) && diff) { + QLatin1Char sign(diff < 0 ? '-' : '+'); + QString number(QString::number(qAbs(diff))); + const QString expect = gmt + sign + number; + + if (diff < 10) { + const QString zeroed = gmt + sign + QLatin1Char('0') + number; + + QVERIFY2(timeString.contains(expect) || timeString.contains(zeroed), + qPrintable(QString("timeString `%1', expected GMT specifier `%2' or `%3'") + .arg(timeString).arg(expect).arg(zeroed))); + } else { + QVERIFY2(timeString.contains(expect), + qPrintable(QString("timeString `%1', expected GMT specifier `%2'") + .arg(timeString).arg(expect))); + } } QCOMPARE(locale.dayName(1), QString("Monday")); QCOMPARE(locale.dayName(7), QString("Sunday")); diff --git a/tests/auto/gui/kernel/qwindow/BLACKLIST b/tests/auto/gui/kernel/qwindow/BLACKLIST index d1f14de794..e9a0d44ba7 100644 --- a/tests/auto/gui/kernel/qwindow/BLACKLIST +++ b/tests/auto/gui/kernel/qwindow/BLACKLIST @@ -8,6 +8,7 @@ osx-10.12 ci ubuntu-16.04 # QTBUG-66851 opensuse +opensuse-leap # QTBUG-69160 android [setVisible] diff --git a/tests/auto/gui/util/qtexturefilereader/qtexturefilereader.qrc b/tests/auto/gui/util/qtexturefilereader/qtexturefilereader.qrc index 74f33d57ad..ab882b5db2 100644 --- a/tests/auto/gui/util/qtexturefilereader/qtexturefilereader.qrc +++ b/tests/auto/gui/util/qtexturefilereader/qtexturefilereader.qrc @@ -2,5 +2,6 @@ <qresource prefix="/"> <file>texturefiles/car.ktx</file> <file>texturefiles/pattern.pkm</file> + <file>texturefiles/car_mips.ktx</file> </qresource> </RCC> diff --git a/tests/auto/gui/util/qtexturefilereader/texturefiles/car_mips.ktx b/tests/auto/gui/util/qtexturefilereader/texturefiles/car_mips.ktx Binary files differnew file mode 100644 index 0000000000..82822e6c0b --- /dev/null +++ b/tests/auto/gui/util/qtexturefilereader/texturefiles/car_mips.ktx diff --git a/tests/auto/gui/util/qtexturefilereader/tst_qtexturefilereader.cpp b/tests/auto/gui/util/qtexturefilereader/tst_qtexturefilereader.cpp index f480184067..9ff4f0ccf2 100644 --- a/tests/auto/gui/util/qtexturefilereader/tst_qtexturefilereader.cpp +++ b/tests/auto/gui/util/qtexturefilereader/tst_qtexturefilereader.cpp @@ -44,26 +44,38 @@ void tst_qtexturefilereader::checkHandlers_data() QTest::addColumn<QSize>("size"); QTest::addColumn<quint32>("glFormat"); QTest::addColumn<quint32>("glInternalFormat"); - // todo: glBaseInternalFormat + QTest::addColumn<quint32>("glBaseInternalFormat"); QTest::addColumn<int>("levels"); - QTest::addColumn<int>("dataOffset"); - QTest::addColumn<int>("dataLength"); + QTest::addColumn<QList<int>>("dataOffsets"); + QTest::addColumn<QList<int>>("dataLengths"); QTest::addRow("pattern.pkm") << QStringLiteral(":/texturefiles/pattern.pkm") << QSize(64, 64) << quint32(0x0) << quint32(0x8d64) + << quint32(0x0) << 1 - << 16 - << 2048; + << (QList<int>() << 16) + << (QList<int>() << 2048); QTest::addRow("car.ktx") << QStringLiteral(":/texturefiles/car.ktx") << QSize(146, 80) << quint32(0x0) << quint32(0x9278) + << quint32(0x1908) << 1 - << 68 - << 11840; + << (QList<int>() << 68) + << (QList<int>() << 11840); + + QTest::addRow("car_mips.ktx") << QStringLiteral(":/texturefiles/car_mips.ktx") + << QSize(146, 80) + << quint32(0x0) + << quint32(0x9274) + << quint32(0x1907) + << 8 + << (QList<int>() << 68 << 5992 << 7516 << 7880 << 8004 << 8056 << 8068 << 8080) + << (QList<int>() << 5920 << 1520 << 360 << 120 << 48 << 8 << 8 << 8); + } void tst_qtexturefilereader::checkHandlers() @@ -73,8 +85,8 @@ void tst_qtexturefilereader::checkHandlers() QFETCH(quint32, glFormat); QFETCH(quint32, glInternalFormat); QFETCH(int, levels); - QFETCH(int, dataOffset); - QFETCH(int, dataLength); + QFETCH(QList<int>, dataOffsets); + QFETCH(QList<int>, dataLengths); QFile f(fileName); QVERIFY(f.open(QIODevice::ReadOnly)); @@ -88,8 +100,10 @@ void tst_qtexturefilereader::checkHandlers() QCOMPARE(tex.glFormat(), glFormat); QCOMPARE(tex.glInternalFormat(), glInternalFormat); QCOMPARE(tex.numLevels(), levels); - QCOMPARE(tex.dataOffset(), dataOffset); - QCOMPARE(tex.dataLength(), dataLength); + for (int i = 0; i < tex.numLevels(); i++) { + QCOMPARE(tex.dataOffset(i), dataOffsets.at(i)); + QCOMPARE(tex.dataLength(i), dataLengths.at(i)); + } } QTEST_MAIN(tst_qtexturefilereader) diff --git a/tests/auto/other/gestures/BLACKLIST b/tests/auto/other/gestures/BLACKLIST index ff6d2fa48e..269bac5750 100644 --- a/tests/auto/other/gestures/BLACKLIST +++ b/tests/auto/other/gestures/BLACKLIST @@ -5,6 +5,7 @@ ubuntu-18.04 # QTBUG-67254 ubuntu opensuse +opensuse-leap [graphicsItemGesture] ubuntu-18.04 [graphicsItemTreeGesture] diff --git a/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp b/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp index 7bfa29ec8e..15190b0f3e 100644 --- a/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp +++ b/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp @@ -54,6 +54,18 @@ private slots: void formatValue(); }; +static bool driverSupportsDefaultValues(QSqlDriver::DbmsType dbType) +{ + switch (dbType) { + case QSqlDriver::SQLite: + case QSqlDriver::PostgreSQL: + case QSqlDriver::Oracle: + return true; + default: + break; + } + return false; +} void tst_QSqlDriver::initTestCase_data() { @@ -81,8 +93,9 @@ void tst_QSqlDriver::recreateTestTables(QSqlDatabase db) doubleField = "more_data double precision"; else doubleField = "more_data double(8,7)"; + const QString defValue(driverSupportsDefaultValues(dbType) ? QStringLiteral("DEFAULT 'defaultVal'") : QString()); QVERIFY_SQL( q, exec("create table " + relTEST1 + - " (id int not null primary key, name varchar(20), title_key int, another_title_key int, " + doubleField + QLatin1Char(')'))); + " (id int not null primary key, name varchar(20) " + defValue + ", title_key int, another_title_key int, " + doubleField + QLatin1Char(')'))); QVERIFY_SQL( q, exec("insert into " + relTEST1 + " values(1, 'harry', 1, 2, 1.234567)")); QVERIFY_SQL( q, exec("insert into " + relTEST1 + " values(2, 'trond', 2, 1, 8.901234)")); QVERIFY_SQL( q, exec("insert into " + relTEST1 + " values(3, 'vohi', 1, 2, 5.678901)")); @@ -127,7 +140,7 @@ void tst_QSqlDriver::record() //check we can get records using an unquoted mixed case table name QSqlRecord rec = db.driver()->record(tablename); - QCOMPARE(rec.count(), 5); + QCOMPARE(rec.count(), fields.size()); QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); // QTBUG-1363: QSqlField::length() always return -1 when using QODBC3 driver and QSqlDatabase::record() @@ -141,6 +154,9 @@ void tst_QSqlDriver::record() for (int i = 0; i < fields.count(); ++i) QCOMPARE(rec.fieldName(i), fields[i]); + if (driverSupportsDefaultValues(dbType)) + QCOMPARE(rec.field(QStringLiteral("name")).defaultValue().toString(), QStringLiteral("defaultVal")); + if (dbType == QSqlDriver::Interbase || dbType == QSqlDriver::Oracle || dbType == QSqlDriver::DB2) tablename = tablename.toUpper(); else if (dbType == QSqlDriver::PostgreSQL) diff --git a/tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST b/tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST index 0f7c377194..c6aeebc8f8 100644 --- a/tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST +++ b/tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST @@ -5,3 +5,4 @@ opensuse-42.3 ci [comboBox] # QTBUG-67282 opensuse +opensuse-leap diff --git a/tests/auto/widgets/kernel/qapplication/BLACKLIST b/tests/auto/widgets/kernel/qapplication/BLACKLIST index ca0efdff8a..d7de7bf16e 100644 --- a/tests/auto/widgets/kernel/qapplication/BLACKLIST +++ b/tests/auto/widgets/kernel/qapplication/BLACKLIST @@ -1,3 +1,4 @@ [touchEventPropagation] # QTBUG-66745 opensuse +opensuse-leap diff --git a/tests/auto/widgets/kernel/qwidget/BLACKLIST b/tests/auto/widgets/kernel/qwidget/BLACKLIST index 2be016e99b..d8654e5768 100644 --- a/tests/auto/widgets/kernel/qwidget/BLACKLIST +++ b/tests/auto/widgets/kernel/qwidget/BLACKLIST @@ -16,6 +16,7 @@ linux [raise] # QTBUG-68175 opensuse +opensuse-leap [setWindowGeometry] osx [windowMoveResize] @@ -36,6 +37,7 @@ osx-10.12 ci osx-10.13 ci [maskedUpdate] opensuse +opensuse-leap [moveInResizeEvent] ubuntu-16.04 [moveChild:right] diff --git a/tests/auto/widgets/widgets/qspinbox/BLACKLIST b/tests/auto/widgets/widgets/qspinbox/BLACKLIST index cc049df942..a38511bfb4 100644 --- a/tests/auto/widgets/widgets/qspinbox/BLACKLIST +++ b/tests/auto/widgets/widgets/qspinbox/BLACKLIST @@ -1,2 +1,3 @@ [stepModifierPressAndHold] opensuse ci # QTBUG-69492 +opensuse-leap ci |