summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@qt.io>2017-07-13 16:34:32 -0700
committerGabriel de Dietrich <gabriel.dedietrich@qt.io>2017-07-13 16:36:10 -0700
commitd38fe875c7850ca2c6ca28f91e94ae276735fac8 (patch)
treee5c92cef74e0853490d77cf0139b23f00d548a6e /tests/auto/corelib
parentac4e848c9802377b7c4ff673180f28b9ca76b746 (diff)
parent627f0a7f7d775ecd263b95dd07fca44bfcb0c5cf (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: src/widgets/widgets/qmainwindowlayout.cpp Change-Id: I306b4f5ad11bceb336c9091241b468d455fe6bb6
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r--tests/auto/corelib/io/qfile/BLACKLIST6
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/BLACKLIST3
-rw-r--r--tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp8
-rw-r--r--tests/auto/corelib/tools/qlocale/tst_qlocale.cpp19
-rw-r--r--tests/auto/corelib/tools/qtime/tst_qtime.cpp15
6 files changed, 38 insertions, 17 deletions
diff --git a/tests/auto/corelib/io/qfile/BLACKLIST b/tests/auto/corelib/io/qfile/BLACKLIST
index e3bc093c83..8d636d40b8 100644
--- a/tests/auto/corelib/io/qfile/BLACKLIST
+++ b/tests/auto/corelib/io/qfile/BLACKLIST
@@ -1,8 +1,10 @@
# QTBUG-48455
[readLineStdin]
-msvc-2015
+msvc-2015 ci
+msvc-2017 ci
[readLineStdin_lineByLine]
-msvc-2015
+msvc-2015 ci
+msvc-2017 ci
[openStandardStreamsFileDescriptors]
osx
[openStandardStreamsBufferedStreams]
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index 0ee7599b2c..154c7ec5bf 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -568,6 +568,10 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory()
QCOMPARE(fileChangedSpy.count(), 0);
QCOMPARE(dirChangedSpy.count(), 1);
+ // QTBUG-61792, removal should succeed (bug on Windows which uses one change
+ // notification per directory).
+ QVERIFY(watcher.removePath(testDir.absolutePath()));
+
QVERIFY(temporaryDir.rmdir(testDirName));
}
diff --git a/tests/auto/corelib/io/qprocess/BLACKLIST b/tests/auto/corelib/io/qprocess/BLACKLIST
index 216faa7fb4..a278af12d3 100644
--- a/tests/auto/corelib/io/qprocess/BLACKLIST
+++ b/tests/auto/corelib/io/qprocess/BLACKLIST
@@ -2,4 +2,5 @@
redhatenterpriselinuxworkstation-6.6
# QTBUG-48455
[fileWriterProcess]
-msvc-2015
+msvc-2015 ci
+msvc-2017 ci
diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
index 97fce88f19..bddc1cd2b2 100644
--- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
+++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
@@ -2558,6 +2558,8 @@ void tst_QVariant::variantMap()
QVariant v3 = QVariant(QMetaType::type("QMap<QString, QVariant>"), &map);
QCOMPARE(qvariant_cast<QVariantMap>(v3).value("test").toInt(), 42);
+ QCOMPARE(v, QVariant(v.toHash()));
+
// multi-keys
map.insertMulti("test", 47);
v = map;
@@ -2565,6 +2567,8 @@ void tst_QVariant::variantMap()
QCOMPARE(map2, map);
map2 = v.toMap();
QCOMPARE(map2, map);
+
+ QCOMPARE(v, QVariant(v.toHash()));
}
void tst_QVariant::variantHash()
@@ -2587,6 +2591,8 @@ void tst_QVariant::variantHash()
QVariant v3 = QVariant(QMetaType::type("QHash<QString, QVariant>"), &hash);
QCOMPARE(qvariant_cast<QVariantHash>(v3).value("test").toInt(), 42);
+ QCOMPARE(v, QVariant(v.toMap()));
+
// multi-keys
hash.insertMulti("test", 47);
v = hash;
@@ -2594,6 +2600,8 @@ void tst_QVariant::variantHash()
QCOMPARE(hash2, hash);
hash2 = v.toHash();
QCOMPARE(hash2, hash);
+
+ QCOMPARE(v, QVariant(v.toMap()));
}
class CustomQObject : public QObject {
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
index 661074ac16..88984feff7 100644
--- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
@@ -1309,10 +1309,11 @@ void tst_QLocale::formatTime_data()
QTest::newRow("28") << QTime(1, 2, 3, 456) << "H:m:s.z" << "1:2:3.456";
QTest::newRow("29") << QTime(1, 2, 3, 456) << "H:m:s.zz" << "1:2:3.456456";
QTest::newRow("30") << QTime(1, 2, 3, 456) << "H:m:s.zzz" << "1:2:3.456";
- QTest::newRow("31") << QTime(1, 2, 3, 4) << "H:m:s.z" << "1:2:3.4";
- QTest::newRow("32") << QTime(1, 2, 3, 4) << "H:m:s.zzz" << "1:2:3.004";
- QTest::newRow("33") << QTime() << "H:m:s.zzz" << "";
- QTest::newRow("34") << QTime(1, 2, 3, 4) << "dd MM yyyy H:m:s.zzz" << "dd MM yyyy 1:2:3.004";
+ QTest::newRow("31") << QTime(1, 2, 3, 400) << "H:m:s.z" << "1:2:3.4";
+ QTest::newRow("32") << QTime(1, 2, 3, 4) << "H:m:s.z" << "1:2:3.004";
+ QTest::newRow("33") << QTime(1, 2, 3, 4) << "H:m:s.zzz" << "1:2:3.004";
+ QTest::newRow("34") << QTime() << "H:m:s.zzz" << "";
+ QTest::newRow("35") << QTime(1, 2, 3, 4) << "dd MM yyyy H:m:s.zzz" << "dd MM yyyy 1:2:3.004";
}
void tst_QLocale::formatTime()
@@ -1551,10 +1552,12 @@ void tst_QLocale::toDateTime_data()
<< "d/M/yyyy hh:h:mm" << "1/12/1974 05:5:14";
QTest::newRow("2C") << "C" << QDateTime(QDate(1974, 12, 1), QTime(15, 0, 0))
<< "d/M/yyyyy h" << "1/12/1974y 15";
- QTest::newRow("4C") << "C" << QDateTime(QDate(1974, 1, 1), QTime(0, 0, 0))
- << "d/M/yyyy zzz" << "1/1/1974 000";
- QTest::newRow("5C") << "C" << QDateTime(QDate(1974, 1, 1), QTime(0, 0, 0))
- << "dd/MM/yyy z" << "01/01/74y 0";
+ QTest::newRow("4C") << "C" << QDateTime(QDate(1974, 1, 1), QTime(0, 0, 0, 1))
+ << "d/M/yyyy zzz" << "1/1/1974 001";
+ QTest::newRow("5C") << "C" << QDateTime(QDate(1974, 1, 1), QTime(0, 0, 0, 1))
+ << "dd/MM/yyy z" << "01/01/74y 001";
+ QTest::newRow("5Cbis") << "C" << QDateTime(QDate(1974, 1, 1), QTime(0, 0, 0, 100))
+ << "dd/MM/yyy z" << "01/01/74y 1";
QTest::newRow("8C") << "C" << QDateTime(QDate(1974, 12, 2), QTime(0, 0, 13))
<< "ddddd/MMMMM/yy ss" << "Monday2/December12/74 13";
QTest::newRow("9C") << "C" << QDateTime(QDate(1974, 12, 1), QTime(0, 0, 13))
diff --git a/tests/auto/corelib/tools/qtime/tst_qtime.cpp b/tests/auto/corelib/tools/qtime/tst_qtime.cpp
index 71bf39fc4e..162047b537 100644
--- a/tests/auto/corelib/tools/qtime/tst_qtime.cpp
+++ b/tests/auto/corelib/tools/qtime/tst_qtime.cpp
@@ -560,6 +560,8 @@ void tst_QTime::fromStringFormat_data()
QTest::newRow("data9") << QString("2221") << QString("hhhh") << invalidTime();
QTest::newRow("data10") << QString("02:23PM") << QString("hh:mmAP") << QTime(14,23,0,0);
QTest::newRow("data11") << QString("02:23pm") << QString("hh:mmap") << QTime(14,23,0,0);
+ QTest::newRow("short-msecs-lt100") << QString("10:12:34:045") << QString("hh:m:ss:z") << QTime(10,12,34,45);
+ QTest::newRow("short-msecs-gt100") << QString("10:12:34:45") << QString("hh:m:ss:z") << QTime(10,12,34,450);
}
void tst_QTime::fromStringFormat()
@@ -711,12 +713,13 @@ void tst_QTime::toStringFormat_data()
QTest::addColumn<QString>("format");
QTest::addColumn<QString>("str");
- QTest::newRow( "data0" ) << QTime(0,0,0,0) << QString("h:m:s:z") << QString("0:0:0:0");
- QTest::newRow( "data1" ) << QTime(10,12,34,53) << QString("hh:mm:ss:zzz") << QString("10:12:34:053");
- QTest::newRow( "data2" ) << QTime(10,12,34,45) << QString("hh:m:ss:z") << QString("10:12:34:45");
- QTest::newRow( "data3" ) << QTime(10,12,34,45) << QString("hh:ss ap") << QString("10:34 am");
- QTest::newRow( "data4" ) << QTime(22,12,34,45) << QString("hh:zzz AP") << QString("10:045 PM");
- QTest::newRow( "data5" ) << QTime(230,230,230,230) << QString("hh:mm:ss") << QString();
+ QTest::newRow( "midnight" ) << QTime(0,0,0,0) << QString("h:m:s:z") << QString("0:0:0:0");
+ QTest::newRow( "full" ) << QTime(10,12,34,53) << QString("hh:mm:ss:zzz") << QString("10:12:34:053");
+ QTest::newRow( "short-msecs-lt100" ) << QTime(10,12,34,45) << QString("hh:m:ss:z") << QString("10:12:34:045");
+ QTest::newRow( "short-msecs-gt100" ) << QTime(10,12,34,450) << QString("hh:m:ss:z") << QString("10:12:34:45");
+ QTest::newRow( "am-pm" ) << QTime(10,12,34,45) << QString("hh:ss ap") << QString("10:34 am");
+ QTest::newRow( "AM-PM" ) << QTime(22,12,34,45) << QString("hh:zzz AP") << QString("10:045 PM");
+ QTest::newRow( "invalid" ) << QTime(230,230,230,230) << QString("hh:mm:ss") << QString();
}
void tst_QTime::toStringFormat()