diff options
Diffstat (limited to 'tests/auto')
202 files changed, 3573 insertions, 1049 deletions
diff --git a/tests/auto/corelib/codecs/qtextcodec/echo/main.cpp b/tests/auto/corelib/codecs/qtextcodec/echo/main.cpp index 55c831bd35..09c3ac3c09 100644 --- a/tests/auto/corelib/codecs/qtextcodec/echo/main.cpp +++ b/tests/auto/corelib/codecs/qtextcodec/echo/main.cpp @@ -47,8 +47,7 @@ int main(int argc, char **argv) { - static char lc_all[] = "LC_ALL=C"; - putenv(lc_all); + qputenv("LC_ALL", "C"); QCoreApplication app(argc, argv); QString string(QChar(0x410)); diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp index 31a4254344..21e07630e2 100644 --- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp +++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp @@ -672,7 +672,7 @@ void tst_qmessagehandler::qMessagePattern() QVERIFY(output.contains("debug tst_qlogging 57 main qDebug")); QVERIFY(output.contains("warning tst_qlogging 58 main qWarning")); QVERIFY(output.contains("critical tst_qlogging 59 main qCritical")); - QVERIFY(output.contains("warning tst_qlogging 62 main qDebug with category ")); + QVERIFY(output.contains("warning tst_qlogging 62 main qDebug with category")); QVERIFY(output.contains("debug tst_qlogging 66 main qDebug2")); environment = m_baseEnvironment; @@ -712,7 +712,7 @@ void tst_qmessagehandler::qMessagePattern() "[debug] qDebug\n" "[warning] qWarning\n" "[critical] qCritical\n" - "[warning] qDebug with category \n"; + "[warning] qDebug with category\n"; #ifdef Q_OS_WIN output.replace("\r\n", "\n"); #endif diff --git a/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp b/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp index 20f99e9191..36e01a0ccd 100644 --- a/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp +++ b/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp @@ -44,6 +44,7 @@ #include <QtGlobal> #include <math.h> +#include <float.h> class tst_QNumeric: public QObject { @@ -53,6 +54,10 @@ private slots: void fuzzyCompare_data(); void fuzzyCompare(); void qNan(); + void floatDistance_data(); + void floatDistance(); + void floatDistance_double_data(); + void floatDistance_double(); }; void tst_QNumeric::fuzzyCompare_data() @@ -121,5 +126,93 @@ void tst_QNumeric::qNan() QVERIFY(qFuzzyCompare(1/inf, 0.0)); } +void tst_QNumeric::floatDistance_data() +{ + QTest::addColumn<float>("val1"); + QTest::addColumn<float>("val2"); + QTest::addColumn<quint32>("expectedDistance"); + + // exponent: 8 bits + // mantissa: 23 bits + const quint32 number_of_denormals = (1 << 23) - 1; // Set to 0 if denormals are not included + + quint32 _0_to_1 = quint32((1 << 23) * 126 + 1 + number_of_denormals); // We need +1 to include the 0 + quint32 _1_to_2 = quint32(1 << 23); + + // We don't need +1 because FLT_MAX has all bits set in the mantissa. (Thus mantissa + // have not wrapped back to 0, which would be the case for 1 in _0_to_1 + quint32 _0_to_FLT_MAX = quint32((1 << 23) * 254) + number_of_denormals; + + quint32 _0_to_FLT_MIN = 1 + number_of_denormals; + QTest::newRow("[0,FLT_MIN]") << 0.F << FLT_MIN << _0_to_FLT_MIN; + QTest::newRow("[0,FLT_MAX]") << 0.F << FLT_MAX << _0_to_FLT_MAX; + QTest::newRow("[1,1.5]") << 1.0F << 1.5F << quint32(1 << 22); + QTest::newRow("[0,1]") << 0.F << 1.0F << _0_to_1; + QTest::newRow("[0.5,1]") << 0.5F << 1.0F << quint32(1 << 23); + QTest::newRow("[1,2]") << 1.F << 2.0F << _1_to_2; + QTest::newRow("[-1,+1]") << -1.F << +1.0F << 2 * _0_to_1; + QTest::newRow("[-1,0]") << -1.F << 0.0F << _0_to_1; + QTest::newRow("[-1,FLT_MAX]") << -1.F << FLT_MAX << _0_to_1 + _0_to_FLT_MAX; + QTest::newRow("[-2,-1") << -2.F << -1.F << _1_to_2; + QTest::newRow("[-1,-2") << -1.F << -2.F << _1_to_2; + QTest::newRow("[FLT_MIN,FLT_MAX]") << FLT_MIN << FLT_MAX << _0_to_FLT_MAX - _0_to_FLT_MIN; + QTest::newRow("[-FLT_MAX,FLT_MAX]") << -FLT_MAX << FLT_MAX << (2*_0_to_FLT_MAX); + float denormal = FLT_MIN; + denormal/=2.0F; + QTest::newRow("denormal") << 0.F << denormal << _0_to_FLT_MIN/2; +} + +void tst_QNumeric::floatDistance() +{ + QFETCH(float, val1); + QFETCH(float, val2); + QFETCH(quint32, expectedDistance); + QCOMPARE(qFloatDistance(val1, val2), expectedDistance); +} + +void tst_QNumeric::floatDistance_double_data() +{ + QTest::addColumn<double>("val1"); + QTest::addColumn<double>("val2"); + QTest::addColumn<quint64>("expectedDistance"); + + // exponent: 11 bits + // mantissa: 52 bits + const quint64 number_of_denormals = (Q_UINT64_C(1) << 52) - 1; // Set to 0 if denormals are not included + + quint64 _0_to_1 = (Q_UINT64_C(1) << 52) * ((1 << (11-1)) - 2) + 1 + number_of_denormals; // We need +1 to include the 0 + quint64 _1_to_2 = Q_UINT64_C(1) << 52; + + // We don't need +1 because DBL_MAX has all bits set in the mantissa. (Thus mantissa + // have not wrapped back to 0, which would be the case for 1 in _0_to_1 + quint64 _0_to_DBL_MAX = quint64((Q_UINT64_C(1) << 52) * ((1 << 11) - 2)) + number_of_denormals; + + quint64 _0_to_DBL_MIN = 1 + number_of_denormals; + QTest::newRow("[0,DBL_MIN]") << 0.0 << DBL_MIN << _0_to_DBL_MIN; + QTest::newRow("[0,DBL_MAX]") << 0.0 << DBL_MAX << _0_to_DBL_MAX; + QTest::newRow("[1,1.5]") << 1.0 << 1.5 << (Q_UINT64_C(1) << 51); + QTest::newRow("[0,1]") << 0.0 << 1.0 << _0_to_1; + QTest::newRow("[0.5,1]") << 0.5 << 1.0 << (Q_UINT64_C(1) << 52); + QTest::newRow("[1,2]") << 1.0 << 2.0 << _1_to_2; + QTest::newRow("[-1,+1]") << -1.0 << +1.0 << 2 * _0_to_1; + QTest::newRow("[-1,0]") << -1.0 << 0.0 << _0_to_1; + QTest::newRow("[-1,DBL_MAX]") << -1.0 << DBL_MAX << _0_to_1 + _0_to_DBL_MAX; + QTest::newRow("[-2,-1") << -2.0 << -1.0 << _1_to_2; + QTest::newRow("[-1,-2") << -1.0 << -2.0 << _1_to_2; + QTest::newRow("[DBL_MIN,DBL_MAX]") << DBL_MIN << DBL_MAX << _0_to_DBL_MAX - _0_to_DBL_MIN; + QTest::newRow("[-DBL_MAX,DBL_MAX]") << -DBL_MAX << DBL_MAX << (2*_0_to_DBL_MAX); + double denormal = DBL_MIN; + denormal/=2.0; + QTest::newRow("denormal") << 0.0 << denormal << _0_to_DBL_MIN/2; +} + +void tst_QNumeric::floatDistance_double() +{ + QFETCH(double, val1); + QFETCH(double, val2); + QFETCH(quint64, expectedDistance); + QCOMPARE(qFloatDistance(val1, val2), expectedDistance); +} + QTEST_APPLESS_MAIN(tst_QNumeric) #include "tst_qnumeric.moc" diff --git a/tests/auto/corelib/io/io.pro b/tests/auto/corelib/io/io.pro index ab66323d3b..259463f976 100644 --- a/tests/auto/corelib/io/io.pro +++ b/tests/auto/corelib/io/io.pro @@ -43,7 +43,6 @@ SUBDIRS=\ qsettings !qtHaveModule(network): SUBDIRS -= \ - qfile \ qiodevice \ qprocess \ qtextstream @@ -56,3 +55,9 @@ SUBDIRS=\ win32:!contains(QT_CONFIG, private_tests): SUBDIRS -= \ qfilesystementry + +winrt: SUBDIRS -= \ + qprocess \ + qprocess-noapplication \ + qprocessenvironment \ + qwinoverlappedionotifier diff --git a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp index f452efc1b3..29c7e6a81e 100644 --- a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp +++ b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp @@ -65,8 +65,8 @@ void tst_QDebug::assignment() const QDebug debug1(QtDebugMsg); QDebug debug2(QtWarningMsg); - QTest::ignoreMessage(QtDebugMsg, "foo "); - QTest::ignoreMessage(QtWarningMsg, "bar 1 2 "); + QTest::ignoreMessage(QtDebugMsg, "foo"); + QTest::ignoreMessage(QtWarningMsg, "bar 1 2"); debug1 << "foo"; debug2 << "bar"; @@ -118,7 +118,7 @@ void tst_QDebug::warningWithoutDebug() const { qWarning() << "A qWarning() message"; } QString file = __FILE__; int line = __LINE__ - 1; QString function = Q_FUNC_INFO; QCOMPARE(s_msgType, QtWarningMsg); - QCOMPARE(s_msg, QString::fromLatin1("A qWarning() message ")); + QCOMPARE(s_msg, QString::fromLatin1("A qWarning() message")); QCOMPARE(QString::fromLatin1(s_file), file); QCOMPARE(s_line, line); QCOMPARE(QString::fromLatin1(s_function), function); @@ -133,7 +133,7 @@ void tst_QDebug::criticalWithoutDebug() const { qCritical() << "A qCritical() message"; } QString file = __FILE__; int line = __LINE__ - 1; QString function = Q_FUNC_INFO; QCOMPARE(s_msgType, QtCriticalMsg); - QCOMPARE(s_msg, QString::fromLatin1("A qCritical() message ")); + QCOMPARE(s_msg, QString::fromLatin1("A qCritical() message")); QCOMPARE(QString::fromLatin1(s_file), file); QCOMPARE(s_line, line); QCOMPARE(QString::fromLatin1(s_function), function); @@ -145,7 +145,7 @@ void tst_QDebug::debugWithBool() const { qDebug() << false << true; } QString file = __FILE__; int line = __LINE__ - 1; QString function = Q_FUNC_INFO; QCOMPARE(s_msgType, QtDebugMsg); - QCOMPARE(s_msg, QString::fromLatin1("false true ")); + QCOMPARE(s_msg, QString::fromLatin1("false true")); QCOMPARE(QString::fromLatin1(s_file), file); QCOMPARE(s_line, line); QCOMPARE(QString::fromLatin1(s_function), function); @@ -215,7 +215,7 @@ void tst_QDebug::stateSaver() const } d.space() << 42; } - QCOMPARE(s_msg, QString::fromLatin1("02a 42 ")); + QCOMPARE(s_msg, QString::fromLatin1("02a 42")); } void tst_QDebug::veryLongWarningMessage() const @@ -247,7 +247,7 @@ void tst_QDebug::qDebugQStringRef() const { qDebug() << inRef; } QString file = __FILE__; int line = __LINE__ - 1; QString function = Q_FUNC_INFO; QCOMPARE(s_msgType, QtDebugMsg); - QCOMPARE(s_msg, QString::fromLatin1("\"input\" ")); + QCOMPARE(s_msg, QString::fromLatin1("\"input\"")); QCOMPARE(QString::fromLatin1(s_file), file); QCOMPARE(s_line, line); QCOMPARE(QString::fromLatin1(s_function), function); @@ -261,7 +261,7 @@ void tst_QDebug::qDebugQStringRef() const { qDebug() << inRef; } QString file = __FILE__; int line = __LINE__ - 1; QString function = Q_FUNC_INFO; QCOMPARE(s_msgType, QtDebugMsg); - QCOMPARE(s_msg, QString::fromLatin1("\"\" ")); + QCOMPARE(s_msg, QString::fromLatin1("\"\"")); QCOMPARE(QString::fromLatin1(s_file), file); QCOMPARE(s_line, line); QCOMPARE(QString::fromLatin1(s_function), function); @@ -274,7 +274,7 @@ void tst_QDebug::qDebugQLatin1String() const { qDebug() << QLatin1String("foo") << QLatin1String("") << QLatin1String("barbaz", 3); } QString file = __FILE__; int line = __LINE__ - 1; QString function = Q_FUNC_INFO; QCOMPARE(s_msgType, QtDebugMsg); - QCOMPARE(s_msg, QString::fromLatin1("\"foo\" \"\" \"bar\" ")); + QCOMPARE(s_msg, QString::fromLatin1("\"foo\" \"\" \"bar\"")); QCOMPARE(QString::fromLatin1(s_file), file); QCOMPARE(s_line, line); QCOMPARE(QString::fromLatin1(s_function), function); diff --git a/tests/auto/corelib/io/qfile/test/test.pro b/tests/auto/corelib/io/qfile/test/test.pro index bc6922b4e9..03863e9943 100644 --- a/tests/auto/corelib/io/qfile/test/test.pro +++ b/tests/auto/corelib/io/qfile/test/test.pro @@ -1,7 +1,10 @@ CONFIG += testcase CONFIG += parallel_test CONFIG -= app_bundle debug_and_release_target -QT = core-private core network testlib +QT = core-private core testlib +qtHaveModule(network): QT += network +else: DEFINES += QT_NO_NETWORK + TARGET = ../tst_qfile SOURCES = ../tst_qfile.cpp wince*: SOURCES += $$QT_SOURCE_TREE/src/corelib/kernel/qfunctions_wince.cpp @@ -13,5 +16,5 @@ TESTDATA += ../dosfile.txt ../noendofline.txt ../testfile.txt \ ../Makefile ../forCopying.txt ../forRenaming.txt \ ../resources/file1.ext1 -win32: LIBS+=-lole32 -luuid +win32:!winrt: LIBS+=-lole32 -luuid DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp index 2b029203e9..77ac4bcd86 100644 --- a/tests/auto/corelib/io/qfile/tst_qfile.cpp +++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp @@ -59,7 +59,7 @@ extern Q_CORE_EXPORT int qt_ntfs_permission_lookup; QT_END_NAMESPACE #endif -#if !defined(Q_OS_WINCE) +#if !defined(Q_OS_WINCE) && !defined(QT_NO_NETWORK) #include <QHostInfo> #endif #include <QProcess> @@ -527,7 +527,7 @@ void tst_QFile::open_data() << false << QFile::OpenError; QTest::newRow("noreadfile") << QString::fromLatin1(noReadFile) << int(QIODevice::ReadOnly) << false << QFile::OpenError; -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) //opening devices requires administrative privileges (and elevation). HANDLE hTest = CreateFile(_T("\\\\.\\PhysicalDrive0"), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); if (hTest != INVALID_HANDLE_VALUE) { @@ -1057,7 +1057,7 @@ void tst_QFile::ungetChar() QCOMPARE(buf[2], '4'); } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) QString driveLetters() { wchar_t volumeName[MAX_PATH]; @@ -1094,7 +1094,7 @@ void tst_QFile::invalidFile_data() #if !defined(Q_OS_WIN) QTest::newRow( "x11" ) << QString( "qwe//" ); #else -#if !defined(Q_OS_WINCE) +#if !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) QTest::newRow( "colon2" ) << invalidDriveLetter() + QString::fromLatin1(":ail:invalid"); #endif QTest::newRow( "colon3" ) << QString( ":failinvalid" ); @@ -1338,10 +1338,12 @@ void tst_QFile::copyFallback() #ifdef Q_OS_WIN #include <objbase.h> +#ifndef Q_OS_WINPHONE #include <shlobj.h> #endif +#endif -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) static QString getWorkingDirectoryForLink(const QString &linkFileName) { bool neededCoInit = false; @@ -1400,7 +1402,7 @@ void tst_QFile::link() QCOMPARE(QFile::symLinkTarget("myLink.lnk"), referenceTarget); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) QString wd = getWorkingDirectoryForLink(info2.absoluteFilePath()); QCOMPARE(QDir::fromNativeSeparators(wd), QDir::cleanPath(info1.absolutePath())); #endif @@ -2243,7 +2245,7 @@ void tst_QFile::writeLargeDataBlock_data() QTest::newRow("localfile-Fd") << "./largeblockfile.txt" << (int)OpenFd; QTest::newRow("localfile-Stream") << "./largeblockfile.txt" << (int)OpenStream; -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(QT_NO_NETWORK) // Some semi-randomness to avoid collisions. QTest::newRow("unc file") << QString("//" + QtNetworkSettings::winServerName() + "/TESTSHAREWRITABLE/largefile-%1-%2.txt") @@ -2690,8 +2692,12 @@ void tst_QFile::nativeHandleLeaks() } #ifdef Q_OS_WIN +# ifndef Q_OS_WINRT handle1 = ::CreateFileA("qt_file.tmp", GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); +# else + handle1 = ::CreateFile2(L"qt_file.tmp", GENERIC_READ, 0, OPEN_ALWAYS, NULL); +# endif QVERIFY( INVALID_HANDLE_VALUE != handle1 ); QVERIFY( ::CloseHandle(handle1) ); #endif @@ -2705,8 +2711,12 @@ void tst_QFile::nativeHandleLeaks() } #ifdef Q_OS_WIN +# ifndef Q_OS_WINRT handle2 = ::CreateFileA("qt_file.tmp", GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); +# else + handle2 = ::CreateFile2(L"qt_file.tmp", GENERIC_READ, 0, OPEN_ALWAYS, NULL); +# endif QVERIFY( INVALID_HANDLE_VALUE != handle2 ); QVERIFY( ::CloseHandle(handle2) ); #endif diff --git a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro index c4b37a8847..64d289bc3c 100644 --- a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro +++ b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro @@ -6,5 +6,5 @@ RESOURCES += qfileinfo.qrc TESTDATA += qfileinfo.qrc qfileinfo.pro tst_qfileinfo.cpp resources/file1 resources/file1.ext1 resources/file1.ext1.ext2 -win32*:!wince*:LIBS += -ladvapi32 -lnetapi32 +win32*:!wince*:!winrt:LIBS += -ladvapi32 -lnetapi32 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp index d2171cc64a..74667a951f 100644 --- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp @@ -62,7 +62,7 @@ #ifdef Q_OS_WIN #include <qt_windows.h> #include <qlibrary.h> -#if !defined(Q_OS_WINCE) +#if !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) #include <lm.h> #endif #endif @@ -176,7 +176,7 @@ private slots: void refresh(); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) void ntfsJunctionPointsAndSymlinks_data(); void ntfsJunctionPointsAndSymlinks(); void brokenShortcut(); @@ -193,7 +193,7 @@ private slots: void detachingOperations(); -#if !defined(Q_OS_WINCE) +#if !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) void owner(); #endif void group(); @@ -1058,7 +1058,7 @@ void tst_QFileInfo::fileTimes() //In Vista the last-access timestamp is not updated when the file is accessed/touched (by default). //To enable this the HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisableLastAccessUpdate //is set to 0, in the test machine. -#ifdef Q_OS_WIN +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) HKEY key; if (ERROR_SUCCESS == RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\FileSystem", 0, KEY_READ, &key)) { @@ -1085,8 +1085,8 @@ void tst_QFileInfo::fileTimes() void tst_QFileInfo::fileTimes_oldFile() { - // This is not supported on WinCE -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) + // This is not supported on WinCE or WinRT +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) // All files are opened in share mode (both read and write). DWORD shareMode = FILE_SHARE_READ | FILE_SHARE_WRITE; @@ -1329,7 +1329,7 @@ void tst_QFileInfo::refresh() QCOMPARE(info2.size(), info.size()); } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) void tst_QFileInfo::ntfsJunctionPointsAndSymlinks_data() { QTest::addColumn<QString>("path"); @@ -1680,7 +1680,7 @@ void tst_QFileInfo::detachingOperations() QVERIFY(!info1.caching()); } -#if !defined(Q_OS_WINCE) +#if !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) #if defined (Q_OS_WIN) BOOL IsUserAdmin() { diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp index fda6519d82..b681cec802 100644 --- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp +++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp @@ -55,6 +55,7 @@ class tst_QFileSystemWatcher : public QObject public: tst_QFileSystemWatcher(); +#ifndef QT_NO_FILESYSTEMWATCHER private slots: void basicTest_data(); void basicTest(); @@ -83,16 +84,20 @@ private slots: private: QString m_tempDirPattern; +#endif // QT_NO_FILESYSTEMWATCHER }; tst_QFileSystemWatcher::tst_QFileSystemWatcher() { +#ifndef QT_NO_FILESYSTEMWATCHER m_tempDirPattern = QDir::tempPath(); if (!m_tempDirPattern.endsWith(QLatin1Char('/'))) m_tempDirPattern += QLatin1Char('/'); m_tempDirPattern += QStringLiteral("tst_qfilesystemwatcherXXXXXX"); +#endif // QT_NO_FILESYSTEMWATCHER } +#ifndef QT_NO_FILESYSTEMWATCHER void tst_QFileSystemWatcher::basicTest_data() { QTest::addColumn<QString>("backend"); @@ -676,6 +681,7 @@ void tst_QFileSystemWatcher::signalsEmittedAfterFileMoved() QTRY_COMPARE(changedSpy.count(), 10); } +#endif // QT_NO_FILESYSTEMWATCHER QTEST_MAIN(tst_QFileSystemWatcher) #include "tst_qfilesystemwatcher.moc" diff --git a/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp b/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp index 157e42b447..a516b762f7 100644 --- a/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp +++ b/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp @@ -68,8 +68,8 @@ void tst_QNoDebug::noDebugOutput() const qCDebug(cat) << "foo"; // qWarning still works, though - QTest::ignoreMessage(QtWarningMsg, "bar "); - QTest::ignoreMessage(QtWarningMsg, "custom-bar "); + QTest::ignoreMessage(QtWarningMsg, "bar"); + QTest::ignoreMessage(QtWarningMsg, "custom-bar"); qWarning() << "bar"; qCWarning(cat) << "custom-bar"; } @@ -79,7 +79,7 @@ void tst_QNoDebug::streaming() const QDateTime dt(QDate(1,2,3),QTime(4,5,6)); QString debugString = dt.toString(QStringLiteral("yyyy-MM-dd HH:mm:ss.zzz t")) + QStringLiteral(" Qt::LocalTime"); - QTest::ignoreMessage(QtWarningMsg, qPrintable(QString::fromLatin1("QDateTime(\"%1\") ").arg(debugString))); + QTest::ignoreMessage(QtWarningMsg, qPrintable(QString::fromLatin1("QDateTime(\"%1\")").arg(debugString))); qWarning() << dt; } diff --git a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp index c5a9b421ee..42c360f2d8 100644 --- a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp +++ b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp @@ -119,7 +119,7 @@ private slots: #if !defined(Q_OS_WIN) && !defined(QT_QSETTINGS_ALWAYS_CASE_SENSITIVE_AND_FORGET_ORIGINAL_KEY_ORDER) void dontReorderIniKeysNeedlessly(); #endif -#if defined(Q_OS_WIN) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) void consistentRegistryStorage(); #endif @@ -274,7 +274,7 @@ void tst_QSettings::init() QSettings::setSystemIniPath(settingsPath("__system__")); QSettings::setUserIniPath(settingsPath("__user__")); -#if defined(Q_OS_WIN) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) QSettings("HKEY_CURRENT_USER\\Software\\software.org", QSettings::NativeFormat).clear(); QSettings("HKEY_LOCAL_MACHINE\\Software\\software.org", QSettings::NativeFormat).clear(); QSettings("HKEY_CURRENT_USER\\Software\\other.software.org", QSettings::NativeFormat).clear(); @@ -1496,7 +1496,7 @@ void tst_QSettings::sync() // Now "some other app" will change other.software.org.ini QString userConfDir = settingsPath("__user__") + QDir::separator(); -#if !defined(Q_OS_WINCE) +#if !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) unlink((userConfDir + "other.software.org.ini").toLatin1()); rename((userConfDir + "software.org.ini").toLatin1(), (userConfDir + "other.software.org.ini").toLatin1()); @@ -3197,7 +3197,7 @@ void tst_QSettings::recursionBug() } } -#if defined(Q_OS_WIN) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) static DWORD readKeyType(HKEY handle, const QString &rSubKey) { diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp index 35a59401b7..d19f4379c7 100644 --- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp +++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp @@ -289,9 +289,9 @@ void tst_qstandardpaths::testDataLocation() { // On all platforms, DataLocation should be GenericDataLocation / organization name / app name // This allows one app to access the data of another app. - // Blackberry OS is an exception to this case, owing to the fact that + // Blackberry OS and WinRT are an exception to this case, owing to the fact that // applications are sandboxed. -#ifndef Q_OS_BLACKBERRY +#if !defined(Q_OS_BLACKBERRY) && !defined(Q_OS_WINRT) const QString base = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation); QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::DataLocation), base + "/tst_qstandardpaths"); QCoreApplication::instance()->setOrganizationName("Qt"); @@ -335,6 +335,7 @@ void tst_qstandardpaths::testFindExecutable_data() QTest::addColumn<QString>("needle"); QTest::addColumn<QString>("expected"); #ifdef Q_OS_WIN +# ifndef Q_OS_WINRT const QFileInfo cmdFi = QFileInfo(QDir::cleanPath(QString::fromLocal8Bit(qgetenv("COMSPEC")))); const QString cmdPath = cmdFi.absoluteFilePath(); @@ -358,6 +359,7 @@ void tst_qstandardpaths::testFindExecutable_data() QTest::newRow("win8-logo-nosuffix") << QString() << logo << logoPath; } +# endif // Q_OS_WINRT #else const QFileInfo shFi = findSh(); Q_ASSERT(shFi.exists()); diff --git a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp index 713d0c5c17..a6cc083d9c 100644 --- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp +++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp @@ -257,7 +257,7 @@ void tst_QTemporaryDir::nonWritableCurrentDir() void tst_QTemporaryDir::openOnRootDrives() { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) unsigned int lastErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS); #endif // If it's possible to create a file in the root directory, it @@ -271,7 +271,7 @@ void tst_QTemporaryDir::openOnRootDrives() QVERIFY(dir.isValid()); } } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) SetErrorMode(lastErrorMode); #endif } diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp index 6eb6f83d2a..5ad798ae1f 100644 --- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp +++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp @@ -371,7 +371,7 @@ void tst_QTemporaryFile::resize() void tst_QTemporaryFile::openOnRootDrives() { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) unsigned int lastErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS); #endif // If it's possible to create a file in the root directory, it @@ -385,7 +385,7 @@ void tst_QTemporaryFile::openOnRootDrives() QVERIFY(file.open()); } } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) SetErrorMode(lastErrorMode); #endif } diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp index 923b9a3a07..bb77ec54c5 100644 --- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp +++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp @@ -2740,9 +2740,9 @@ void tst_QSortFilterProxyModel::mapFromToSource() QCOMPARE(proxy.mapToSource(QModelIndex()), QModelIndex()); #ifdef QT_NO_DEBUG //if Qt is compiled in debug mode, this will assert - QTest::ignoreMessage(QtWarningMsg, "QSortFilterProxyModel: index from wrong model passed to mapToSource "); + QTest::ignoreMessage(QtWarningMsg, "QSortFilterProxyModel: index from wrong model passed to mapToSource"); QCOMPARE(proxy.mapToSource(source.index(2, 3)), QModelIndex()); - QTest::ignoreMessage(QtWarningMsg, "QSortFilterProxyModel: index from wrong model passed to mapFromSource "); + QTest::ignoreMessage(QtWarningMsg, "QSortFilterProxyModel: index from wrong model passed to mapFromSource"); QCOMPARE(proxy.mapFromSource(proxy.index(6, 2)), QModelIndex()); #endif } diff --git a/tests/auto/corelib/json/tst_qtjson.cpp b/tests/auto/corelib/json/tst_qtjson.cpp index c79e7273c0..a8534bf6f0 100644 --- a/tests/auto/corelib/json/tst_qtjson.cpp +++ b/tests/auto/corelib/json/tst_qtjson.cpp @@ -1985,11 +1985,11 @@ void tst_QtJson::testDebugStream() // QJsonObject QJsonObject object; - QTest::ignoreMessage(QtDebugMsg, "QJsonObject() "); + QTest::ignoreMessage(QtDebugMsg, "QJsonObject()"); qDebug() << object; object.insert(QLatin1String("foo"), QLatin1String("bar")); - QTest::ignoreMessage(QtDebugMsg, "QJsonObject({\"foo\": \"bar\"}) "); + QTest::ignoreMessage(QtDebugMsg, "QJsonObject({\"foo\": \"bar\"})"); qDebug() << object; } @@ -1997,12 +1997,12 @@ void tst_QtJson::testDebugStream() // QJsonArray QJsonArray array; - QTest::ignoreMessage(QtDebugMsg, "QJsonArray() "); + QTest::ignoreMessage(QtDebugMsg, "QJsonArray()"); qDebug() << array; array.append(1); array.append(QLatin1String("foo")); - QTest::ignoreMessage(QtDebugMsg, "QJsonArray([1,\"foo\"]) "); + QTest::ignoreMessage(QtDebugMsg, "QJsonArray([1,\"foo\"])"); qDebug() << array; } @@ -2010,19 +2010,19 @@ void tst_QtJson::testDebugStream() // QJsonDocument QJsonDocument doc; - QTest::ignoreMessage(QtDebugMsg, "QJsonDocument() "); + QTest::ignoreMessage(QtDebugMsg, "QJsonDocument()"); qDebug() << doc; QJsonObject object; object.insert(QLatin1String("foo"), QLatin1String("bar")); doc.setObject(object); - QTest::ignoreMessage(QtDebugMsg, "QJsonDocument({\"foo\": \"bar\"}) "); + QTest::ignoreMessage(QtDebugMsg, "QJsonDocument({\"foo\": \"bar\"})"); qDebug() << doc; QJsonArray array; array.append(1); array.append(QLatin1String("foo")); - QTest::ignoreMessage(QtDebugMsg, "QJsonDocument([1,\"foo\"]) "); + QTest::ignoreMessage(QtDebugMsg, "QJsonDocument([1,\"foo\"])"); doc.setArray(array); qDebug() << doc; } @@ -2032,36 +2032,36 @@ void tst_QtJson::testDebugStream() QJsonValue value; - QTest::ignoreMessage(QtDebugMsg, "QJsonValue(null) "); + QTest::ignoreMessage(QtDebugMsg, "QJsonValue(null)"); qDebug() << value; value = QJsonValue(true); // bool - QTest::ignoreMessage(QtDebugMsg, "QJsonValue(bool, true) "); + QTest::ignoreMessage(QtDebugMsg, "QJsonValue(bool, true)"); qDebug() << value; value = QJsonValue((double)4.2); // double - QTest::ignoreMessage(QtDebugMsg, "QJsonValue(double, 4.2) "); + QTest::ignoreMessage(QtDebugMsg, "QJsonValue(double, 4.2)"); qDebug() << value; value = QJsonValue((int)42); // int - QTest::ignoreMessage(QtDebugMsg, "QJsonValue(double, 42) "); + QTest::ignoreMessage(QtDebugMsg, "QJsonValue(double, 42)"); qDebug() << value; value = QJsonValue(QLatin1String("foo")); // string - QTest::ignoreMessage(QtDebugMsg, "QJsonValue(string, \"foo\") "); + QTest::ignoreMessage(QtDebugMsg, "QJsonValue(string, \"foo\")"); qDebug() << value; QJsonArray array; array.append(1); array.append(QLatin1String("foo")); value = QJsonValue(array); // array - QTest::ignoreMessage(QtDebugMsg, "QJsonValue(array, QJsonArray([1,\"foo\"]) ) "); + QTest::ignoreMessage(QtDebugMsg, "QJsonValue(array, QJsonArray([1,\"foo\"]) )"); qDebug() << value; QJsonObject object; object.insert(QLatin1String("foo"), QLatin1String("bar")); value = QJsonValue(object); // object - QTest::ignoreMessage(QtDebugMsg, "QJsonValue(object, QJsonObject({\"foo\": \"bar\"}) ) "); + QTest::ignoreMessage(QtDebugMsg, "QJsonValue(object, QJsonObject({\"foo\": \"bar\"}) )"); qDebug() << value; } } diff --git a/tests/auto/corelib/kernel/kernel.pro b/tests/auto/corelib/kernel/kernel.pro index fe3e4b7e0a..4b3b2e824e 100644 --- a/tests/auto/corelib/kernel/kernel.pro +++ b/tests/auto/corelib/kernel/kernel.pro @@ -13,6 +13,7 @@ SUBDIRS=\ qobject \ qpointer \ qsharedmemory \ + qsignalblocker \ qsignalmapper \ qsocketnotifier \ qsystemsemaphore \ @@ -34,6 +35,6 @@ SUBDIRS=\ qsharedmemory # This test is only applicable on Windows -!win32*:SUBDIRS -= qwineventnotifier +!win32*|winrt: SUBDIRS -= qwineventnotifier android|qnx: SUBDIRS -= qsharedmemory qsystemsemaphore diff --git a/tests/auto/corelib/kernel/qeventloop/qeventloop.pro b/tests/auto/corelib/kernel/qeventloop/qeventloop.pro index e5bcc31e6a..5593aa2430 100644 --- a/tests/auto/corelib/kernel/qeventloop/qeventloop.pro +++ b/tests/auto/corelib/kernel/qeventloop/qeventloop.pro @@ -4,7 +4,7 @@ TARGET = tst_qeventloop QT = core network testlib core-private SOURCES = $$PWD/tst_qeventloop.cpp -win32:!wince*:LIBS += -luser32 +win32:!wince*:!winrt:LIBS += -luser32 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 contains(QT_CONFIG, glib): DEFINES += HAVE_GLIB diff --git a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp index 5cf3e6d97c..0e7005799e 100644 --- a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp +++ b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp @@ -1323,8 +1323,8 @@ bool tst_QMetaObjectBuilder::sameMetaObject return false; } - const QMetaObject **objects1 = meta1->d.relatedMetaObjects; - const QMetaObject **objects2 = meta2->d.relatedMetaObjects; + const QMetaObject * const *objects1 = meta1->d.relatedMetaObjects; + const QMetaObject * const *objects2 = meta2->d.relatedMetaObjects; if (objects1 && !objects2) return false; if (objects2 && !objects1) diff --git a/tests/auto/corelib/kernel/qmetatype/qmetatype.pro b/tests/auto/corelib/kernel/qmetatype/qmetatype.pro index 23a8e6d23a..d19ec23760 100644 --- a/tests/auto/corelib/kernel/qmetatype/qmetatype.pro +++ b/tests/auto/corelib/kernel/qmetatype/qmetatype.pro @@ -6,11 +6,11 @@ SOURCES = tst_qmetatype.cpp TESTDATA=./typeFlags.bin DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 -win32-msvc*|wince { +win32-msvc*|wince|winrt { # Prevents "fatal error C1128: number of sections exceeded object file format limit". QMAKE_CXXFLAGS += /bigobj # Reduce compile time - win32-msvc2012|wince { + win32-msvc2012|wince|winrt { QMAKE_CXXFLAGS_RELEASE -= -O2 QMAKE_CFLAGS_RELEASE -= -O2 } diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp index f1e04511cd..a5b5b659ea 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp @@ -102,6 +102,7 @@ private slots: #ifndef QT_NO_PROCESS void recursiveSignalEmission(); #endif + void signalBlocking(); void blockingQueuedConnection(); void childEvents(); void installEventFilter(); @@ -454,7 +455,7 @@ void tst_QObject::connectSlotsByName() sender.setObjectName("Sender"); QTest::ignoreMessage(QtWarningMsg, "QMetaObject::connectSlotsByName: No matching signal for on_child_signal()"); - QTest::ignoreMessage(QtWarningMsg, "QMetaObject::connectSlotsByName: Connecting slot on_Sender_signalManyParams() with the first of the following compatible signals: (\"signalManyParams(int,int,int,QString,bool)\", \"signalManyParams(int,int,int,QString,bool,bool)\") "); + QTest::ignoreMessage(QtWarningMsg, "QMetaObject::connectSlotsByName: Connecting slot on_Sender_signalManyParams() with the first of the following compatible signals: (\"signalManyParams(int,int,int,QString,bool)\", \"signalManyParams(int,int,int,QString,bool,bool)\")"); QMetaObject::connectSlotsByName(&receiver); receiver.called_slots.clear(); @@ -2981,6 +2982,30 @@ void tst_QObject::recursiveSignalEmission() } #endif +void tst_QObject::signalBlocking() +{ + SenderObject sender; + ReceiverObject receiver; + + receiver.connect(&sender, SIGNAL(signal1()), SLOT(slot1())); + + sender.emitSignal1(); + QVERIFY(receiver.called(1)); + receiver.reset(); + + sender.blockSignals(true); + + sender.emitSignal1(); + QVERIFY(!receiver.called(1)); + receiver.reset(); + + sender.blockSignals(false); + + sender.emitSignal1(); + QVERIFY(receiver.called(1)); + receiver.reset(); +} + void tst_QObject::blockingQueuedConnection() { { diff --git a/tests/auto/corelib/kernel/qsignalblocker/.gitignore b/tests/auto/corelib/kernel/qsignalblocker/.gitignore new file mode 100644 index 0000000000..a841a2a0a8 --- /dev/null +++ b/tests/auto/corelib/kernel/qsignalblocker/.gitignore @@ -0,0 +1 @@ +tst_qsignalblocker diff --git a/tests/auto/corelib/kernel/qsignalblocker/qsignalblocker.pro b/tests/auto/corelib/kernel/qsignalblocker/qsignalblocker.pro new file mode 100644 index 0000000000..c6c6f379eb --- /dev/null +++ b/tests/auto/corelib/kernel/qsignalblocker/qsignalblocker.pro @@ -0,0 +1,7 @@ +CONFIG += testcase console +CONFIG += parallel_test +TARGET = tst_qsignalblocker +QT = core testlib +SOURCES = tst_qsignalblocker.cpp + +DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/corelib/kernel/qsignalblocker/tst_qsignalblocker.cpp b/tests/auto/corelib/kernel/qsignalblocker/tst_qsignalblocker.cpp new file mode 100644 index 0000000000..1f71692ffe --- /dev/null +++ b/tests/auto/corelib/kernel/qsignalblocker/tst_qsignalblocker.cpp @@ -0,0 +1,305 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@woboq.com> +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtTest/QtTest> + +#include "qobject.h" + +class tst_QSignalBlocker : public QObject +{ + Q_OBJECT +private slots: + void signalBlocking(); + void signalBlockingMoveAssignment(); +}; + +class SenderObject : public QObject +{ + Q_OBJECT + +public: + SenderObject() : aPublicSlotCalled(0), recursionCount(0) {} + + void emitSignal1AfterRecursion() + { + if (recursionCount++ < 100) + emitSignal1AfterRecursion(); + else + emitSignal1(); + } + + void emitSignal1() { emit signal1(); } + void emitSignal2() { emit signal2(); } + void emitSignal3() { emit signal3(); } + void emitSignal4() { emit signal4(); } + +signals: + void signal1(); + void signal2(); + void signal3(); + void signal4(); + QT_MOC_COMPAT void signal5(); + void signal6(void); + void signal7(int, const QString &); + +public slots: + void aPublicSlot() { aPublicSlotCalled++; } + +public: + Q_INVOKABLE void invoke1(){} + Q_SCRIPTABLE void sinvoke1(){} + int aPublicSlotCalled; +protected: + Q_INVOKABLE QT_MOC_COMPAT void invoke2(){} + Q_INVOKABLE QT_MOC_COMPAT void invoke2(int){} + Q_SCRIPTABLE QT_MOC_COMPAT void sinvoke2(){} +private: + Q_INVOKABLE void invoke3(int hinz = 0, int kunz = 0){Q_UNUSED(hinz) Q_UNUSED(kunz)} + Q_SCRIPTABLE void sinvoke3(){} + + int recursionCount; +}; + +class ReceiverObject : public QObject +{ + Q_OBJECT + +public: + ReceiverObject() + : sequence_slot1( 0 ) + , sequence_slot2( 0 ) + , sequence_slot3( 0 ) + , sequence_slot4( 0 ) + {} + + void reset() + { + sequence_slot4 = 0; + sequence_slot3 = 0; + sequence_slot2 = 0; + sequence_slot1 = 0; + count_slot1 = 0; + count_slot2 = 0; + count_slot3 = 0; + count_slot4 = 0; + } + + int sequence_slot1; + int sequence_slot2; + int sequence_slot3; + int sequence_slot4; + int count_slot1; + int count_slot2; + int count_slot3; + int count_slot4; + + bool called(int slot) + { + switch (slot) { + case 1: return sequence_slot1; + case 2: return sequence_slot2; + case 3: return sequence_slot3; + case 4: return sequence_slot4; + default: return false; + } + } + + static int sequence; + +public slots: + void slot1() { sequence_slot1 = ++sequence; count_slot1++; } + void slot2() { sequence_slot2 = ++sequence; count_slot2++; } + void slot3() { sequence_slot3 = ++sequence; count_slot3++; } + void slot4() { sequence_slot4 = ++sequence; count_slot4++; } + +}; + +int ReceiverObject::sequence = 0; + +void tst_QSignalBlocker::signalBlocking() +{ + SenderObject sender; + ReceiverObject receiver; + + receiver.connect(&sender, SIGNAL(signal1()), SLOT(slot1())); + + sender.emitSignal1(); + QVERIFY(receiver.called(1)); + receiver.reset(); + + { + QSignalBlocker blocker(&sender); + + sender.emitSignal1(); + QVERIFY(!receiver.called(1)); + receiver.reset(); + + sender.blockSignals(false); + + sender.emitSignal1(); + QVERIFY(receiver.called(1)); + receiver.reset(); + + sender.blockSignals(true); + + sender.emitSignal1(); + QVERIFY(!receiver.called(1)); + receiver.reset(); + + blocker.unblock(); + + sender.emitSignal1(); + QVERIFY(receiver.called(1)); + receiver.reset(); + + blocker.reblock(); + + sender.emitSignal1(); + QVERIFY(!receiver.called(1)); + receiver.reset(); + } + + sender.emitSignal1(); + QVERIFY(receiver.called(1)); + receiver.reset(); +} + +void tst_QSignalBlocker::signalBlockingMoveAssignment() +{ +#ifdef Q_COMPILER_RVALUE_REFS + QObject o1, o2; + + // move-assignment: both block other objects + { + QSignalBlocker b(&o1); + QVERIFY(o1.signalsBlocked()); + + QVERIFY(!o2.signalsBlocked()); + b = QSignalBlocker(&o2); + QVERIFY(!o1.signalsBlocked()); + QVERIFY(o2.signalsBlocked()); + } + + QVERIFY(!o1.signalsBlocked()); + QVERIFY(!o2.signalsBlocked()); + + // move-assignment: from inert other + { + QSignalBlocker b(&o1); + QVERIFY(o1.signalsBlocked()); + b = QSignalBlocker(0); + } + + QVERIFY(!o1.signalsBlocked()); + QVERIFY(!o2.signalsBlocked()); + + // move-assignment: to inert *this + { + QSignalBlocker b(0); + QVERIFY(!o1.signalsBlocked()); + { + QSignalBlocker inner(&o1); + QVERIFY(o1.signalsBlocked()); + b = std::move(inner); + } + QVERIFY(o1.signalsBlocked()); + } + + QVERIFY(!o1.signalsBlocked()); + QVERIFY(!o2.signalsBlocked()); + + // move-assignment: both block the same object, neither is unblocked + { + QSignalBlocker b(&o1); + QVERIFY(o1.signalsBlocked()); + { + b.unblock(); // make sure inner.m_blocked = false + QVERIFY(!o1.signalsBlocked()); + QSignalBlocker inner(&o1); + QVERIFY(o1.signalsBlocked()); + b.reblock(); + QVERIFY(o1.signalsBlocked()); + b = std::move(inner); + } + QVERIFY(o1.signalsBlocked()); + } + + QVERIFY(!o1.signalsBlocked()); + QVERIFY(!o2.signalsBlocked()); + + // move-assignment: both block the same object, but *this is unblocked + { + QSignalBlocker b(&o1); + QVERIFY(o1.signalsBlocked()); + b.unblock(); + QVERIFY(!o1.signalsBlocked()); + b = QSignalBlocker(&o1); + QVERIFY(o1.signalsBlocked()); + } + + QVERIFY(!o1.signalsBlocked()); + QVERIFY(!o2.signalsBlocked()); + + // move-assignment: both block the same object, but other is unblocked + { + QSignalBlocker b(&o1); + { + QVERIFY(o1.signalsBlocked()); + QSignalBlocker inner(&o1); + QVERIFY(o1.signalsBlocked()); + inner.unblock(); + QVERIFY(o1.signalsBlocked()); + b = std::move(inner); + QVERIFY(!o1.signalsBlocked()); + } + QVERIFY(!o1.signalsBlocked()); + } + + QVERIFY(!o1.signalsBlocked()); + QVERIFY(!o2.signalsBlocked()); + +#else + QSKIP("This compiler is not in C++11 mode or doesn't support move semantics"); +#endif // Q_COMPILER_RVALUE_REFS +} + +QTEST_MAIN(tst_QSignalBlocker) +#include "tst_qsignalblocker.moc" diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp index 5cc0e5bdb4..0e53139414 100644 --- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp +++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp @@ -55,6 +55,8 @@ #endif #if defined(Q_OS_WINCE) #include <windows.h> +#elif defined(Q_OS_WINRT) +#include <thread> #elif defined(Q_OS_WIN) #include <process.h> #include <windows.h> @@ -326,6 +328,9 @@ void tst_QThread::isRunning() void tst_QThread::setPriority() { +#if defined(Q_OS_WINRT) + QSKIP("Thread priority is not supported on WinRT"); +#endif Simple_Thread thread; // cannot change the priority, since the thread is not running @@ -460,6 +465,10 @@ void tst_QThread::start() QVERIFY(!thread.isFinished()); QVERIFY(!thread.isRunning()); QMutexLocker locker(&thread.mutex); +#ifdef Q_OS_WINRT + if (priorities[i] != QThread::NormalPriority && priorities[i] != QThread::InheritPriority) + QTest::ignoreMessage(QtWarningMsg, "QThread::start: Failed to set thread priority (not implemented)"); +#endif thread.start(priorities[i]); QVERIFY(thread.isRunning()); QVERIFY(!thread.isFinished()); @@ -472,6 +481,9 @@ void tst_QThread::start() void tst_QThread::terminate() { +#if defined(Q_OS_WINRT) + QSKIP("Terminate is not supported on WinRT"); +#endif Terminate_Thread thread; { QMutexLocker locker(&thread.mutex); @@ -535,6 +547,9 @@ void tst_QThread::finished() void tst_QThread::terminated() { +#if defined(Q_OS_WINRT) + QSKIP("Terminate is not supported on WinRT"); +#endif SignalRecorder recorder; Terminate_Thread thread; connect(&thread, SIGNAL(finished()), &recorder, SLOT(slot()), Qt::DirectConnection); @@ -630,6 +645,8 @@ void noop(void*) { } #if defined Q_OS_UNIX typedef pthread_t ThreadHandle; +#elif defined Q_OS_WINRT + typedef std::thread ThreadHandle; #elif defined Q_OS_WIN typedef HANDLE ThreadHandle; #endif @@ -671,6 +688,8 @@ void NativeThreadWrapper::start(FunctionPointer functionPointer, void *data) #if defined Q_OS_UNIX const int state = pthread_create(&nativeThreadHandle, 0, NativeThreadWrapper::runUnix, this); Q_UNUSED(state); +#elif defined(Q_OS_WINRT) + nativeThreadHandle = std::thread(NativeThreadWrapper::runWin, this); #elif defined(Q_OS_WINCE) nativeThreadHandle = CreateThread(NULL, 0 , (LPTHREAD_START_ROUTINE)NativeThreadWrapper::runWin , this, 0, NULL); #elif defined Q_OS_WIN @@ -690,6 +709,8 @@ void NativeThreadWrapper::join() { #if defined Q_OS_UNIX pthread_join(nativeThreadHandle, 0); +#elif defined Q_OS_WINRT + nativeThreadHandle.join(); #elif defined Q_OS_WIN WaitForSingleObject(nativeThreadHandle, INFINITE); CloseHandle(nativeThreadHandle); @@ -780,6 +801,9 @@ void tst_QThread::adoptedThreadAffinity() void tst_QThread::adoptedThreadSetPriority() { +#if defined(Q_OS_WINRT) + QSKIP("Thread priority is not supported on WinRT"); +#endif NativeThreadWrapper nativeThread; nativeThread.setWaitForStop(); @@ -857,6 +881,9 @@ void tst_QThread::adoptedThreadFinished() nativeThread.join(); QTestEventLoop::instance().enterLoop(5); +#if defined(Q_OS_WINRT) + QEXPECT_FAIL("", "QTBUG-31397: Known not to work on WinRT", Abort); +#endif QVERIFY(!QTestEventLoop::instance().timeout()); } @@ -872,6 +899,9 @@ void tst_QThread::adoptedThreadExecFinished() nativeThread.join(); QTestEventLoop::instance().enterLoop(5); +#if defined(Q_OS_WINRT) + QEXPECT_FAIL("", "QTBUG-31397: Known not to work on WinRT", Abort); +#endif QVERIFY(!QTestEventLoop::instance().timeout()); } @@ -908,6 +938,9 @@ void tst_QThread::adoptMultipleThreads() } QTestEventLoop::instance().enterLoop(5); +#if defined(Q_OS_WINRT) + QEXPECT_FAIL("", "QTBUG-31397: Known not to work on WinRT", Abort); +#endif QVERIFY(!QTestEventLoop::instance().timeout()); QCOMPARE(recorder.activationCount.load(), numThreads); } @@ -950,6 +983,9 @@ void tst_QThread::adoptMultipleThreadsOverlap() } QTestEventLoop::instance().enterLoop(5); +#if defined(Q_OS_WINRT) + QEXPECT_FAIL("", "QTBUG-31397: Known not to work on WinRT", Abort); +#endif QVERIFY(!QTestEventLoop::instance().timeout()); QCOMPARE(recorder.activationCount.load(), numThreads); } diff --git a/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp b/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp index 4a9932798c..859cd1b36a 100644 --- a/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp +++ b/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp @@ -80,6 +80,7 @@ private slots: void destruction(); void threadRecycling(); void expiryTimeout(); + void expiryTimeoutRace(); #ifndef QT_NO_EXCEPTIONS void exceptions(); #endif @@ -315,7 +316,7 @@ class ExpiryTimeoutTask : public QRunnable { public: QThread *thread; - int runCount; + QAtomicInt runCount; QSemaphore semaphore; ExpiryTimeoutTask() @@ -327,7 +328,7 @@ public: void run() { thread = QThread::currentThread(); - ++runCount; + runCount.ref(); semaphore.release(); } }; @@ -346,7 +347,7 @@ void tst_QThreadPool::expiryTimeout() // run the task threadPool.start(&task); QVERIFY(task.semaphore.tryAcquire(1, 10000)); - QCOMPARE(task.runCount, 1); + QCOMPARE(task.runCount.load(), 1); QVERIFY(!task.thread->wait(100)); // thread should expire QThread *firstThread = task.thread; @@ -355,7 +356,7 @@ void tst_QThreadPool::expiryTimeout() // run task again, thread should be restarted threadPool.start(&task); QVERIFY(task.semaphore.tryAcquire(1, 10000)); - QCOMPARE(task.runCount, 2); + QCOMPARE(task.runCount.load(), 2); QVERIFY(!task.thread->wait(100)); // thread should expire again QVERIFY(task.thread->wait(10000)); @@ -368,6 +369,22 @@ void tst_QThreadPool::expiryTimeout() QCOMPARE(threadPool.expiryTimeout(), expiryTimeout); } +void tst_QThreadPool::expiryTimeoutRace() // QTBUG-3786 +{ + ExpiryTimeoutTask task; + + QThreadPool threadPool; + threadPool.setMaxThreadCount(1); + threadPool.setExpiryTimeout(50); + const int numTasks = 20; + for (int i = 0; i < numTasks; ++i) { + threadPool.start(&task); + QThread::msleep(50); // exactly the same as the expiry timeout + } + QCOMPARE(task.runCount.load(), numTasks); + QVERIFY(threadPool.waitForDone(2000)); +} + #ifndef QT_NO_EXCEPTIONS class ExceptionTask : public QRunnable { @@ -503,7 +520,8 @@ void tst_QThreadPool::setMaxThreadCountStartsAndStopsThreads() QVERIFY(task->waitForStarted.tryAcquire(6, 1000)); task->waitToFinish.release(10); -// delete task; + threadPool.waitForDone(); + delete task; } void tst_QThreadPool::reserveThread_data() diff --git a/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp b/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp index 2072034f5f..c96de29b98 100644 --- a/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp +++ b/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp @@ -232,7 +232,7 @@ void tst_QThreadStorage::adoptedThreads() const int state = pthread_create(&thread, 0, testAdoptedThreadStorageUnix, &pointers); QCOMPARE(state, 0); pthread_join(thread, 0); -#elif defined Q_OS_WIN +#elif defined Q_OS_WIN && !defined(Q_OS_WINRT) HANDLE thread; #if defined(Q_OS_WINCE) thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)testAdoptedThreadStorageWin, &pointers, 0, NULL); diff --git a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp index 7d65309cb7..ce30710f7f 100644 --- a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp +++ b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp @@ -565,6 +565,9 @@ void tst_QCommandLineParser::testHelpOption() void tst_QCommandLineParser::testQuoteEscaping() { +#ifdef QT_NO_PROCESS + QSKIP("This test requires QProcess support"); +#else QCoreApplication app(empty_argc, empty_argv); QProcess process; process.start("testhelper/qcommandlineparser_test_helper", QStringList() << @@ -581,6 +584,7 @@ void tst_QCommandLineParser::testQuoteEscaping() QVERIFY2(output.contains("KEY1=\"VALUE1\""), qPrintable(output)); QVERIFY2(output.contains("QTBUG-15379=C:\\path\\'file.ext"), qPrintable(output)); QVERIFY2(output.contains("QTBUG-30628=C:\\temp\\'file'.ext"), qPrintable(output)); +#endif // !QT_NO_PROCESS } QTEST_APPLESS_MAIN(tst_QCommandLineParser) diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp index 6c80c5ff47..7d51696fe3 100644 --- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp @@ -49,6 +49,9 @@ #ifdef Q_OS_WIN # include <qt_windows.h> +# if defined(Q_OS_WINRT) +# define tzset() +# endif #endif class tst_QDateTime : public QObject @@ -175,7 +178,7 @@ void tst_QDateTime::init() { #if defined(Q_OS_WINCE) SetUserDefaultLCID(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT)); -#elif defined(Q_OS_WIN) +#elif defined(Q_OS_WIN32) SetThreadLocale(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT)); #endif } diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp index 028cea3d62..1bac5f39e7 100644 --- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -133,7 +133,7 @@ public: private slots: void initTestCase(); void cleanupTestCase(); -#ifdef Q_OS_WIN +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) void windowsDefaultLocale(); #endif #ifdef Q_OS_MAC @@ -1472,7 +1472,7 @@ void tst_QLocale::macDefaultLocale() } #endif // Q_OS_MAC -#ifdef Q_OS_WIN +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) #include <qt_windows.h> static QString getWinLocaleInfo(LCTYPE type) @@ -1526,7 +1526,7 @@ public: #endif // Q_OS_WIN -#ifdef Q_OS_WIN +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) void tst_QLocale::windowsDefaultLocale() { RestoreLocaleHelper systemLocale; diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp index 48874781c0..a0edc16718 100644 --- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp @@ -1440,6 +1440,8 @@ void tst_QString::contains() QVERIFY(a.contains('F',Qt::CaseInsensitive)); QVERIFY(a.contains("FG")); QVERIFY(a.contains("FG",Qt::CaseInsensitive)); + QVERIFY(a.contains(QLatin1String("FG"))); + QVERIFY(a.contains(QLatin1String("fg"),Qt::CaseInsensitive)); QVERIFY(a.contains( QString(), Qt::CaseInsensitive)); QVERIFY(a.contains( "", Qt::CaseInsensitive)); QVERIFY(a.contains(QRegExp("[FG][HI]"))); @@ -3880,6 +3882,14 @@ void tst_QString::toLatin1Roundtrip() // and back: QCOMPARE(QString::fromLatin1(latin1, latin1.length()).length(), unicodedst.length()); QCOMPARE(QString::fromLatin1(latin1, latin1.length()), unicodedst); + + // try the rvalue version of toLatin1() + QString s = unicodesrc; + QCOMPARE(qMove(s).toLatin1(), latin1); + + // and verify that the moved-from object can still be used + s = "foo"; + s.clear(); } void tst_QString::stringRef_toLatin1Roundtrip_data() diff --git a/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp b/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp index b4f13af0a1..d81bfc33fb 100644 --- a/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp +++ b/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp @@ -827,7 +827,7 @@ void tst_QTimeZone::macTest() void tst_QTimeZone::winTest() { -#if defined(QT_BUILD_INTERNAL) && defined(Q_OS_WIN) +#if defined(QT_BUILD_INTERNAL) && defined(Q_OS_WIN) && !defined(Q_OS_WINRT) // Known datetimes qint64 std = QDateTime(QDate(2012, 1, 1), QTime(0, 0, 0), Qt::UTC).toMSecsSinceEpoch(); qint64 dst = QDateTime(QDate(2012, 6, 1), QTime(0, 0, 0), Qt::UTC).toMSecsSinceEpoch(); diff --git a/tests/auto/gui/image/qpixmap/qpixmap.pro b/tests/auto/gui/image/qpixmap/qpixmap.pro index bdd0c15788..33c301a500 100644 --- a/tests/auto/gui/image/qpixmap/qpixmap.pro +++ b/tests/auto/gui/image/qpixmap/qpixmap.pro @@ -5,7 +5,7 @@ QT += core-private gui-private testlib qtHaveModule(widgets): QT += widgets widgets-private SOURCES += tst_qpixmap.cpp -!wince* { +!wince*:!winrt { win32:LIBS += -lgdi32 -luser32 } diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp index cb5d836291..79dc3f311a 100644 --- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp @@ -116,7 +116,7 @@ private slots: void convertFromImageDetach(); void convertFromImageCacheKey(); -#if defined(Q_OS_WIN) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) void toWinHBITMAP_data(); void toWinHBITMAP(); void fromWinHBITMAP_data(); @@ -805,7 +805,7 @@ void tst_QPixmap::convertFromImageCacheKey() QCOMPARE(copy.cacheKey(), pix.cacheKey()); } -#if defined(Q_OS_WIN) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) QT_BEGIN_NAMESPACE Q_GUI_EXPORT HBITMAP qt_createIconMask(const QBitmap &bitmap); @@ -1024,7 +1024,7 @@ void tst_QPixmap::fromWinHICON() #endif // Q_OS_WINCE } -#endif // Q_OS_WIN +#endif // Q_OS_WIN && !Q_OS_WINRT void tst_QPixmap::onlyNullPixmapsOutsideGuiThread() { diff --git a/tests/auto/gui/kernel/qguivariant/test/black.png b/tests/auto/gui/kernel/qguivariant/test/black.png Binary files differnew file mode 100644 index 0000000000..6c94085ed5 --- /dev/null +++ b/tests/auto/gui/kernel/qguivariant/test/black.png diff --git a/tests/auto/gui/kernel/qguivariant/test/black2.png b/tests/auto/gui/kernel/qguivariant/test/black2.png Binary files differnew file mode 100644 index 0000000000..6c94085ed5 --- /dev/null +++ b/tests/auto/gui/kernel/qguivariant/test/black2.png diff --git a/tests/auto/gui/kernel/qguivariant/test/test.pro b/tests/auto/gui/kernel/qguivariant/test/test.pro index e3b4a350ca..c4123797d2 100644 --- a/tests/auto/gui/kernel/qguivariant/test/test.pro +++ b/tests/auto/gui/kernel/qguivariant/test/test.pro @@ -2,6 +2,7 @@ CONFIG += testcase CONFIG += parallel_test TARGET = tst_qguivariant SOURCES += tst_qguivariant.cpp +RESOURCES = tst_qguivariant.qrc INCLUDEPATH += $$PWD/../../../../other/qvariant_common QT += testlib RESOURCES += qguivariant.qrc diff --git a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp index 42570751fc..efc688f0b1 100644 --- a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp +++ b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp @@ -126,6 +126,8 @@ private slots: void implicitConstruction(); void guiVariantAtExit(); + + void iconEquality(); }; void tst_QGuiVariant::constructor_invalid_data() @@ -761,5 +763,32 @@ void tst_QGuiVariant::guiVariantAtExit() QVERIFY(true); } +void tst_QGuiVariant::iconEquality() +{ + QIcon i; + QVariant a = i; + QVariant b = i; + QCOMPARE(a, b); + + i = QIcon(":/black.png"); + a = i; + QVERIFY(a != b); + + b = a; + QCOMPARE(a, b); + + i = QIcon(":/black2.png"); + a = i; + QVERIFY(a != b); + + b = i; + QCOMPARE(a, b); + + // This is a "different" QIcon + // even if the contents are the same + b = QIcon(":/black2.png"); + QVERIFY(a != b); +} + QTEST_MAIN(tst_QGuiVariant) #include "tst_qguivariant.moc" diff --git a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.qrc b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.qrc new file mode 100644 index 0000000000..15cfde5788 --- /dev/null +++ b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.qrc @@ -0,0 +1,6 @@ +<!DOCTYPE RCC><RCC version="1.0"> +<qresource prefix="/"> +<file>black.png</file> +<file>black2.png</file> +</qresource> +</RCC> diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index 259c840ae7..76b3a4f6cc 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -61,6 +61,7 @@ private slots: void eventOrderOnShow(); void resizeEventAfterResize(); void mapGlobal(); + void positioning_data(); void positioning(); void isExposed(); void isActive(); @@ -93,7 +94,6 @@ private: QTouchDevice *touchDevice; }; - void tst_QWindow::mapGlobal() { QWindow a; @@ -116,10 +116,10 @@ void tst_QWindow::mapGlobal() class Window : public QWindow { public: - Window() + Window(const Qt::WindowFlags flags = Qt::Window | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint) { reset(); - setFlags(Qt::Window | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint); + setFlags(flags); } void reset() @@ -188,6 +188,23 @@ void tst_QWindow::resizeEventAfterResize() QTRY_COMPARE(window.received(QEvent::Resize), 2); } +void tst_QWindow::positioning_data() +{ + QTest::addColumn<int>("windowflags"); + QTest::addColumn<int>("resizecount"); + + QTest::newRow("default") << int(Qt::Window | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint | Qt::WindowFullscreenButtonHint) +#if defined(Q_OS_OSX) && MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 + << 4; +#else + << 3; +#endif + +#ifdef Q_OS_OSX + QTest::newRow("fake") << int(Qt::Window | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint) << 4; +#endif +} + void tst_QWindow::positioning() { if (!QGuiApplicationPrivate::platformIntegration()->hasCapability( @@ -200,7 +217,9 @@ void tst_QWindow::positioning() const QSize size = QSize(300, 40); const QRect geometry(QPoint(80, 80), size); - Window window; + QFETCH(int, windowflags); + QFETCH(int, resizecount); + Window window((Qt::WindowFlags)windowflags); window.setGeometry(QRect(QPoint(20, 20), size)); window.setFramePosition(QPoint(40, 40)); // Move window around before show, size must not change. QCOMPARE(window.geometry().size(), size); @@ -223,14 +242,13 @@ void tst_QWindow::positioning() window.setWindowState(Qt::WindowFullScreen); QCoreApplication::processEvents(); -#ifdef Q_OS_OSX - QEXPECT_FAIL("", "Multiple failures in this test on Mac OS X, see QTBUG-23059", Abort); -#endif QTRY_COMPARE(window.received(QEvent::Resize), 2); + QTest::qWait(2000); + window.setWindowState(Qt::WindowNoState); QCoreApplication::processEvents(); - QTRY_COMPARE(window.received(QEvent::Resize), 3); + QTRY_COMPARE(window.received(QEvent::Resize), resizecount); QTRY_COMPARE(originalPos, window.position()); QTRY_COMPARE(originalFramePos, window.framePosition()); @@ -239,7 +257,7 @@ void tst_QWindow::positioning() // if our positioning is actually fully respected by the window manager // test whether it correctly handles frame positioning as well if (originalPos == geometry.topLeft() && (originalMargins.top() != 0 || originalMargins.left() != 0)) { - QPoint framePos = QGuiApplication::primaryScreen()->availableVirtualGeometry().topLeft() + QPoint(40, 40); + QPoint framePos = QPlatformScreen::platformScreenForWindow(&window)->availableGeometry().topLeft() + QPoint(40, 40); window.reset(); window.setFramePosition(framePos); diff --git a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp index d5ddf8fbec..53aef40df0 100644 --- a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp +++ b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp @@ -187,6 +187,9 @@ private slots: void htmlExportImportBlockCount(); void QTBUG27354_spaceAndSoftSpace(); + void baseUrl_data(); + void baseUrl(); + void QTBUG28998_linkColor(); private: @@ -2947,6 +2950,53 @@ void tst_QTextDocument::QTBUG27354_spaceAndSoftSpace() } } +class BaseDocument : public QTextDocument +{ +public: + QUrl loadedResource() const { return resourceUrl; } + + QVariant loadResource(int type, const QUrl &name) + { + resourceUrl = name; + return QTextDocument::loadResource(type, name); + } + +private: + QUrl resourceUrl; +}; + +void tst_QTextDocument::baseUrl_data() +{ + QTest::addColumn<QUrl>("base"); + QTest::addColumn<QUrl>("resource"); + QTest::addColumn<QUrl>("loaded"); + + QTest::newRow("1") << QUrl() << QUrl("images/logo.png") << QUrl("images/logo.png"); + QTest::newRow("2") << QUrl("file:///path/to/content") << QUrl("images/logo.png") << QUrl("file:///path/to/images/logo.png"); + QTest::newRow("3") << QUrl("file:///path/to/content/") << QUrl("images/logo.png") << QUrl("file:///path/to/content/images/logo.png"); + QTest::newRow("4") << QUrl("file:///path/to/content/images") << QUrl("images/logo.png") << QUrl("file:///path/to/content/images/logo.png"); + QTest::newRow("5") << QUrl("file:///path/to/content/images/") << QUrl("images/logo.png") << QUrl("file:///path/to/content/images/images/logo.png"); + QTest::newRow("6") << QUrl("file:///path/to/content/images") << QUrl("../images/logo.png") << QUrl("file:///path/to/images/logo.png"); + QTest::newRow("7") << QUrl("file:///path/to/content/images/") << QUrl("../images/logo.png") << QUrl("file:///path/to/content/images/logo.png"); + QTest::newRow("8") << QUrl("file:///path/to/content/index.html") << QUrl("images/logo.png") << QUrl("file:///path/to/content/images/logo.png"); +} + +void tst_QTextDocument::baseUrl() +{ + QFETCH(QUrl, base); + QFETCH(QUrl, resource); + QFETCH(QUrl, loaded); + + BaseDocument document; + QVERIFY(!document.baseUrl().isValid()); + document.setBaseUrl(base); + QCOMPARE(document.baseUrl(), base); + + document.setHtml(QString("<img src='%1'/>").arg(resource.toString())); + document.resource(QTextDocument::ImageResource, resource); + QCOMPARE(document.loadedResource(), loaded); +} + void tst_QTextDocument::QTBUG28998_linkColor() { QPalette pal; diff --git a/tests/auto/network/access/qftp/tst_qftp.cpp b/tests/auto/network/access/qftp/tst_qftp.cpp index 71af9690be..fffe663f0a 100644 --- a/tests/auto/network/access/qftp/tst_qftp.cpp +++ b/tests/auto/network/access/qftp/tst_qftp.cpp @@ -197,14 +197,18 @@ void tst_QFtp::initTestCase_data() QTest::addColumn<bool>("setSession"); QTest::newRow("WithoutProxy") << false << 0 << false; +#ifndef QT_NO_SOCKS5 QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy) << false; +#endif //### doesn't work well yet. //QTest::newRow("WithHttpProxy") << true << int(QNetworkProxy::HttpProxy); #ifndef QT_NO_BEARERMANAGEMENT QTest::newRow("WithoutProxyWithSession") << false << 0 << true; +#ifndef QT_NO_SOCKS5 QTest::newRow("WithSocks5ProxyAndSession") << true << int(QNetworkProxy::Socks5Proxy) << true; #endif +#endif } void tst_QFtp::initTestCase() @@ -232,11 +236,16 @@ void tst_QFtp::init() QFETCH_GLOBAL(int, proxyType); QFETCH_GLOBAL(bool, setSession); if (setProxy) { +#ifndef QT_NO_NETWORKPROXY if (proxyType == QNetworkProxy::Socks5Proxy) { QNetworkProxy::setApplicationProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1080)); } else if (proxyType == QNetworkProxy::HttpProxy) { QNetworkProxy::setApplicationProxy(QNetworkProxy(QNetworkProxy::HttpProxy, QtNetworkSettings::serverName(), 3128)); } +#else // !QT_NO_NETWORKPROXY + Q_UNUSED(proxyType); + QSKIP("No proxy support"); +#endif // QT_NO_NETWORKPROXY } #ifndef QT_NO_BEARERMANAGEMENT if (setSession) { @@ -293,7 +302,11 @@ void tst_QFtp::cleanup() } QFETCH_GLOBAL(bool, setProxy); if (setProxy) { +#ifndef QT_NO_NETWORKPROXY QNetworkProxy::setApplicationProxy(QNetworkProxy::DefaultProxy); +#else + QSKIP("No proxy support"); +#endif } delete ftp; @@ -749,14 +762,14 @@ void tst_QFtp::put() QFETCH( QByteArray, fileData ); QFETCH( bool, useIODevice ); -#ifdef Q_OS_WIN +#if defined(Q_OS_WIN) && !defined(QT_NO_NETWORKPROXY) QFETCH_GLOBAL(bool, setProxy); if (setProxy) { QFETCH_GLOBAL(int, proxyType); if (proxyType == QNetworkProxy::Socks5Proxy) QSKIP("With socks5 the put() test takes too long time on Windows."); } -#endif +#endif // OS_WIN && !QT_NO_NETWORKPROXY const int timestep = 50; diff --git a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp index 4ee4b67ec0..bcfe9f090f 100644 --- a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp +++ b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp @@ -211,6 +211,17 @@ void tst_QNetworkCookieJar::setCookiesFromUrl_data() result += cookie; QTest::newRow("effective-tld2-accepted") << preset << cookie << "http://www.gobiernoelectronico.ar" << result << true; + result.clear(); + preset.clear(); + cookie.setDomain("127.0.0.1"); + result += cookie; + QTest::newRow("IPv4-address-as-domain") << preset << cookie << "http://127.0.0.1/" << result << true; + + result.clear(); + preset.clear(); + cookie.setDomain("fe80::250:56ff:fec0:1"); + result += cookie; + QTest::newRow("IPv6-address-as-domain") << preset << cookie << "http://[fe80::250:56ff:fec0:1]/" << result << true; // setting the defaults: finalCookie = cookie; diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index 1837e8d665..b35c934680 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -97,7 +97,9 @@ Q_DECLARE_METATYPE(QSharedPointer<char>) #include "../../../network-settings.h" Q_DECLARE_METATYPE(QAuthenticator*) +#ifndef QT_NO_NETWORKPROXY Q_DECLARE_METATYPE(QNetworkProxyQuery) +#endif typedef QSharedPointer<QNetworkReply> QNetworkReplyPtr; @@ -106,6 +108,7 @@ class tst_QNetworkReply: public QObject { Q_OBJECT +#ifndef QT_NO_NETWORKPROXY struct ProxyData { ProxyData(const QNetworkProxy &p, const QByteArray &t, bool auth) : tag(t), proxy(p), requiresAuthentication(auth) @@ -114,6 +117,7 @@ class tst_QNetworkReply: public QObject QNetworkProxy proxy; bool requiresAuthentication; }; +#endif // !QT_NO_NETWORKPROXY static bool seedCreated; static QString createUniqueExtension() { @@ -134,7 +138,9 @@ class tst_QNetworkReply: public QObject QString wronlyFileName; #endif QString uniqueExtension; +#ifndef QT_NO_NETWORKPROXY QList<ProxyData> proxies; +#endif QNetworkAccessManager manager; MyCookieJar *cookieJar; #ifndef QT_NO_SSL @@ -203,8 +209,10 @@ private Q_SLOTS: void getFromHttp(); void getErrors_data(); void getErrors(); +#ifndef QT_NO_NETWORKPROXY void headFromHttp_data(); void headFromHttp(); +#endif // !QT_NO_NETWORKPROXY void putToFile_data(); void putToFile(); void putToFtp_data(); @@ -261,9 +269,11 @@ private Q_SLOTS: void ioGetFromHttpWithAuth_data(); void ioGetFromHttpWithAuth(); void ioGetFromHttpWithAuthSynchronous(); +#ifndef QT_NO_NETWORKPROXY void ioGetFromHttpWithProxyAuth(); void ioGetFromHttpWithProxyAuthSynchronous(); void ioGetFromHttpWithSocksProxy(); +#endif // !QT_NO_NETWORKPROXY #ifndef QT_NO_SSL void ioGetFromHttpsWithSslErrors(); void ioGetFromHttpsWithIgnoreSslErrors(); @@ -278,8 +288,10 @@ private Q_SLOTS: void ioGetFromHttpWithCache_data(); void ioGetFromHttpWithCache(); +#ifndef QT_NO_NETWORKPROXY void ioGetWithManyProxies_data(); void ioGetWithManyProxies(); +#endif // !QT_NO_NETWORKPROXY void ioPutToFileFromFile_data(); void ioPutToFileFromFile(); @@ -297,10 +309,12 @@ private Q_SLOTS: void ioPutToHttpFromFile(); void ioPostToHttpFromFile_data(); void ioPostToHttpFromFile(); +#ifndef QT_NO_NETWORKPROXY void ioPostToHttpFromSocket_data(); void ioPostToHttpFromSocket(); void ioPostToHttpFromSocketSynchronous(); void ioPostToHttpFromSocketSynchronous_data(); +#endif // !QT_NO_NETWORKPROXY void ioPostToHttpFromMiddleOfFileToEnd(); void ioPostToHttpFromMiddleOfFileFiveBytes(); void ioPostToHttpFromMiddleOfQBufferFiveBytes(); @@ -339,11 +353,13 @@ private Q_SLOTS: void nestedEventLoops(); +#ifndef QT_NO_NETWORKPROXY void httpProxyCommands_data(); void httpProxyCommands(); void httpProxyCommandsSynchronous_data(); void httpProxyCommandsSynchronous(); void proxyChange(); +#endif // !QT_NO_NETWORKPROXY void authorizationError_data(); void authorizationError(); @@ -419,9 +435,11 @@ private Q_SLOTS: void dontInsertPartialContentIntoTheCache(); void httpUserAgent(); +#ifndef QT_NO_NETWORKPROXY void authenticationCacheAfterCancel_data(); void authenticationCacheAfterCancel(); void authenticationWithDifferentRealm(); +#endif // !QT_NO_NETWORKPROXY void synchronousAuthenticationCache(); void pipelining(); @@ -638,6 +656,7 @@ public: { QNetworkCookieJar::setAllCookies(cookieList); } }; +#ifndef QT_NO_NETWORKPROXY class MyProxyFactory: public QNetworkProxyFactory { public: @@ -660,6 +679,7 @@ public: return toReturn; } }; +#endif // !QT_NO_NETWORKPROXY class MyMemoryCache: public QAbstractNetworkCache { @@ -1154,7 +1174,9 @@ tst_QNetworkReply::tst_QNetworkReply() { qRegisterMetaType<QNetworkReply *>(); // for QSignalSpy qRegisterMetaType<QAuthenticator *>(); +#ifndef QT_NO_NETWORKPROXY qRegisterMetaType<QNetworkProxy>(); +#endif #ifndef QT_NO_SSL qRegisterMetaType<QList<QSslError> >(); #endif @@ -1165,6 +1187,7 @@ tst_QNetworkReply::tst_QNetworkReply() cookieJar = new MyCookieJar; manager.setCookieJar(cookieJar); +#ifndef QT_NO_NETWORKPROXY QHostInfo hostInfo = QHostInfo::fromName(QtNetworkSettings::serverName()); proxies << ProxyData(QNetworkProxy::NoProxy, "", false); @@ -1178,10 +1201,13 @@ tst_QNetworkReply::tst_QNetworkReply() << ProxyData(QNetworkProxy(QNetworkProxy::Socks5Proxy, proxyserver, 1080), "+socks", false) << ProxyData(QNetworkProxy(QNetworkProxy::Socks5Proxy, proxyserver, 1081), "+socksauth", true); } else { +#endif // !QT_NO_NETWORKPROXY printf("==================================================================\n"); printf("Proxy could not be looked up. No proxy will be used while testing!\n"); printf("==================================================================\n"); +#ifndef QT_NO_NETWORKPROXY } +#endif // !QT_NO_NETWORKPROXY } tst_QNetworkReply::~tst_QNetworkReply() @@ -1438,7 +1464,9 @@ void tst_QNetworkReply::cleanup() // clear the internal cache manager.clearAccessCache(); +#ifndef QT_NO_NETWORKPROXY manager.setProxy(QNetworkProxy()); +#endif manager.setCache(0); // clear cookies @@ -1732,6 +1760,7 @@ void tst_QNetworkReply::getFromHttp() QCOMPARE(reply->readAll(), reference.readAll()); } +#ifndef QT_NO_NETWORKPROXY void tst_QNetworkReply::headFromHttp_data() { QTest::addColumn<qint64>("referenceSize"); @@ -1790,6 +1819,7 @@ void tst_QNetworkReply::headFromHttp() if (reply->header(QNetworkRequest::ContentTypeHeader).isValid()) QCOMPARE(reply->header(QNetworkRequest::ContentTypeHeader).toString(), contentType); } +#endif // !QT_NO_NETWORKPROXY void tst_QNetworkReply::getErrors_data() { @@ -3270,6 +3300,7 @@ void tst_QNetworkReply::ioGetFromHttpWithAuthSynchronous() QCOMPARE(replySync->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 401); } +#ifndef QT_NO_NETWORKPROXY void tst_QNetworkReply::ioGetFromHttpWithProxyAuth() { // This test sends three requests @@ -3432,6 +3463,7 @@ void tst_QNetworkReply::ioGetFromHttpWithSocksProxy() QCOMPARE(authspy.count(), 0); } } +#endif // !QT_NO_NETWORKPROXY #ifndef QT_NO_SSL void tst_QNetworkReply::ioGetFromHttpsWithSslErrors() @@ -3793,6 +3825,7 @@ void tst_QNetworkReply::ioGetFromHttpWithCache() QCOMPARE(reply->readAll().constData(), qPrintable(body)); } +#ifndef QT_NO_NETWORKPROXY void tst_QNetworkReply::ioGetWithManyProxies_data() { QTest::addColumn<QList<QNetworkProxy> >("proxyList"); @@ -4054,6 +4087,7 @@ void tst_QNetworkReply::ioGetWithManyProxies() QCOMPARE(authspy.count(), 0); } } +#endif // !QT_NO_NETWORKPROXY void tst_QNetworkReply::ioPutToFileFromFile_data() { @@ -4346,6 +4380,7 @@ void tst_QNetworkReply::ioPostToHttpFromFile() QCOMPARE(reply->readAll().trimmed(), md5sum(sourceFile.readAll()).toHex()); } +#ifndef QT_NO_NETWORKPROXY void tst_QNetworkReply::ioPostToHttpFromSocket_data() { QTest::addColumn<QByteArray>("data"); @@ -4496,6 +4531,7 @@ void tst_QNetworkReply::ioPostToHttpFromSocketSynchronous() QCOMPARE(reply->readAll().trimmed(), md5sum(data).toHex()); } +#endif // !QT_NO_NETWORKPROXY // this tests checks if rewinding the POST-data to some place in the middle // worked. @@ -5410,6 +5446,7 @@ void tst_QNetworkReply::nestedEventLoops() QCOMPARE(errorspy.count(), 0); } +#ifndef QT_NO_NETWORKPROXY void tst_QNetworkReply::httpProxyCommands_data() { QTest::addColumn<QUrl>("url"); @@ -5485,6 +5522,7 @@ void tst_QNetworkReply::httpProxyCommandsSynchronous_data() { httpProxyCommands_data(); } +#endif // !QT_NO_NETWORKPROXY struct QThreadCleanup { @@ -5506,6 +5544,7 @@ struct QDeleteLaterCleanup } }; +#ifndef QT_NO_NETWORKPROXY void tst_QNetworkReply::httpProxyCommandsSynchronous() { QFETCH(QUrl, url); @@ -5586,6 +5625,7 @@ void tst_QNetworkReply::proxyChange() QVERIFY(int(reply3->error()) > 0); } +#endif // !QT_NO_NETWORKPROXY void tst_QNetworkReply::authorizationError_data() { @@ -6502,6 +6542,7 @@ void tst_QNetworkReply::qtbug4121unknownAuthentication() QCOMPARE(reply->error(), QNetworkReply::AuthenticationRequiredError); } +#ifndef QT_NO_NETWORKPROXY void tst_QNetworkReply::authenticationCacheAfterCancel_data() { QTest::addColumn<QNetworkProxy>("proxy"); @@ -6716,6 +6757,7 @@ void tst_QNetworkReply::authenticationWithDifferentRealm() QVERIFY(!QTestEventLoop::instance().timeout()); QCOMPARE(reply->error(), QNetworkReply::NoError); } +#endif // !QT_NO_NETWORKPROXY class QtBug13431Helper : public QObject { Q_OBJECT diff --git a/tests/auto/network/kernel/kernel.pro b/tests/auto/network/kernel/kernel.pro index 14080a0548..8594ad5932 100644 --- a/tests/auto/network/kernel/kernel.pro +++ b/tests/auto/network/kernel/kernel.pro @@ -10,6 +10,10 @@ SUBDIRS=\ qnetworkaddressentry \ qhostaddress \ +winrt: SUBDIRS -= \ + qnetworkproxy \ + qnetworkproxyfactory \ + !contains(QT_CONFIG, private_tests): SUBDIRS -= \ qauthenticator \ qhostinfo \ diff --git a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp index dd9202c748..c4d42206fe 100644 --- a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp +++ b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp @@ -50,6 +50,9 @@ #include <qdatastream.h> #ifdef Q_OS_WIN # include <qt_windows.h> +# if defined(Q_OS_WINRT) +# include <winsock2.h> +# endif #endif class tst_QHostAddress : public QObject @@ -336,12 +339,15 @@ void tst_QHostAddress::assignment() address = "::1"; QCOMPARE(address, QHostAddress("::1")); + // WinRT does not support sockaddr_in +#ifndef Q_OS_WINRT QHostAddress addr("4.2.2.1"); sockaddr_in sockAddr; sockAddr.sin_family = AF_INET; sockAddr.sin_addr.s_addr = htonl(addr.toIPv4Address()); address.setAddress((sockaddr *)&sockAddr); QCOMPARE(address, addr); +#endif // !Q_OS_WINRT } void tst_QHostAddress::scopeId() diff --git a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp index e81c7f71db..e3156ceb3f 100644 --- a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp +++ b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp @@ -67,7 +67,7 @@ #include <time.h> #include <qlibrary.h> -#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) #include <windows.h> #else #include <unistd.h> diff --git a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp index f474f97f5d..35028735e2 100644 --- a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp +++ b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp @@ -64,7 +64,11 @@ #define PLATFORMSOCKETENGINE QNativeSocketEngine #define PLATFORMSOCKETENGINESTRING "QNativeSocketEngine" -#include <private/qnativesocketengine_p.h> +#ifndef Q_OS_WINRT +# include <private/qnativesocketengine_p.h> +#else +# include <private/qnativesocketengine_winrt_p.h> +#endif #include <qstringlist.h> @@ -97,7 +101,9 @@ private slots: void networkError(); void setSocketDescriptor(); void invalidSend(); +#ifndef Q_OS_WINRT void receiveUrgentData(); +#endif void tooManySockets(); }; @@ -608,7 +614,9 @@ void tst_PlatformSocketEngine::networkError() QVERIFY(client.state() == QAbstractSocket::ConnectedState); // An unexpected network error! -#ifdef Q_OS_WIN +#ifdef Q_OS_WINRT + client.close(); +#elif defined(Q_OS_WIN) // could use shutdown to produce different errors ::closesocket(client.socketDescriptor()); #else @@ -641,6 +649,7 @@ void tst_PlatformSocketEngine::invalidSend() } //--------------------------------------------------------------------------- +#ifndef Q_OS_WINRT void tst_PlatformSocketEngine::receiveUrgentData() { PLATFORMSOCKETENGINE server; @@ -703,6 +712,7 @@ void tst_PlatformSocketEngine::receiveUrgentData() QCOMPARE(response.at(0), msg); #endif } +#endif // !Q_OS_WINRT QTEST_MAIN(tst_PlatformSocketEngine) #include "tst_platformsocketengine.moc" diff --git a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp index 9887acf7dd..6053021cf4 100644 --- a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp +++ b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp @@ -1026,7 +1026,7 @@ void tst_QLocalSocket::writeToClientAndDisconnect() void tst_QLocalSocket::debug() { // Make sure this compiles - QTest::ignoreMessage(QtDebugMsg, "QLocalSocket::ConnectionRefusedError QLocalSocket::UnconnectedState "); + QTest::ignoreMessage(QtDebugMsg, "QLocalSocket::ConnectionRefusedError QLocalSocket::UnconnectedState"); qDebug() << QLocalSocket::ConnectionRefusedError << QLocalSocket::UnconnectedState; } diff --git a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp index d838b463f7..10b41ced9e 100644 --- a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp +++ b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp @@ -100,16 +100,20 @@ private slots: void maxPendingConnections(); void listenError(); void waitForConnectionTest(); +#ifndef Q_OS_WINRT void setSocketDescriptor(); +#endif void listenWhileListening(); #ifndef QT_NO_PROCESS void addressReusable(); #endif void setNewSocketDescriptorBlocking(); +#ifndef QT_NO_NETWORKPROXY void invalidProxy_data(); void invalidProxy(); void proxyFactory_data(); void proxyFactory(); +#endif // !QT_NO_NETWORKPROXY void qtbug14268_peek(); @@ -158,7 +162,9 @@ void tst_QTcpServer::initTestCase_data() QTest::addColumn<int>("proxyType"); QTest::newRow("WithoutProxy") << false << 0; +#ifndef QT_NO_SOCKS5 QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy); +#endif crashingServerDir = QFINDTESTDATA("crashingServer"); QVERIFY2(!crashingServerDir.isEmpty(), qPrintable( @@ -181,16 +187,22 @@ void tst_QTcpServer::init() { QFETCH_GLOBAL(bool, setProxy); if (setProxy) { +#ifndef QT_NO_NETWORKPROXY QFETCH_GLOBAL(int, proxyType); if (proxyType == QNetworkProxy::Socks5Proxy) { QNetworkProxy::setApplicationProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1080)); } +#else // !QT_NO_NETWORKPROXY + QSKIP("No proxy support"); +#endif // QT_NO_NETWORKPROXY } } void tst_QTcpServer::cleanup() { +#ifndef QT_NO_NETWORKPROXY QNetworkProxy::setApplicationProxy(QNetworkProxy::DefaultProxy); +#endif } //---------------------------------------------------------------------------------- @@ -369,9 +381,13 @@ void tst_QTcpServer::maxPendingConnections() { QFETCH_GLOBAL(bool, setProxy); if (setProxy) { +#ifndef QT_NO_NETWORKPROXY QFETCH_GLOBAL(int, proxyType); if (proxyType == QNetworkProxy::Socks5Proxy) QSKIP("With socks5 only 1 connection is allowed ever"); +#else // !QT_NO_NETWORKPROXY + QSKIP("No proxy support"); +#endif // QT_NO_NETWORKPROXY } //### sees to fail sometimes ... a timing issue with the test on windows QTcpServer server; @@ -407,9 +423,13 @@ void tst_QTcpServer::listenError() { QFETCH_GLOBAL(bool, setProxy); if (setProxy) { +#ifndef QT_NO_NETWORKPROXY QFETCH_GLOBAL(int, proxyType); if (proxyType == QNetworkProxy::Socks5Proxy) QSKIP("With socks5 we can not make hard requirements on the address or port"); +#else // !QT_NO_NETWORKPROXY + QSKIP("No proxy support"); +#endif //QT_NO_NETWORKPROXY } QTcpServer server; QVERIFY(!server.listen(QHostAddress("1.2.3.4"), 0)); @@ -453,9 +473,13 @@ void tst_QTcpServer::waitForConnectionTest() QFETCH_GLOBAL(bool, setProxy); if (setProxy) { +#ifndef QT_NO_NETWORKPROXY QFETCH_GLOBAL(int, proxyType); if (proxyType == QNetworkProxy::Socks5Proxy) QSKIP("Localhost servers don't work well with SOCKS5"); +#else // !QT_NO_NETWORKPROXY + QSKIP("No proxy support"); +#endif // QT_NO_NETWORKPROXY } QTcpSocket findLocalIpSocket; @@ -481,6 +505,7 @@ void tst_QTcpServer::waitForConnectionTest() } //---------------------------------------------------------------------------------- +#ifndef Q_OS_WINRT void tst_QTcpServer::setSocketDescriptor() { QTcpServer server; @@ -510,6 +535,7 @@ void tst_QTcpServer::setSocketDescriptor() WSACleanup(); #endif } +#endif // !Q_OS_WINRT //---------------------------------------------------------------------------------- void tst_QTcpServer::listenWhileListening() @@ -531,6 +557,7 @@ public: bool ok; protected: +#ifndef Q_OS_WINRT void incomingConnection(qintptr socketDescriptor) { // how a user woulddo it (qabstractsocketengine is not public) @@ -543,6 +570,7 @@ protected: ::close(socketDescriptor); #endif } +#endif // !Q_OS_WINRT }; #ifndef QT_NO_PROCESS @@ -550,9 +578,13 @@ void tst_QTcpServer::addressReusable() { QFETCH_GLOBAL(bool, setProxy); if (setProxy) { +#ifndef QT_NO_NETWORKPROXY QFETCH_GLOBAL(int, proxyType); if (proxyType == QNetworkProxy::Socks5Proxy) QSKIP("With socks5 this test does not make senans at the momment"); +#else // !QT_NO_NETWORKPROXY + QSKIP("No proxy support"); +#endif // QT_NO_NETWORKPROXY } #if defined(Q_OS_WINCE) QString signalName = QString::fromLatin1("/test_signal.txt"); @@ -596,9 +628,13 @@ void tst_QTcpServer::setNewSocketDescriptorBlocking() { QFETCH_GLOBAL(bool, setProxy); if (setProxy) { +#ifndef QT_NO_NETWORKPROXY QFETCH_GLOBAL(int, proxyType); if (proxyType == QNetworkProxy::Socks5Proxy) QSKIP("With socks5 we can not make the socket descripter blocking"); +#else // !QT_NO_NETWORKPROXY + QSKIP("No proxy support"); +#endif // QT_NO_NETWORKPROXY } SeverWithBlockingSockets server; QVERIFY(server.listen()); @@ -609,6 +645,7 @@ void tst_QTcpServer::setNewSocketDescriptorBlocking() QVERIFY(server.ok); } +#ifndef QT_NO_NETWORKPROXY void tst_QTcpServer::invalidProxy_data() { QTest::addColumn<int>("type"); @@ -763,6 +800,7 @@ void tst_QTcpServer::proxyFactory() // Sometimes, error codes change for the better QTEST(int(server.serverError()), "expectedError"); } +#endif // !QT_NO_NETWORKPROXY class Qtbug14268Helper : public QObject { diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp index b6df536b98..e589d520cb 100644 --- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp +++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp @@ -132,7 +132,9 @@ private slots: void bind_data(); void bind(); void setInvalidSocketDescriptor(); +#ifndef Q_OS_WINRT void setSocketDescriptor(); +#endif void socketDescriptor(); void blockingIMAP(); void nonBlockingIMAP(); @@ -187,14 +189,17 @@ private slots: void connectToMultiIP(); void moveToThread0(); void increaseReadBufferSize(); + void increaseReadBufferSizeFromSlot(); void taskQtBug5799ConnectionErrorWaitForConnected(); void taskQtBug5799ConnectionErrorEventLoop(); void taskQtBug7054TimeoutErrorResetting(); +#ifndef QT_NO_NETWORKPROXY void invalidProxy_data(); void invalidProxy(); void proxyFactory_data(); void proxyFactory(); +#endif // !QT_NO_NETWORKPROXY void qtbug14268_peek(); @@ -216,9 +221,12 @@ protected slots: void hostLookupSlot(); void abortiveClose_abortSlot(); void remoteCloseErrorSlot(); +#ifndef QT_NO_NETWORKPROXY void proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth); +#endif void earlySocketBytesSent(qint64 bytes); void earlySocketReadyRead(); + void slotIncreaseReadBufferSizeReadyRead(); private: QByteArray expectedReplyIMAP(); @@ -354,6 +362,7 @@ void tst_QTcpSocket::init() { QFETCH_GLOBAL(bool, setProxy); if (setProxy) { +#ifndef QT_NO_NETWORKPROXY QFETCH_GLOBAL(int, proxyType); QList<QHostAddress> addresses = QHostInfo::fromName(QtNetworkSettings::serverName()).addresses(); QVERIFY2(addresses.count() > 0, "failed to get ip address for test server"); @@ -382,6 +391,9 @@ void tst_QTcpSocket::init() break; } QNetworkProxy::setApplicationProxy(proxy); +#else // !QT_NO_NETWORKPROXY + QSKIP("No proxy support"); +#endif // QT_NO_NETWORKPROXY } qt_qhostinfo_clear_cache(); @@ -406,15 +418,19 @@ QTcpSocket *tst_QTcpSocket::newSocket() const void tst_QTcpSocket::cleanup() { +#ifndef QT_NO_NETWORKPROXY QNetworkProxy::setApplicationProxy(QNetworkProxy::DefaultProxy); +#endif } +#ifndef QT_NO_NETWORKPROXY void tst_QTcpSocket::proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth) { ++proxyAuthCalled; auth->setUser("qsockstest"); auth->setPassword("password"); } +#endif // !QT_NO_NETWORKPROXY //---------------------------------------------------------------------------------- @@ -552,6 +568,7 @@ void tst_QTcpSocket::setInvalidSocketDescriptor() //---------------------------------------------------------------------------------- +#ifndef Q_OS_WINRT void tst_QTcpSocket::setSocketDescriptor() { QFETCH_GLOBAL(bool, setProxy); @@ -596,6 +613,7 @@ void tst_QTcpSocket::setSocketDescriptor() delete dummy; #endif } +#endif // !Q_OS_WINRT //---------------------------------------------------------------------------------- @@ -1546,7 +1564,9 @@ void tst_QTcpSocket::synchronousApi() void tst_QTcpSocket::dontCloseOnTimeout() { QTcpServer server; +#ifndef QT_NO_NETWORKPROXY server.setProxy(QNetworkProxy(QNetworkProxy::NoProxy)); +#endif QVERIFY(server.listen()); QHostAddress serverAddress = QHostAddress::LocalHost; @@ -1673,11 +1693,13 @@ private slots: { quit(); } +#ifndef QT_NO_NETWORKPROXY inline void proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth) { auth->setUser("qsockstest"); auth->setPassword("password"); } +#endif // !QT_NO_NETWORKPROXY private: int exitCode; QTcpSocket *socket; @@ -1970,11 +1992,13 @@ public slots: tst_QTcpSocket::exitLoop(); } +#ifndef QT_NO_NETWORKPROXY inline void proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth) { auth->setUser("qsockstest"); auth->setPassword("password"); } +#endif // !QT_NO_NETWORKPROXY }; //---------------------------------------------------------------------------------- @@ -2437,6 +2461,57 @@ void tst_QTcpSocket::increaseReadBufferSize() delete active; } +void tst_QTcpSocket::increaseReadBufferSizeFromSlot() // like KIO's socketconnectionbackend +{ + QFETCH_GLOBAL(bool, setProxy); + if (setProxy) + return; //proxy not useful for localhost test case + QTcpServer server; + QTcpSocket *active = newSocket(); + connect(active, SIGNAL(readyRead()), SLOT(slotIncreaseReadBufferSizeReadyRead())); + + // connect two sockets to each other: + QVERIFY(server.listen(QHostAddress::LocalHost)); + active->connectToHost("127.0.0.1", server.serverPort()); + QVERIFY(active->waitForConnected(5000)); + QVERIFY(server.waitForNewConnection(5000)); + + QTcpSocket *passive = server.nextPendingConnection(); + QVERIFY(passive); + + // now write 512 bytes of data on one end + QByteArray data(512, 'a'); + passive->write(data); + QVERIFY2(passive->waitForBytesWritten(5000), "Network timeout"); + + // set the read buffer size to less than what was written, + // and increase it from the slot, first to 384 then to 1024. + active->setReadBufferSize(256); + enterLoop(10); + QVERIFY2(!timeout(), "Network timeout"); + QCOMPARE(active->bytesAvailable(), qint64(data.size())); + + // drain it and compare + QCOMPARE(active->readAll(), data); + + delete active; +} + +void tst_QTcpSocket::slotIncreaseReadBufferSizeReadyRead() +{ + QTcpSocket *socket = qobject_cast<QTcpSocket *>(sender()); + const int currentBufferSize = socket->readBufferSize(); + QCOMPARE(currentBufferSize, socket->bytesAvailable()); + if (currentBufferSize == 256) + socket->setReadBufferSize(384); + else if (currentBufferSize == 384) + socket->setReadBufferSize(512); + else if (currentBufferSize == 512) + exitLoopSlot(); + else // should not happen + qFatal("buffer size was %d", currentBufferSize); +} + void tst_QTcpSocket::taskQtBug5799ConnectionErrorWaitForConnected() { QFETCH_GLOBAL(bool, setProxy); @@ -2500,6 +2575,7 @@ void tst_QTcpSocket::taskQtBug7054TimeoutErrorResetting() QVERIFY(socket->error() == QAbstractSocket::RemoteHostClosedError); } +#ifndef QT_NO_NETWORKPROXY void tst_QTcpSocket::invalidProxy_data() { QTest::addColumn<int>("type"); @@ -2676,6 +2752,7 @@ void tst_QTcpSocket::proxyFactory() delete socket; } +#endif // !QT_NO_NETWORKPROXY // there is a similar test inside tst_qtcpserver that uses the event loop instead void tst_QTcpSocket::qtbug14268_peek() diff --git a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp index f08afaa9a5..f3cae6f4eb 100644 --- a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp +++ b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp @@ -162,8 +162,10 @@ void tst_QUdpSocket::initTestCase_data() QTest::addColumn<int>("proxyType"); QTest::newRow("WithoutProxy") << false << 0; +#ifndef QT_NO_SOCKS5 if (!newTestServer) QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy); +#endif #ifndef QT_NO_BEARERMANAGEMENT netConfMan = new QNetworkConfigurationManager(this); @@ -186,16 +188,22 @@ void tst_QUdpSocket::init() { QFETCH_GLOBAL(bool, setProxy); if (setProxy) { +#ifndef QT_NO_SOCKS5 QFETCH_GLOBAL(int, proxyType); if (proxyType == QNetworkProxy::Socks5Proxy) { QNetworkProxy::setApplicationProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1080)); } +#else + QSKIP("No proxy support"); +#endif // !QT_NO_SOCKS5 } } void tst_QUdpSocket::cleanup() { +#ifndef QT_NO_NETWORKPROXY QNetworkProxy::setApplicationProxy(QNetworkProxy::DefaultProxy); +#endif // !QT_NO_NETWORKPROXY } @@ -265,9 +273,13 @@ void tst_QUdpSocket::broadcasting() { QFETCH_GLOBAL(bool, setProxy); if (setProxy) { +#ifndef QT_NO_NETWORKPROXY QFETCH_GLOBAL(int, proxyType); if (proxyType == QNetworkProxy::Socks5Proxy) QSKIP("With socks5 Broadcast is not supported."); +#else // !QT_NO_NETWORKPROXY + QSKIP("No proxy support"); +#endif // QT_NO_NETWORKPROXY } #ifdef Q_OS_AIX QSKIP("Broadcast does not work on darko"); @@ -761,9 +773,13 @@ void tst_QUdpSocket::bindMode() { QFETCH_GLOBAL(bool, setProxy); if (setProxy) { +#ifndef QT_NO_NETWORKPROXY QFETCH_GLOBAL(int, proxyType); if (proxyType == QNetworkProxy::Socks5Proxy) QSKIP("With socks5 explicit port binding is not supported."); +#else // !QT_NO_NETWORKPROXY + QSKIP("No proxy support"); +#endif // QT_NO_NETWORKPROXY } QUdpSocket socket; diff --git a/tests/auto/network/socket/socket.pro b/tests/auto/network/socket/socket.pro index 6d86eab209..436ebe5c7f 100644 --- a/tests/auto/network/socket/socket.pro +++ b/tests/auto/network/socket/socket.pro @@ -14,3 +14,7 @@ SUBDIRS=\ qtcpsocket \ qhttpsocketengine \ qsocks5socketengine \ + +winrt: SUBDIRS -= \ + qhttpsocketengine \ + qsocks5socketengine \ diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp index a15daf660a..82543fbc91 100644 --- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp @@ -111,7 +111,9 @@ public slots: void initTestCase(); void init(); void cleanup(); +#ifndef QT_NO_NETWORKPROXY void proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth); +#endif #ifndef QT_NO_SSL private slots: @@ -276,6 +278,7 @@ void tst_QSslSocket::init() { QFETCH_GLOBAL(bool, setProxy); if (setProxy) { +#ifndef QT_NO_NETWORKPROXY QFETCH_GLOBAL(int, proxyType); QString fluke = QHostInfo::fromName(QtNetworkSettings::serverName()).addresses().first().toString(); QNetworkProxy proxy; @@ -302,6 +305,9 @@ void tst_QSslSocket::init() break; } QNetworkProxy::setApplicationProxy(proxy); +#else // !QT_NO_NETWORKPROXY + QSKIP("No proxy support"); +#endif // QT_NO_NETWORKPROXY } qt_qhostinfo_clear_cache(); @@ -309,7 +315,9 @@ void tst_QSslSocket::init() void tst_QSslSocket::cleanup() { +#ifndef QT_NO_NETWORKPROXY QNetworkProxy::setApplicationProxy(QNetworkProxy::DefaultProxy); +#endif } #ifndef QT_NO_SSL @@ -326,12 +334,14 @@ QSslSocketPtr tst_QSslSocket::newSocket() } #endif +#ifndef QT_NO_NETWORKPROXY void tst_QSslSocket::proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth) { ++proxyAuthCalled; auth->setUser("qsockstest"); auth->setPassword("password"); } +#endif // !QT_NO_NETWORKPROXY #ifndef QT_NO_SSL diff --git a/tests/auto/network/ssl/ssl.pro b/tests/auto/network/ssl/ssl.pro index 06f4a05241..0b8f269fac 100644 --- a/tests/auto/network/ssl/ssl.pro +++ b/tests/auto/network/ssl/ssl.pro @@ -12,3 +12,7 @@ contains(QT_CONFIG, openssl) | contains(QT_CONFIG, openssl-linked): qsslsocket_onDemandCertificates_member \ qsslsocket_onDemandCertificates_static \ } + +winrt: SUBDIRS -= \ + qsslsocket_onDemandCertificates_member \ + qsslsocket_onDemandCertificates_static \ diff --git a/tests/auto/other/d3dcompiler/d3dcompiler.pro b/tests/auto/other/d3dcompiler/d3dcompiler.pro new file mode 100644 index 0000000000..6242d0a554 --- /dev/null +++ b/tests/auto/other/d3dcompiler/d3dcompiler.pro @@ -0,0 +1,5 @@ +CONFIG += testcase +TARGET = tst_d3dcompiler +QT = core testlib + +SOURCES = tst_d3dcompiler.cpp diff --git a/tests/auto/other/d3dcompiler/tst_d3dcompiler.cpp b/tests/auto/other/d3dcompiler/tst_d3dcompiler.cpp new file mode 100644 index 0000000000..f86c965d84 --- /dev/null +++ b/tests/auto/other/d3dcompiler/tst_d3dcompiler.cpp @@ -0,0 +1,371 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// This test verifies the behavior of d3dcompiler_qt, which is only built when ANGLE is enabled + +#include <QCryptographicHash> +#include <QDir> +#include <QFuture> +#include <QObject> +#include <QStandardPaths> +#include <QTemporaryDir> +#include <QTest> +#include <QThread> + +#if defined(Q_OS_WIN) + +#include <d3dcommon.h> + +#ifndef Q_OS_WINRT +#define loadLibrary(library) LoadLibrary(library) +#else +#define loadLibrary(library) LoadPackagedLibrary(library, NULL) +#endif + +#ifdef D3DCOMPILER_DLL +#undef D3DCOMPILER_DLL +#endif + +#ifdef QT_NO_DEBUG +#define D3DCOMPILER_DLL L"d3dcompiler_qt" +#else +#define D3DCOMPILER_DLL L"d3dcompiler_qtd" +#endif + +#define getCompilerFunc(dll) reinterpret_cast<D3DCompileFunc>(GetProcAddress(dll, "D3DCompile")) + +typedef HRESULT (WINAPI *D3DCompileFunc)(const void *data, SIZE_T data_size, const char *filename, + const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint, + const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages); + +static const wchar_t *compilerDlls[] = { + L"d3dcompiler_47.dll", + L"d3dcompiler_46.dll", + L"d3dcompiler_45.dll", + L"d3dcompiler_44.dll", + L"d3dcompiler_43.dll", + 0 +}; + +static const char hlsl[] = + "uniform SamplerState Sampler : register(s0);\n" + "uniform Texture2D Texture : register(t0);\n" + "float4 main(in float4 gl_Position : SV_POSITION, in float2 coord : TEXCOORD0) : SV_TARGET0\n" + "{\n" + "return Texture.Sample(Sampler, coord);\n" + "}\n"; + +static inline QByteArray blobToByteArray(ID3DBlob *blob) +{ + return blob ? QByteArray::fromRawData(reinterpret_cast<const char *>(blob->GetBufferPointer()), blob->GetBufferSize()) : QByteArray(); +} + +class CompileRunner : public QThread +{ +public: + CompileRunner(D3DCompileFunc d3dCompile, const QByteArray &data, ID3DBlob **shader, ID3DBlob **error) + : m_d3dCompile(d3dCompile), m_data(data), m_shader(shader), m_error(error) + { + } + + HRESULT result() const + { + return m_result; + } + +private: + void run() + { + m_result = m_d3dCompile(m_data.constData(), m_data.size(), 0, 0, 0, "main", "ps_4_0", 0, 0, m_shader, m_error); + } + + HRESULT m_result; + D3DCompileFunc m_d3dCompile; + QByteArray m_data; + ID3DBlob **m_shader; + ID3DBlob **m_error; +}; + +class tst_d3dcompiler : public QObject +{ + Q_OBJECT +private slots: + void initTestCase(); + void init(); + void cleanup(); + void service_data(); + void service(); + void offlineCompile(); + void onlineCompile(); + +private: + QString blobPath(); + + HMODULE d3dcompiler_qt; + HMODULE d3dcompiler_win; + + D3DCompileFunc d3dCompile; + + QTemporaryDir tempDir; +}; + +QString tst_d3dcompiler::blobPath() +{ + QDir path; + if (qEnvironmentVariableIsSet("QT_D3DCOMPILER_DIR")) + path.setPath(qgetenv("QT_D3DCOMPILER_DIR")); + else + path.setPath(QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QStringLiteral("/d3dcompiler")); + + path.mkdir(QStringLiteral("binary")); + path.mkdir(QStringLiteral("source")); + + return path.absolutePath(); +} + +void tst_d3dcompiler::initTestCase() +{ + QVERIFY(tempDir.isValid()); +} + +void tst_d3dcompiler::init() +{ + qunsetenv("QT_D3DCOMPILER_DIR"); + qunsetenv("QT_D3DCOMPILER_TIMEOUT"); +} + +void tst_d3dcompiler::cleanup() +{ + FreeLibrary(d3dcompiler_qt); + FreeLibrary(d3dcompiler_win); + + QDir path(blobPath()); + foreach (const QString &entry, path.entryList(QStringList(), QDir::Files|QDir::NoDotAndDotDot)) + path.remove(entry); + foreach (const QString &entry, path.entryList(QStringList(), QDir::Dirs|QDir::NoDotAndDotDot)) { + QDir dir(path.absoluteFilePath(entry + QStringLiteral("/"))); + dir.removeRecursively(); + } +} + +void tst_d3dcompiler::service_data() +{ + QTest::addColumn<QByteArray>("compilerDir"); + QTest::addColumn<bool>("exists"); + QTest::addColumn<HRESULT>("result"); + + // Don't test the default case, as it would clutter the AppData directory + //QTest::newRow("default") << QByteArrayLiteral("") << true << E_ABORT; + QTest::newRow("temporary") << QFile::encodeName(tempDir.path()) << true << E_ABORT; + QTest::newRow("invalid") << QByteArrayLiteral("ZZ:\\") << false << S_OK; + QTest::newRow("empty") << QByteArrayLiteral("") << false << S_OK; +} + +void tst_d3dcompiler::service() +{ + QFETCH(QByteArray, compilerDir); + QFETCH(bool, exists); + QFETCH(HRESULT, result); + qputenv("QT_D3DCOMPILER_DIR", compilerDir); + const QDir path = blobPath(); + + if (exists) { + // Activate service + QVERIFY(path.exists()); + + QFile control(path.absoluteFilePath(QStringLiteral("control"))); + QVERIFY(control.open(QFile::WriteOnly)); + control.close(); + QVERIFY(control.exists()); + } else { + QVERIFY(!path.exists()); + } + + // Run compiler (fast fail) + d3dcompiler_qt = loadLibrary(D3DCOMPILER_DLL); + QVERIFY(d3dcompiler_qt); + d3dCompile = getCompilerFunc(d3dcompiler_qt); + QVERIFY(d3dCompile); + + qputenv("QT_D3DCOMPILER_TIMEOUT", "1"); + const QByteArray data(hlsl); + ID3DBlob *shader = 0, *errorMessage = 0; + HRESULT hr = d3dCompile(data.constData(), data.size(), 0, 0, 0, "main", "ps_4_0", 0, 0, &shader, &errorMessage); + QVERIFY2(hr == result, blobToByteArray(errorMessage)); + + // Check that passthrough works + if (hr == S_OK) { + for (int i = 0; compilerDlls[i]; ++i) { + d3dcompiler_win = loadLibrary(compilerDlls[i]); + if (d3dcompiler_win) + break; + } + QVERIFY(d3dcompiler_win); + d3dCompile = getCompilerFunc(d3dcompiler_win); + QVERIFY(d3dCompile); + + // Compile a shader to compare with + ID3DBlob *reference = 0; + HRESULT hr = d3dCompile(data.constData(), data.size(), 0, 0, 0, "main", "ps_4_0", 0, 0, &reference, &errorMessage); + QVERIFY2(SUCCEEDED(hr), blobToByteArray(errorMessage)); + + QByteArray shaderData(reinterpret_cast<const char *>(shader->GetBufferPointer()), shader->GetBufferSize()); + QByteArray referenceData(reinterpret_cast<const char *>(reference->GetBufferPointer()), reference->GetBufferSize()); + reference->Release(); + QCOMPARE(shaderData, referenceData); + } else { + QVERIFY(FAILED(hr)); + } + + if (shader) + shader->Release(); +} + +void tst_d3dcompiler::offlineCompile() +{ + qputenv("QT_D3DCOMPILER_DIR", QFile::encodeName(tempDir.path())); + + for (int i = 0; compilerDlls[i]; ++i) { + d3dcompiler_win = loadLibrary(compilerDlls[i]); + if (d3dcompiler_win) + break; + } + QVERIFY(d3dcompiler_win); + d3dCompile = getCompilerFunc(d3dcompiler_win); + QVERIFY(d3dCompile); + + // Compile a shader to place in binary directory + const QByteArray data(hlsl); + ID3DBlob *shader = 0, *errorMessage = 0; + HRESULT hr = d3dCompile(data.constData(), data.size(), 0, 0, 0, "main", "ps_4_0", 0, 0, &shader, &errorMessage); + QVERIFY2(SUCCEEDED(hr), blobToByteArray(errorMessage)); + QVERIFY(shader); + + QDir outputPath(blobPath()); + QVERIFY(outputPath.exists()); + QVERIFY(outputPath.exists(QStringLiteral("binary"))); + outputPath.cd(QStringLiteral("binary")); + QFile output(outputPath.absoluteFilePath(QCryptographicHash::hash(data, QCryptographicHash::Sha1).toHex())); + QVERIFY(output.open(QFile::WriteOnly)); + output.write(reinterpret_cast<const char *>(shader->GetBufferPointer()), shader->GetBufferSize()); + shader->Release(); + + // Run compiler + d3dcompiler_qt = loadLibrary(D3DCOMPILER_DLL); + QVERIFY(d3dcompiler_qt); + d3dCompile = getCompilerFunc(d3dcompiler_qt); + QVERIFY(d3dCompile); + + hr = d3dCompile(data.constData(), data.size(), 0, 0, 0, "main", "ps_4_0", 0, 0, &shader, &errorMessage); + // Returns S_FALSE if a cached shader was found + QVERIFY2(hr == S_FALSE, blobToByteArray(errorMessage)); +} + +void tst_d3dcompiler::onlineCompile() +{ + qputenv("QT_D3DCOMPILER_DIR", QFile::encodeName(tempDir.path())); + + QByteArray data(hlsl); + + const QDir path = blobPath(); + + // Activate service + QVERIFY(path.exists()); + QFile control(path.absoluteFilePath(QStringLiteral("control"))); + QVERIFY(control.open(QFile::WriteOnly)); + control.close(); + QVERIFY(control.exists()); + + d3dcompiler_qt = loadLibrary(D3DCOMPILER_DLL); + QVERIFY(d3dcompiler_qt); + D3DCompileFunc concurrentCompile = getCompilerFunc(d3dcompiler_qt); + QVERIFY(d3dCompile); + + // Run async + ID3DBlob *shader = 0, *errorMessage = 0; + CompileRunner runner(concurrentCompile, data, &shader, &errorMessage); + runner.start(); + + // Wait for source to appear + QVERIFY(path.exists()); + QVERIFY(path.exists(QStringLiteral("source"))); + QVERIFY(path.exists(QStringLiteral("binary"))); + + const QByteArray hash = QCryptographicHash::hash(data, QCryptographicHash::Sha1).toHex(); + QFile input(path.absoluteFilePath(QStringLiteral("source/") + hash)); + QTRY_VERIFY_WITH_TIMEOUT(input.exists(), 3000); + QTRY_VERIFY_WITH_TIMEOUT(input.isOpen() || input.open(QFile::ReadOnly), 1000); + + // Compile passed source + const QByteArray inputData = input.readAll(); + for (int i = 0; compilerDlls[i]; ++i) { + d3dcompiler_win = loadLibrary(compilerDlls[i]); + if (d3dcompiler_win) + break; + } + QVERIFY(d3dcompiler_win); + d3dCompile = getCompilerFunc(d3dcompiler_win); + QVERIFY(d3dCompile); + ID3DBlob *reference = 0, *errorMessage2 = 0; + HRESULT hr = d3dCompile(inputData.constData(), inputData.size(), 0, 0, 0, "main", "ps_4_0", 0, 0, &reference, &errorMessage2); + QVERIFY2(SUCCEEDED(hr), blobToByteArray(errorMessage2)); + const QByteArray referenceData(reinterpret_cast<const char *>(reference->GetBufferPointer()), reference->GetBufferSize()); + reference->Release(); + + // Write to output directory + QFile output(path.absoluteFilePath(QStringLiteral("binary/") + hash)); + QVERIFY(output.open(QFile::WriteOnly)); + output.write(referenceData); + output.close(); + + // All done + QVERIFY(runner.wait(3000)); + hr = runner.result(); + QVERIFY2(hr == S_FALSE, blobToByteArray(errorMessage2)); + const QByteArray resultData(reinterpret_cast<const char *>(shader->GetBufferPointer()), shader->GetBufferSize()); + shader->Release(); + QVERIFY(referenceData == resultData); +} + +QTEST_MAIN(tst_d3dcompiler) +#include "tst_d3dcompiler.moc" + +#endif // Q_OS_WIN diff --git a/tests/auto/other/other.pro b/tests/auto/other/other.pro index 63cbca539d..2bddc8d127 100644 --- a/tests/auto/other/other.pro +++ b/tests/auto/other/other.pro @@ -4,6 +4,7 @@ SUBDIRS=\ baselineexample \ collections \ compiler \ + d3dcompiler \ gestures \ headersclean \ lancelot \ @@ -57,6 +58,8 @@ cross_compile: SUBDIRS -= \ wince*|!contains(QT_CONFIG, accessibility): SUBDIRS -= qaccessibility +!angle_d3d11: SUBDIRS -= d3dcompiler + !contains(QT_CONFIG, accessibility-atspi-bridge): SUBDIRS -= qaccessibilitylinux !mac: SUBDIRS -= \ diff --git a/tests/auto/other/qvariant_common/tst_qvariant_common.h b/tests/auto/other/qvariant_common/tst_qvariant_common.h index fc3eff4b91..7a34d7b0c2 100644 --- a/tests/auto/other/qvariant_common/tst_qvariant_common.h +++ b/tests/auto/other/qvariant_common/tst_qvariant_common.h @@ -107,7 +107,7 @@ protected: currentName.chop(1); ok &= (msg.contains(", " + currentName) || msg.contains(", 0x0")); } - ok &= msg.endsWith(") "); + ok &= msg.endsWith(")"); QVERIFY2(ok, (QString::fromLatin1("Message is not correctly finished: '") + msg + '\'').toLatin1().constData()); } diff --git a/tests/auto/printsupport/dialogs/dialogs.pro b/tests/auto/printsupport/dialogs/dialogs.pro new file mode 100644 index 0000000000..419bd13ccf --- /dev/null +++ b/tests/auto/printsupport/dialogs/dialogs.pro @@ -0,0 +1,3 @@ +TEMPLATE=subdirs +SUBDIRS=\ + qabstractprintdialog \ diff --git a/tests/auto/widgets/dialogs/qabstractprintdialog/.gitignore b/tests/auto/printsupport/dialogs/qabstractprintdialog/.gitignore index a768494da5..a768494da5 100644 --- a/tests/auto/widgets/dialogs/qabstractprintdialog/.gitignore +++ b/tests/auto/printsupport/dialogs/qabstractprintdialog/.gitignore diff --git a/tests/auto/widgets/dialogs/qabstractprintdialog/qabstractprintdialog.pro b/tests/auto/printsupport/dialogs/qabstractprintdialog/qabstractprintdialog.pro index 2e9ae33592..2e9ae33592 100644 --- a/tests/auto/widgets/dialogs/qabstractprintdialog/qabstractprintdialog.pro +++ b/tests/auto/printsupport/dialogs/qabstractprintdialog/qabstractprintdialog.pro diff --git a/tests/auto/widgets/dialogs/qabstractprintdialog/tst_qabstractprintdialog.cpp b/tests/auto/printsupport/dialogs/qabstractprintdialog/tst_qabstractprintdialog.cpp index c79a4a97ef..c79a4a97ef 100644 --- a/tests/auto/widgets/dialogs/qabstractprintdialog/tst_qabstractprintdialog.cpp +++ b/tests/auto/printsupport/dialogs/qabstractprintdialog/tst_qabstractprintdialog.cpp diff --git a/tests/auto/printsupport/printsupport.pro b/tests/auto/printsupport/printsupport.pro index 69ba296738..062f46980a 100644 --- a/tests/auto/printsupport/printsupport.pro +++ b/tests/auto/printsupport/printsupport.pro @@ -1,3 +1,4 @@ TEMPLATE=subdirs SUBDIRS=\ + dialogs \ kernel \ diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h index f87493205f..59a16bc569 100644 --- a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h +++ b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h @@ -55,11 +55,14 @@ #include <QtSql/private/qsqldriver_p.h> #include <QtTest/QtTest> -#if defined (Q_OS_WIN) || defined (Q_OS_WIN32) +#if defined(Q_OS_WIN) # include <qt_windows.h> -# if defined (Q_OS_WINCE) +# if defined(Q_OS_WINCE) || defined(Q_OS_WINRT) # include <winsock2.h> # endif +# if defined(Q_OS_WINRT) && !defined(Q_OS_WINPHONE) +static inline int gethostname(char *name, int len) { qstrcpy(name, "localhost"); return 9; } +# endif #else #include <unistd.h> #endif @@ -512,8 +515,8 @@ public: static QByteArray printError( const QSqlError& err ) { QString result; - if(err.number() > 0) - result += '(' + QString::number(err.number()) + ") "; + if (!err.nativeErrorCode().isEmpty()) + result += '(' + err.nativeErrorCode() + ") "; result += '\''; if(!err.driverText().isEmpty()) result += err.driverText() + "' || '"; @@ -524,8 +527,8 @@ public: static QByteArray printError( const QSqlError& err, const QSqlDatabase& db ) { QString result(dbToString(db) + ": "); - if(err.number() > 0) - result += '(' + QString::number(err.number()) + ") "; + if (!err.nativeErrorCode().isEmpty()) + result += '(' + err.nativeErrorCode() + ") "; result += '\''; if(!err.driverText().isEmpty()) result += err.driverText() + "' || '"; diff --git a/tests/auto/sql/kernel/qsqlerror/tst_qsqlerror.cpp b/tests/auto/sql/kernel/qsqlerror/tst_qsqlerror.cpp index bee4441c0f..9763e3e7e6 100644 --- a/tests/auto/sql/kernel/qsqlerror/tst_qsqlerror.cpp +++ b/tests/auto/sql/kernel/qsqlerror/tst_qsqlerror.cpp @@ -120,6 +120,24 @@ void tst_QSqlError::construction() QSqlError obj4; QVERIFY(!obj4.isValid()); + + QSqlError obj5(QStringLiteral("drivertext"), QStringLiteral("databasetext"), + QSqlError::UnknownError, QStringLiteral("123")); + QCOMPARE(obj5.driverText(), QString("drivertext")); + QCOMPARE(obj5.databaseText(), QString("databasetext")); + QCOMPARE(obj5.type(), QSqlError::UnknownError); + QCOMPARE(obj5.number(), 123); + QCOMPARE(obj5.nativeErrorCode(), QStringLiteral("123")); + QVERIFY(obj5.isValid()); + + QSqlError obj6(QStringLiteral("drivertext"), QStringLiteral("databasetext"), + QSqlError::UnknownError, QStringLiteral("Err123")); + QCOMPARE(obj6.driverText(), QString("drivertext")); + QCOMPARE(obj6.databaseText(), QString("databasetext")); + QCOMPARE(obj6.type(), QSqlError::UnknownError); + QCOMPARE(obj6.number(), 0); + QCOMPARE(obj6.nativeErrorCode(), QStringLiteral("Err123")); + QVERIFY(obj6.isValid()); } void tst_QSqlError::operators() diff --git a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp index 1a100ce706..b74e02bcc4 100644 --- a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp +++ b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp @@ -1384,7 +1384,9 @@ void tst_QSqlQuery::isNull() QVERIFY_SQL(q, exec("select id, t_varchar from " + qTableName("qtest_null", __FILE__, db) + " order by id")); QVERIFY( q.next() ); QVERIFY( !q.isNull( 0 ) ); + QVERIFY(!q.isNull("id")); QVERIFY( q.isNull( 1 ) ); + QVERIFY(q.isNull("t_varchar")); QCOMPARE( q.value( 0 ).toInt(), 0 ); QCOMPARE( q.value( 1 ).toString(), QString() ); QVERIFY( !q.value( 0 ).isNull() ); @@ -1392,7 +1394,13 @@ void tst_QSqlQuery::isNull() QVERIFY( q.next() ); QVERIFY( !q.isNull( 0 ) ); + QVERIFY(!q.isNull("id")); QVERIFY( !q.isNull( 1 ) ); + QVERIFY(!q.isNull("t_varchar")); + + // For a non existent field, it should be returning true. + QVERIFY(q.isNull(2)); + QVERIFY(q.isNull("unknown")); } /*! TDS specific BIT field test */ diff --git a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp index 067c2a9f4f..3b73d87876 100644 --- a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp +++ b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp @@ -57,7 +57,7 @@ private slots: void tst_Crashes::crash() { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) //we avoid the error dialogbox to appear on windows SetErrorMode( SEM_NOGPFAULTERRORBOX | SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); #endif diff --git a/tests/auto/testlib/selftests/expected_badxml.lightxml b/tests/auto/testlib/selftests/expected_badxml.lightxml index 08ba497efa..222c396059 100644 --- a/tests/auto/testlib/selftests/expected_badxml.lightxml +++ b/tests/auto/testlib/selftests/expected_badxml.lightxml @@ -10,7 +10,7 @@ <DataTag><![CDATA[fail end cdata ]]]><![CDATA[]> text ]]]><![CDATA[]> more text]]></DataTag> <Description><![CDATA[a message]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp" line="111"> +<Incident type="fail" file="tst_badxml.cpp" line="111"> <DataTag><![CDATA[fail end cdata ]]]><![CDATA[]> text ]]]><![CDATA[]> more text]]></DataTag> <Description><![CDATA[a failure]]></Description> </Incident> @@ -26,7 +26,7 @@ <DataTag><![CDATA[fail quotes " text" more text]]></DataTag> <Description><![CDATA[a message]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp" line="111"> +<Incident type="fail" file="tst_badxml.cpp" line="111"> <DataTag><![CDATA[fail quotes " text" more text]]></DataTag> <Description><![CDATA[a failure]]></Description> </Incident> @@ -42,7 +42,7 @@ <DataTag><![CDATA[fail xml close > open < tags < text]]></DataTag> <Description><![CDATA[a message]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp" line="111"> +<Incident type="fail" file="tst_badxml.cpp" line="111"> <DataTag><![CDATA[fail xml close > open < tags < text]]></DataTag> <Description><![CDATA[a failure]]></Description> </Incident> @@ -58,7 +58,7 @@ <DataTag><![CDATA[fail all > " mixed ]]]><![CDATA[]> up > " in < the ]]]><![CDATA[]> hopes < of triggering "< ]]]><![CDATA[]> bugs]]></DataTag> <Description><![CDATA[a message]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp" line="111"> +<Incident type="fail" file="tst_badxml.cpp" line="111"> <DataTag><![CDATA[fail all > " mixed ]]]><![CDATA[]> up > " in < the ]]]><![CDATA[]> hopes < of triggering "< ]]]><![CDATA[]> bugs]]></DataTag> <Description><![CDATA[a failure]]></Description> </Incident> diff --git a/tests/auto/testlib/selftests/expected_badxml.txt b/tests/auto/testlib/selftests/expected_badxml.txt index 0458401b44..3c65231529 100644 --- a/tests/auto/testlib/selftests/expected_badxml.txt +++ b/tests/auto/testlib/selftests/expected_badxml.txt @@ -3,28 +3,28 @@ Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HER PASS : tst_BadXml::initTestCase() QDEBUG : tst_BadXml::badDataTag(fail end cdata ]]> text ]]> more text) a message FAIL! : tst_BadXml::badDataTag(fail end cdata ]]> text ]]> more text) a failure - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp(111)] + Loc: [tst_badxml.cpp(111)] QDEBUG : tst_BadXml::badDataTag(pass end cdata ]]> text ]]> more text) a message PASS : tst_BadXml::badDataTag(pass end cdata ]]> text ]]> more text) RESULT : tst_BadXml::badDataTag():"pass end cdata ]]> text ]]> more text": 0 events per iteration (total: 0, iterations: 1) QDEBUG : tst_BadXml::badDataTag(fail quotes " text" more text) a message FAIL! : tst_BadXml::badDataTag(fail quotes " text" more text) a failure - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp(111)] + Loc: [tst_badxml.cpp(111)] QDEBUG : tst_BadXml::badDataTag(pass quotes " text" more text) a message PASS : tst_BadXml::badDataTag(pass quotes " text" more text) RESULT : tst_BadXml::badDataTag():"pass quotes " text" more text": 0 events per iteration (total: 0, iterations: 1) QDEBUG : tst_BadXml::badDataTag(fail xml close > open < tags < text) a message FAIL! : tst_BadXml::badDataTag(fail xml close > open < tags < text) a failure - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp(111)] + Loc: [tst_badxml.cpp(111)] QDEBUG : tst_BadXml::badDataTag(pass xml close > open < tags < text) a message PASS : tst_BadXml::badDataTag(pass xml close > open < tags < text) RESULT : tst_BadXml::badDataTag():"pass xml close > open < tags < text": 0 events per iteration (total: 0, iterations: 1) QDEBUG : tst_BadXml::badDataTag(fail all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs) a message FAIL! : tst_BadXml::badDataTag(fail all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs) a failure - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp(111)] + Loc: [tst_badxml.cpp(111)] QDEBUG : tst_BadXml::badDataTag(pass all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs) a message PASS : tst_BadXml::badDataTag(pass all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs) RESULT : tst_BadXml::badDataTag():"pass all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs": diff --git a/tests/auto/testlib/selftests/expected_badxml.xml b/tests/auto/testlib/selftests/expected_badxml.xml index 97e917602e..4b180dbd01 100644 --- a/tests/auto/testlib/selftests/expected_badxml.xml +++ b/tests/auto/testlib/selftests/expected_badxml.xml @@ -12,7 +12,7 @@ <DataTag><![CDATA[fail end cdata ]]]><![CDATA[]> text ]]]><![CDATA[]> more text]]></DataTag> <Description><![CDATA[a message]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp" line="111"> +<Incident type="fail" file="tst_badxml.cpp" line="111"> <DataTag><![CDATA[fail end cdata ]]]><![CDATA[]> text ]]]><![CDATA[]> more text]]></DataTag> <Description><![CDATA[a failure]]></Description> </Incident> @@ -28,7 +28,7 @@ <DataTag><![CDATA[fail quotes " text" more text]]></DataTag> <Description><![CDATA[a message]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp" line="111"> +<Incident type="fail" file="tst_badxml.cpp" line="111"> <DataTag><![CDATA[fail quotes " text" more text]]></DataTag> <Description><![CDATA[a failure]]></Description> </Incident> @@ -44,7 +44,7 @@ <DataTag><![CDATA[fail xml close > open < tags < text]]></DataTag> <Description><![CDATA[a message]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp" line="111"> +<Incident type="fail" file="tst_badxml.cpp" line="111"> <DataTag><![CDATA[fail xml close > open < tags < text]]></DataTag> <Description><![CDATA[a failure]]></Description> </Incident> @@ -60,7 +60,7 @@ <DataTag><![CDATA[fail all > " mixed ]]]><![CDATA[]> up > " in < the ]]]><![CDATA[]> hopes < of triggering "< ]]]><![CDATA[]> bugs]]></DataTag> <Description><![CDATA[a message]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp" line="111"> +<Incident type="fail" file="tst_badxml.cpp" line="111"> <DataTag><![CDATA[fail all > " mixed ]]]><![CDATA[]> up > " in < the ]]]><![CDATA[]> hopes < of triggering "< ]]]><![CDATA[]> bugs]]></DataTag> <Description><![CDATA[a failure]]></Description> </Incident> diff --git a/tests/auto/testlib/selftests/expected_benchlibcounting.lightxml b/tests/auto/testlib/selftests/expected_benchlibcounting.lightxml index 5c436a53e0..f9e5924eef 100644 --- a/tests/auto/testlib/selftests/expected_benchlibcounting.lightxml +++ b/tests/auto/testlib/selftests/expected_benchlibcounting.lightxml @@ -10,12 +10,12 @@ <BenchmarkResult metric="Events" tag="" value="0" iterations="1" /> </TestFunction> <TestFunction name="skippingBenchmark"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp" line="64"> +<Message type="skip" file="tst_benchlibcounting.cpp" line="64"> <Description><![CDATA[This is a skipping benchmark]]></Description> </Message> </TestFunction> <TestFunction name="failingBenchmark"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp" line="71"> +<Incident type="fail" file="tst_benchlibcounting.cpp" line="71"> <Description><![CDATA[This is a failing benchmark]]></Description> </Incident> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_benchlibcounting.txt b/tests/auto/testlib/selftests/expected_benchlibcounting.txt index 23dd19d2cd..8be8206afc 100644 --- a/tests/auto/testlib/selftests/expected_benchlibcounting.txt +++ b/tests/auto/testlib/selftests/expected_benchlibcounting.txt @@ -5,9 +5,9 @@ PASS : tst_BenchlibCounting::passingBenchmark() RESULT : tst_BenchlibCounting::passingBenchmark(): 0 events per iteration (total: 0, iterations: 1) SKIP : tst_BenchlibCounting::skippingBenchmark() This is a skipping benchmark - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp(64)] + Loc: [tst_benchlibcounting.cpp(64)] FAIL! : tst_BenchlibCounting::failingBenchmark() This is a failing benchmark - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp(71)] + Loc: [tst_benchlibcounting.cpp(71)] PASS : tst_BenchlibCounting::cleanupTestCase() Totals: 3 passed, 1 failed, 1 skipped ********* Finished testing of tst_BenchlibCounting ********* diff --git a/tests/auto/testlib/selftests/expected_benchlibcounting.xml b/tests/auto/testlib/selftests/expected_benchlibcounting.xml index 1e0f4531e2..f3e674e7a3 100644 --- a/tests/auto/testlib/selftests/expected_benchlibcounting.xml +++ b/tests/auto/testlib/selftests/expected_benchlibcounting.xml @@ -12,12 +12,12 @@ <BenchmarkResult metric="Events" tag="" value="0" iterations="1" /> </TestFunction> <TestFunction name="skippingBenchmark"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp" line="64"> +<Message type="skip" file="tst_benchlibcounting.cpp" line="64"> <Description><![CDATA[This is a skipping benchmark]]></Description> </Message> </TestFunction> <TestFunction name="failingBenchmark"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp" line="71"> +<Incident type="fail" file="tst_benchlibcounting.cpp" line="71"> <Description><![CDATA[This is a failing benchmark]]></Description> </Incident> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_benchlibtickcounter.lightxml b/tests/auto/testlib/selftests/expected_benchlibtickcounter.lightxml index 845fd9c161..665ba58689 100644 --- a/tests/auto/testlib/selftests/expected_benchlibtickcounter.lightxml +++ b/tests/auto/testlib/selftests/expected_benchlibtickcounter.lightxml @@ -6,9 +6,8 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="threeBillionTicks"> -<Incident type="pass" file="" line="0"> -<BenchmarkResult metric="walltime" tag="" value="1059" iterations="1" /> -</Incident> +<Incident type="pass" file="" line="0" /> +<BenchmarkResult metric="CPUTicks" tag="" value="3.00001e+09" iterations="1" /> </TestFunction> <TestFunction name="cleanupTestCase"> <Incident type="pass" file="" line="0" /> diff --git a/tests/auto/testlib/selftests/expected_benchlibtickcounter.txt b/tests/auto/testlib/selftests/expected_benchlibtickcounter.txt index 9519e1d340..ee2f0f28c4 100644 --- a/tests/auto/testlib/selftests/expected_benchlibtickcounter.txt +++ b/tests/auto/testlib/selftests/expected_benchlibtickcounter.txt @@ -1,9 +1,9 @@ ********* Start testing of tst_BenchlibTickCounter ********* Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibTickCounter::initTestCase() -RESULT : tst_BenchlibTickCounter::threeBillionTicks(): - 3,000,000,000 ticks per iteration (total: 3000000000, iterations: 1) PASS : tst_BenchlibTickCounter::threeBillionTicks() +RESULT : tst_BenchlibTickCounter::threeBillionTicks(): + 3,000,005,772 CPU ticks per iteration (total: 3,000,005,772, iterations: 1) PASS : tst_BenchlibTickCounter::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_BenchlibTickCounter ********* diff --git a/tests/auto/testlib/selftests/expected_benchlibtickcounter.xml b/tests/auto/testlib/selftests/expected_benchlibtickcounter.xml index 8c9d823485..695b8f2134 100644 --- a/tests/auto/testlib/selftests/expected_benchlibtickcounter.xml +++ b/tests/auto/testlib/selftests/expected_benchlibtickcounter.xml @@ -8,8 +8,8 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="threeBillionTicks"> -<BenchmarkResult metric="walltime" tag="" value="1059" iterations="1" /> <Incident type="pass" file="" line="0" /> +<BenchmarkResult metric="CPUTicks" tag="" value="3.00002e+09" iterations="1" /> </TestFunction> <TestFunction name="cleanupTestCase"> <Incident type="pass" file="" line="0" /> diff --git a/tests/auto/testlib/selftests/expected_benchlibwalltime.lightxml b/tests/auto/testlib/selftests/expected_benchlibwalltime.lightxml index f1d89328ef..f9311e943e 100644 --- a/tests/auto/testlib/selftests/expected_benchlibwalltime.lightxml +++ b/tests/auto/testlib/selftests/expected_benchlibwalltime.lightxml @@ -3,22 +3,19 @@ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> -<ncident type="pass" file="" line="0" /> +<Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="waitForOneThousand"> -<Incident type="pass" file="" line="0"> -<BenchmarkResult metric="walltime" tag="" value="1004" iterations="1" /> -</Incident> +<Incident type="pass" file="" line="0" /> +<BenchmarkResult metric="WalltimeMilliseconds" tag="" value="1004" iterations="1" /> </TestFunction> <TestFunction name="waitForFourThousand"> -<Incident type="pass" file="" line="0"> -<BenchmarkResult metric="walltime" tag="" value="4007" iterations="1" /> -</Incident> +<Incident type="pass" file="" line="0" /> +<BenchmarkResult metric="WalltimeMilliseconds" tag="" value="4004" iterations="1" /> </TestFunction> <TestFunction name="qbenchmark_once"> -<Incident type="pass" file="" line="0"> -<BenchmarkResult metric="walltime" tag="" value="0" iterations="1" /> -</Incident> +<Incident type="pass" file="" line="0" /> +<BenchmarkResult metric="WalltimeMilliseconds" tag="" value="0" iterations="1" /> </TestFunction> <TestFunction name="cleanupTestCase"> <Incident type="pass" file="" line="0" /> diff --git a/tests/auto/testlib/selftests/expected_benchlibwalltime.txt b/tests/auto/testlib/selftests/expected_benchlibwalltime.txt index b0e78ae78d..f1e353703b 100644 --- a/tests/auto/testlib/selftests/expected_benchlibwalltime.txt +++ b/tests/auto/testlib/selftests/expected_benchlibwalltime.txt @@ -1,15 +1,15 @@ ********* Start testing of tst_BenchlibWalltime ********* Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibWalltime::initTestCase() -RESULT : tst_BenchlibWalltime::waitForOneThousand(): - 1,000 msec per iteration (total: 1000, iterations: 1) PASS : tst_BenchlibWalltime::waitForOneThousand() -RESULT : tst_BenchlibWalltime::waitForFourThousand(): - 4,000 msec per iteration (total: 4000, iterations: 1) +RESULT : tst_BenchlibWalltime::waitForOneThousand(): + 1,006 msecs per iteration (total: 1,006, iterations: 1) PASS : tst_BenchlibWalltime::waitForFourThousand() -RESULT : tst_BenchlibWalltime::qbenchmark_once(): - 0 msec per iteration (total: 0, iterations: 1) +RESULT : tst_BenchlibWalltime::waitForFourThousand(): + 4,008 msecs per iteration (total: 4,008, iterations: 1) PASS : tst_BenchlibWalltime::qbenchmark_once() +RESULT : tst_BenchlibWalltime::qbenchmark_once(): + 0 msecs per iteration (total: 0, iterations: 1) PASS : tst_BenchlibWalltime::cleanupTestCase() Totals: 5 passed, 0 failed, 0 skipped ********* Finished testing of tst_BenchlibWalltime ********* diff --git a/tests/auto/testlib/selftests/expected_benchlibwalltime.xml b/tests/auto/testlib/selftests/expected_benchlibwalltime.xml index 69d025b9cf..41b39eb925 100644 --- a/tests/auto/testlib/selftests/expected_benchlibwalltime.xml +++ b/tests/auto/testlib/selftests/expected_benchlibwalltime.xml @@ -8,16 +8,16 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="waitForOneThousand"> -<BenchmarkResult metric="walltime" tag="" value="1005" iterations="1" /> <Incident type="pass" file="" line="0" /> +<BenchmarkResult metric="WalltimeMilliseconds" tag="" value="1008" iterations="1" /> </TestFunction> <TestFunction name="waitForFourThousand"> -<BenchmarkResult metric="walltime" tag="" value="4008" iterations="1" /> <Incident type="pass" file="" line="0" /> +<BenchmarkResult metric="WalltimeMilliseconds" tag="" value="4002" iterations="1" /> </TestFunction> <TestFunction name="qbenchmark_once"> -<BenchmarkResult metric="walltime" tag="" value="0" iterations="1" /> <Incident type="pass" file="" line="0" /> +<BenchmarkResult metric="WalltimeMilliseconds" tag="" value="0" iterations="1" /> </TestFunction> <TestFunction name="cleanupTestCase"> <Incident type="pass" file="" line="0" /> diff --git a/tests/auto/testlib/selftests/expected_cmptest.lightxml b/tests/auto/testlib/selftests/expected_cmptest.lightxml index 99e2e825c0..aebff4de61 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.lightxml +++ b/tests/auto/testlib/selftests/expected_cmptest.lightxml @@ -12,7 +12,7 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="compare_tostring"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="214"> +<Incident type="fail" file="tst_cmptest.cpp" line="219"> <DataTag><![CDATA[int, string]]></DataTag> <Description><![CDATA[Compared values are not the same Actual (actual) : QVariant(int,123) @@ -21,19 +21,19 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[both invalid]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="214"> +<Incident type="fail" file="tst_cmptest.cpp" line="219"> <DataTag><![CDATA[null hash, invalid]]></DataTag> <Description><![CDATA[Compared values are not the same Actual (actual) : QVariant(QVariantHash) Expected (expected): QVariant()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="214"> +<Incident type="fail" file="tst_cmptest.cpp" line="219"> <DataTag><![CDATA[string, null user type]]></DataTag> <Description><![CDATA[Compared values are not the same Actual (actual) : QVariant(QString,A simple string) Expected (expected): QVariant(PhonyClass)]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="214"> +<Incident type="fail" file="tst_cmptest.cpp" line="219"> <DataTag><![CDATA[both non-null user type]]></DataTag> <Description><![CDATA[Compared values are not the same Actual (actual) : QVariant(PhonyClass,<value not representable as string>) @@ -47,31 +47,31 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[equal lists]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308"> +<Incident type="fail" file="tst_cmptest.cpp" line="313"> <DataTag><![CDATA[last item different]]></DataTag> <Description><![CDATA[Compared lists differ at index 2. Actual (opA): 'string3' Expected (opB): 'DIFFERS']]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308"> +<Incident type="fail" file="tst_cmptest.cpp" line="313"> <DataTag><![CDATA[second-last item different]]></DataTag> <Description><![CDATA[Compared lists differ at index 2. Actual (opA): 'string3' Expected (opB): 'DIFFERS']]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308"> +<Incident type="fail" file="tst_cmptest.cpp" line="313"> <DataTag><![CDATA[prefix]]></DataTag> <Description><![CDATA[Compared lists have different sizes. Actual (opA) size: '2' Expected (opB) size: '1']]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308"> +<Incident type="fail" file="tst_cmptest.cpp" line="313"> <DataTag><![CDATA[short list second]]></DataTag> <Description><![CDATA[Compared lists have different sizes. Actual (opA) size: '12' Expected (opB) size: '1']]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308"> +<Incident type="fail" file="tst_cmptest.cpp" line="313"> <DataTag><![CDATA[short list first]]></DataTag> <Description><![CDATA[Compared lists have different sizes. Actual (opA) size: '1' @@ -79,14 +79,14 @@ </Incident> </TestFunction> <TestFunction name="compareQListInt"> -<Incident type="fail" file="tst_cmptest.cpp" line="316"> +<Incident type="fail" file="tst_cmptest.cpp" line="320"> <Description><![CDATA[Compared lists differ at index 2. Actual (int1): '3' Expected (int2): '4']]></Description> </Incident> </TestFunction> <TestFunction name="compareQListDouble"> -<Incident type="fail" file="tst_cmptest.cpp" line="323"> +<Incident type="fail" file="tst_cmptest.cpp" line="327"> <Description><![CDATA[Compared lists differ at index 0. Actual (double1): '1.5' Expected (double2): '1']]></Description> @@ -96,13 +96,13 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[both null]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="333"> +<Incident type="fail" file="tst_cmptest.cpp" line="353"> <DataTag><![CDATA[one null]]></DataTag> <Description><![CDATA[Compared QPixmaps differ. Actual (opA).isNull(): 1 Expected (opB).isNull(): 0]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="333"> +<Incident type="fail" file="tst_cmptest.cpp" line="353"> <DataTag><![CDATA[other null]]></DataTag> <Description><![CDATA[Compared QPixmaps differ. Actual (opA).isNull(): 0 @@ -111,13 +111,13 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[equal]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="333"> +<Incident type="fail" file="tst_cmptest.cpp" line="353"> <DataTag><![CDATA[different size]]></DataTag> <Description><![CDATA[Compared QPixmaps differ in size. Actual (opA): 11x20 Expected (opB): 20x20]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="333"> +<Incident type="fail" file="tst_cmptest.cpp" line="353"> <DataTag><![CDATA[different pixels]]></DataTag> <Description><![CDATA[Compared values are not the same]]></Description> </Incident> @@ -126,13 +126,13 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[both null]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360"> +<Incident type="fail" file="tst_cmptest.cpp" line="380"> <DataTag><![CDATA[one null]]></DataTag> <Description><![CDATA[Compared QImages differ. Actual (opA).isNull(): 1 Expected (opB).isNull(): 0]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360"> +<Incident type="fail" file="tst_cmptest.cpp" line="380"> <DataTag><![CDATA[other null]]></DataTag> <Description><![CDATA[Compared QImages differ. Actual (opA).isNull(): 0 @@ -141,19 +141,19 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[equal]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360"> +<Incident type="fail" file="tst_cmptest.cpp" line="380"> <DataTag><![CDATA[different size]]></DataTag> <Description><![CDATA[Compared QImages differ in size. Actual (opA): 11x20 Expected (opB): 20x20]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360"> +<Incident type="fail" file="tst_cmptest.cpp" line="380"> <DataTag><![CDATA[different format]]></DataTag> <Description><![CDATA[Compared QImages differ in format. Actual (opA): 6 Expected (opB): 3]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360"> +<Incident type="fail" file="tst_cmptest.cpp" line="380"> <DataTag><![CDATA[different pixels]]></DataTag> <Description><![CDATA[Compared values are not the same]]></Description> </Incident> diff --git a/tests/auto/testlib/selftests/expected_cmptest.txt b/tests/auto/testlib/selftests/expected_cmptest.txt index 504507f032..b3d34d49de 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.txt +++ b/tests/auto/testlib/selftests/expected_cmptest.txt @@ -6,86 +6,86 @@ PASS : tst_Cmptest::compare_pointerfuncs() FAIL! : tst_Cmptest::compare_tostring(int, string) Compared values are not the same Actual (actual) : QVariant(int,123) Expected (expected): QVariant(QString,hi) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(214)] + Loc: [tst_cmptest.cpp(219)] PASS : tst_Cmptest::compare_tostring(both invalid) FAIL! : tst_Cmptest::compare_tostring(null hash, invalid) Compared values are not the same Actual (actual) : QVariant(QVariantHash) Expected (expected): QVariant() - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(214)] + Loc: [tst_cmptest.cpp(219)] FAIL! : tst_Cmptest::compare_tostring(string, null user type) Compared values are not the same Actual (actual) : QVariant(QString,A simple string) Expected (expected): QVariant(PhonyClass) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(214)] + Loc: [tst_cmptest.cpp(219)] FAIL! : tst_Cmptest::compare_tostring(both non-null user type) Compared values are not the same Actual (actual) : QVariant(PhonyClass,<value not representable as string>) Expected (expected): QVariant(PhonyClass,<value not representable as string>) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(214)] + Loc: [tst_cmptest.cpp(219)] PASS : tst_Cmptest::compareQStringLists(empty lists) PASS : tst_Cmptest::compareQStringLists(equal lists) FAIL! : tst_Cmptest::compareQStringLists(last item different) Compared lists differ at index 2. Actual (opA): 'string3' Expected (opB): 'DIFFERS' - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(308)] + Loc: [tst_cmptest.cpp(313)] FAIL! : tst_Cmptest::compareQStringLists(second-last item different) Compared lists differ at index 2. Actual (opA): 'string3' Expected (opB): 'DIFFERS' - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(308)] + Loc: [tst_cmptest.cpp(313)] FAIL! : tst_Cmptest::compareQStringLists(prefix) Compared lists have different sizes. Actual (opA) size: '2' Expected (opB) size: '1' - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(308)] + Loc: [tst_cmptest.cpp(313)] FAIL! : tst_Cmptest::compareQStringLists(short list second) Compared lists have different sizes. Actual (opA) size: '12' Expected (opB) size: '1' - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(308)] + Loc: [tst_cmptest.cpp(313)] FAIL! : tst_Cmptest::compareQStringLists(short list first) Compared lists have different sizes. Actual (opA) size: '1' Expected (opB) size: '12' - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(308)] + Loc: [tst_cmptest.cpp(313)] FAIL! : tst_Cmptest::compareQListInt() Compared lists differ at index 2. Actual (int1): '3' Expected (int2): '4' - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(316)] + Loc: [tst_cmptest.cpp(320)] FAIL! : tst_Cmptest::compareQListDouble() Compared lists differ at index 0. Actual (double1): '1.5' Expected (double2): '1' - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(323)] + Loc: [tst_cmptest.cpp(327)] PASS : tst_Cmptest::compareQPixmaps(both null) FAIL! : tst_Cmptest::compareQPixmaps(one null) Compared QPixmaps differ. Actual (opA).isNull(): 1 Expected (opB).isNull(): 0 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(333)] + Loc: [tst_cmptest.cpp(353)] FAIL! : tst_Cmptest::compareQPixmaps(other null) Compared QPixmaps differ. Actual (opA).isNull(): 0 Expected (opB).isNull(): 1 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(333)] + Loc: [tst_cmptest.cpp(353)] PASS : tst_Cmptest::compareQPixmaps(equal) FAIL! : tst_Cmptest::compareQPixmaps(different size) Compared QPixmaps differ in size. Actual (opA): 11x20 Expected (opB): 20x20 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(333)] + Loc: [tst_cmptest.cpp(353)] FAIL! : tst_Cmptest::compareQPixmaps(different pixels) Compared values are not the same - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(333)] + Loc: [tst_cmptest.cpp(353)] PASS : tst_Cmptest::compareQImages(both null) FAIL! : tst_Cmptest::compareQImages(one null) Compared QImages differ. Actual (opA).isNull(): 1 Expected (opB).isNull(): 0 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(360)] + Loc: [tst_cmptest.cpp(380)] FAIL! : tst_Cmptest::compareQImages(other null) Compared QImages differ. Actual (opA).isNull(): 0 Expected (opB).isNull(): 1 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(360)] + Loc: [tst_cmptest.cpp(380)] PASS : tst_Cmptest::compareQImages(equal) FAIL! : tst_Cmptest::compareQImages(different size) Compared QImages differ in size. Actual (opA): 11x20 Expected (opB): 20x20 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(360)] + Loc: [tst_cmptest.cpp(380)] FAIL! : tst_Cmptest::compareQImages(different format) Compared QImages differ in format. Actual (opA): 6 Expected (opB): 3 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(360)] + Loc: [tst_cmptest.cpp(380)] FAIL! : tst_Cmptest::compareQImages(different pixels) Compared values are not the same - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(360)] + Loc: [tst_cmptest.cpp(380)] PASS : tst_Cmptest::cleanupTestCase() Totals: 11 passed, 20 failed, 0 skipped ********* Finished testing of tst_Cmptest ********* diff --git a/tests/auto/testlib/selftests/expected_cmptest.xml b/tests/auto/testlib/selftests/expected_cmptest.xml index df35058acc..8a9f64d877 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.xml +++ b/tests/auto/testlib/selftests/expected_cmptest.xml @@ -14,7 +14,7 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="compare_tostring"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="214"> +<Incident type="fail" file="tst_cmptest.cpp" line="219"> <DataTag><![CDATA[int, string]]></DataTag> <Description><![CDATA[Compared values are not the same Actual (actual) : QVariant(int,123) @@ -23,19 +23,19 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[both invalid]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="214"> +<Incident type="fail" file="tst_cmptest.cpp" line="219"> <DataTag><![CDATA[null hash, invalid]]></DataTag> <Description><![CDATA[Compared values are not the same Actual (actual) : QVariant(QVariantHash) Expected (expected): QVariant()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="214"> +<Incident type="fail" file="tst_cmptest.cpp" line="219"> <DataTag><![CDATA[string, null user type]]></DataTag> <Description><![CDATA[Compared values are not the same Actual (actual) : QVariant(QString,A simple string) Expected (expected): QVariant(PhonyClass)]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="214"> +<Incident type="fail" file="tst_cmptest.cpp" line="219"> <DataTag><![CDATA[both non-null user type]]></DataTag> <Description><![CDATA[Compared values are not the same Actual (actual) : QVariant(PhonyClass,<value not representable as string>) @@ -49,31 +49,31 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[equal lists]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308"> +<Incident type="fail" file="tst_cmptest.cpp" line="313"> <DataTag><![CDATA[last item different]]></DataTag> <Description><![CDATA[Compared lists differ at index 2. Actual (opA): 'string3' Expected (opB): 'DIFFERS']]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308"> +<Incident type="fail" file="tst_cmptest.cpp" line="313"> <DataTag><![CDATA[second-last item different]]></DataTag> <Description><![CDATA[Compared lists differ at index 2. Actual (opA): 'string3' Expected (opB): 'DIFFERS']]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308"> +<Incident type="fail" file="tst_cmptest.cpp" line="313"> <DataTag><![CDATA[prefix]]></DataTag> <Description><![CDATA[Compared lists have different sizes. Actual (opA) size: '2' Expected (opB) size: '1']]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308"> +<Incident type="fail" file="tst_cmptest.cpp" line="313"> <DataTag><![CDATA[short list second]]></DataTag> <Description><![CDATA[Compared lists have different sizes. Actual (opA) size: '12' Expected (opB) size: '1']]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308"> +<Incident type="fail" file="tst_cmptest.cpp" line="313"> <DataTag><![CDATA[short list first]]></DataTag> <Description><![CDATA[Compared lists have different sizes. Actual (opA) size: '1' @@ -81,14 +81,14 @@ </Incident> </TestFunction> <TestFunction name="compareQListInt"> -<Incident type="fail" file="tst_cmptest.cpp" line="316"> +<Incident type="fail" file="tst_cmptest.cpp" line="320"> <Description><![CDATA[Compared lists differ at index 2. Actual (int1): '3' Expected (int2): '4']]></Description> </Incident> </TestFunction> <TestFunction name="compareQListDouble"> -<Incident type="fail" file="tst_cmptest.cpp" line="323"> +<Incident type="fail" file="tst_cmptest.cpp" line="327"> <Description><![CDATA[Compared lists differ at index 0. Actual (double1): '1.5' Expected (double2): '1']]></Description> @@ -98,13 +98,13 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[both null]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="333"> +<Incident type="fail" file="tst_cmptest.cpp" line="353"> <DataTag><![CDATA[one null]]></DataTag> <Description><![CDATA[Compared QPixmaps differ. Actual (opA).isNull(): 1 Expected (opB).isNull(): 0]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="333"> +<Incident type="fail" file="tst_cmptest.cpp" line="353"> <DataTag><![CDATA[other null]]></DataTag> <Description><![CDATA[Compared QPixmaps differ. Actual (opA).isNull(): 0 @@ -113,13 +113,13 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[equal]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="333"> +<Incident type="fail" file="tst_cmptest.cpp" line="353"> <DataTag><![CDATA[different size]]></DataTag> <Description><![CDATA[Compared QPixmaps differ in size. Actual (opA): 11x20 Expected (opB): 20x20]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="333"> +<Incident type="fail" file="tst_cmptest.cpp" line="353"> <DataTag><![CDATA[different pixels]]></DataTag> <Description><![CDATA[Compared values are not the same]]></Description> </Incident> @@ -128,13 +128,13 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[both null]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360"> +<Incident type="fail" file="tst_cmptest.cpp" line="380"> <DataTag><![CDATA[one null]]></DataTag> <Description><![CDATA[Compared QImages differ. Actual (opA).isNull(): 1 Expected (opB).isNull(): 0]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360"> +<Incident type="fail" file="tst_cmptest.cpp" line="380"> <DataTag><![CDATA[other null]]></DataTag> <Description><![CDATA[Compared QImages differ. Actual (opA).isNull(): 0 @@ -143,19 +143,19 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[equal]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360"> +<Incident type="fail" file="tst_cmptest.cpp" line="380"> <DataTag><![CDATA[different size]]></DataTag> <Description><![CDATA[Compared QImages differ in size. Actual (opA): 11x20 Expected (opB): 20x20]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360"> +<Incident type="fail" file="tst_cmptest.cpp" line="380"> <DataTag><![CDATA[different format]]></DataTag> <Description><![CDATA[Compared QImages differ in format. Actual (opA): 6 Expected (opB): 3]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360"> +<Incident type="fail" file="tst_cmptest.cpp" line="380"> <DataTag><![CDATA[different pixels]]></DataTag> <Description><![CDATA[Compared values are not the same]]></Description> </Incident> diff --git a/tests/auto/testlib/selftests/expected_commandlinedata.lightxml b/tests/auto/testlib/selftests/expected_commandlinedata.lightxml index 37eb5f5a2b..65062970f0 100644 --- a/tests/auto/testlib/selftests/expected_commandlinedata.lightxml +++ b/tests/auto/testlib/selftests/expected_commandlinedata.lightxml @@ -6,35 +6,35 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="fiveTablePasses"> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp" line="65"> +<Message type="info" file="tst_commandlinedata.cpp" line="65"> <DataTag><![CDATA[fiveTablePasses_data1]]></DataTag> <Description><![CDATA[QVERIFY(test)]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[fiveTablePasses_data1]]></DataTag> </Incident> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp" line="65"> +<Message type="info" file="tst_commandlinedata.cpp" line="65"> <DataTag><![CDATA[fiveTablePasses_data2]]></DataTag> <Description><![CDATA[QVERIFY(test)]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[fiveTablePasses_data2]]></DataTag> </Incident> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp" line="65"> +<Message type="info" file="tst_commandlinedata.cpp" line="65"> <DataTag><![CDATA[fiveTablePasses_data3]]></DataTag> <Description><![CDATA[QVERIFY(test)]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[fiveTablePasses_data3]]></DataTag> </Incident> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp" line="65"> +<Message type="info" file="tst_commandlinedata.cpp" line="65"> <DataTag><![CDATA[fiveTablePasses_data4]]></DataTag> <Description><![CDATA[QVERIFY(test)]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[fiveTablePasses_data4]]></DataTag> </Incident> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp" line="65"> +<Message type="info" file="tst_commandlinedata.cpp" line="65"> <DataTag><![CDATA[fiveTablePasses_data5]]></DataTag> <Description><![CDATA[QVERIFY(test)]]></Description> </Message> @@ -43,7 +43,7 @@ </Incident> </TestFunction> <TestFunction name="fiveTablePasses"> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp" line="65"> +<Message type="info" file="tst_commandlinedata.cpp" line="65"> <DataTag><![CDATA[fiveTablePasses_data1]]></DataTag> <Description><![CDATA[QVERIFY(test)]]></Description> </Message> diff --git a/tests/auto/testlib/selftests/expected_commandlinedata.txt b/tests/auto/testlib/selftests/expected_commandlinedata.txt index 7c16267b74..509f6a2de5 100644 --- a/tests/auto/testlib/selftests/expected_commandlinedata.txt +++ b/tests/auto/testlib/selftests/expected_commandlinedata.txt @@ -4,23 +4,23 @@ INFO : tst_DataTable::initTestCase() entering PASS : tst_DataTable::initTestCase() INFO : tst_DataTable::fiveTablePasses() entering INFO : tst_DataTable::fiveTablePasses(fiveTablePasses_data1) QVERIFY(test) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp(65)] + Loc: [tst_commandlinedata.cpp(65)] PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data1) INFO : tst_DataTable::fiveTablePasses(fiveTablePasses_data2) QVERIFY(test) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp(65)] + Loc: [tst_commandlinedata.cpp(65)] PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data2) INFO : tst_DataTable::fiveTablePasses(fiveTablePasses_data3) QVERIFY(test) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp(65)] + Loc: [tst_commandlinedata.cpp(65)] PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data3) INFO : tst_DataTable::fiveTablePasses(fiveTablePasses_data4) QVERIFY(test) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp(65)] + Loc: [tst_commandlinedata.cpp(65)] PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data4) INFO : tst_DataTable::fiveTablePasses(fiveTablePasses_data5) QVERIFY(test) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp(65)] + Loc: [tst_commandlinedata.cpp(65)] PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data5) INFO : tst_DataTable::fiveTablePasses() entering INFO : tst_DataTable::fiveTablePasses(fiveTablePasses_data1) QVERIFY(test) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp(65)] + Loc: [tst_commandlinedata.cpp(65)] PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data1) INFO : tst_DataTable::cleanupTestCase() entering PASS : tst_DataTable::cleanupTestCase() diff --git a/tests/auto/testlib/selftests/expected_commandlinedata.xml b/tests/auto/testlib/selftests/expected_commandlinedata.xml index 76e297801c..70ad6bbe0d 100644 --- a/tests/auto/testlib/selftests/expected_commandlinedata.xml +++ b/tests/auto/testlib/selftests/expected_commandlinedata.xml @@ -8,35 +8,35 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="fiveTablePasses"> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp" line="65"> +<Message type="info" file="tst_commandlinedata.cpp" line="65"> <DataTag><![CDATA[fiveTablePasses_data1]]></DataTag> <Description><![CDATA[QVERIFY(test)]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[fiveTablePasses_data1]]></DataTag> </Incident> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp" line="65"> +<Message type="info" file="tst_commandlinedata.cpp" line="65"> <DataTag><![CDATA[fiveTablePasses_data2]]></DataTag> <Description><![CDATA[QVERIFY(test)]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[fiveTablePasses_data2]]></DataTag> </Incident> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp" line="65"> +<Message type="info" file="tst_commandlinedata.cpp" line="65"> <DataTag><![CDATA[fiveTablePasses_data3]]></DataTag> <Description><![CDATA[QVERIFY(test)]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[fiveTablePasses_data3]]></DataTag> </Incident> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp" line="65"> +<Message type="info" file="tst_commandlinedata.cpp" line="65"> <DataTag><![CDATA[fiveTablePasses_data4]]></DataTag> <Description><![CDATA[QVERIFY(test)]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[fiveTablePasses_data4]]></DataTag> </Incident> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp" line="65"> +<Message type="info" file="tst_commandlinedata.cpp" line="65"> <DataTag><![CDATA[fiveTablePasses_data5]]></DataTag> <Description><![CDATA[QVERIFY(test)]]></Description> </Message> @@ -45,7 +45,7 @@ </Incident> </TestFunction> <TestFunction name="fiveTablePasses"> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp" line="65"> +<Message type="info" file="tst_commandlinedata.cpp" line="65"> <DataTag><![CDATA[fiveTablePasses_data1]]></DataTag> <Description><![CDATA[QVERIFY(test)]]></Description> </Message> diff --git a/tests/auto/testlib/selftests/expected_counting.lightxml b/tests/auto/testlib/selftests/expected_counting.lightxml index c49792fec4..5b0e947340 100644 --- a/tests/auto/testlib/selftests/expected_counting.lightxml +++ b/tests/auto/testlib/selftests/expected_counting.lightxml @@ -17,7 +17,7 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[row 1]]></DataTag> </Incident> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="tst_counting.cpp" line="118"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> @@ -26,13 +26,13 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[row 1]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> </TestFunction> <TestFunction name="testSkipPass"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="tst_counting.cpp" line="118"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> @@ -41,27 +41,27 @@ </Incident> </TestFunction> <TestFunction name="testSkipSkip"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="tst_counting.cpp" line="118"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="tst_counting.cpp" line="118"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> </TestFunction> <TestFunction name="testSkipFail"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="tst_counting.cpp" line="118"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> </TestFunction> <TestFunction name="testFailPass"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> @@ -70,21 +70,21 @@ </Incident> </TestFunction> <TestFunction name="testFailSkip"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="tst_counting.cpp" line="118"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> </TestFunction> <TestFunction name="testFailFail"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> @@ -93,7 +93,7 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[before]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="234"> +<Incident type="fail" file="tst_counting.cpp" line="234"> <DataTag><![CDATA[fail]]></DataTag> <Description><![CDATA[Fail in init()]]></Description> </Incident> @@ -107,9 +107,9 @@ </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[fail]]></DataTag> - <Description><![CDATA[This test function should execute and then QFAIL in cleanup() ]]></Description> + <Description><![CDATA[This test function should execute and then QFAIL in cleanup()]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="242"> +<Incident type="fail" file="tst_counting.cpp" line="242"> <DataTag><![CDATA[fail]]></DataTag> <Description><![CDATA[Fail in cleanup()]]></Description> </Incident> @@ -121,7 +121,7 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[before]]></DataTag> </Incident> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="236"> +<Message type="skip" file="tst_counting.cpp" line="236"> <DataTag><![CDATA[skip]]></DataTag> <Description><![CDATA[Skip in init()]]></Description> </Message> @@ -135,9 +135,9 @@ </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[skip]]></DataTag> - <Description><![CDATA[This test function should execute and then QSKIP in cleanup() ]]></Description> + <Description><![CDATA[This test function should execute and then QSKIP in cleanup()]]></Description> </Message> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="244"> +<Message type="skip" file="tst_counting.cpp" line="244"> <DataTag><![CDATA[skip]]></DataTag> <Description><![CDATA[Skip in cleanup()]]></Description> </Message> diff --git a/tests/auto/testlib/selftests/expected_counting.txt b/tests/auto/testlib/selftests/expected_counting.txt index f413882c2a..cdabf6770e 100644 --- a/tests/auto/testlib/selftests/expected_counting.txt +++ b/tests/auto/testlib/selftests/expected_counting.txt @@ -5,49 +5,49 @@ PASS : tst_Counting::testPassPass(row 1) PASS : tst_Counting::testPassPass(row 2) PASS : tst_Counting::testPassSkip(row 1) SKIP : tst_Counting::testPassSkip(row 2) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(118)] + Loc: [tst_counting.cpp(118)] PASS : tst_Counting::testPassFail(row 1) FAIL! : tst_Counting::testPassFail(row 2) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [tst_counting.cpp(115)] SKIP : tst_Counting::testSkipPass(row 1) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(118)] + Loc: [tst_counting.cpp(118)] PASS : tst_Counting::testSkipPass(row 2) SKIP : tst_Counting::testSkipSkip(row 1) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(118)] + Loc: [tst_counting.cpp(118)] SKIP : tst_Counting::testSkipSkip(row 2) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(118)] + Loc: [tst_counting.cpp(118)] SKIP : tst_Counting::testSkipFail(row 1) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(118)] + Loc: [tst_counting.cpp(118)] FAIL! : tst_Counting::testSkipFail(row 2) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [tst_counting.cpp(115)] FAIL! : tst_Counting::testFailPass(row 1) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [tst_counting.cpp(115)] PASS : tst_Counting::testFailPass(row 2) FAIL! : tst_Counting::testFailSkip(row 1) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [tst_counting.cpp(115)] SKIP : tst_Counting::testFailSkip(row 2) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(118)] + Loc: [tst_counting.cpp(118)] FAIL! : tst_Counting::testFailFail(row 1) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [tst_counting.cpp(115)] FAIL! : tst_Counting::testFailFail(row 2) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [tst_counting.cpp(115)] PASS : tst_Counting::testFailInInit(before) FAIL! : tst_Counting::testFailInInit(fail) Fail in init() - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(234)] + Loc: [tst_counting.cpp(234)] PASS : tst_Counting::testFailInInit(after) PASS : tst_Counting::testFailInCleanup(before) -QDEBUG : tst_Counting::testFailInCleanup(fail) This test function should execute and then QFAIL in cleanup() +QDEBUG : tst_Counting::testFailInCleanup(fail) This test function should execute and then QFAIL in cleanup() FAIL! : tst_Counting::testFailInCleanup(fail) Fail in cleanup() - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(242)] + Loc: [tst_counting.cpp(242)] PASS : tst_Counting::testFailInCleanup(after) PASS : tst_Counting::testSkipInInit(before) SKIP : tst_Counting::testSkipInInit(skip) Skip in init() - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(236)] + Loc: [tst_counting.cpp(236)] PASS : tst_Counting::testSkipInInit(after) PASS : tst_Counting::testSkipInCleanup(before) -QDEBUG : tst_Counting::testSkipInCleanup(skip) This test function should execute and then QSKIP in cleanup() +QDEBUG : tst_Counting::testSkipInCleanup(skip) This test function should execute and then QSKIP in cleanup() SKIP : tst_Counting::testSkipInCleanup(skip) Skip in cleanup() - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(244)] + Loc: [tst_counting.cpp(244)] PASS : tst_Counting::testSkipInCleanup(after) PASS : tst_Counting::cleanupTestCase() Totals: 16 passed, 8 failed, 8 skipped diff --git a/tests/auto/testlib/selftests/expected_counting.xml b/tests/auto/testlib/selftests/expected_counting.xml index 7caa915f65..661a617aa0 100644 --- a/tests/auto/testlib/selftests/expected_counting.xml +++ b/tests/auto/testlib/selftests/expected_counting.xml @@ -19,7 +19,7 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[row 1]]></DataTag> </Incident> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="tst_counting.cpp" line="118"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> @@ -28,13 +28,13 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[row 1]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> </TestFunction> <TestFunction name="testSkipPass"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="tst_counting.cpp" line="118"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> @@ -43,27 +43,27 @@ </Incident> </TestFunction> <TestFunction name="testSkipSkip"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="tst_counting.cpp" line="118"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="tst_counting.cpp" line="118"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> </TestFunction> <TestFunction name="testSkipFail"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="tst_counting.cpp" line="118"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> </TestFunction> <TestFunction name="testFailPass"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> @@ -72,21 +72,21 @@ </Incident> </TestFunction> <TestFunction name="testFailSkip"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="tst_counting.cpp" line="118"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> </TestFunction> <TestFunction name="testFailFail"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> @@ -95,7 +95,7 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[before]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="234"> +<Incident type="fail" file="tst_counting.cpp" line="234"> <DataTag><![CDATA[fail]]></DataTag> <Description><![CDATA[Fail in init()]]></Description> </Incident> @@ -109,9 +109,9 @@ </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[fail]]></DataTag> - <Description><![CDATA[This test function should execute and then QFAIL in cleanup() ]]></Description> + <Description><![CDATA[This test function should execute and then QFAIL in cleanup()]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="242"> +<Incident type="fail" file="tst_counting.cpp" line="242"> <DataTag><![CDATA[fail]]></DataTag> <Description><![CDATA[Fail in cleanup()]]></Description> </Incident> @@ -123,7 +123,7 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[before]]></DataTag> </Incident> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="236"> +<Message type="skip" file="tst_counting.cpp" line="236"> <DataTag><![CDATA[skip]]></DataTag> <Description><![CDATA[Skip in init()]]></Description> </Message> @@ -137,9 +137,9 @@ </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[skip]]></DataTag> - <Description><![CDATA[This test function should execute and then QSKIP in cleanup() ]]></Description> + <Description><![CDATA[This test function should execute and then QSKIP in cleanup()]]></Description> </Message> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="244"> +<Message type="skip" file="tst_counting.cpp" line="244"> <DataTag><![CDATA[skip]]></DataTag> <Description><![CDATA[Skip in cleanup()]]></Description> </Message> diff --git a/tests/auto/testlib/selftests/expected_counting.xunitxml b/tests/auto/testlib/selftests/expected_counting.xunitxml index f317ed5923..72bf047ba8 100644 --- a/tests/auto/testlib/selftests/expected_counting.xunitxml +++ b/tests/auto/testlib/selftests/expected_counting.xunitxml @@ -38,14 +38,14 @@ <failure tag="fail" message="Fail in init()" result="fail"/> </testcase> <testcase result="fail" name="testFailInCleanup"> - <!-- tag="fail" message="This test function should execute and then QFAIL in cleanup() " type="qdebug" --> + <!-- tag="fail" message="This test function should execute and then QFAIL in cleanup()" type="qdebug" --> <failure tag="fail" message="Fail in cleanup()" result="fail"/> </testcase> <testcase result="pass" name="testSkipInInit"> <!-- tag="skip" message="Skip in init()" type="skip" --> </testcase> <testcase result="pass" name="testSkipInCleanup"> - <!-- tag="skip" message="This test function should execute and then QSKIP in cleanup() " type="qdebug" --> + <!-- tag="skip" message="This test function should execute and then QSKIP in cleanup()" type="qdebug" --> <!-- tag="skip" message="Skip in cleanup()" type="skip" --> </testcase> <testcase result="pass" name="cleanupTestCase"/> @@ -56,9 +56,9 @@ <![CDATA[Skipping]]> <![CDATA[Skipping]]> <![CDATA[Skipping]]> -<![CDATA[This test function should execute and then QFAIL in cleanup() ]]> +<![CDATA[This test function should execute and then QFAIL in cleanup()]]> <![CDATA[Skip in init()]]> -<![CDATA[This test function should execute and then QSKIP in cleanup() ]]> +<![CDATA[This test function should execute and then QSKIP in cleanup()]]> <![CDATA[Skip in cleanup()]]> </system-err> </testsuite> diff --git a/tests/auto/testlib/selftests/expected_datatable.lightxml b/tests/auto/testlib/selftests/expected_datatable.lightxml index 83ac0c0b5d..b1442cfc10 100644 --- a/tests/auto/testlib/selftests/expected_datatable.lightxml +++ b/tests/auto/testlib/selftests/expected_datatable.lightxml @@ -29,29 +29,29 @@ </Incident> </TestFunction> <TestFunction name="fiveTableFailures"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="91"> +<Incident type="fail" file="tst_datatable.cpp" line="91"> <DataTag><![CDATA[fiveTableFailures_data 1]]></DataTag> <Description><![CDATA['test' returned FALSE. ()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="91"> +<Incident type="fail" file="tst_datatable.cpp" line="91"> <DataTag><![CDATA[fiveTableFailures_data 2]]></DataTag> <Description><![CDATA['test' returned FALSE. ()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="91"> +<Incident type="fail" file="tst_datatable.cpp" line="91"> <DataTag><![CDATA[fiveTableFailures_data 3]]></DataTag> <Description><![CDATA['test' returned FALSE. ()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="91"> +<Incident type="fail" file="tst_datatable.cpp" line="91"> <DataTag><![CDATA[fiveTableFailures_data 4]]></DataTag> <Description><![CDATA['test' returned FALSE. ()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="91"> +<Incident type="fail" file="tst_datatable.cpp" line="91"> <DataTag><![CDATA[fiveTableFailures_data 5]]></DataTag> <Description><![CDATA['test' returned FALSE. ()]]></Description> </Incident> </TestFunction> <TestFunction name="startsWithFailure"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="91"> +<Incident type="fail" file="tst_datatable.cpp" line="91"> <DataTag><![CDATA[startsWithFailure_data 1]]></DataTag> <Description><![CDATA['test' returned FALSE. ()]]></Description> </Incident> @@ -81,7 +81,7 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[endsWithFailure 4]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="91"> +<Incident type="fail" file="tst_datatable.cpp" line="91"> <DataTag><![CDATA[endsWithFailure 5]]></DataTag> <Description><![CDATA['test' returned FALSE. ()]]></Description> </Incident> @@ -93,7 +93,7 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[failureInMiddle_data 2]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="91"> +<Incident type="fail" file="tst_datatable.cpp" line="91"> <DataTag><![CDATA[failureInMiddle_data 3]]></DataTag> <Description><![CDATA['test' returned FALSE. ()]]></Description> </Incident> @@ -105,23 +105,23 @@ </Incident> </TestFunction> <TestFunction name="fiveIsolatedFailures"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="173"> +<Incident type="fail" file="tst_datatable.cpp" line="173"> <DataTag><![CDATA[fiveIsolatedFailures_data 1]]></DataTag> <Description><![CDATA['!test' returned FALSE. ()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="173"> +<Incident type="fail" file="tst_datatable.cpp" line="173"> <DataTag><![CDATA[fiveIsolatedFailures_data 2]]></DataTag> <Description><![CDATA['!test' returned FALSE. ()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="173"> +<Incident type="fail" file="tst_datatable.cpp" line="173"> <DataTag><![CDATA[fiveIsolatedFailures_data 3]]></DataTag> <Description><![CDATA['!test' returned FALSE. ()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="173"> +<Incident type="fail" file="tst_datatable.cpp" line="173"> <DataTag><![CDATA[fiveIsolatedFailures_data 4]]></DataTag> <Description><![CDATA['!test' returned FALSE. ()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="173"> +<Incident type="fail" file="tst_datatable.cpp" line="173"> <DataTag><![CDATA[fiveIsolatedFailures_data 5]]></DataTag> <Description><![CDATA['!test' returned FALSE. ()]]></Description> </Incident> diff --git a/tests/auto/testlib/selftests/expected_datatable.txt b/tests/auto/testlib/selftests/expected_datatable.txt index 24b39becd2..63118b5d33 100644 --- a/tests/auto/testlib/selftests/expected_datatable.txt +++ b/tests/auto/testlib/selftests/expected_datatable.txt @@ -9,17 +9,17 @@ PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data 3) PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data 4) PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data 5) FAIL! : tst_DataTable::fiveTableFailures(fiveTableFailures_data 1) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] + Loc: [tst_datatable.cpp(91)] FAIL! : tst_DataTable::fiveTableFailures(fiveTableFailures_data 2) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] + Loc: [tst_datatable.cpp(91)] FAIL! : tst_DataTable::fiveTableFailures(fiveTableFailures_data 3) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] + Loc: [tst_datatable.cpp(91)] FAIL! : tst_DataTable::fiveTableFailures(fiveTableFailures_data 4) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] + Loc: [tst_datatable.cpp(91)] FAIL! : tst_DataTable::fiveTableFailures(fiveTableFailures_data 5) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] + Loc: [tst_datatable.cpp(91)] FAIL! : tst_DataTable::startsWithFailure(startsWithFailure_data 1) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] + Loc: [tst_datatable.cpp(91)] PASS : tst_DataTable::startsWithFailure(startsWithFailure_data 2) PASS : tst_DataTable::startsWithFailure(startsWithFailure_data 3) PASS : tst_DataTable::startsWithFailure(startsWithFailure_data 4) @@ -29,23 +29,23 @@ PASS : tst_DataTable::endsWithFailure(endsWithFailure 2) PASS : tst_DataTable::endsWithFailure(endsWithFailure 3) PASS : tst_DataTable::endsWithFailure(endsWithFailure 4) FAIL! : tst_DataTable::endsWithFailure(endsWithFailure 5) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] + Loc: [tst_datatable.cpp(91)] PASS : tst_DataTable::failureInMiddle(failureInMiddle_data 1) PASS : tst_DataTable::failureInMiddle(failureInMiddle_data 2) FAIL! : tst_DataTable::failureInMiddle(failureInMiddle_data 3) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] + Loc: [tst_datatable.cpp(91)] PASS : tst_DataTable::failureInMiddle(failureInMiddle_data 4) PASS : tst_DataTable::failureInMiddle(failureInMiddle_data 5) FAIL! : tst_DataTable::fiveIsolatedFailures(fiveIsolatedFailures_data 1) '!test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(173)] + Loc: [tst_datatable.cpp(173)] FAIL! : tst_DataTable::fiveIsolatedFailures(fiveIsolatedFailures_data 2) '!test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(173)] + Loc: [tst_datatable.cpp(173)] FAIL! : tst_DataTable::fiveIsolatedFailures(fiveIsolatedFailures_data 3) '!test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(173)] + Loc: [tst_datatable.cpp(173)] FAIL! : tst_DataTable::fiveIsolatedFailures(fiveIsolatedFailures_data 4) '!test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(173)] + Loc: [tst_datatable.cpp(173)] FAIL! : tst_DataTable::fiveIsolatedFailures(fiveIsolatedFailures_data 5) '!test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(173)] + Loc: [tst_datatable.cpp(173)] PASS : tst_DataTable::cleanupTestCase() Totals: 21 passed, 13 failed, 0 skipped ********* Finished testing of tst_DataTable ********* diff --git a/tests/auto/testlib/selftests/expected_datatable.xml b/tests/auto/testlib/selftests/expected_datatable.xml index 2579ff24cc..c98e1ee44a 100644 --- a/tests/auto/testlib/selftests/expected_datatable.xml +++ b/tests/auto/testlib/selftests/expected_datatable.xml @@ -31,29 +31,29 @@ </Incident> </TestFunction> <TestFunction name="fiveTableFailures"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="91"> +<Incident type="fail" file="tst_datatable.cpp" line="91"> <DataTag><![CDATA[fiveTableFailures_data 1]]></DataTag> <Description><![CDATA['test' returned FALSE. ()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="91"> +<Incident type="fail" file="tst_datatable.cpp" line="91"> <DataTag><![CDATA[fiveTableFailures_data 2]]></DataTag> <Description><![CDATA['test' returned FALSE. ()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="91"> +<Incident type="fail" file="tst_datatable.cpp" line="91"> <DataTag><![CDATA[fiveTableFailures_data 3]]></DataTag> <Description><![CDATA['test' returned FALSE. ()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="91"> +<Incident type="fail" file="tst_datatable.cpp" line="91"> <DataTag><![CDATA[fiveTableFailures_data 4]]></DataTag> <Description><![CDATA['test' returned FALSE. ()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="91"> +<Incident type="fail" file="tst_datatable.cpp" line="91"> <DataTag><![CDATA[fiveTableFailures_data 5]]></DataTag> <Description><![CDATA['test' returned FALSE. ()]]></Description> </Incident> </TestFunction> <TestFunction name="startsWithFailure"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="91"> +<Incident type="fail" file="tst_datatable.cpp" line="91"> <DataTag><![CDATA[startsWithFailure_data 1]]></DataTag> <Description><![CDATA['test' returned FALSE. ()]]></Description> </Incident> @@ -83,7 +83,7 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[endsWithFailure 4]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="91"> +<Incident type="fail" file="tst_datatable.cpp" line="91"> <DataTag><![CDATA[endsWithFailure 5]]></DataTag> <Description><![CDATA['test' returned FALSE. ()]]></Description> </Incident> @@ -95,7 +95,7 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[failureInMiddle_data 2]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="91"> +<Incident type="fail" file="tst_datatable.cpp" line="91"> <DataTag><![CDATA[failureInMiddle_data 3]]></DataTag> <Description><![CDATA['test' returned FALSE. ()]]></Description> </Incident> @@ -107,23 +107,23 @@ </Incident> </TestFunction> <TestFunction name="fiveIsolatedFailures"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="173"> +<Incident type="fail" file="tst_datatable.cpp" line="173"> <DataTag><![CDATA[fiveIsolatedFailures_data 1]]></DataTag> <Description><![CDATA['!test' returned FALSE. ()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="173"> +<Incident type="fail" file="tst_datatable.cpp" line="173"> <DataTag><![CDATA[fiveIsolatedFailures_data 2]]></DataTag> <Description><![CDATA['!test' returned FALSE. ()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="173"> +<Incident type="fail" file="tst_datatable.cpp" line="173"> <DataTag><![CDATA[fiveIsolatedFailures_data 3]]></DataTag> <Description><![CDATA['!test' returned FALSE. ()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="173"> +<Incident type="fail" file="tst_datatable.cpp" line="173"> <DataTag><![CDATA[fiveIsolatedFailures_data 4]]></DataTag> <Description><![CDATA['!test' returned FALSE. ()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp" line="173"> +<Incident type="fail" file="tst_datatable.cpp" line="173"> <DataTag><![CDATA[fiveIsolatedFailures_data 5]]></DataTag> <Description><![CDATA['!test' returned FALSE. ()]]></Description> </Incident> diff --git a/tests/auto/testlib/selftests/expected_datetime.lightxml b/tests/auto/testlib/selftests/expected_datetime.lightxml index 183744b2e2..0594f4627d 100644 --- a/tests/auto/testlib/selftests/expected_datetime.lightxml +++ b/tests/auto/testlib/selftests/expected_datetime.lightxml @@ -6,7 +6,7 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="dateTime"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp" line="66"> +<Incident type="fail" file="tst_datetime.cpp" line="65"> <Description><![CDATA[Compared values are not the same Actual (local): 2000/05/03 04:03:04.000[local time] Expected (utc) : 2000/05/03 04:03:04.000[UTC]]]></Description> @@ -16,13 +16,13 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[empty urls]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp" line="74"> +<Incident type="fail" file="tst_datetime.cpp" line="73"> <DataTag><![CDATA[empty rhs]]></DataTag> <Description><![CDATA[Compared values are not the same Actual (operandA): http://example.com Expected (operandB): Invalid URL: ]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp" line="74"> +<Incident type="fail" file="tst_datetime.cpp" line="73"> <DataTag><![CDATA[empty lhs]]></DataTag> <Description><![CDATA[Compared values are not the same Actual (operandA): Invalid URL: diff --git a/tests/auto/testlib/selftests/expected_datetime.txt b/tests/auto/testlib/selftests/expected_datetime.txt index 0cbc6506d5..f48e28ea38 100644 --- a/tests/auto/testlib/selftests/expected_datetime.txt +++ b/tests/auto/testlib/selftests/expected_datetime.txt @@ -4,16 +4,16 @@ PASS : tst_DateTime::initTestCase() FAIL! : tst_DateTime::dateTime() Compared values are not the same Actual (local): 2000/05/03 04:03:04.000[local time] Expected (utc) : 2000/05/03 04:03:04.000[UTC] - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp(33)] + Loc: [tst_datetime.cpp(65)] PASS : tst_DateTime::qurl(empty urls) FAIL! : tst_DateTime::qurl(empty rhs) Compared values are not the same Actual (operandA): http://example.com Expected (operandB): Invalid URL: - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp(41)] + Loc: [tst_datetime.cpp(73)] FAIL! : tst_DateTime::qurl(empty lhs) Compared values are not the same Actual (operandA): Invalid URL: Expected (operandB): http://example.com - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp(41)] + Loc: [tst_datetime.cpp(73)] PASS : tst_DateTime::qurl(same urls) PASS : tst_DateTime::cleanupTestCase() Totals: 4 passed, 3 failed, 0 skipped diff --git a/tests/auto/testlib/selftests/expected_datetime.xml b/tests/auto/testlib/selftests/expected_datetime.xml index 42b566c074..c132a1fcf6 100644 --- a/tests/auto/testlib/selftests/expected_datetime.xml +++ b/tests/auto/testlib/selftests/expected_datetime.xml @@ -8,7 +8,7 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="dateTime"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp" line="66"> +<Incident type="fail" file="tst_datetime.cpp" line="65"> <Description><![CDATA[Compared values are not the same Actual (local): 2000/05/03 04:03:04.000[local time] Expected (utc) : 2000/05/03 04:03:04.000[UTC]]]></Description> @@ -18,13 +18,13 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[empty urls]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp" line="74"> +<Incident type="fail" file="tst_datetime.cpp" line="73"> <DataTag><![CDATA[empty rhs]]></DataTag> <Description><![CDATA[Compared values are not the same Actual (operandA): http://example.com Expected (operandB): Invalid URL: ]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp" line="74"> +<Incident type="fail" file="tst_datetime.cpp" line="73"> <DataTag><![CDATA[empty lhs]]></DataTag> <Description><![CDATA[Compared values are not the same Actual (operandA): Invalid URL: diff --git a/tests/auto/testlib/selftests/expected_exceptionthrow.lightxml b/tests/auto/testlib/selftests/expected_exceptionthrow.lightxml index e4f87fa611..81c33cb26e 100644 --- a/tests/auto/testlib/selftests/expected_exceptionthrow.lightxml +++ b/tests/auto/testlib/selftests/expected_exceptionthrow.lightxml @@ -6,7 +6,7 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="throwException"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase//src/testlib/qtestcase.cpp" line="1691"> +<Incident type="fail" file="/home/frederik/dev/qt/qt-src-dev/qtbase/src/testlib/qtestcase.cpp" line="2229"> <Description><![CDATA[Caught unhandled exception]]></Description> </Incident> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_exceptionthrow.txt b/tests/auto/testlib/selftests/expected_exceptionthrow.txt index ecbc7da01a..671e609230 100644 --- a/tests/auto/testlib/selftests/expected_exceptionthrow.txt +++ b/tests/auto/testlib/selftests/expected_exceptionthrow.txt @@ -2,6 +2,6 @@ Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Exception::initTestCase() FAIL! : tst_Exception::throwException() Caught unhandled exception - Loc: [/home/user/dev/qt5/qtbase/src/testlib/qtestcase.cpp(1220)] + Loc: [/home/frederik/dev/qt/qt-src-dev/qtbase/src/testlib/qtestcase.cpp(2229)] Totals: 1 passed, 1 failed, 0 skipped ********* Finished testing of tst_Exception ********* diff --git a/tests/auto/testlib/selftests/expected_exceptionthrow.xml b/tests/auto/testlib/selftests/expected_exceptionthrow.xml index ab0f9a917e..015f7f5f4b 100644 --- a/tests/auto/testlib/selftests/expected_exceptionthrow.xml +++ b/tests/auto/testlib/selftests/expected_exceptionthrow.xml @@ -8,7 +8,7 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="throwException"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/src/testlib/qtestcase.cpp" line="1691"> +<Incident type="fail" file="/home/frederik/dev/qt/qt-src-dev/qtbase/src/testlib/qtestcase.cpp" line="2229"> <Description><![CDATA[Caught unhandled exception]]></Description> </Incident> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_expectfail.lightxml b/tests/auto/testlib/selftests/expected_expectfail.lightxml index 55bd9578a8..3f262c6228 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.lightxml +++ b/tests/auto/testlib/selftests/expected_expectfail.lightxml @@ -9,7 +9,7 @@ <Message type="qdebug" file="" line="0"> <Description><![CDATA[begin]]></Description> </Message> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="78"> +<Incident type="xfail" file="tst_expectfail.cpp" line="78"> <Description><![CDATA[This should xfail]]></Description> </Incident> <Message type="qdebug" file="" line="0"> @@ -21,21 +21,21 @@ <Message type="qdebug" file="" line="0"> <Description><![CDATA[begin]]></Description> </Message> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="86"> +<Incident type="xfail" file="tst_expectfail.cpp" line="86"> <Description><![CDATA[This should xfail]]></Description> </Incident> <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="xfailTwice"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="96"> +<Incident type="fail" file="tst_expectfail.cpp" line="96"> <Description><![CDATA[Already expecting a fail]]></Description> </Incident> </TestFunction> <TestFunction name="xfailWithQString"> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="105"> +<Incident type="xfail" file="tst_expectfail.cpp" line="105"> <Description><![CDATA[A string]]></Description> </Incident> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="110"> +<Incident type="xfail" file="tst_expectfail.cpp" line="110"> <Description><![CDATA[Bug 5 (The message)]]></Description> </Incident> <Incident type="pass" file="" line="0" /> @@ -47,14 +47,14 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[Pass 2]]></DataTag> </Incident> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="139"> +<Incident type="xfail" file="tst_expectfail.cpp" line="139"> <DataTag><![CDATA[Abort]]></DataTag> <Description><![CDATA[This test should xfail]]></Description> </Incident> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[Abort]]></DataTag> </Incident> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="139"> +<Incident type="xfail" file="tst_expectfail.cpp" line="139"> <DataTag><![CDATA[Continue]]></DataTag> <Description><![CDATA[This test should xfail]]></Description> </Incident> @@ -69,14 +69,14 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[Pass 2]]></DataTag> </Incident> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="173"> +<Incident type="xfail" file="tst_expectfail.cpp" line="173"> <DataTag><![CDATA[Abort]]></DataTag> <Description><![CDATA[This test should xfail]]></Description> </Incident> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[Abort]]></DataTag> </Incident> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="173"> +<Incident type="xfail" file="tst_expectfail.cpp" line="173"> <DataTag><![CDATA[Continue]]></DataTag> <Description><![CDATA[This test should xfail]]></Description> </Incident> @@ -90,14 +90,14 @@ </Incident> </TestFunction> <TestFunction name="xfailOnAnyRow"> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="208"> +<Incident type="xfail" file="tst_expectfail.cpp" line="208"> <DataTag><![CDATA[first row]]></DataTag> <Description><![CDATA[This test should xfail]]></Description> </Incident> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[first row]]></DataTag> </Incident> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="208"> +<Incident type="xfail" file="tst_expectfail.cpp" line="208"> <DataTag><![CDATA[second row]]></DataTag> <Description><![CDATA[This test should xfail]]></Description> </Incident> @@ -116,12 +116,12 @@ </Incident> </TestFunction> <TestFunction name="xpass"> -<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="228"> +<Incident type="xpass" file="tst_expectfail.cpp" line="228"> <Description><![CDATA['true' returned TRUE unexpectedly. ()]]></Description> </Incident> </TestFunction> <TestFunction name="xpassDataDrivenWithQVerify"> -<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="250"> +<Incident type="xpass" file="tst_expectfail.cpp" line="250"> <DataTag><![CDATA[XPass]]></DataTag> <Description><![CDATA['true' returned TRUE unexpectedly. ()]]></Description> </Incident> @@ -130,7 +130,7 @@ </Incident> </TestFunction> <TestFunction name="xpassDataDrivenWithQCompare"> -<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="271"> +<Incident type="xpass" file="tst_expectfail.cpp" line="271"> <DataTag><![CDATA[XPass]]></DataTag> <Description><![CDATA[QCOMPARE(1, 1) returned TRUE unexpectedly.]]></Description> </Incident> diff --git a/tests/auto/testlib/selftests/expected_expectfail.txt b/tests/auto/testlib/selftests/expected_expectfail.txt index abd1cdc32c..39f3c17f70 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.txt +++ b/tests/auto/testlib/selftests/expected_expectfail.txt @@ -3,52 +3,52 @@ Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HER PASS : tst_ExpectFail::initTestCase() QDEBUG : tst_ExpectFail::xfailAndContinue() begin XFAIL : tst_ExpectFail::xfailAndContinue() This should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(78)] + Loc: [tst_expectfail.cpp(78)] QDEBUG : tst_ExpectFail::xfailAndContinue() after PASS : tst_ExpectFail::xfailAndContinue() QDEBUG : tst_ExpectFail::xfailAndAbort() begin XFAIL : tst_ExpectFail::xfailAndAbort() This should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(86)] + Loc: [tst_expectfail.cpp(86)] PASS : tst_ExpectFail::xfailAndAbort() FAIL! : tst_ExpectFail::xfailTwice() Already expecting a fail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(96)] + Loc: [tst_expectfail.cpp(96)] XFAIL : tst_ExpectFail::xfailWithQString() A string - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(105)] + Loc: [tst_expectfail.cpp(105)] XFAIL : tst_ExpectFail::xfailWithQString() Bug 5 (The message) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(110)] + Loc: [tst_expectfail.cpp(110)] PASS : tst_ExpectFail::xfailWithQString() PASS : tst_ExpectFail::xfailDataDrivenWithQVerify(Pass 1) PASS : tst_ExpectFail::xfailDataDrivenWithQVerify(Pass 2) XFAIL : tst_ExpectFail::xfailDataDrivenWithQVerify(Abort) This test should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(139)] + Loc: [tst_expectfail.cpp(139)] PASS : tst_ExpectFail::xfailDataDrivenWithQVerify(Abort) XFAIL : tst_ExpectFail::xfailDataDrivenWithQVerify(Continue) This test should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(139)] + Loc: [tst_expectfail.cpp(139)] PASS : tst_ExpectFail::xfailDataDrivenWithQVerify(Continue) PASS : tst_ExpectFail::xfailDataDrivenWithQCompare(Pass 1) PASS : tst_ExpectFail::xfailDataDrivenWithQCompare(Pass 2) XFAIL : tst_ExpectFail::xfailDataDrivenWithQCompare(Abort) This test should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(173)] + Loc: [tst_expectfail.cpp(173)] PASS : tst_ExpectFail::xfailDataDrivenWithQCompare(Abort) XFAIL : tst_ExpectFail::xfailDataDrivenWithQCompare(Continue) This test should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(173)] + Loc: [tst_expectfail.cpp(173)] PASS : tst_ExpectFail::xfailDataDrivenWithQCompare(Continue) PASS : tst_ExpectFail::xfailOnWrongRow(right row) XFAIL : tst_ExpectFail::xfailOnAnyRow(first row) This test should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(208)] + Loc: [tst_expectfail.cpp(208)] PASS : tst_ExpectFail::xfailOnAnyRow(first row) XFAIL : tst_ExpectFail::xfailOnAnyRow(second row) This test should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(208)] + Loc: [tst_expectfail.cpp(208)] PASS : tst_ExpectFail::xfailOnAnyRow(second row) FAIL! : tst_ExpectFail::xfailWithoutVerify(first row) QEXPECT_FAIL was called without any subsequent verification statements FAIL! : tst_ExpectFail::xfailWithoutVerify(second row) QEXPECT_FAIL was called without any subsequent verification statements XPASS : tst_ExpectFail::xpass() 'true' returned TRUE unexpectedly. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(228)] + Loc: [tst_expectfail.cpp(228)] XPASS : tst_ExpectFail::xpassDataDrivenWithQVerify(XPass) 'true' returned TRUE unexpectedly. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(250)] + Loc: [tst_expectfail.cpp(250)] PASS : tst_ExpectFail::xpassDataDrivenWithQVerify(Pass) XPASS : tst_ExpectFail::xpassDataDrivenWithQCompare(XPass) QCOMPARE(1, 1) returned TRUE unexpectedly. - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(271)] + Loc: [tst_expectfail.cpp(271)] PASS : tst_ExpectFail::xpassDataDrivenWithQCompare(Pass) PASS : tst_ExpectFail::cleanupTestCase() Totals: 18 passed, 6 failed, 0 skipped diff --git a/tests/auto/testlib/selftests/expected_expectfail.xml b/tests/auto/testlib/selftests/expected_expectfail.xml index 58a48197b0..31b61d8db2 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.xml +++ b/tests/auto/testlib/selftests/expected_expectfail.xml @@ -11,7 +11,7 @@ <Message type="qdebug" file="" line="0"> <Description><![CDATA[begin]]></Description> </Message> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="78"> +<Incident type="xfail" file="tst_expectfail.cpp" line="78"> <Description><![CDATA[This should xfail]]></Description> </Incident> <Message type="qdebug" file="" line="0"> @@ -23,21 +23,21 @@ <Message type="qdebug" file="" line="0"> <Description><![CDATA[begin]]></Description> </Message> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="86"> +<Incident type="xfail" file="tst_expectfail.cpp" line="86"> <Description><![CDATA[This should xfail]]></Description> </Incident> <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="xfailTwice"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="96"> +<Incident type="fail" file="tst_expectfail.cpp" line="96"> <Description><![CDATA[Already expecting a fail]]></Description> </Incident> </TestFunction> <TestFunction name="xfailWithQString"> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="105"> +<Incident type="xfail" file="tst_expectfail.cpp" line="105"> <Description><![CDATA[A string]]></Description> </Incident> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="110"> +<Incident type="xfail" file="tst_expectfail.cpp" line="110"> <Description><![CDATA[Bug 5 (The message)]]></Description> </Incident> <Incident type="pass" file="" line="0" /> @@ -49,14 +49,14 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[Pass 2]]></DataTag> </Incident> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="139"> +<Incident type="xfail" file="tst_expectfail.cpp" line="139"> <DataTag><![CDATA[Abort]]></DataTag> <Description><![CDATA[This test should xfail]]></Description> </Incident> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[Abort]]></DataTag> </Incident> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="139"> +<Incident type="xfail" file="tst_expectfail.cpp" line="139"> <DataTag><![CDATA[Continue]]></DataTag> <Description><![CDATA[This test should xfail]]></Description> </Incident> @@ -71,14 +71,14 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[Pass 2]]></DataTag> </Incident> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="173"> +<Incident type="xfail" file="tst_expectfail.cpp" line="173"> <DataTag><![CDATA[Abort]]></DataTag> <Description><![CDATA[This test should xfail]]></Description> </Incident> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[Abort]]></DataTag> </Incident> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="173"> +<Incident type="xfail" file="tst_expectfail.cpp" line="173"> <DataTag><![CDATA[Continue]]></DataTag> <Description><![CDATA[This test should xfail]]></Description> </Incident> @@ -92,14 +92,14 @@ </Incident> </TestFunction> <TestFunction name="xfailOnAnyRow"> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="208"> +<Incident type="xfail" file="tst_expectfail.cpp" line="208"> <DataTag><![CDATA[first row]]></DataTag> <Description><![CDATA[This test should xfail]]></Description> </Incident> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[first row]]></DataTag> </Incident> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="208"> +<Incident type="xfail" file="tst_expectfail.cpp" line="208"> <DataTag><![CDATA[second row]]></DataTag> <Description><![CDATA[This test should xfail]]></Description> </Incident> @@ -118,12 +118,12 @@ </Incident> </TestFunction> <TestFunction name="xpass"> -<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="228"> +<Incident type="xpass" file="tst_expectfail.cpp" line="228"> <Description><![CDATA['true' returned TRUE unexpectedly. ()]]></Description> </Incident> </TestFunction> <TestFunction name="xpassDataDrivenWithQVerify"> -<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="250"> +<Incident type="xpass" file="tst_expectfail.cpp" line="250"> <DataTag><![CDATA[XPass]]></DataTag> <Description><![CDATA['true' returned TRUE unexpectedly. ()]]></Description> </Incident> @@ -132,7 +132,7 @@ </Incident> </TestFunction> <TestFunction name="xpassDataDrivenWithQCompare"> -<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="271"> +<Incident type="xpass" file="tst_expectfail.cpp" line="271"> <DataTag><![CDATA[XPass]]></DataTag> <Description><![CDATA[QCOMPARE(1, 1) returned TRUE unexpectedly.]]></Description> </Incident> diff --git a/tests/auto/testlib/selftests/expected_failcleanup.lightxml b/tests/auto/testlib/selftests/expected_failcleanup.lightxml index 83ce7a7b15..4ceff4eba8 100644 --- a/tests/auto/testlib/selftests/expected_failcleanup.lightxml +++ b/tests/auto/testlib/selftests/expected_failcleanup.lightxml @@ -9,7 +9,7 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="cleanupTestCase"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp" line="59"> +<Incident type="fail" file="tst_failcleanup.cpp" line="59"> <Description><![CDATA['false' returned FALSE. (Fail inside cleanupTestCase)]]></Description> </Incident> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_failcleanup.txt b/tests/auto/testlib/selftests/expected_failcleanup.txt index 1d9405b326..59d0c26794 100644 --- a/tests/auto/testlib/selftests/expected_failcleanup.txt +++ b/tests/auto/testlib/selftests/expected_failcleanup.txt @@ -3,6 +3,6 @@ Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HER PASS : tst_FailCleanup::initTestCase() PASS : tst_FailCleanup::aTestFunction() FAIL! : tst_FailCleanup::cleanupTestCase() 'false' returned FALSE. (Fail inside cleanupTestCase) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp(59)] + Loc: [tst_failcleanup.cpp(59)] Totals: 2 passed, 1 failed, 0 skipped ********* Finished testing of tst_FailCleanup ********* diff --git a/tests/auto/testlib/selftests/expected_failcleanup.xml b/tests/auto/testlib/selftests/expected_failcleanup.xml index 13633a8a0d..79a66771cd 100644 --- a/tests/auto/testlib/selftests/expected_failcleanup.xml +++ b/tests/auto/testlib/selftests/expected_failcleanup.xml @@ -11,7 +11,7 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="cleanupTestCase"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp" line="59"> +<Incident type="fail" file="tst_failcleanup.cpp" line="59"> <Description><![CDATA['false' returned FALSE. (Fail inside cleanupTestCase)]]></Description> </Incident> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_failinit.lightxml b/tests/auto/testlib/selftests/expected_failinit.lightxml index f80d8075ca..e10b3a476b 100644 --- a/tests/auto/testlib/selftests/expected_failinit.lightxml +++ b/tests/auto/testlib/selftests/expected_failinit.lightxml @@ -3,7 +3,7 @@ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/failinit/tst_failinit.cpp" line="55"> +<Incident type="fail" file="tst_failinit.cpp" line="55"> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_failinit.txt b/tests/auto/testlib/selftests/expected_failinit.txt index a6cf55b2e2..2265898d69 100644 --- a/tests/auto/testlib/selftests/expected_failinit.txt +++ b/tests/auto/testlib/selftests/expected_failinit.txt @@ -1,7 +1,7 @@ ********* Start testing of tst_FailInit ********* Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ FAIL! : tst_FailInit::initTestCase() 'false' returned FALSE. () - Loc: [tst_failinit.cpp(22)] + Loc: [tst_failinit.cpp(55)] PASS : tst_FailInit::cleanupTestCase() Totals: 1 passed, 1 failed, 0 skipped ********* Finished testing of tst_FailInit ********* diff --git a/tests/auto/testlib/selftests/expected_failinit.xml b/tests/auto/testlib/selftests/expected_failinit.xml index 4ab455c966..3911253f61 100644 --- a/tests/auto/testlib/selftests/expected_failinit.xml +++ b/tests/auto/testlib/selftests/expected_failinit.xml @@ -5,7 +5,7 @@ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/failinit/tst_failinit.cpp" line="55"> +<Incident type="fail" file="tst_failinit.cpp" line="55"> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_failinitdata.lightxml b/tests/auto/testlib/selftests/expected_failinitdata.lightxml index 11ba1f0c2e..743bc0d045 100644 --- a/tests/auto/testlib/selftests/expected_failinitdata.lightxml +++ b/tests/auto/testlib/selftests/expected_failinitdata.lightxml @@ -3,7 +3,7 @@ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/failinitdata/tst_failinitdata.cpp" line="56"> +<Incident type="fail" file="tst_failinitdata.cpp" line="56"> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_failinitdata.txt b/tests/auto/testlib/selftests/expected_failinitdata.txt index 40b36526ba..982db4b2c2 100644 --- a/tests/auto/testlib/selftests/expected_failinitdata.txt +++ b/tests/auto/testlib/selftests/expected_failinitdata.txt @@ -1,6 +1,6 @@ ********* Start testing of tst_FailInitData ********* Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ FAIL! : tst_FailInitData::initTestCase() 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/failinitdata/tst_failinitdata.cpp(23)] + Loc: [tst_failinitdata.cpp(56)] Totals: 0 passed, 1 failed, 0 skipped ********* Finished testing of tst_FailInitData ********* diff --git a/tests/auto/testlib/selftests/expected_failinitdata.xml b/tests/auto/testlib/selftests/expected_failinitdata.xml index e4da823112..6d5b386a3e 100644 --- a/tests/auto/testlib/selftests/expected_failinitdata.xml +++ b/tests/auto/testlib/selftests/expected_failinitdata.xml @@ -5,7 +5,7 @@ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/failinitdata/tst_failinitdata.cpp" line="56"> +<Incident type="fail" file="tst_failinitdata.cpp" line="56"> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_findtestdata.lightxml b/tests/auto/testlib/selftests/expected_findtestdata.lightxml index f1944c4897..bf69bcb845 100644 --- a/tests/auto/testlib/selftests/expected_findtestdata.lightxml +++ b/tests/auto/testlib/selftests/expected_findtestdata.lightxml @@ -6,7 +6,7 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="paths"> -<Message type="warn" file="findtestdata.cpp" line="131"> +<Message type="warn" file="findtestdata.cpp" line="154"> <Description><![CDATA[testdata testfile could not be located!]]></Description> </Message> <Incident type="pass" file="" line="0" /> diff --git a/tests/auto/testlib/selftests/expected_findtestdata.txt b/tests/auto/testlib/selftests/expected_findtestdata.txt index 22c2e851d4..d92b167d3e 100644 --- a/tests/auto/testlib/selftests/expected_findtestdata.txt +++ b/tests/auto/testlib/selftests/expected_findtestdata.txt @@ -2,7 +2,7 @@ Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : FindTestData::initTestCase() WARNING: FindTestData::paths() testdata testfile could not be located! - Loc: [findtestdata.cpp(131)] + Loc: [findtestdata.cpp(154)] PASS : FindTestData::paths() PASS : FindTestData::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped diff --git a/tests/auto/testlib/selftests/expected_findtestdata.xml b/tests/auto/testlib/selftests/expected_findtestdata.xml index dd1fc08f68..8770730c76 100644 --- a/tests/auto/testlib/selftests/expected_findtestdata.xml +++ b/tests/auto/testlib/selftests/expected_findtestdata.xml @@ -8,7 +8,7 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="paths"> -<Message type="warn" file="findtestdata.cpp" line="131"> +<Message type="warn" file="findtestdata.cpp" line="154"> <Description><![CDATA[testdata testfile could not be located!]]></Description> </Message> <Incident type="pass" file="" line="0" /> diff --git a/tests/auto/testlib/selftests/expected_float.txt b/tests/auto/testlib/selftests/expected_float.txt index da98f9c19d..6d0588981c 100644 --- a/tests/auto/testlib/selftests/expected_float.txt +++ b/tests/auto/testlib/selftests/expected_float.txt @@ -5,28 +5,28 @@ PASS : tst_float::floatComparisons(should SUCCEED 1) FAIL! : tst_float::floatComparisons(should FAIL 1) Compared floats are not the same (fuzzy compare) Actual (operandLeft) : 1 Expected (operandRight): 3 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(61)] + Loc: [tst_float.cpp(61)] FAIL! : tst_float::floatComparisons(should FAIL 2) Compared floats are not the same (fuzzy compare) Actual (operandLeft) : 1e-07 Expected (operandRight): 3e-07 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(61)] + Loc: [tst_float.cpp(61)] FAIL! : tst_float::floatComparisons(should FAIL 3) Compared floats are not the same (fuzzy compare) Actual (operandLeft) : 99998 Expected (operandRight): 99999 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(61)] + Loc: [tst_float.cpp(61)] PASS : tst_float::floatComparisons(should SUCCEED 2) FAIL! : tst_float::compareFloatTests(1e0) Compared floats are not the same (fuzzy compare) Actual (t1): 1 Expected (t3): 3 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(104)] + Loc: [tst_float.cpp(109)] FAIL! : tst_float::compareFloatTests(1e-7) Compared floats are not the same (fuzzy compare) Actual (t1): 1e-07 Expected (t3): 3e-07 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(104)] + Loc: [tst_float.cpp(109)] FAIL! : tst_float::compareFloatTests(1e+7) Compared floats are not the same (fuzzy compare) Actual (t1): 1e+07 Expected (t3): 3e+07 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(104)] + Loc: [tst_float.cpp(109)] PASS : tst_float::cleanupTestCase() Totals: 4 passed, 6 failed, 0 skipped ********* Finished testing of tst_float ********* diff --git a/tests/auto/testlib/selftests/expected_globaldata.lightxml b/tests/auto/testlib/selftests/expected_globaldata.lightxml index 6d68bfbdb5..86418a4935 100644 --- a/tests/auto/testlib/selftests/expected_globaldata.lightxml +++ b/tests/auto/testlib/selftests/expected_globaldata.lightxml @@ -4,90 +4,90 @@ </Environment> <TestFunction name="initTestCase"> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[initTestCase initTestCase (null) ]]></Description> + <Description><![CDATA[initTestCase initTestCase (null)]]></Description> </Message> <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="testGlobal"> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> - <Description><![CDATA[init testGlobal local 1 ]]></Description> + <Description><![CDATA[init testGlobal local 1]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> - <Description><![CDATA[global: false ]]></Description> + <Description><![CDATA[global: false]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> - <Description><![CDATA[local: false ]]></Description> + <Description><![CDATA[local: false]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> - <Description><![CDATA[cleanup testGlobal local 1 ]]></Description> + <Description><![CDATA[cleanup testGlobal local 1]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> - <Description><![CDATA[init testGlobal local 2 ]]></Description> + <Description><![CDATA[init testGlobal local 2]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> - <Description><![CDATA[global: false ]]></Description> + <Description><![CDATA[global: false]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> - <Description><![CDATA[local: true ]]></Description> + <Description><![CDATA[local: true]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> - <Description><![CDATA[cleanup testGlobal local 2 ]]></Description> + <Description><![CDATA[cleanup testGlobal local 2]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 1]]></DataTag> - <Description><![CDATA[init testGlobal local 1 ]]></Description> + <Description><![CDATA[init testGlobal local 1]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 1]]></DataTag> - <Description><![CDATA[global: true ]]></Description> + <Description><![CDATA[global: true]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 1]]></DataTag> - <Description><![CDATA[local: false ]]></Description> + <Description><![CDATA[local: false]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 1]]></DataTag> - <Description><![CDATA[cleanup testGlobal local 1 ]]></Description> + <Description><![CDATA[cleanup testGlobal local 1]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[2:local 1]]></DataTag> </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 2]]></DataTag> - <Description><![CDATA[init testGlobal local 2 ]]></Description> + <Description><![CDATA[init testGlobal local 2]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 2]]></DataTag> - <Description><![CDATA[global: true ]]></Description> + <Description><![CDATA[global: true]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 2]]></DataTag> - <Description><![CDATA[local: true ]]></Description> + <Description><![CDATA[local: true]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 2]]></DataTag> - <Description><![CDATA[cleanup testGlobal local 2 ]]></Description> + <Description><![CDATA[cleanup testGlobal local 2]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[2:local 2]]></DataTag> </Incident> </TestFunction> <TestFunction name="skip"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp" line="129"> +<Message type="skip" file="tst_globaldata.cpp" line="129"> <DataTag><![CDATA[1]]></DataTag> <Description><![CDATA[skipping]]></Description> </Message> @@ -95,83 +95,83 @@ <TestFunction name="skipLocal"> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> - <Description><![CDATA[init skipLocal local 1 ]]></Description> + <Description><![CDATA[init skipLocal local 1]]></Description> </Message> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp" line="149"> +<Message type="skip" file="tst_globaldata.cpp" line="149"> <DataTag><![CDATA[1:local 1]]></DataTag> <Description><![CDATA[skipping]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> - <Description><![CDATA[cleanup skipLocal local 1 ]]></Description> + <Description><![CDATA[cleanup skipLocal local 1]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> - <Description><![CDATA[init skipLocal local 2 ]]></Description> + <Description><![CDATA[init skipLocal local 2]]></Description> </Message> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp" line="149"> +<Message type="skip" file="tst_globaldata.cpp" line="149"> <DataTag><![CDATA[1:local 2]]></DataTag> <Description><![CDATA[skipping]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> - <Description><![CDATA[cleanup skipLocal local 2 ]]></Description> + <Description><![CDATA[cleanup skipLocal local 2]]></Description> </Message> </TestFunction> <TestFunction name="skipSingle"> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> - <Description><![CDATA[init skipSingle local 1 ]]></Description> + <Description><![CDATA[init skipSingle local 1]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> - <Description><![CDATA[global: false local: false ]]></Description> + <Description><![CDATA[global: false local: false]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> - <Description><![CDATA[cleanup skipSingle local 1 ]]></Description> + <Description><![CDATA[cleanup skipSingle local 1]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> - <Description><![CDATA[init skipSingle local 2 ]]></Description> + <Description><![CDATA[init skipSingle local 2]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> - <Description><![CDATA[global: false local: true ]]></Description> + <Description><![CDATA[global: false local: true]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> - <Description><![CDATA[cleanup skipSingle local 2 ]]></Description> + <Description><![CDATA[cleanup skipSingle local 2]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 1]]></DataTag> - <Description><![CDATA[init skipSingle local 1 ]]></Description> + <Description><![CDATA[init skipSingle local 1]]></Description> </Message> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp" line="143"> +<Message type="skip" file="tst_globaldata.cpp" line="143"> <DataTag><![CDATA[2:local 1]]></DataTag> <Description><![CDATA[skipping]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 1]]></DataTag> - <Description><![CDATA[cleanup skipSingle local 1 ]]></Description> + <Description><![CDATA[cleanup skipSingle local 1]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 2]]></DataTag> - <Description><![CDATA[init skipSingle local 2 ]]></Description> + <Description><![CDATA[init skipSingle local 2]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 2]]></DataTag> - <Description><![CDATA[global: true local: true ]]></Description> + <Description><![CDATA[global: true local: true]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 2]]></DataTag> - <Description><![CDATA[cleanup skipSingle local 2 ]]></Description> + <Description><![CDATA[cleanup skipSingle local 2]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[2:local 2]]></DataTag> @@ -179,7 +179,7 @@ </TestFunction> <TestFunction name="cleanupTestCase"> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[cleanupTestCase cleanupTestCase (null) ]]></Description> + <Description><![CDATA[cleanupTestCase cleanupTestCase (null)]]></Description> </Message> <Incident type="pass" file="" line="0" /> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_globaldata.txt b/tests/auto/testlib/selftests/expected_globaldata.txt index e5d9cacc9c..a7c18e765b 100644 --- a/tests/auto/testlib/selftests/expected_globaldata.txt +++ b/tests/auto/testlib/selftests/expected_globaldata.txt @@ -1,54 +1,54 @@ ********* Start testing of tst_globaldata ********* Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ -QDEBUG : tst_globaldata::initTestCase() initTestCase initTestCase (null) +QDEBUG : tst_globaldata::initTestCase() initTestCase initTestCase (null) PASS : tst_globaldata::initTestCase() -QDEBUG : tst_globaldata::testGlobal(1:local 1) init testGlobal local 1 -QDEBUG : tst_globaldata::testGlobal(1:local 1) global: false -QDEBUG : tst_globaldata::testGlobal(1:local 1) local: false -QDEBUG : tst_globaldata::testGlobal(1:local 1) cleanup testGlobal local 1 +QDEBUG : tst_globaldata::testGlobal(1:local 1) init testGlobal local 1 +QDEBUG : tst_globaldata::testGlobal(1:local 1) global: false +QDEBUG : tst_globaldata::testGlobal(1:local 1) local: false +QDEBUG : tst_globaldata::testGlobal(1:local 1) cleanup testGlobal local 1 PASS : tst_globaldata::testGlobal(1:local 1) -QDEBUG : tst_globaldata::testGlobal(1:local 2) init testGlobal local 2 -QDEBUG : tst_globaldata::testGlobal(1:local 2) global: false -QDEBUG : tst_globaldata::testGlobal(1:local 2) local: true -QDEBUG : tst_globaldata::testGlobal(1:local 2) cleanup testGlobal local 2 +QDEBUG : tst_globaldata::testGlobal(1:local 2) init testGlobal local 2 +QDEBUG : tst_globaldata::testGlobal(1:local 2) global: false +QDEBUG : tst_globaldata::testGlobal(1:local 2) local: true +QDEBUG : tst_globaldata::testGlobal(1:local 2) cleanup testGlobal local 2 PASS : tst_globaldata::testGlobal(1:local 2) -QDEBUG : tst_globaldata::testGlobal(2:local 1) init testGlobal local 1 -QDEBUG : tst_globaldata::testGlobal(2:local 1) global: true -QDEBUG : tst_globaldata::testGlobal(2:local 1) local: false -QDEBUG : tst_globaldata::testGlobal(2:local 1) cleanup testGlobal local 1 +QDEBUG : tst_globaldata::testGlobal(2:local 1) init testGlobal local 1 +QDEBUG : tst_globaldata::testGlobal(2:local 1) global: true +QDEBUG : tst_globaldata::testGlobal(2:local 1) local: false +QDEBUG : tst_globaldata::testGlobal(2:local 1) cleanup testGlobal local 1 PASS : tst_globaldata::testGlobal(2:local 1) -QDEBUG : tst_globaldata::testGlobal(2:local 2) init testGlobal local 2 -QDEBUG : tst_globaldata::testGlobal(2:local 2) global: true -QDEBUG : tst_globaldata::testGlobal(2:local 2) local: true -QDEBUG : tst_globaldata::testGlobal(2:local 2) cleanup testGlobal local 2 +QDEBUG : tst_globaldata::testGlobal(2:local 2) init testGlobal local 2 +QDEBUG : tst_globaldata::testGlobal(2:local 2) global: true +QDEBUG : tst_globaldata::testGlobal(2:local 2) local: true +QDEBUG : tst_globaldata::testGlobal(2:local 2) cleanup testGlobal local 2 PASS : tst_globaldata::testGlobal(2:local 2) SKIP : tst_globaldata::skip(1) skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(129)] -QDEBUG : tst_globaldata::skipLocal(1:local 1) init skipLocal local 1 + Loc: [tst_globaldata.cpp(129)] +QDEBUG : tst_globaldata::skipLocal(1:local 1) init skipLocal local 1 SKIP : tst_globaldata::skipLocal(1:local 1) skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(149)] -QDEBUG : tst_globaldata::skipLocal(1:local 1) cleanup skipLocal local 1 -QDEBUG : tst_globaldata::skipLocal(1:local 2) init skipLocal local 2 + Loc: [tst_globaldata.cpp(149)] +QDEBUG : tst_globaldata::skipLocal(1:local 1) cleanup skipLocal local 1 +QDEBUG : tst_globaldata::skipLocal(1:local 2) init skipLocal local 2 SKIP : tst_globaldata::skipLocal(1:local 2) skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(149)] -QDEBUG : tst_globaldata::skipLocal(1:local 2) cleanup skipLocal local 2 -QDEBUG : tst_globaldata::skipSingle(1:local 1) init skipSingle local 1 -QDEBUG : tst_globaldata::skipSingle(1:local 1) global: false local: false -QDEBUG : tst_globaldata::skipSingle(1:local 1) cleanup skipSingle local 1 + Loc: [tst_globaldata.cpp(149)] +QDEBUG : tst_globaldata::skipLocal(1:local 2) cleanup skipLocal local 2 +QDEBUG : tst_globaldata::skipSingle(1:local 1) init skipSingle local 1 +QDEBUG : tst_globaldata::skipSingle(1:local 1) global: false local: false +QDEBUG : tst_globaldata::skipSingle(1:local 1) cleanup skipSingle local 1 PASS : tst_globaldata::skipSingle(1:local 1) -QDEBUG : tst_globaldata::skipSingle(1:local 2) init skipSingle local 2 -QDEBUG : tst_globaldata::skipSingle(1:local 2) global: false local: true -QDEBUG : tst_globaldata::skipSingle(1:local 2) cleanup skipSingle local 2 +QDEBUG : tst_globaldata::skipSingle(1:local 2) init skipSingle local 2 +QDEBUG : tst_globaldata::skipSingle(1:local 2) global: false local: true +QDEBUG : tst_globaldata::skipSingle(1:local 2) cleanup skipSingle local 2 PASS : tst_globaldata::skipSingle(1:local 2) -QDEBUG : tst_globaldata::skipSingle(2:local 1) init skipSingle local 1 +QDEBUG : tst_globaldata::skipSingle(2:local 1) init skipSingle local 1 SKIP : tst_globaldata::skipSingle(2:local 1) skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(143)] -QDEBUG : tst_globaldata::skipSingle(2:local 1) cleanup skipSingle local 1 -QDEBUG : tst_globaldata::skipSingle(2:local 2) init skipSingle local 2 -QDEBUG : tst_globaldata::skipSingle(2:local 2) global: true local: true -QDEBUG : tst_globaldata::skipSingle(2:local 2) cleanup skipSingle local 2 + Loc: [tst_globaldata.cpp(143)] +QDEBUG : tst_globaldata::skipSingle(2:local 1) cleanup skipSingle local 1 +QDEBUG : tst_globaldata::skipSingle(2:local 2) init skipSingle local 2 +QDEBUG : tst_globaldata::skipSingle(2:local 2) global: true local: true +QDEBUG : tst_globaldata::skipSingle(2:local 2) cleanup skipSingle local 2 PASS : tst_globaldata::skipSingle(2:local 2) -QDEBUG : tst_globaldata::cleanupTestCase() cleanupTestCase cleanupTestCase (null) +QDEBUG : tst_globaldata::cleanupTestCase() cleanupTestCase cleanupTestCase (null) PASS : tst_globaldata::cleanupTestCase() Totals: 9 passed, 0 failed, 4 skipped ********* Finished testing of tst_globaldata ********* diff --git a/tests/auto/testlib/selftests/expected_globaldata.xml b/tests/auto/testlib/selftests/expected_globaldata.xml index 906e66ca68..10fd4fd571 100644 --- a/tests/auto/testlib/selftests/expected_globaldata.xml +++ b/tests/auto/testlib/selftests/expected_globaldata.xml @@ -6,90 +6,90 @@ </Environment> <TestFunction name="initTestCase"> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[initTestCase initTestCase (null) ]]></Description> + <Description><![CDATA[initTestCase initTestCase (null)]]></Description> </Message> <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="testGlobal"> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> - <Description><![CDATA[init testGlobal local 1 ]]></Description> + <Description><![CDATA[init testGlobal local 1]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> - <Description><![CDATA[global: false ]]></Description> + <Description><![CDATA[global: false]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> - <Description><![CDATA[local: false ]]></Description> + <Description><![CDATA[local: false]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> - <Description><![CDATA[cleanup testGlobal local 1 ]]></Description> + <Description><![CDATA[cleanup testGlobal local 1]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> - <Description><![CDATA[init testGlobal local 2 ]]></Description> + <Description><![CDATA[init testGlobal local 2]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> - <Description><![CDATA[global: false ]]></Description> + <Description><![CDATA[global: false]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> - <Description><![CDATA[local: true ]]></Description> + <Description><![CDATA[local: true]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> - <Description><![CDATA[cleanup testGlobal local 2 ]]></Description> + <Description><![CDATA[cleanup testGlobal local 2]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 1]]></DataTag> - <Description><![CDATA[init testGlobal local 1 ]]></Description> + <Description><![CDATA[init testGlobal local 1]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 1]]></DataTag> - <Description><![CDATA[global: true ]]></Description> + <Description><![CDATA[global: true]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 1]]></DataTag> - <Description><![CDATA[local: false ]]></Description> + <Description><![CDATA[local: false]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 1]]></DataTag> - <Description><![CDATA[cleanup testGlobal local 1 ]]></Description> + <Description><![CDATA[cleanup testGlobal local 1]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[2:local 1]]></DataTag> </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 2]]></DataTag> - <Description><![CDATA[init testGlobal local 2 ]]></Description> + <Description><![CDATA[init testGlobal local 2]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 2]]></DataTag> - <Description><![CDATA[global: true ]]></Description> + <Description><![CDATA[global: true]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 2]]></DataTag> - <Description><![CDATA[local: true ]]></Description> + <Description><![CDATA[local: true]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 2]]></DataTag> - <Description><![CDATA[cleanup testGlobal local 2 ]]></Description> + <Description><![CDATA[cleanup testGlobal local 2]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[2:local 2]]></DataTag> </Incident> </TestFunction> <TestFunction name="skip"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp" line="129"> +<Message type="skip" file="tst_globaldata.cpp" line="129"> <DataTag><![CDATA[1]]></DataTag> <Description><![CDATA[skipping]]></Description> </Message> @@ -97,83 +97,83 @@ <TestFunction name="skipLocal"> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> - <Description><![CDATA[init skipLocal local 1 ]]></Description> + <Description><![CDATA[init skipLocal local 1]]></Description> </Message> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp" line="149"> +<Message type="skip" file="tst_globaldata.cpp" line="149"> <DataTag><![CDATA[1:local 1]]></DataTag> <Description><![CDATA[skipping]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> - <Description><![CDATA[cleanup skipLocal local 1 ]]></Description> + <Description><![CDATA[cleanup skipLocal local 1]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> - <Description><![CDATA[init skipLocal local 2 ]]></Description> + <Description><![CDATA[init skipLocal local 2]]></Description> </Message> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp" line="149"> +<Message type="skip" file="tst_globaldata.cpp" line="149"> <DataTag><![CDATA[1:local 2]]></DataTag> <Description><![CDATA[skipping]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> - <Description><![CDATA[cleanup skipLocal local 2 ]]></Description> + <Description><![CDATA[cleanup skipLocal local 2]]></Description> </Message> </TestFunction> <TestFunction name="skipSingle"> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> - <Description><![CDATA[init skipSingle local 1 ]]></Description> + <Description><![CDATA[init skipSingle local 1]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> - <Description><![CDATA[global: false local: false ]]></Description> + <Description><![CDATA[global: false local: false]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> - <Description><![CDATA[cleanup skipSingle local 1 ]]></Description> + <Description><![CDATA[cleanup skipSingle local 1]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[1:local 1]]></DataTag> </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> - <Description><![CDATA[init skipSingle local 2 ]]></Description> + <Description><![CDATA[init skipSingle local 2]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> - <Description><![CDATA[global: false local: true ]]></Description> + <Description><![CDATA[global: false local: true]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> - <Description><![CDATA[cleanup skipSingle local 2 ]]></Description> + <Description><![CDATA[cleanup skipSingle local 2]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[1:local 2]]></DataTag> </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 1]]></DataTag> - <Description><![CDATA[init skipSingle local 1 ]]></Description> + <Description><![CDATA[init skipSingle local 1]]></Description> </Message> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp" line="143"> +<Message type="skip" file="tst_globaldata.cpp" line="143"> <DataTag><![CDATA[2:local 1]]></DataTag> <Description><![CDATA[skipping]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 1]]></DataTag> - <Description><![CDATA[cleanup skipSingle local 1 ]]></Description> + <Description><![CDATA[cleanup skipSingle local 1]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 2]]></DataTag> - <Description><![CDATA[init skipSingle local 2 ]]></Description> + <Description><![CDATA[init skipSingle local 2]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 2]]></DataTag> - <Description><![CDATA[global: true local: true ]]></Description> + <Description><![CDATA[global: true local: true]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[2:local 2]]></DataTag> - <Description><![CDATA[cleanup skipSingle local 2 ]]></Description> + <Description><![CDATA[cleanup skipSingle local 2]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[2:local 2]]></DataTag> @@ -181,7 +181,7 @@ </TestFunction> <TestFunction name="cleanupTestCase"> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[cleanupTestCase cleanupTestCase (null) ]]></Description> + <Description><![CDATA[cleanupTestCase cleanupTestCase (null)]]></Description> </Message> <Incident type="pass" file="" line="0" /> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_globaldata.xunitxml b/tests/auto/testlib/selftests/expected_globaldata.xunitxml index 9e0cd149dc..e8cd03a59c 100644 --- a/tests/auto/testlib/selftests/expected_globaldata.xunitxml +++ b/tests/auto/testlib/selftests/expected_globaldata.xunitxml @@ -5,91 +5,91 @@ <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> </properties> <testcase result="pass" name="initTestCase"> - <!-- message="initTestCase initTestCase (null) " type="qdebug" --> + <!-- message="initTestCase initTestCase (null)" type="qdebug" --> </testcase> <testcase result="pass" name="testGlobal"> - <!-- tag="1:local 1" message="init testGlobal local 1 " type="qdebug" --> - <!-- tag="1:local 1" message="global: false " type="qdebug" --> - <!-- tag="1:local 1" message="local: false " type="qdebug" --> - <!-- tag="1:local 1" message="cleanup testGlobal local 1 " type="qdebug" --> - <!-- tag="1:local 2" message="init testGlobal local 2 " type="qdebug" --> - <!-- tag="1:local 2" message="global: false " type="qdebug" --> - <!-- tag="1:local 2" message="local: true " type="qdebug" --> - <!-- tag="1:local 2" message="cleanup testGlobal local 2 " type="qdebug" --> - <!-- tag="2:local 1" message="init testGlobal local 1 " type="qdebug" --> - <!-- tag="2:local 1" message="global: true " type="qdebug" --> - <!-- tag="2:local 1" message="local: false " type="qdebug" --> - <!-- tag="2:local 1" message="cleanup testGlobal local 1 " type="qdebug" --> - <!-- tag="2:local 2" message="init testGlobal local 2 " type="qdebug" --> - <!-- tag="2:local 2" message="global: true " type="qdebug" --> - <!-- tag="2:local 2" message="local: true " type="qdebug" --> - <!-- tag="2:local 2" message="cleanup testGlobal local 2 " type="qdebug" --> + <!-- tag="1:local 1" message="init testGlobal local 1" type="qdebug" --> + <!-- tag="1:local 1" message="global: false" type="qdebug" --> + <!-- tag="1:local 1" message="local: false" type="qdebug" --> + <!-- tag="1:local 1" message="cleanup testGlobal local 1" type="qdebug" --> + <!-- tag="1:local 2" message="init testGlobal local 2" type="qdebug" --> + <!-- tag="1:local 2" message="global: false" type="qdebug" --> + <!-- tag="1:local 2" message="local: true" type="qdebug" --> + <!-- tag="1:local 2" message="cleanup testGlobal local 2" type="qdebug" --> + <!-- tag="2:local 1" message="init testGlobal local 1" type="qdebug" --> + <!-- tag="2:local 1" message="global: true" type="qdebug" --> + <!-- tag="2:local 1" message="local: false" type="qdebug" --> + <!-- tag="2:local 1" message="cleanup testGlobal local 1" type="qdebug" --> + <!-- tag="2:local 2" message="init testGlobal local 2" type="qdebug" --> + <!-- tag="2:local 2" message="global: true" type="qdebug" --> + <!-- tag="2:local 2" message="local: true" type="qdebug" --> + <!-- tag="2:local 2" message="cleanup testGlobal local 2" type="qdebug" --> </testcase> <testcase name="skip"> <!-- tag="1" message="skipping" type="skip" --> </testcase> <testcase name="skipLocal"> - <!-- tag="1:local 1" message="init skipLocal local 1 " type="qdebug" --> + <!-- tag="1:local 1" message="init skipLocal local 1" type="qdebug" --> <!-- tag="1:local 1" message="skipping" type="skip" --> - <!-- tag="1:local 1" message="cleanup skipLocal local 1 " type="qdebug" --> - <!-- tag="1:local 2" message="init skipLocal local 2 " type="qdebug" --> + <!-- tag="1:local 1" message="cleanup skipLocal local 1" type="qdebug" --> + <!-- tag="1:local 2" message="init skipLocal local 2" type="qdebug" --> <!-- tag="1:local 2" message="skipping" type="skip" --> - <!-- tag="1:local 2" message="cleanup skipLocal local 2 " type="qdebug" --> + <!-- tag="1:local 2" message="cleanup skipLocal local 2" type="qdebug" --> </testcase> <testcase result="pass" name="skipSingle"> - <!-- tag="1:local 1" message="init skipSingle local 1 " type="qdebug" --> - <!-- tag="1:local 1" message="global: false local: false " type="qdebug" --> - <!-- tag="1:local 1" message="cleanup skipSingle local 1 " type="qdebug" --> - <!-- tag="1:local 2" message="init skipSingle local 2 " type="qdebug" --> - <!-- tag="1:local 2" message="global: false local: true " type="qdebug" --> - <!-- tag="1:local 2" message="cleanup skipSingle local 2 " type="qdebug" --> - <!-- tag="2:local 1" message="init skipSingle local 1 " type="qdebug" --> + <!-- tag="1:local 1" message="init skipSingle local 1" type="qdebug" --> + <!-- tag="1:local 1" message="global: false local: false" type="qdebug" --> + <!-- tag="1:local 1" message="cleanup skipSingle local 1" type="qdebug" --> + <!-- tag="1:local 2" message="init skipSingle local 2" type="qdebug" --> + <!-- tag="1:local 2" message="global: false local: true" type="qdebug" --> + <!-- tag="1:local 2" message="cleanup skipSingle local 2" type="qdebug" --> + <!-- tag="2:local 1" message="init skipSingle local 1" type="qdebug" --> <!-- tag="2:local 1" message="skipping" type="skip" --> - <!-- tag="2:local 1" message="cleanup skipSingle local 1 " type="qdebug" --> - <!-- tag="2:local 2" message="init skipSingle local 2 " type="qdebug" --> - <!-- tag="2:local 2" message="global: true local: true " type="qdebug" --> - <!-- tag="2:local 2" message="cleanup skipSingle local 2 " type="qdebug" --> + <!-- tag="2:local 1" message="cleanup skipSingle local 1" type="qdebug" --> + <!-- tag="2:local 2" message="init skipSingle local 2" type="qdebug" --> + <!-- tag="2:local 2" message="global: true local: true" type="qdebug" --> + <!-- tag="2:local 2" message="cleanup skipSingle local 2" type="qdebug" --> </testcase> <testcase result="pass" name="cleanupTestCase"> - <!-- message="cleanupTestCase cleanupTestCase (null) " type="qdebug" --> + <!-- message="cleanupTestCase cleanupTestCase (null)" type="qdebug" --> </testcase> <system-err> -<![CDATA[initTestCase initTestCase (null) ]]> -<![CDATA[init testGlobal local 1 ]]> -<![CDATA[global: false ]]> -<![CDATA[local: false ]]> -<![CDATA[cleanup testGlobal local 1 ]]> -<![CDATA[init testGlobal local 2 ]]> -<![CDATA[global: false ]]> -<![CDATA[local: true ]]> -<![CDATA[cleanup testGlobal local 2 ]]> -<![CDATA[init testGlobal local 1 ]]> -<![CDATA[global: true ]]> -<![CDATA[local: false ]]> -<![CDATA[cleanup testGlobal local 1 ]]> -<![CDATA[init testGlobal local 2 ]]> -<![CDATA[global: true ]]> -<![CDATA[local: true ]]> -<![CDATA[cleanup testGlobal local 2 ]]> +<![CDATA[initTestCase initTestCase (null)]]> +<![CDATA[init testGlobal local 1]]> +<![CDATA[global: false]]> +<![CDATA[local: false]]> +<![CDATA[cleanup testGlobal local 1]]> +<![CDATA[init testGlobal local 2]]> +<![CDATA[global: false]]> +<![CDATA[local: true]]> +<![CDATA[cleanup testGlobal local 2]]> +<![CDATA[init testGlobal local 1]]> +<![CDATA[global: true]]> +<![CDATA[local: false]]> +<![CDATA[cleanup testGlobal local 1]]> +<![CDATA[init testGlobal local 2]]> +<![CDATA[global: true]]> +<![CDATA[local: true]]> +<![CDATA[cleanup testGlobal local 2]]> <![CDATA[skipping]]> -<![CDATA[init skipLocal local 1 ]]> +<![CDATA[init skipLocal local 1]]> <![CDATA[skipping]]> -<![CDATA[cleanup skipLocal local 1 ]]> -<![CDATA[init skipLocal local 2 ]]> +<![CDATA[cleanup skipLocal local 1]]> +<![CDATA[init skipLocal local 2]]> <![CDATA[skipping]]> -<![CDATA[cleanup skipLocal local 2 ]]> -<![CDATA[init skipSingle local 1 ]]> -<![CDATA[global: false local: false ]]> -<![CDATA[cleanup skipSingle local 1 ]]> -<![CDATA[init skipSingle local 2 ]]> -<![CDATA[global: false local: true ]]> -<![CDATA[cleanup skipSingle local 2 ]]> -<![CDATA[init skipSingle local 1 ]]> +<![CDATA[cleanup skipLocal local 2]]> +<![CDATA[init skipSingle local 1]]> +<![CDATA[global: false local: false]]> +<![CDATA[cleanup skipSingle local 1]]> +<![CDATA[init skipSingle local 2]]> +<![CDATA[global: false local: true]]> +<![CDATA[cleanup skipSingle local 2]]> +<![CDATA[init skipSingle local 1]]> <![CDATA[skipping]]> -<![CDATA[cleanup skipSingle local 1 ]]> -<![CDATA[init skipSingle local 2 ]]> -<![CDATA[global: true local: true ]]> -<![CDATA[cleanup skipSingle local 2 ]]> -<![CDATA[cleanupTestCase cleanupTestCase (null) ]]> +<![CDATA[cleanup skipSingle local 1]]> +<![CDATA[init skipSingle local 2]]> +<![CDATA[global: true local: true]]> +<![CDATA[cleanup skipSingle local 2]]> +<![CDATA[cleanupTestCase cleanupTestCase (null)]]> </system-err> </testsuite> diff --git a/tests/auto/testlib/selftests/expected_longstring.lightxml b/tests/auto/testlib/selftests/expected_longstring.lightxml index 80c528e0d7..2b3a585bf2 100644 --- a/tests/auto/testlib/selftests/expected_longstring.lightxml +++ b/tests/auto/testlib/selftests/expected_longstring.lightxml @@ -6,7 +6,7 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="failWithLongString"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/longstring/tst_longstring.cpp" line="67"> +<Incident type="fail" file="tst_longstring.cpp" line="67"> <Description><![CDATA[Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. diff --git a/tests/auto/testlib/selftests/expected_longstring.txt b/tests/auto/testlib/selftests/expected_longstring.txt index b367e64959..364c8cf4a7 100644 --- a/tests/auto/testlib/selftests/expected_longstring.txt +++ b/tests/auto/testlib/selftests/expected_longstring.txt @@ -10,7 +10,7 @@ Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, impe Curabitur ligula sapien, tincidunt non, euismod vitae, posuere imperdiet, leo. Maecenas malesuada. Praesent congue erat at massa. Sed cursus turpis vitae tortor. Donec posuere vulputate arcu. Phasellus accumsan cursus velit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed aliquam, nisi quis porttitor congue, elit erat euismod orci, ac placerat dolor lectus quis orci. Phasellus consectetuer vestibulum elit. Aenean tellus metus, bibendum sed, posuere ac, mattis non, nunc. Vestibulum fringilla pede sit amet augue. In turpis. Pellentesque posuere. Praesent turpis. Aenean posuere, tortor sed cursus feugiat, nunc augue blandit nunc, eu sollicitudin urna dolor sagittis lacus. Donec elit libero, sodales nec, volutpat a, suscipit non, turpis. Nullam sagittis. Suspendisse pulvinar, augue ac venenatis condimentum, sem libero volutpat nibh, nec pellentesque velit pede quis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce id purus. Ut varius tincidunt libero. Phasellus dolor. Maecenas vestibulum mollis diam. Pellentesque ut neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/longstring/tst_longstring.cpp(67)] + Loc: [tst_longstring.cpp(67)] PASS : tst_LongString::cleanupTestCase() Totals: 2 passed, 1 failed, 0 skipped ********* Finished testing of tst_LongString ********* diff --git a/tests/auto/testlib/selftests/expected_longstring.xml b/tests/auto/testlib/selftests/expected_longstring.xml index b3d1c5c846..dd60dcd94c 100644 --- a/tests/auto/testlib/selftests/expected_longstring.xml +++ b/tests/auto/testlib/selftests/expected_longstring.xml @@ -8,7 +8,7 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="failWithLongString"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/longstring/tst_longstring.cpp" line="67"> +<Incident type="fail" file="tst_longstring.cpp" line="67"> <Description><![CDATA[Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. diff --git a/tests/auto/testlib/selftests/expected_silent.txt b/tests/auto/testlib/selftests/expected_silent.txt index 39e0bfc601..5d4c77bffd 100644 --- a/tests/auto/testlib/selftests/expected_silent.txt +++ b/tests/auto/testlib/selftests/expected_silent.txt @@ -1,8 +1,8 @@ Testing tst_Silent FAIL! : tst_Silent::fail() 'false' returned FALSE. (This test should fail) - Loc: [/home/jasmcdon/depot/qt5-test/qtbase/tests/auto/testlib/selftests/silent/tst_silent.cpp(73)] + Loc: [tst_silent.cpp(73)] XPASS : tst_Silent::xpass() 'true' returned TRUE unexpectedly. (This test should XPASS) - Loc: [/home/jasmcdon/depot/qt5-test/qtbase/tests/auto/testlib/selftests/silent/tst_silent.cpp(85)] + Loc: [tst_silent.cpp(85)] QFATAL : tst_Silent::messages() This is a fatal error message that should still appear in silent test output FAIL! : tst_Silent::messages() Received a fatal error. Loc: [Unknown file(0)] diff --git a/tests/auto/testlib/selftests/expected_singleskip.lightxml b/tests/auto/testlib/selftests/expected_singleskip.lightxml index b49b624ffe..0581f8d974 100644 --- a/tests/auto/testlib/selftests/expected_singleskip.lightxml +++ b/tests/auto/testlib/selftests/expected_singleskip.lightxml @@ -6,7 +6,7 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="myTest"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/singleskip/tst_singleskip.cpp" line="56"> +<Message type="skip" file="tst_singleskip.cpp" line="56"> <Description><![CDATA[skipping test]]></Description> </Message> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_singleskip.txt b/tests/auto/testlib/selftests/expected_singleskip.txt index 46b40e5791..ba5415a216 100644 --- a/tests/auto/testlib/selftests/expected_singleskip.txt +++ b/tests/auto/testlib/selftests/expected_singleskip.txt @@ -2,7 +2,7 @@ Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_SingleSkip::initTestCase() SKIP : tst_SingleSkip::myTest() skipping test - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/singleskip/tst_singleskip.cpp(56)] + Loc: [tst_singleskip.cpp(56)] PASS : tst_SingleSkip::cleanupTestCase() Totals: 2 passed, 0 failed, 1 skipped ********* Finished testing of tst_SingleSkip ********* diff --git a/tests/auto/testlib/selftests/expected_singleskip.xml b/tests/auto/testlib/selftests/expected_singleskip.xml index 393344b478..7ebffb04cb 100644 --- a/tests/auto/testlib/selftests/expected_singleskip.xml +++ b/tests/auto/testlib/selftests/expected_singleskip.xml @@ -8,7 +8,7 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="myTest"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/singleskip/tst_singleskip.cpp" line="56"> +<Message type="skip" file="tst_singleskip.cpp" line="56"> <Description><![CDATA[skipping test]]></Description> </Message> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_skip.lightxml b/tests/auto/testlib/selftests/expected_skip.lightxml index b01570e275..44428fbf3c 100644 --- a/tests/auto/testlib/selftests/expected_skip.lightxml +++ b/tests/auto/testlib/selftests/expected_skip.lightxml @@ -6,17 +6,17 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="test"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skip/tst_skip.cpp" line="68"> +<Message type="skip" file="tst_skip.cpp" line="68"> <Description><![CDATA[skipping all]]></Description> </Message> </TestFunction> <TestFunction name="emptytest"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skip/tst_skip.cpp" line="78"> +<Message type="skip" file="tst_skip.cpp" line="78"> <Description><![CDATA[skipping all]]></Description> </Message> </TestFunction> <TestFunction name="singleSkip"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skip/tst_skip.cpp" line="97"> +<Message type="skip" file="tst_skip.cpp" line="97"> <DataTag><![CDATA[local 1]]></DataTag> <Description><![CDATA[skipping one]]></Description> </Message> diff --git a/tests/auto/testlib/selftests/expected_skip.txt b/tests/auto/testlib/selftests/expected_skip.txt index ef96d08d83..9a79e35de3 100644 --- a/tests/auto/testlib/selftests/expected_skip.txt +++ b/tests/auto/testlib/selftests/expected_skip.txt @@ -2,11 +2,11 @@ Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Skip::initTestCase() SKIP : tst_Skip::test() skipping all - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skip/tst_skip.cpp(68)] + Loc: [tst_skip.cpp(68)] SKIP : tst_Skip::emptytest() skipping all - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skip/tst_skip.cpp(78)] + Loc: [tst_skip.cpp(78)] SKIP : tst_Skip::singleSkip(local 1) skipping one - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skip/tst_skip.cpp(97)] + Loc: [tst_skip.cpp(97)] QDEBUG : tst_Skip::singleSkip(local 2) this line should only be reached once (true) PASS : tst_Skip::singleSkip(local 2) PASS : tst_Skip::cleanupTestCase() diff --git a/tests/auto/testlib/selftests/expected_skip.xml b/tests/auto/testlib/selftests/expected_skip.xml index 0f010860d4..a4e6bc96fe 100644 --- a/tests/auto/testlib/selftests/expected_skip.xml +++ b/tests/auto/testlib/selftests/expected_skip.xml @@ -8,17 +8,17 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="test"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skip/tst_skip.cpp" line="68"> +<Message type="skip" file="tst_skip.cpp" line="68"> <Description><![CDATA[skipping all]]></Description> </Message> </TestFunction> <TestFunction name="emptytest"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skip/tst_skip.cpp" line="78"> +<Message type="skip" file="tst_skip.cpp" line="78"> <Description><![CDATA[skipping all]]></Description> </Message> </TestFunction> <TestFunction name="singleSkip"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skip/tst_skip.cpp" line="97"> +<Message type="skip" file="tst_skip.cpp" line="97"> <DataTag><![CDATA[local 1]]></DataTag> <Description><![CDATA[skipping one]]></Description> </Message> diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.lightxml b/tests/auto/testlib/selftests/expected_skipcleanup.lightxml index d2bc3b766e..14ce937497 100644 --- a/tests/auto/testlib/selftests/expected_skipcleanup.lightxml +++ b/tests/auto/testlib/selftests/expected_skipcleanup.lightxml @@ -9,7 +9,7 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="cleanupTestCase"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp" line="59"> +<Message type="skip" file="tst_skipcleanup.cpp" line="59"> <Description><![CDATA[Skip inside cleanupTestCase.]]></Description> </Message> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.txt b/tests/auto/testlib/selftests/expected_skipcleanup.txt index 52845c355e..35c5d3dccb 100644 --- a/tests/auto/testlib/selftests/expected_skipcleanup.txt +++ b/tests/auto/testlib/selftests/expected_skipcleanup.txt @@ -3,6 +3,6 @@ Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HER PASS : tst_SkipCleanup::initTestCase() PASS : tst_SkipCleanup::aTestFunction() SKIP : tst_SkipCleanup::cleanupTestCase() Skip inside cleanupTestCase. - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp(59)] + Loc: [tst_skipcleanup.cpp(59)] Totals: 2 passed, 0 failed, 1 skipped ********* Finished testing of tst_SkipCleanup ********* diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.xml b/tests/auto/testlib/selftests/expected_skipcleanup.xml index e6c5d85783..77a02a7d65 100644 --- a/tests/auto/testlib/selftests/expected_skipcleanup.xml +++ b/tests/auto/testlib/selftests/expected_skipcleanup.xml @@ -11,7 +11,7 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="cleanupTestCase"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp" line="59"> +<Message type="skip" file="tst_skipcleanup.cpp" line="59"> <Description><![CDATA[Skip inside cleanupTestCase.]]></Description> </Message> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_skipinit.lightxml b/tests/auto/testlib/selftests/expected_skipinit.lightxml index b5a73d614a..4150838d2f 100644 --- a/tests/auto/testlib/selftests/expected_skipinit.lightxml +++ b/tests/auto/testlib/selftests/expected_skipinit.lightxml @@ -3,7 +3,7 @@ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skipinit/tst_skipinit.cpp" line="55"> +<Message type="skip" file="tst_skipinit.cpp" line="55"> <Description><![CDATA[Skip inside initTestCase. This should skip all tests in the class.]]></Description> </Message> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_skipinit.txt b/tests/auto/testlib/selftests/expected_skipinit.txt index dcd0322e9d..f3de6cd2df 100644 --- a/tests/auto/testlib/selftests/expected_skipinit.txt +++ b/tests/auto/testlib/selftests/expected_skipinit.txt @@ -1,7 +1,7 @@ ********* Start testing of tst_SkipInit ********* Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ SKIP : tst_SkipInit::initTestCase() Skip inside initTestCase. This should skip all tests in the class. - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skipinit/tst_skipinit.cpp(55)] + Loc: [tst_skipinit.cpp(55)] PASS : tst_SkipInit::cleanupTestCase() Totals: 1 passed, 0 failed, 1 skipped ********* Finished testing of tst_SkipInit ********* diff --git a/tests/auto/testlib/selftests/expected_skipinit.xml b/tests/auto/testlib/selftests/expected_skipinit.xml index bc6b7d12f8..d9a595192e 100644 --- a/tests/auto/testlib/selftests/expected_skipinit.xml +++ b/tests/auto/testlib/selftests/expected_skipinit.xml @@ -5,7 +5,7 @@ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skipinit/tst_skipinit.cpp" line="55"> +<Message type="skip" file="tst_skipinit.cpp" line="55"> <Description><![CDATA[Skip inside initTestCase. This should skip all tests in the class.]]></Description> </Message> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_skipinitdata.lightxml b/tests/auto/testlib/selftests/expected_skipinitdata.lightxml index cd820240fd..051292f04b 100644 --- a/tests/auto/testlib/selftests/expected_skipinitdata.lightxml +++ b/tests/auto/testlib/selftests/expected_skipinitdata.lightxml @@ -3,7 +3,7 @@ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skipinitdata/tst_skipinitdata.cpp" line="56"> +<Message type="skip" file="tst_skipinitdata.cpp" line="56"> <Description><![CDATA[Skip inside initTestCase_data. This should skip all tests in the class.]]></Description> </Message> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_skipinitdata.txt b/tests/auto/testlib/selftests/expected_skipinitdata.txt index 1010f97689..912ab8cd6d 100644 --- a/tests/auto/testlib/selftests/expected_skipinitdata.txt +++ b/tests/auto/testlib/selftests/expected_skipinitdata.txt @@ -1,6 +1,6 @@ ********* Start testing of tst_SkipInitData ********* Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ SKIP : tst_SkipInitData::initTestCase() Skip inside initTestCase_data. This should skip all tests in the class. - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skipinitdata/tst_skipinitdata.cpp(56)] + Loc: [tst_skipinitdata.cpp(56)] Totals: 0 passed, 0 failed, 1 skipped ********* Finished testing of tst_SkipInitData ********* diff --git a/tests/auto/testlib/selftests/expected_skipinitdata.xml b/tests/auto/testlib/selftests/expected_skipinitdata.xml index eb42569598..8c5fbd8fc4 100644 --- a/tests/auto/testlib/selftests/expected_skipinitdata.xml +++ b/tests/auto/testlib/selftests/expected_skipinitdata.xml @@ -5,7 +5,7 @@ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> </Environment> <TestFunction name="initTestCase"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skipinitdata/tst_skipinitdata.cpp" line="56"> +<Message type="skip" file="tst_skipinitdata.cpp" line="56"> <Description><![CDATA[Skip inside initTestCase_data. This should skip all tests in the class.]]></Description> </Message> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_strcmp.lightxml b/tests/auto/testlib/selftests/expected_strcmp.lightxml index 4c30c9f801..6ad7e7b997 100644 --- a/tests/auto/testlib/selftests/expected_strcmp.lightxml +++ b/tests/auto/testlib/selftests/expected_strcmp.lightxml @@ -9,44 +9,44 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="compareByteArray"> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="88"> +<Incident type="xfail" file="tst_strcmp.cpp" line="88"> <Description><![CDATA[Next test should fail]]></Description> </Incident> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="95"> +<Incident type="xfail" file="tst_strcmp.cpp" line="95"> <Description><![CDATA[Next test should fail]]></Description> </Incident> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="102"> +<Incident type="xfail" file="tst_strcmp.cpp" line="102"> <Description><![CDATA[Next test should fail]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="109"> +<Incident type="fail" file="tst_strcmp.cpp" line="109"> <Description><![CDATA[Compared values are not the same Actual (a): 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 ... Expected (b): 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 ...]]></Description> </Incident> </TestFunction> <TestFunction name="failByteArray"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="115"> +<Incident type="fail" file="tst_strcmp.cpp" line="115"> <Description><![CDATA[Compared values are not the same Actual (QByteArray("abc")): 61 62 63 Expected (QByteArray("cba")): 63 62 61]]></Description> </Incident> </TestFunction> <TestFunction name="failByteArrayNull"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="121"> +<Incident type="fail" file="tst_strcmp.cpp" line="121"> <Description><![CDATA[Compared values are not the same Actual (QByteArray("foo")): 66 6F 6F Expected (QByteArray()) : ]]></Description> </Incident> </TestFunction> <TestFunction name="failByteArrayEmpty"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="126"> +<Incident type="fail" file="tst_strcmp.cpp" line="126"> <Description><![CDATA[Compared values are not the same Actual (QByteArray("")) : Expected (QByteArray("foo")): 66 6F 6F]]></Description> </Incident> </TestFunction> <TestFunction name="failByteArraySingleChars"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="133"> +<Incident type="fail" file="tst_strcmp.cpp" line="133"> <Description><![CDATA[Compared values are not the same Actual (QByteArray("6")): 36 Expected (QByteArray("7")): 37]]></Description> diff --git a/tests/auto/testlib/selftests/expected_strcmp.txt b/tests/auto/testlib/selftests/expected_strcmp.txt index f3ad169fb7..4bd3844d08 100644 --- a/tests/auto/testlib/selftests/expected_strcmp.txt +++ b/tests/auto/testlib/selftests/expected_strcmp.txt @@ -3,31 +3,31 @@ Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HER PASS : tst_StrCmp::initTestCase() PASS : tst_StrCmp::compareCharStars() XFAIL : tst_StrCmp::compareByteArray() Next test should fail - Loc: [./tst_strcmp.cpp(55)] + Loc: [tst_strcmp.cpp(88)] XFAIL : tst_StrCmp::compareByteArray() Next test should fail - Loc: [./tst_strcmp.cpp(62)] + Loc: [tst_strcmp.cpp(95)] XFAIL : tst_StrCmp::compareByteArray() Next test should fail - Loc: [./tst_strcmp.cpp(69)] + Loc: [tst_strcmp.cpp(102)] FAIL! : tst_StrCmp::compareByteArray() Compared values are not the same Actual (a): 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 ... Expected (b): 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 ... - Loc: [./tst_strcmp.cpp(76)] + Loc: [tst_strcmp.cpp(109)] FAIL! : tst_StrCmp::failByteArray() Compared values are not the same Actual (QByteArray("abc")): 61 62 63 Expected (QByteArray("cba")): 63 62 61 - Loc: [./tst_strcmp.cpp(82)] + Loc: [tst_strcmp.cpp(115)] FAIL! : tst_StrCmp::failByteArrayNull() Compared values are not the same Actual (QByteArray("foo")): 66 6F 6F Expected (QByteArray()) : - Loc: [./tst_strcmp.cpp(88)] + Loc: [tst_strcmp.cpp(121)] FAIL! : tst_StrCmp::failByteArrayEmpty() Compared values are not the same Actual (QByteArray("")) : Expected (QByteArray("foo")): 66 6F 6F - Loc: [./tst_strcmp.cpp(93)] + Loc: [tst_strcmp.cpp(126)] FAIL! : tst_StrCmp::failByteArraySingleChars() Compared values are not the same Actual (QByteArray("6")): 36 Expected (QByteArray("7")): 37 - Loc: [./tst_strcmp.cpp(100)] + Loc: [tst_strcmp.cpp(133)] PASS : tst_StrCmp::cleanupTestCase() Totals: 3 passed, 5 failed, 0 skipped ********* Finished testing of tst_StrCmp ********* diff --git a/tests/auto/testlib/selftests/expected_strcmp.xml b/tests/auto/testlib/selftests/expected_strcmp.xml index db9ed34bb8..72ecd4277a 100644 --- a/tests/auto/testlib/selftests/expected_strcmp.xml +++ b/tests/auto/testlib/selftests/expected_strcmp.xml @@ -11,44 +11,44 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="compareByteArray"> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="88"> +<Incident type="xfail" file="tst_strcmp.cpp" line="88"> <Description><![CDATA[Next test should fail]]></Description> </Incident> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="95"> +<Incident type="xfail" file="tst_strcmp.cpp" line="95"> <Description><![CDATA[Next test should fail]]></Description> </Incident> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="102"> +<Incident type="xfail" file="tst_strcmp.cpp" line="102"> <Description><![CDATA[Next test should fail]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="109"> +<Incident type="fail" file="tst_strcmp.cpp" line="109"> <Description><![CDATA[Compared values are not the same Actual (a): 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 ... Expected (b): 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 ...]]></Description> </Incident> </TestFunction> <TestFunction name="failByteArray"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="115"> +<Incident type="fail" file="tst_strcmp.cpp" line="115"> <Description><![CDATA[Compared values are not the same Actual (QByteArray("abc")): 61 62 63 Expected (QByteArray("cba")): 63 62 61]]></Description> </Incident> </TestFunction> <TestFunction name="failByteArrayNull"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="121"> +<Incident type="fail" file="tst_strcmp.cpp" line="121"> <Description><![CDATA[Compared values are not the same Actual (QByteArray("foo")): 66 6F 6F Expected (QByteArray()) : ]]></Description> </Incident> </TestFunction> <TestFunction name="failByteArrayEmpty"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="126"> +<Incident type="fail" file="tst_strcmp.cpp" line="126"> <Description><![CDATA[Compared values are not the same Actual (QByteArray("")) : Expected (QByteArray("foo")): 66 6F 6F]]></Description> </Incident> </TestFunction> <TestFunction name="failByteArraySingleChars"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="133"> +<Incident type="fail" file="tst_strcmp.cpp" line="133"> <Description><![CDATA[Compared values are not the same Actual (QByteArray("6")): 36 Expected (QByteArray("7")): 37]]></Description> diff --git a/tests/auto/testlib/selftests/expected_subtest.lightxml b/tests/auto/testlib/selftests/expected_subtest.lightxml index 5adbb771af..40a14663ba 100644 --- a/tests/auto/testlib/selftests/expected_subtest.lightxml +++ b/tests/auto/testlib/selftests/expected_subtest.lightxml @@ -4,82 +4,82 @@ </Environment> <TestFunction name="initTestCase"> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[initTestCase initTestCase (null) ]]></Description> + <Description><![CDATA[initTestCase initTestCase (null)]]></Description> </Message> <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="test1"> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[init test1 (null) ]]></Description> + <Description><![CDATA[init test1 (null)]]></Description> </Message> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[test1 test1 (null) ]]></Description> + <Description><![CDATA[test1 test1 (null)]]></Description> </Message> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[cleanup test1 (null) ]]></Description> + <Description><![CDATA[cleanup test1 (null)]]></Description> </Message> <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="test2"> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[test2_data test2 (null) ]]></Description> + <Description><![CDATA[test2_data test2 (null)]]></Description> </Message> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[test2_data end ]]></Description> + <Description><![CDATA[test2_data end]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data0]]></DataTag> - <Description><![CDATA[init test2 data0 ]]></Description> + <Description><![CDATA[init test2 data0]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data0]]></DataTag> - <Description><![CDATA[test2 test2 data0 ]]></Description> + <Description><![CDATA[test2 test2 data0]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data0]]></DataTag> - <Description><![CDATA[test2 end ]]></Description> + <Description><![CDATA[test2 end]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data0]]></DataTag> - <Description><![CDATA[cleanup test2 data0 ]]></Description> + <Description><![CDATA[cleanup test2 data0]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[data0]]></DataTag> </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data1]]></DataTag> - <Description><![CDATA[init test2 data1 ]]></Description> + <Description><![CDATA[init test2 data1]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data1]]></DataTag> - <Description><![CDATA[test2 test2 data1 ]]></Description> + <Description><![CDATA[test2 test2 data1]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data1]]></DataTag> - <Description><![CDATA[test2 end ]]></Description> + <Description><![CDATA[test2 end]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data1]]></DataTag> - <Description><![CDATA[cleanup test2 data1 ]]></Description> + <Description><![CDATA[cleanup test2 data1]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[data1]]></DataTag> </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data2]]></DataTag> - <Description><![CDATA[init test2 data2 ]]></Description> + <Description><![CDATA[init test2 data2]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data2]]></DataTag> - <Description><![CDATA[test2 test2 data2 ]]></Description> + <Description><![CDATA[test2 test2 data2]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data2]]></DataTag> - <Description><![CDATA[test2 end ]]></Description> + <Description><![CDATA[test2 end]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data2]]></DataTag> - <Description><![CDATA[cleanup test2 data2 ]]></Description> + <Description><![CDATA[cleanup test2 data2]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[data2]]></DataTag> @@ -87,39 +87,39 @@ </TestFunction> <TestFunction name="test3"> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[test3_data test3 (null) ]]></Description> + <Description><![CDATA[test3_data test3 (null)]]></Description> </Message> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[test3_data end ]]></Description> + <Description><![CDATA[test3_data end]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data0]]></DataTag> - <Description><![CDATA[init test3 data0 ]]></Description> + <Description><![CDATA[init test3 data0]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data0]]></DataTag> - <Description><![CDATA[test2 test3 data0 ]]></Description> + <Description><![CDATA[test2 test3 data0]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data0]]></DataTag> - <Description><![CDATA[test2 end ]]></Description> + <Description><![CDATA[test2 end]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data0]]></DataTag> - <Description><![CDATA[cleanup test3 data0 ]]></Description> + <Description><![CDATA[cleanup test3 data0]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[data0]]></DataTag> </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data1]]></DataTag> - <Description><![CDATA[init test3 data1 ]]></Description> + <Description><![CDATA[init test3 data1]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data1]]></DataTag> - <Description><![CDATA[test2 test3 data1 ]]></Description> + <Description><![CDATA[test2 test3 data1]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp" line="154"> +<Incident type="fail" file="tst_subtest.cpp" line="154"> <DataTag><![CDATA[data1]]></DataTag> <Description><![CDATA[Compared values are not the same Actual (str) : hello1 @@ -127,17 +127,17 @@ </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data1]]></DataTag> - <Description><![CDATA[cleanup test3 data1 ]]></Description> + <Description><![CDATA[cleanup test3 data1]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data2]]></DataTag> - <Description><![CDATA[init test3 data2 ]]></Description> + <Description><![CDATA[init test3 data2]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data2]]></DataTag> - <Description><![CDATA[test2 test3 data2 ]]></Description> + <Description><![CDATA[test2 test3 data2]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp" line="154"> +<Incident type="fail" file="tst_subtest.cpp" line="154"> <DataTag><![CDATA[data2]]></DataTag> <Description><![CDATA[Compared values are not the same Actual (str) : hello2 @@ -145,12 +145,12 @@ </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data2]]></DataTag> - <Description><![CDATA[cleanup test3 data2 ]]></Description> + <Description><![CDATA[cleanup test3 data2]]></Description> </Message> </TestFunction> <TestFunction name="cleanupTestCase"> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[cleanupTestCase cleanupTestCase (null) ]]></Description> + <Description><![CDATA[cleanupTestCase cleanupTestCase (null)]]></Description> </Message> <Incident type="pass" file="" line="0" /> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_subtest.txt b/tests/auto/testlib/selftests/expected_subtest.txt index bb88f189ec..e874e0c020 100644 --- a/tests/auto/testlib/selftests/expected_subtest.txt +++ b/tests/auto/testlib/selftests/expected_subtest.txt @@ -1,50 +1,50 @@ ********* Start testing of tst_Subtest ********* Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ -QDEBUG : tst_Subtest::initTestCase() initTestCase initTestCase (null) +QDEBUG : tst_Subtest::initTestCase() initTestCase initTestCase (null) PASS : tst_Subtest::initTestCase() -QDEBUG : tst_Subtest::test1() init test1 (null) -QDEBUG : tst_Subtest::test1() test1 test1 (null) -QDEBUG : tst_Subtest::test1() cleanup test1 (null) +QDEBUG : tst_Subtest::test1() init test1 (null) +QDEBUG : tst_Subtest::test1() test1 test1 (null) +QDEBUG : tst_Subtest::test1() cleanup test1 (null) PASS : tst_Subtest::test1() -QDEBUG : tst_Subtest::test2() test2_data test2 (null) -QDEBUG : tst_Subtest::test2() test2_data end -QDEBUG : tst_Subtest::test2(data0) init test2 data0 -QDEBUG : tst_Subtest::test2(data0) test2 test2 data0 -QDEBUG : tst_Subtest::test2(data0) test2 end -QDEBUG : tst_Subtest::test2(data0) cleanup test2 data0 +QDEBUG : tst_Subtest::test2() test2_data test2 (null) +QDEBUG : tst_Subtest::test2() test2_data end +QDEBUG : tst_Subtest::test2(data0) init test2 data0 +QDEBUG : tst_Subtest::test2(data0) test2 test2 data0 +QDEBUG : tst_Subtest::test2(data0) test2 end +QDEBUG : tst_Subtest::test2(data0) cleanup test2 data0 PASS : tst_Subtest::test2(data0) -QDEBUG : tst_Subtest::test2(data1) init test2 data1 -QDEBUG : tst_Subtest::test2(data1) test2 test2 data1 -QDEBUG : tst_Subtest::test2(data1) test2 end -QDEBUG : tst_Subtest::test2(data1) cleanup test2 data1 +QDEBUG : tst_Subtest::test2(data1) init test2 data1 +QDEBUG : tst_Subtest::test2(data1) test2 test2 data1 +QDEBUG : tst_Subtest::test2(data1) test2 end +QDEBUG : tst_Subtest::test2(data1) cleanup test2 data1 PASS : tst_Subtest::test2(data1) -QDEBUG : tst_Subtest::test2(data2) init test2 data2 -QDEBUG : tst_Subtest::test2(data2) test2 test2 data2 -QDEBUG : tst_Subtest::test2(data2) test2 end -QDEBUG : tst_Subtest::test2(data2) cleanup test2 data2 +QDEBUG : tst_Subtest::test2(data2) init test2 data2 +QDEBUG : tst_Subtest::test2(data2) test2 test2 data2 +QDEBUG : tst_Subtest::test2(data2) test2 end +QDEBUG : tst_Subtest::test2(data2) cleanup test2 data2 PASS : tst_Subtest::test2(data2) -QDEBUG : tst_Subtest::test3() test3_data test3 (null) -QDEBUG : tst_Subtest::test3() test3_data end -QDEBUG : tst_Subtest::test3(data0) init test3 data0 -QDEBUG : tst_Subtest::test3(data0) test2 test3 data0 -QDEBUG : tst_Subtest::test3(data0) test2 end -QDEBUG : tst_Subtest::test3(data0) cleanup test3 data0 +QDEBUG : tst_Subtest::test3() test3_data test3 (null) +QDEBUG : tst_Subtest::test3() test3_data end +QDEBUG : tst_Subtest::test3(data0) init test3 data0 +QDEBUG : tst_Subtest::test3(data0) test2 test3 data0 +QDEBUG : tst_Subtest::test3(data0) test2 end +QDEBUG : tst_Subtest::test3(data0) cleanup test3 data0 PASS : tst_Subtest::test3(data0) -QDEBUG : tst_Subtest::test3(data1) init test3 data1 -QDEBUG : tst_Subtest::test3(data1) test2 test3 data1 +QDEBUG : tst_Subtest::test3(data1) init test3 data1 +QDEBUG : tst_Subtest::test3(data1) test2 test3 data1 FAIL! : tst_Subtest::test3(data1) Compared values are not the same Actual (str) : hello1 Expected (QString("hello0")): hello0 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp(154)] -QDEBUG : tst_Subtest::test3(data1) cleanup test3 data1 -QDEBUG : tst_Subtest::test3(data2) init test3 data2 -QDEBUG : tst_Subtest::test3(data2) test2 test3 data2 + Loc: [tst_subtest.cpp(154)] +QDEBUG : tst_Subtest::test3(data1) cleanup test3 data1 +QDEBUG : tst_Subtest::test3(data2) init test3 data2 +QDEBUG : tst_Subtest::test3(data2) test2 test3 data2 FAIL! : tst_Subtest::test3(data2) Compared values are not the same Actual (str) : hello2 Expected (QString("hello0")): hello0 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp(154)] -QDEBUG : tst_Subtest::test3(data2) cleanup test3 data2 -QDEBUG : tst_Subtest::cleanupTestCase() cleanupTestCase cleanupTestCase (null) + Loc: [tst_subtest.cpp(154)] +QDEBUG : tst_Subtest::test3(data2) cleanup test3 data2 +QDEBUG : tst_Subtest::cleanupTestCase() cleanupTestCase cleanupTestCase (null) PASS : tst_Subtest::cleanupTestCase() Totals: 7 passed, 2 failed, 0 skipped ********* Finished testing of tst_Subtest ********* diff --git a/tests/auto/testlib/selftests/expected_subtest.xml b/tests/auto/testlib/selftests/expected_subtest.xml index 094e22383d..58fda7222e 100644 --- a/tests/auto/testlib/selftests/expected_subtest.xml +++ b/tests/auto/testlib/selftests/expected_subtest.xml @@ -6,82 +6,82 @@ </Environment> <TestFunction name="initTestCase"> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[initTestCase initTestCase (null) ]]></Description> + <Description><![CDATA[initTestCase initTestCase (null)]]></Description> </Message> <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="test1"> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[init test1 (null) ]]></Description> + <Description><![CDATA[init test1 (null)]]></Description> </Message> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[test1 test1 (null) ]]></Description> + <Description><![CDATA[test1 test1 (null)]]></Description> </Message> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[cleanup test1 (null) ]]></Description> + <Description><![CDATA[cleanup test1 (null)]]></Description> </Message> <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="test2"> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[test2_data test2 (null) ]]></Description> + <Description><![CDATA[test2_data test2 (null)]]></Description> </Message> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[test2_data end ]]></Description> + <Description><![CDATA[test2_data end]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data0]]></DataTag> - <Description><![CDATA[init test2 data0 ]]></Description> + <Description><![CDATA[init test2 data0]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data0]]></DataTag> - <Description><![CDATA[test2 test2 data0 ]]></Description> + <Description><![CDATA[test2 test2 data0]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data0]]></DataTag> - <Description><![CDATA[test2 end ]]></Description> + <Description><![CDATA[test2 end]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data0]]></DataTag> - <Description><![CDATA[cleanup test2 data0 ]]></Description> + <Description><![CDATA[cleanup test2 data0]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[data0]]></DataTag> </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data1]]></DataTag> - <Description><![CDATA[init test2 data1 ]]></Description> + <Description><![CDATA[init test2 data1]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data1]]></DataTag> - <Description><![CDATA[test2 test2 data1 ]]></Description> + <Description><![CDATA[test2 test2 data1]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data1]]></DataTag> - <Description><![CDATA[test2 end ]]></Description> + <Description><![CDATA[test2 end]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data1]]></DataTag> - <Description><![CDATA[cleanup test2 data1 ]]></Description> + <Description><![CDATA[cleanup test2 data1]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[data1]]></DataTag> </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data2]]></DataTag> - <Description><![CDATA[init test2 data2 ]]></Description> + <Description><![CDATA[init test2 data2]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data2]]></DataTag> - <Description><![CDATA[test2 test2 data2 ]]></Description> + <Description><![CDATA[test2 test2 data2]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data2]]></DataTag> - <Description><![CDATA[test2 end ]]></Description> + <Description><![CDATA[test2 end]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data2]]></DataTag> - <Description><![CDATA[cleanup test2 data2 ]]></Description> + <Description><![CDATA[cleanup test2 data2]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[data2]]></DataTag> @@ -89,39 +89,39 @@ </TestFunction> <TestFunction name="test3"> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[test3_data test3 (null) ]]></Description> + <Description><![CDATA[test3_data test3 (null)]]></Description> </Message> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[test3_data end ]]></Description> + <Description><![CDATA[test3_data end]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data0]]></DataTag> - <Description><![CDATA[init test3 data0 ]]></Description> + <Description><![CDATA[init test3 data0]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data0]]></DataTag> - <Description><![CDATA[test2 test3 data0 ]]></Description> + <Description><![CDATA[test2 test3 data0]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data0]]></DataTag> - <Description><![CDATA[test2 end ]]></Description> + <Description><![CDATA[test2 end]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data0]]></DataTag> - <Description><![CDATA[cleanup test3 data0 ]]></Description> + <Description><![CDATA[cleanup test3 data0]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[data0]]></DataTag> </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data1]]></DataTag> - <Description><![CDATA[init test3 data1 ]]></Description> + <Description><![CDATA[init test3 data1]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data1]]></DataTag> - <Description><![CDATA[test2 test3 data1 ]]></Description> + <Description><![CDATA[test2 test3 data1]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp" line="154"> +<Incident type="fail" file="tst_subtest.cpp" line="154"> <DataTag><![CDATA[data1]]></DataTag> <Description><![CDATA[Compared values are not the same Actual (str) : hello1 @@ -129,17 +129,17 @@ </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data1]]></DataTag> - <Description><![CDATA[cleanup test3 data1 ]]></Description> + <Description><![CDATA[cleanup test3 data1]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data2]]></DataTag> - <Description><![CDATA[init test3 data2 ]]></Description> + <Description><![CDATA[init test3 data2]]></Description> </Message> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data2]]></DataTag> - <Description><![CDATA[test2 test3 data2 ]]></Description> + <Description><![CDATA[test2 test3 data2]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp" line="154"> +<Incident type="fail" file="tst_subtest.cpp" line="154"> <DataTag><![CDATA[data2]]></DataTag> <Description><![CDATA[Compared values are not the same Actual (str) : hello2 @@ -147,12 +147,12 @@ </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[data2]]></DataTag> - <Description><![CDATA[cleanup test3 data2 ]]></Description> + <Description><![CDATA[cleanup test3 data2]]></Description> </Message> </TestFunction> <TestFunction name="cleanupTestCase"> <Message type="qdebug" file="" line="0"> - <Description><![CDATA[cleanupTestCase cleanupTestCase (null) ]]></Description> + <Description><![CDATA[cleanupTestCase cleanupTestCase (null)]]></Description> </Message> <Incident type="pass" file="" line="0" /> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_subtest.xunitxml b/tests/auto/testlib/selftests/expected_subtest.xunitxml index 6f8fc3db45..5f7024e8ba 100644 --- a/tests/auto/testlib/selftests/expected_subtest.xunitxml +++ b/tests/auto/testlib/selftests/expected_subtest.xunitxml @@ -5,83 +5,83 @@ <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> </properties> <testcase result="pass" name="initTestCase"> - <!-- message="initTestCase initTestCase (null) " type="qdebug" --> + <!-- message="initTestCase initTestCase (null)" type="qdebug" --> </testcase> <testcase result="pass" name="test1"> - <!-- message="init test1 (null) " type="qdebug" --> - <!-- message="test1 test1 (null) " type="qdebug" --> - <!-- message="cleanup test1 (null) " type="qdebug" --> + <!-- message="init test1 (null)" type="qdebug" --> + <!-- message="test1 test1 (null)" type="qdebug" --> + <!-- message="cleanup test1 (null)" type="qdebug" --> </testcase> <testcase result="pass" name="test2"> - <!-- message="test2_data test2 (null) " type="qdebug" --> - <!-- message="test2_data end " type="qdebug" --> - <!-- tag="data0" message="init test2 data0 " type="qdebug" --> - <!-- tag="data0" message="test2 test2 data0 " type="qdebug" --> - <!-- tag="data0" message="test2 end " type="qdebug" --> - <!-- tag="data0" message="cleanup test2 data0 " type="qdebug" --> - <!-- tag="data1" message="init test2 data1 " type="qdebug" --> - <!-- tag="data1" message="test2 test2 data1 " type="qdebug" --> - <!-- tag="data1" message="test2 end " type="qdebug" --> - <!-- tag="data1" message="cleanup test2 data1 " type="qdebug" --> - <!-- tag="data2" message="init test2 data2 " type="qdebug" --> - <!-- tag="data2" message="test2 test2 data2 " type="qdebug" --> - <!-- tag="data2" message="test2 end " type="qdebug" --> - <!-- tag="data2" message="cleanup test2 data2 " type="qdebug" --> + <!-- message="test2_data test2 (null)" type="qdebug" --> + <!-- message="test2_data end" type="qdebug" --> + <!-- tag="data0" message="init test2 data0" type="qdebug" --> + <!-- tag="data0" message="test2 test2 data0" type="qdebug" --> + <!-- tag="data0" message="test2 end" type="qdebug" --> + <!-- tag="data0" message="cleanup test2 data0" type="qdebug" --> + <!-- tag="data1" message="init test2 data1" type="qdebug" --> + <!-- tag="data1" message="test2 test2 data1" type="qdebug" --> + <!-- tag="data1" message="test2 end" type="qdebug" --> + <!-- tag="data1" message="cleanup test2 data1" type="qdebug" --> + <!-- tag="data2" message="init test2 data2" type="qdebug" --> + <!-- tag="data2" message="test2 test2 data2" type="qdebug" --> + <!-- tag="data2" message="test2 end" type="qdebug" --> + <!-- tag="data2" message="cleanup test2 data2" type="qdebug" --> </testcase> <testcase result="fail" name="test3"> - <!-- message="test3_data test3 (null) " type="qdebug" --> - <!-- message="test3_data end " type="qdebug" --> - <!-- tag="data0" message="init test3 data0 " type="qdebug" --> - <!-- tag="data0" message="test2 test3 data0 " type="qdebug" --> - <!-- tag="data0" message="test2 end " type="qdebug" --> - <!-- tag="data0" message="cleanup test3 data0 " type="qdebug" --> - <!-- tag="data1" message="init test3 data1 " type="qdebug" --> - <!-- tag="data1" message="test2 test3 data1 " type="qdebug" --> + <!-- message="test3_data test3 (null)" type="qdebug" --> + <!-- message="test3_data end" type="qdebug" --> + <!-- tag="data0" message="init test3 data0" type="qdebug" --> + <!-- tag="data0" message="test2 test3 data0" type="qdebug" --> + <!-- tag="data0" message="test2 end" type="qdebug" --> + <!-- tag="data0" message="cleanup test3 data0" type="qdebug" --> + <!-- tag="data1" message="init test3 data1" type="qdebug" --> + <!-- tag="data1" message="test2 test3 data1" type="qdebug" --> <failure tag="data1" message="Compared values are not the same Actual (str) : hello1 Expected (QString("hello0")): hello0" result="fail"/> - <!-- tag="data1" message="cleanup test3 data1 " type="qdebug" --> - <!-- tag="data2" message="init test3 data2 " type="qdebug" --> - <!-- tag="data2" message="test2 test3 data2 " type="qdebug" --> + <!-- tag="data1" message="cleanup test3 data1" type="qdebug" --> + <!-- tag="data2" message="init test3 data2" type="qdebug" --> + <!-- tag="data2" message="test2 test3 data2" type="qdebug" --> <failure tag="data2" message="Compared values are not the same Actual (str) : hello2 Expected (QString("hello0")): hello0" result="fail"/> - <!-- tag="data2" message="cleanup test3 data2 " type="qdebug" --> + <!-- tag="data2" message="cleanup test3 data2" type="qdebug" --> </testcase> <testcase result="pass" name="cleanupTestCase"> - <!-- message="cleanupTestCase cleanupTestCase (null) " type="qdebug" --> + <!-- message="cleanupTestCase cleanupTestCase (null)" type="qdebug" --> </testcase> <system-err> -<![CDATA[initTestCase initTestCase (null) ]]> -<![CDATA[init test1 (null) ]]> -<![CDATA[test1 test1 (null) ]]> -<![CDATA[cleanup test1 (null) ]]> -<![CDATA[test2_data test2 (null) ]]> -<![CDATA[test2_data end ]]> -<![CDATA[init test2 data0 ]]> -<![CDATA[test2 test2 data0 ]]> -<![CDATA[test2 end ]]> -<![CDATA[cleanup test2 data0 ]]> -<![CDATA[init test2 data1 ]]> -<![CDATA[test2 test2 data1 ]]> -<![CDATA[test2 end ]]> -<![CDATA[cleanup test2 data1 ]]> -<![CDATA[init test2 data2 ]]> -<![CDATA[test2 test2 data2 ]]> -<![CDATA[test2 end ]]> -<![CDATA[cleanup test2 data2 ]]> -<![CDATA[test3_data test3 (null) ]]> -<![CDATA[test3_data end ]]> -<![CDATA[init test3 data0 ]]> -<![CDATA[test2 test3 data0 ]]> -<![CDATA[test2 end ]]> -<![CDATA[cleanup test3 data0 ]]> -<![CDATA[init test3 data1 ]]> -<![CDATA[test2 test3 data1 ]]> -<![CDATA[cleanup test3 data1 ]]> -<![CDATA[init test3 data2 ]]> -<![CDATA[test2 test3 data2 ]]> -<![CDATA[cleanup test3 data2 ]]> -<![CDATA[cleanupTestCase cleanupTestCase (null) ]]> +<![CDATA[initTestCase initTestCase (null)]]> +<![CDATA[init test1 (null)]]> +<![CDATA[test1 test1 (null)]]> +<![CDATA[cleanup test1 (null)]]> +<![CDATA[test2_data test2 (null)]]> +<![CDATA[test2_data end]]> +<![CDATA[init test2 data0]]> +<![CDATA[test2 test2 data0]]> +<![CDATA[test2 end]]> +<![CDATA[cleanup test2 data0]]> +<![CDATA[init test2 data1]]> +<![CDATA[test2 test2 data1]]> +<![CDATA[test2 end]]> +<![CDATA[cleanup test2 data1]]> +<![CDATA[init test2 data2]]> +<![CDATA[test2 test2 data2]]> +<![CDATA[test2 end]]> +<![CDATA[cleanup test2 data2]]> +<![CDATA[test3_data test3 (null)]]> +<![CDATA[test3_data end]]> +<![CDATA[init test3 data0]]> +<![CDATA[test2 test3 data0]]> +<![CDATA[test2 end]]> +<![CDATA[cleanup test3 data0]]> +<![CDATA[init test3 data1]]> +<![CDATA[test2 test3 data1]]> +<![CDATA[cleanup test3 data1]]> +<![CDATA[init test3 data2]]> +<![CDATA[test2 test3 data2]]> +<![CDATA[cleanup test3 data2]]> +<![CDATA[cleanupTestCase cleanupTestCase (null)]]> </system-err> </testsuite> diff --git a/tests/auto/testlib/selftests/expected_verbose1.lightxml b/tests/auto/testlib/selftests/expected_verbose1.lightxml index c49792fec4..3daa1231fe 100644 --- a/tests/auto/testlib/selftests/expected_verbose1.lightxml +++ b/tests/auto/testlib/selftests/expected_verbose1.lightxml @@ -17,7 +17,7 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[row 1]]></DataTag> </Incident> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> @@ -26,13 +26,13 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[row 1]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> </TestFunction> <TestFunction name="testSkipPass"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> @@ -41,27 +41,27 @@ </Incident> </TestFunction> <TestFunction name="testSkipSkip"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> </TestFunction> <TestFunction name="testSkipFail"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> </TestFunction> <TestFunction name="testFailPass"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> @@ -70,21 +70,21 @@ </Incident> </TestFunction> <TestFunction name="testFailSkip"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> </TestFunction> <TestFunction name="testFailFail"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> @@ -93,7 +93,7 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[before]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="234"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="234"> <DataTag><![CDATA[fail]]></DataTag> <Description><![CDATA[Fail in init()]]></Description> </Incident> @@ -107,9 +107,9 @@ </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[fail]]></DataTag> - <Description><![CDATA[This test function should execute and then QFAIL in cleanup() ]]></Description> + <Description><![CDATA[This test function should execute and then QFAIL in cleanup()]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="242"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="242"> <DataTag><![CDATA[fail]]></DataTag> <Description><![CDATA[Fail in cleanup()]]></Description> </Incident> @@ -121,7 +121,7 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[before]]></DataTag> </Incident> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="236"> +<Message type="skip" file="../counting/tst_counting.cpp" line="236"> <DataTag><![CDATA[skip]]></DataTag> <Description><![CDATA[Skip in init()]]></Description> </Message> @@ -135,9 +135,9 @@ </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[skip]]></DataTag> - <Description><![CDATA[This test function should execute and then QSKIP in cleanup() ]]></Description> + <Description><![CDATA[This test function should execute and then QSKIP in cleanup()]]></Description> </Message> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="244"> +<Message type="skip" file="../counting/tst_counting.cpp" line="244"> <DataTag><![CDATA[skip]]></DataTag> <Description><![CDATA[Skip in cleanup()]]></Description> </Message> diff --git a/tests/auto/testlib/selftests/expected_verbose1.txt b/tests/auto/testlib/selftests/expected_verbose1.txt index 4ba42c1c8e..1711a33004 100644 --- a/tests/auto/testlib/selftests/expected_verbose1.txt +++ b/tests/auto/testlib/selftests/expected_verbose1.txt @@ -8,60 +8,60 @@ PASS : tst_Counting::testPassPass(row 2) INFO : tst_Counting::testPassSkip() entering PASS : tst_Counting::testPassSkip(row 1) SKIP : tst_Counting::testPassSkip(row 2) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(118)] + Loc: [../counting/tst_counting.cpp(118)] INFO : tst_Counting::testPassFail() entering PASS : tst_Counting::testPassFail(row 1) FAIL! : tst_Counting::testPassFail(row 2) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [../counting/tst_counting.cpp(115)] INFO : tst_Counting::testSkipPass() entering SKIP : tst_Counting::testSkipPass(row 1) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(118)] + Loc: [../counting/tst_counting.cpp(118)] PASS : tst_Counting::testSkipPass(row 2) INFO : tst_Counting::testSkipSkip() entering SKIP : tst_Counting::testSkipSkip(row 1) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(118)] + Loc: [../counting/tst_counting.cpp(118)] SKIP : tst_Counting::testSkipSkip(row 2) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(118)] + Loc: [../counting/tst_counting.cpp(118)] INFO : tst_Counting::testSkipFail() entering SKIP : tst_Counting::testSkipFail(row 1) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(118)] + Loc: [../counting/tst_counting.cpp(118)] FAIL! : tst_Counting::testSkipFail(row 2) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [../counting/tst_counting.cpp(115)] INFO : tst_Counting::testFailPass() entering FAIL! : tst_Counting::testFailPass(row 1) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [../counting/tst_counting.cpp(115)] PASS : tst_Counting::testFailPass(row 2) INFO : tst_Counting::testFailSkip() entering FAIL! : tst_Counting::testFailSkip(row 1) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [../counting/tst_counting.cpp(115)] SKIP : tst_Counting::testFailSkip(row 2) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(118)] + Loc: [../counting/tst_counting.cpp(118)] INFO : tst_Counting::testFailFail() entering FAIL! : tst_Counting::testFailFail(row 1) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [../counting/tst_counting.cpp(115)] FAIL! : tst_Counting::testFailFail(row 2) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [../counting/tst_counting.cpp(115)] INFO : tst_Counting::testFailInInit() entering PASS : tst_Counting::testFailInInit(before) FAIL! : tst_Counting::testFailInInit(fail) Fail in init() - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(234)] + Loc: [../counting/tst_counting.cpp(234)] PASS : tst_Counting::testFailInInit(after) INFO : tst_Counting::testFailInCleanup() entering PASS : tst_Counting::testFailInCleanup(before) -QDEBUG : tst_Counting::testFailInCleanup(fail) This test function should execute and then QFAIL in cleanup() +QDEBUG : tst_Counting::testFailInCleanup(fail) This test function should execute and then QFAIL in cleanup() FAIL! : tst_Counting::testFailInCleanup(fail) Fail in cleanup() - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(242)] + Loc: [../counting/tst_counting.cpp(242)] PASS : tst_Counting::testFailInCleanup(after) INFO : tst_Counting::testSkipInInit() entering PASS : tst_Counting::testSkipInInit(before) SKIP : tst_Counting::testSkipInInit(skip) Skip in init() - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(236)] + Loc: [../counting/tst_counting.cpp(236)] PASS : tst_Counting::testSkipInInit(after) INFO : tst_Counting::testSkipInCleanup() entering PASS : tst_Counting::testSkipInCleanup(before) -QDEBUG : tst_Counting::testSkipInCleanup(skip) This test function should execute and then QSKIP in cleanup() +QDEBUG : tst_Counting::testSkipInCleanup(skip) This test function should execute and then QSKIP in cleanup() SKIP : tst_Counting::testSkipInCleanup(skip) Skip in cleanup() - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(244)] + Loc: [../counting/tst_counting.cpp(244)] PASS : tst_Counting::testSkipInCleanup(after) INFO : tst_Counting::cleanupTestCase() entering PASS : tst_Counting::cleanupTestCase() diff --git a/tests/auto/testlib/selftests/expected_verbose1.xml b/tests/auto/testlib/selftests/expected_verbose1.xml index 7caa915f65..7da3b42130 100644 --- a/tests/auto/testlib/selftests/expected_verbose1.xml +++ b/tests/auto/testlib/selftests/expected_verbose1.xml @@ -19,7 +19,7 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[row 1]]></DataTag> </Incident> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> @@ -28,13 +28,13 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[row 1]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> </TestFunction> <TestFunction name="testSkipPass"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> @@ -43,27 +43,27 @@ </Incident> </TestFunction> <TestFunction name="testSkipSkip"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> </TestFunction> <TestFunction name="testSkipFail"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> </TestFunction> <TestFunction name="testFailPass"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> @@ -72,21 +72,21 @@ </Incident> </TestFunction> <TestFunction name="testFailSkip"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> </TestFunction> <TestFunction name="testFailFail"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> @@ -95,7 +95,7 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[before]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="234"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="234"> <DataTag><![CDATA[fail]]></DataTag> <Description><![CDATA[Fail in init()]]></Description> </Incident> @@ -109,9 +109,9 @@ </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[fail]]></DataTag> - <Description><![CDATA[This test function should execute and then QFAIL in cleanup() ]]></Description> + <Description><![CDATA[This test function should execute and then QFAIL in cleanup()]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="242"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="242"> <DataTag><![CDATA[fail]]></DataTag> <Description><![CDATA[Fail in cleanup()]]></Description> </Incident> @@ -123,7 +123,7 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[before]]></DataTag> </Incident> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="236"> +<Message type="skip" file="../counting/tst_counting.cpp" line="236"> <DataTag><![CDATA[skip]]></DataTag> <Description><![CDATA[Skip in init()]]></Description> </Message> @@ -137,9 +137,9 @@ </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[skip]]></DataTag> - <Description><![CDATA[This test function should execute and then QSKIP in cleanup() ]]></Description> + <Description><![CDATA[This test function should execute and then QSKIP in cleanup()]]></Description> </Message> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="244"> +<Message type="skip" file="../counting/tst_counting.cpp" line="244"> <DataTag><![CDATA[skip]]></DataTag> <Description><![CDATA[Skip in cleanup()]]></Description> </Message> diff --git a/tests/auto/testlib/selftests/expected_verbose1.xunitxml b/tests/auto/testlib/selftests/expected_verbose1.xunitxml index f317ed5923..72bf047ba8 100644 --- a/tests/auto/testlib/selftests/expected_verbose1.xunitxml +++ b/tests/auto/testlib/selftests/expected_verbose1.xunitxml @@ -38,14 +38,14 @@ <failure tag="fail" message="Fail in init()" result="fail"/> </testcase> <testcase result="fail" name="testFailInCleanup"> - <!-- tag="fail" message="This test function should execute and then QFAIL in cleanup() " type="qdebug" --> + <!-- tag="fail" message="This test function should execute and then QFAIL in cleanup()" type="qdebug" --> <failure tag="fail" message="Fail in cleanup()" result="fail"/> </testcase> <testcase result="pass" name="testSkipInInit"> <!-- tag="skip" message="Skip in init()" type="skip" --> </testcase> <testcase result="pass" name="testSkipInCleanup"> - <!-- tag="skip" message="This test function should execute and then QSKIP in cleanup() " type="qdebug" --> + <!-- tag="skip" message="This test function should execute and then QSKIP in cleanup()" type="qdebug" --> <!-- tag="skip" message="Skip in cleanup()" type="skip" --> </testcase> <testcase result="pass" name="cleanupTestCase"/> @@ -56,9 +56,9 @@ <![CDATA[Skipping]]> <![CDATA[Skipping]]> <![CDATA[Skipping]]> -<![CDATA[This test function should execute and then QFAIL in cleanup() ]]> +<![CDATA[This test function should execute and then QFAIL in cleanup()]]> <![CDATA[Skip in init()]]> -<![CDATA[This test function should execute and then QSKIP in cleanup() ]]> +<![CDATA[This test function should execute and then QSKIP in cleanup()]]> <![CDATA[Skip in cleanup()]]> </system-err> </testsuite> diff --git a/tests/auto/testlib/selftests/expected_verbose2.lightxml b/tests/auto/testlib/selftests/expected_verbose2.lightxml index 2937adbe01..44b79fd8ba 100644 --- a/tests/auto/testlib/selftests/expected_verbose2.lightxml +++ b/tests/auto/testlib/selftests/expected_verbose2.lightxml @@ -6,22 +6,22 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="testPassPass"> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="111"> +<Message type="info" file="../counting/tst_counting.cpp" line="111"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[QVERIFY(true)]]></Description> </Message> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112"> +<Message type="info" file="../counting/tst_counting.cpp" line="112"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[row 1]]></DataTag> </Incident> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="111"> +<Message type="info" file="../counting/tst_counting.cpp" line="111"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[QVERIFY(true)]]></Description> </Message> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112"> +<Message type="info" file="../counting/tst_counting.cpp" line="112"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description> </Message> @@ -30,53 +30,53 @@ </Incident> </TestFunction> <TestFunction name="testPassSkip"> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="111"> +<Message type="info" file="../counting/tst_counting.cpp" line="111"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[QVERIFY(true)]]></Description> </Message> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112"> +<Message type="info" file="../counting/tst_counting.cpp" line="112"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[row 1]]></DataTag> </Incident> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> </TestFunction> <TestFunction name="testPassFail"> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="111"> +<Message type="info" file="../counting/tst_counting.cpp" line="111"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[QVERIFY(true)]]></Description> </Message> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112"> +<Message type="info" file="../counting/tst_counting.cpp" line="112"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[row 1]]></DataTag> </Incident> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Message type="info" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[QVERIFY(false)]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> </TestFunction> <TestFunction name="testSkipPass"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="111"> +<Message type="info" file="../counting/tst_counting.cpp" line="111"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[QVERIFY(true)]]></Description> </Message> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112"> +<Message type="info" file="../counting/tst_counting.cpp" line="112"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description> </Message> @@ -85,43 +85,43 @@ </Incident> </TestFunction> <TestFunction name="testSkipSkip"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> </TestFunction> <TestFunction name="testSkipFail"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Message type="info" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[QVERIFY(false)]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> </TestFunction> <TestFunction name="testFailPass"> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Message type="info" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[QVERIFY(false)]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="111"> +<Message type="info" file="../counting/tst_counting.cpp" line="111"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[QVERIFY(true)]]></Description> </Message> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112"> +<Message type="info" file="../counting/tst_counting.cpp" line="112"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description> </Message> @@ -130,33 +130,33 @@ </Incident> </TestFunction> <TestFunction name="testFailSkip"> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Message type="info" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[QVERIFY(false)]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> </TestFunction> <TestFunction name="testFailFail"> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Message type="info" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[QVERIFY(false)]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Message type="info" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[QVERIFY(false)]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> @@ -165,7 +165,7 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[before]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="234"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="234"> <DataTag><![CDATA[fail]]></DataTag> <Description><![CDATA[Fail in init()]]></Description> </Incident> @@ -179,9 +179,9 @@ </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[fail]]></DataTag> - <Description><![CDATA[This test function should execute and then QFAIL in cleanup() ]]></Description> + <Description><![CDATA[This test function should execute and then QFAIL in cleanup()]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="242"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="242"> <DataTag><![CDATA[fail]]></DataTag> <Description><![CDATA[Fail in cleanup()]]></Description> </Incident> @@ -193,7 +193,7 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[before]]></DataTag> </Incident> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="236"> +<Message type="skip" file="../counting/tst_counting.cpp" line="236"> <DataTag><![CDATA[skip]]></DataTag> <Description><![CDATA[Skip in init()]]></Description> </Message> @@ -207,9 +207,9 @@ </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[skip]]></DataTag> - <Description><![CDATA[This test function should execute and then QSKIP in cleanup() ]]></Description> + <Description><![CDATA[This test function should execute and then QSKIP in cleanup()]]></Description> </Message> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="244"> +<Message type="skip" file="../counting/tst_counting.cpp" line="244"> <DataTag><![CDATA[skip]]></DataTag> <Description><![CDATA[Skip in cleanup()]]></Description> </Message> diff --git a/tests/auto/testlib/selftests/expected_verbose2.txt b/tests/auto/testlib/selftests/expected_verbose2.txt index e9c7838f6d..068e7357e8 100644 --- a/tests/auto/testlib/selftests/expected_verbose2.txt +++ b/tests/auto/testlib/selftests/expected_verbose2.txt @@ -4,100 +4,100 @@ INFO : tst_Counting::initTestCase() entering PASS : tst_Counting::initTestCase() INFO : tst_Counting::testPassPass() entering INFO : tst_Counting::testPassPass(row 1) QVERIFY(true) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(111)] + Loc: [../counting/tst_counting.cpp(111)] INFO : tst_Counting::testPassPass(row 1) QCOMPARE(2 + 1, 3) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(112)] + Loc: [../counting/tst_counting.cpp(112)] PASS : tst_Counting::testPassPass(row 1) INFO : tst_Counting::testPassPass(row 2) QVERIFY(true) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(111)] + Loc: [../counting/tst_counting.cpp(111)] INFO : tst_Counting::testPassPass(row 2) QCOMPARE(2 + 1, 3) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(112)] + Loc: [../counting/tst_counting.cpp(112)] PASS : tst_Counting::testPassPass(row 2) INFO : tst_Counting::testPassSkip() entering INFO : tst_Counting::testPassSkip(row 1) QVERIFY(true) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(111)] + Loc: [../counting/tst_counting.cpp(111)] INFO : tst_Counting::testPassSkip(row 1) QCOMPARE(2 + 1, 3) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(112)] + Loc: [../counting/tst_counting.cpp(112)] PASS : tst_Counting::testPassSkip(row 1) SKIP : tst_Counting::testPassSkip(row 2) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(118)] + Loc: [../counting/tst_counting.cpp(118)] INFO : tst_Counting::testPassFail() entering INFO : tst_Counting::testPassFail(row 1) QVERIFY(true) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(111)] + Loc: [../counting/tst_counting.cpp(111)] INFO : tst_Counting::testPassFail(row 1) QCOMPARE(2 + 1, 3) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(112)] + Loc: [../counting/tst_counting.cpp(112)] PASS : tst_Counting::testPassFail(row 1) INFO : tst_Counting::testPassFail(row 2) QVERIFY(false) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [../counting/tst_counting.cpp(115)] FAIL! : tst_Counting::testPassFail(row 2) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [../counting/tst_counting.cpp(115)] INFO : tst_Counting::testSkipPass() entering SKIP : tst_Counting::testSkipPass(row 1) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(118)] + Loc: [../counting/tst_counting.cpp(118)] INFO : tst_Counting::testSkipPass(row 2) QVERIFY(true) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(111)] + Loc: [../counting/tst_counting.cpp(111)] INFO : tst_Counting::testSkipPass(row 2) QCOMPARE(2 + 1, 3) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(112)] + Loc: [../counting/tst_counting.cpp(112)] PASS : tst_Counting::testSkipPass(row 2) INFO : tst_Counting::testSkipSkip() entering SKIP : tst_Counting::testSkipSkip(row 1) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(118)] + Loc: [../counting/tst_counting.cpp(118)] SKIP : tst_Counting::testSkipSkip(row 2) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(118)] + Loc: [../counting/tst_counting.cpp(118)] INFO : tst_Counting::testSkipFail() entering SKIP : tst_Counting::testSkipFail(row 1) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(118)] + Loc: [../counting/tst_counting.cpp(118)] INFO : tst_Counting::testSkipFail(row 2) QVERIFY(false) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [../counting/tst_counting.cpp(115)] FAIL! : tst_Counting::testSkipFail(row 2) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [../counting/tst_counting.cpp(115)] INFO : tst_Counting::testFailPass() entering INFO : tst_Counting::testFailPass(row 1) QVERIFY(false) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [../counting/tst_counting.cpp(115)] FAIL! : tst_Counting::testFailPass(row 1) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [../counting/tst_counting.cpp(115)] INFO : tst_Counting::testFailPass(row 2) QVERIFY(true) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(111)] + Loc: [../counting/tst_counting.cpp(111)] INFO : tst_Counting::testFailPass(row 2) QCOMPARE(2 + 1, 3) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(112)] + Loc: [../counting/tst_counting.cpp(112)] PASS : tst_Counting::testFailPass(row 2) INFO : tst_Counting::testFailSkip() entering INFO : tst_Counting::testFailSkip(row 1) QVERIFY(false) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [../counting/tst_counting.cpp(115)] FAIL! : tst_Counting::testFailSkip(row 1) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [../counting/tst_counting.cpp(115)] SKIP : tst_Counting::testFailSkip(row 2) Skipping - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(118)] + Loc: [../counting/tst_counting.cpp(118)] INFO : tst_Counting::testFailFail() entering INFO : tst_Counting::testFailFail(row 1) QVERIFY(false) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [../counting/tst_counting.cpp(115)] FAIL! : tst_Counting::testFailFail(row 1) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [../counting/tst_counting.cpp(115)] INFO : tst_Counting::testFailFail(row 2) QVERIFY(false) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [../counting/tst_counting.cpp(115)] FAIL! : tst_Counting::testFailFail(row 2) 'false' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)] + Loc: [../counting/tst_counting.cpp(115)] INFO : tst_Counting::testFailInInit() entering PASS : tst_Counting::testFailInInit(before) FAIL! : tst_Counting::testFailInInit(fail) Fail in init() - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(234)] + Loc: [../counting/tst_counting.cpp(234)] PASS : tst_Counting::testFailInInit(after) INFO : tst_Counting::testFailInCleanup() entering PASS : tst_Counting::testFailInCleanup(before) -QDEBUG : tst_Counting::testFailInCleanup(fail) This test function should execute and then QFAIL in cleanup() +QDEBUG : tst_Counting::testFailInCleanup(fail) This test function should execute and then QFAIL in cleanup() FAIL! : tst_Counting::testFailInCleanup(fail) Fail in cleanup() - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(242)] + Loc: [../counting/tst_counting.cpp(242)] PASS : tst_Counting::testFailInCleanup(after) INFO : tst_Counting::testSkipInInit() entering PASS : tst_Counting::testSkipInInit(before) SKIP : tst_Counting::testSkipInInit(skip) Skip in init() - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(236)] + Loc: [../counting/tst_counting.cpp(236)] PASS : tst_Counting::testSkipInInit(after) INFO : tst_Counting::testSkipInCleanup() entering PASS : tst_Counting::testSkipInCleanup(before) -QDEBUG : tst_Counting::testSkipInCleanup(skip) This test function should execute and then QSKIP in cleanup() +QDEBUG : tst_Counting::testSkipInCleanup(skip) This test function should execute and then QSKIP in cleanup() SKIP : tst_Counting::testSkipInCleanup(skip) Skip in cleanup() - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(244)] + Loc: [../counting/tst_counting.cpp(244)] PASS : tst_Counting::testSkipInCleanup(after) INFO : tst_Counting::cleanupTestCase() entering PASS : tst_Counting::cleanupTestCase() diff --git a/tests/auto/testlib/selftests/expected_verbose2.xml b/tests/auto/testlib/selftests/expected_verbose2.xml index bbdca567d3..542372327c 100644 --- a/tests/auto/testlib/selftests/expected_verbose2.xml +++ b/tests/auto/testlib/selftests/expected_verbose2.xml @@ -8,22 +8,22 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="testPassPass"> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="111"> +<Message type="info" file="../counting/tst_counting.cpp" line="111"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[QVERIFY(true)]]></Description> </Message> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112"> +<Message type="info" file="../counting/tst_counting.cpp" line="112"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[row 1]]></DataTag> </Incident> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="111"> +<Message type="info" file="../counting/tst_counting.cpp" line="111"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[QVERIFY(true)]]></Description> </Message> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112"> +<Message type="info" file="../counting/tst_counting.cpp" line="112"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description> </Message> @@ -32,53 +32,53 @@ </Incident> </TestFunction> <TestFunction name="testPassSkip"> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="111"> +<Message type="info" file="../counting/tst_counting.cpp" line="111"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[QVERIFY(true)]]></Description> </Message> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112"> +<Message type="info" file="../counting/tst_counting.cpp" line="112"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[row 1]]></DataTag> </Incident> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> </TestFunction> <TestFunction name="testPassFail"> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="111"> +<Message type="info" file="../counting/tst_counting.cpp" line="111"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[QVERIFY(true)]]></Description> </Message> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112"> +<Message type="info" file="../counting/tst_counting.cpp" line="112"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description> </Message> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[row 1]]></DataTag> </Incident> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Message type="info" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[QVERIFY(false)]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> </TestFunction> <TestFunction name="testSkipPass"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="111"> +<Message type="info" file="../counting/tst_counting.cpp" line="111"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[QVERIFY(true)]]></Description> </Message> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112"> +<Message type="info" file="../counting/tst_counting.cpp" line="112"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description> </Message> @@ -87,43 +87,43 @@ </Incident> </TestFunction> <TestFunction name="testSkipSkip"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> </TestFunction> <TestFunction name="testSkipFail"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Message type="info" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[QVERIFY(false)]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> </TestFunction> <TestFunction name="testFailPass"> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Message type="info" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[QVERIFY(false)]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="111"> +<Message type="info" file="../counting/tst_counting.cpp" line="111"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[QVERIFY(true)]]></Description> </Message> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112"> +<Message type="info" file="../counting/tst_counting.cpp" line="112"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description> </Message> @@ -132,33 +132,33 @@ </Incident> </TestFunction> <TestFunction name="testFailSkip"> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Message type="info" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[QVERIFY(false)]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="118"> +<Message type="skip" file="../counting/tst_counting.cpp" line="118"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[Skipping]]></Description> </Message> </TestFunction> <TestFunction name="testFailFail"> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Message type="info" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA[QVERIFY(false)]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 1]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> -<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Message type="info" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA[QVERIFY(false)]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="115"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="115"> <DataTag><![CDATA[row 2]]></DataTag> <Description><![CDATA['false' returned FALSE. ()]]></Description> </Incident> @@ -167,7 +167,7 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[before]]></DataTag> </Incident> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="234"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="234"> <DataTag><![CDATA[fail]]></DataTag> <Description><![CDATA[Fail in init()]]></Description> </Incident> @@ -181,9 +181,9 @@ </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[fail]]></DataTag> - <Description><![CDATA[This test function should execute and then QFAIL in cleanup() ]]></Description> + <Description><![CDATA[This test function should execute and then QFAIL in cleanup()]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="242"> +<Incident type="fail" file="../counting/tst_counting.cpp" line="242"> <DataTag><![CDATA[fail]]></DataTag> <Description><![CDATA[Fail in cleanup()]]></Description> </Incident> @@ -195,7 +195,7 @@ <Incident type="pass" file="" line="0"> <DataTag><![CDATA[before]]></DataTag> </Incident> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="236"> +<Message type="skip" file="../counting/tst_counting.cpp" line="236"> <DataTag><![CDATA[skip]]></DataTag> <Description><![CDATA[Skip in init()]]></Description> </Message> @@ -209,9 +209,9 @@ </Incident> <Message type="qdebug" file="" line="0"> <DataTag><![CDATA[skip]]></DataTag> - <Description><![CDATA[This test function should execute and then QSKIP in cleanup() ]]></Description> + <Description><![CDATA[This test function should execute and then QSKIP in cleanup()]]></Description> </Message> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="244"> +<Message type="skip" file="../counting/tst_counting.cpp" line="244"> <DataTag><![CDATA[skip]]></DataTag> <Description><![CDATA[Skip in cleanup()]]></Description> </Message> diff --git a/tests/auto/testlib/selftests/expected_verbose2.xunitxml b/tests/auto/testlib/selftests/expected_verbose2.xunitxml index a774cb9d9f..6dabbd34fc 100644 --- a/tests/auto/testlib/selftests/expected_verbose2.xunitxml +++ b/tests/auto/testlib/selftests/expected_verbose2.xunitxml @@ -57,14 +57,14 @@ <failure tag="fail" message="Fail in init()" result="fail"/> </testcase> <testcase result="fail" name="testFailInCleanup"> - <!-- tag="fail" message="This test function should execute and then QFAIL in cleanup() " type="qdebug" --> + <!-- tag="fail" message="This test function should execute and then QFAIL in cleanup()" type="qdebug" --> <failure tag="fail" message="Fail in cleanup()" result="fail"/> </testcase> <testcase result="pass" name="testSkipInInit"> <!-- tag="skip" message="Skip in init()" type="skip" --> </testcase> <testcase result="pass" name="testSkipInCleanup"> - <!-- tag="skip" message="This test function should execute and then QSKIP in cleanup() " type="qdebug" --> + <!-- tag="skip" message="This test function should execute and then QSKIP in cleanup()" type="qdebug" --> <!-- tag="skip" message="Skip in cleanup()" type="skip" --> </testcase> <testcase result="pass" name="cleanupTestCase"/> @@ -93,9 +93,9 @@ <![CDATA[Skipping]]> <![CDATA[QVERIFY(false)]]> <![CDATA[QVERIFY(false)]]> -<![CDATA[This test function should execute and then QFAIL in cleanup() ]]> +<![CDATA[This test function should execute and then QFAIL in cleanup()]]> <![CDATA[Skip in init()]]> -<![CDATA[This test function should execute and then QSKIP in cleanup() ]]> +<![CDATA[This test function should execute and then QSKIP in cleanup()]]> <![CDATA[Skip in cleanup()]]> </system-err> </testsuite> diff --git a/tests/auto/testlib/selftests/expected_verifyexceptionthrown.lightxml b/tests/auto/testlib/selftests/expected_verifyexceptionthrown.lightxml new file mode 100644 index 0000000000..3118eb628e --- /dev/null +++ b/tests/auto/testlib/selftests/expected_verifyexceptionthrown.lightxml @@ -0,0 +1,49 @@ +<Environment> + <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> +</Environment> +<TestFunction name="initTestCase"> +<Incident type="pass" file="" line="0" /> +</TestFunction> +<TestFunction name="testCorrectStdTypes"> +<Incident type="pass" file="" line="0" /> +</TestFunction> +<TestFunction name="testCorrectStdExceptions"> +<Incident type="pass" file="" line="0" /> +</TestFunction> +<TestFunction name="testCorrectMyExceptions"> +<Incident type="pass" file="" line="0" /> +</TestFunction> +<TestFunction name="testFailInt"> +<Incident type="fail" file="tst_verifyexceptionthrown.cpp" line="128"> + <Description><![CDATA[Expected exception of type double to be thrown but unknown exception caught]]></Description> +</Incident> +</TestFunction> +<TestFunction name="testFailStdString"> +<Incident type="fail" file="tst_verifyexceptionthrown.cpp" line="133"> + <Description><![CDATA[Expected exception of type char* to be thrown but unknown exception caught]]></Description> +</Incident> +</TestFunction> +<TestFunction name="testFailStdRuntimeError"> +<Incident type="fail" file="tst_verifyexceptionthrown.cpp" line="138"> + <Description><![CDATA[Expected exception of type std::runtime_error to be thrown but std::exception caught with message: logic error]]></Description> +</Incident> +</TestFunction> +<TestFunction name="testFailMyException"> +<Incident type="fail" file="tst_verifyexceptionthrown.cpp" line="143"> + <Description><![CDATA[Expected exception of type MyBaseException to be thrown but std::exception caught with message: logic error]]></Description> +</Incident> +</TestFunction> +<TestFunction name="testFailMyDerivedException"> +<Incident type="fail" file="tst_verifyexceptionthrown.cpp" line="148"> + <Description><![CDATA[Expected exception of type std::runtime_error to be thrown but std::exception caught with message: MyDerivedException]]></Description> +</Incident> +</TestFunction> +<TestFunction name="testFailNoException"> +<Incident type="fail" file="tst_verifyexceptionthrown.cpp" line="153"> + <Description><![CDATA[Expected exception of type std::exception to be thrown but no exception caught]]></Description> +</Incident> +</TestFunction> +<TestFunction name="cleanupTestCase"> +<Incident type="pass" file="" line="0" /> +</TestFunction> diff --git a/tests/auto/testlib/selftests/expected_verifyexceptionthrown.txt b/tests/auto/testlib/selftests/expected_verifyexceptionthrown.txt new file mode 100644 index 0000000000..04db60eccd --- /dev/null +++ b/tests/auto/testlib/selftests/expected_verifyexceptionthrown.txt @@ -0,0 +1,21 @@ +********* Start testing of tst_VerifyExceptionThrown ********* +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +PASS : tst_VerifyExceptionThrown::initTestCase() +PASS : tst_VerifyExceptionThrown::testCorrectStdTypes() +PASS : tst_VerifyExceptionThrown::testCorrectStdExceptions() +PASS : tst_VerifyExceptionThrown::testCorrectMyExceptions() +FAIL! : tst_VerifyExceptionThrown::testFailInt() Expected exception of type double to be thrown but unknown exception caught + Loc: [tst_verifyexceptionthrown.cpp(128)] +FAIL! : tst_VerifyExceptionThrown::testFailStdString() Expected exception of type char* to be thrown but unknown exception caught + Loc: [tst_verifyexceptionthrown.cpp(133)] +FAIL! : tst_VerifyExceptionThrown::testFailStdRuntimeError() Expected exception of type std::runtime_error to be thrown but std::exception caught with message: logic error + Loc: [tst_verifyexceptionthrown.cpp(138)] +FAIL! : tst_VerifyExceptionThrown::testFailMyException() Expected exception of type MyBaseException to be thrown but std::exception caught with message: logic error + Loc: [tst_verifyexceptionthrown.cpp(143)] +FAIL! : tst_VerifyExceptionThrown::testFailMyDerivedException() Expected exception of type std::runtime_error to be thrown but std::exception caught with message: MyDerivedException + Loc: [tst_verifyexceptionthrown.cpp(148)] +FAIL! : tst_VerifyExceptionThrown::testFailNoException() Expected exception of type std::exception to be thrown but no exception caught + Loc: [tst_verifyexceptionthrown.cpp(153)] +PASS : tst_VerifyExceptionThrown::cleanupTestCase() +Totals: 5 passed, 6 failed, 0 skipped +********* Finished testing of tst_VerifyExceptionThrown ********* diff --git a/tests/auto/testlib/selftests/expected_verifyexceptionthrown.xml b/tests/auto/testlib/selftests/expected_verifyexceptionthrown.xml new file mode 100644 index 0000000000..a533934d4b --- /dev/null +++ b/tests/auto/testlib/selftests/expected_verifyexceptionthrown.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?> +<TestCase name="tst_VerifyExceptionThrown"> +<Environment> + <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> +</Environment> +<TestFunction name="initTestCase"> +<Incident type="pass" file="" line="0" /> +</TestFunction> +<TestFunction name="testCorrectStdTypes"> +<Incident type="pass" file="" line="0" /> +</TestFunction> +<TestFunction name="testCorrectStdExceptions"> +<Incident type="pass" file="" line="0" /> +</TestFunction> +<TestFunction name="testCorrectMyExceptions"> +<Incident type="pass" file="" line="0" /> +</TestFunction> +<TestFunction name="testFailInt"> +<Incident type="fail" file="tst_verifyexceptionthrown.cpp" line="128"> + <Description><![CDATA[Expected exception of type double to be thrown but unknown exception caught]]></Description> +</Incident> +</TestFunction> +<TestFunction name="testFailStdString"> +<Incident type="fail" file="tst_verifyexceptionthrown.cpp" line="133"> + <Description><![CDATA[Expected exception of type char* to be thrown but unknown exception caught]]></Description> +</Incident> +</TestFunction> +<TestFunction name="testFailStdRuntimeError"> +<Incident type="fail" file="tst_verifyexceptionthrown.cpp" line="138"> + <Description><![CDATA[Expected exception of type std::runtime_error to be thrown but std::exception caught with message: logic error]]></Description> +</Incident> +</TestFunction> +<TestFunction name="testFailMyException"> +<Incident type="fail" file="tst_verifyexceptionthrown.cpp" line="143"> + <Description><![CDATA[Expected exception of type MyBaseException to be thrown but std::exception caught with message: logic error]]></Description> +</Incident> +</TestFunction> +<TestFunction name="testFailMyDerivedException"> +<Incident type="fail" file="tst_verifyexceptionthrown.cpp" line="148"> + <Description><![CDATA[Expected exception of type std::runtime_error to be thrown but std::exception caught with message: MyDerivedException]]></Description> +</Incident> +</TestFunction> +<TestFunction name="testFailNoException"> +<Incident type="fail" file="tst_verifyexceptionthrown.cpp" line="153"> + <Description><![CDATA[Expected exception of type std::exception to be thrown but no exception caught]]></Description> +</Incident> +</TestFunction> +<TestFunction name="cleanupTestCase"> +<Incident type="pass" file="" line="0" /> +</TestFunction> +</TestCase> diff --git a/tests/auto/testlib/selftests/expected_verifyexceptionthrown.xunitxml b/tests/auto/testlib/selftests/expected_verifyexceptionthrown.xunitxml new file mode 100644 index 0000000000..f49746a9af --- /dev/null +++ b/tests/auto/testlib/selftests/expected_verifyexceptionthrown.xunitxml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<testsuite errors="0" failures="6" tests="11" name="tst_VerifyExceptionThrown"> + <properties> + <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> + <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> + </properties> + <testcase result="pass" name="initTestCase"/> + <testcase result="pass" name="testCorrectStdTypes"/> + <testcase result="pass" name="testCorrectStdExceptions"/> + <testcase result="pass" name="testCorrectMyExceptions"/> + <testcase result="fail" name="testFailInt"> + <failure message="Expected exception of type double to be thrown but unknown exception caught" result="fail"/> + </testcase> + <testcase result="fail" name="testFailStdString"> + <failure message="Expected exception of type char* to be thrown but unknown exception caught" result="fail"/> + </testcase> + <testcase result="fail" name="testFailStdRuntimeError"> + <failure message="Expected exception of type std::runtime_error to be thrown but std::exception caught with message: logic error" result="fail"/> + </testcase> + <testcase result="fail" name="testFailMyException"> + <failure message="Expected exception of type MyBaseException to be thrown but std::exception caught with message: logic error" result="fail"/> + </testcase> + <testcase result="fail" name="testFailMyDerivedException"> + <failure message="Expected exception of type std::runtime_error to be thrown but std::exception caught with message: MyDerivedException" result="fail"/> + </testcase> + <testcase result="fail" name="testFailNoException"> + <failure message="Expected exception of type std::exception to be thrown but no exception caught" result="fail"/> + </testcase> + <testcase result="pass" name="cleanupTestCase"/> + <system-err/> +</testsuite> diff --git a/tests/auto/testlib/selftests/expected_warnings.lightxml b/tests/auto/testlib/selftests/expected_warnings.lightxml index ad786832ca..2ad9e97449 100644 --- a/tests/auto/testlib/selftests/expected_warnings.lightxml +++ b/tests/auto/testlib/selftests/expected_warnings.lightxml @@ -24,6 +24,12 @@ <Message type="qdebug" file="" line="0"> <Description><![CDATA[Baba]]></Description> </Message> +<Message type="qdebug" file="" line="0"> + <Description><![CDATA[Bubublabla]]></Description> +</Message> +<Message type="qwarn" file="" line="0"> + <Description><![CDATA[Babablabla]]></Description> +</Message> <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="testMissingWarnings"> @@ -37,6 +43,14 @@ <Description><![CDATA[Not all expected messages were received]]></Description> </Incident> </TestFunction> +<TestFunction name="testMissingWarningsRegularExpression"> +<Message type="info" file="" line="0"> + <Description><![CDATA[Did not receive any message matching: "Warning\s\d"]]></Description> +</Message> +<Incident type="fail" file="" line="0"> + <Description><![CDATA[Not all expected messages were received]]></Description> +</Incident> +</TestFunction> <TestFunction name="testMissingWarningsWithData"> <Message type="info" file="" line="0"> <DataTag><![CDATA[first row]]></DataTag> diff --git a/tests/auto/testlib/selftests/expected_warnings.txt b/tests/auto/testlib/selftests/expected_warnings.txt index d8064651b0..e73de980cb 100644 --- a/tests/auto/testlib/selftests/expected_warnings.txt +++ b/tests/auto/testlib/selftests/expected_warnings.txt @@ -7,10 +7,14 @@ QDEBUG : tst_Warnings::testWarnings() Debug QDEBUG : tst_Warnings::testWarnings() Debug QDEBUG : tst_Warnings::testWarnings() Baba QDEBUG : tst_Warnings::testWarnings() Baba +QDEBUG : tst_Warnings::testWarnings() Bubublabla +QWARN : tst_Warnings::testWarnings() Babablabla PASS : tst_Warnings::testWarnings() INFO : tst_Warnings::testMissingWarnings() Did not receive message: "Warning0" INFO : tst_Warnings::testMissingWarnings() Did not receive message: "Warning1" FAIL! : tst_Warnings::testMissingWarnings() Not all expected messages were received +INFO : tst_Warnings::testMissingWarningsRegularExpression() Did not receive any message matching: "Warning\s\d" +FAIL! : tst_Warnings::testMissingWarningsRegularExpression() Not all expected messages were received INFO : tst_Warnings::testMissingWarningsWithData(first row) Did not receive message: "Warning0" INFO : tst_Warnings::testMissingWarningsWithData(first row) Did not receive message: "Warning1" FAIL! : tst_Warnings::testMissingWarningsWithData(first row) Not all expected messages were received @@ -18,5 +22,5 @@ INFO : tst_Warnings::testMissingWarningsWithData(second row) Did not receive m INFO : tst_Warnings::testMissingWarningsWithData(second row) Did not receive message: "Warning1" FAIL! : tst_Warnings::testMissingWarningsWithData(second row) Not all expected messages were received PASS : tst_Warnings::cleanupTestCase() -Totals: 3 passed, 3 failed, 0 skipped +Totals: 3 passed, 4 failed, 0 skipped ********* Finished testing of tst_Warnings ********* diff --git a/tests/auto/testlib/selftests/expected_warnings.xml b/tests/auto/testlib/selftests/expected_warnings.xml index 8ad236b52a..14a45ca4fd 100644 --- a/tests/auto/testlib/selftests/expected_warnings.xml +++ b/tests/auto/testlib/selftests/expected_warnings.xml @@ -26,6 +26,12 @@ <Message type="qdebug" file="" line="0"> <Description><![CDATA[Baba]]></Description> </Message> +<Message type="qdebug" file="" line="0"> + <Description><![CDATA[Bubublabla]]></Description> +</Message> +<Message type="qwarn" file="" line="0"> + <Description><![CDATA[Babablabla]]></Description> +</Message> <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="testMissingWarnings"> @@ -39,6 +45,14 @@ <Description><![CDATA[Not all expected messages were received]]></Description> </Incident> </TestFunction> +<TestFunction name="testMissingWarningsRegularExpression"> +<Message type="info" file="" line="0"> + <Description><![CDATA[Did not receive any message matching: "Warning\s\d"]]></Description> +</Message> +<Incident type="fail" file="" line="0"> + <Description><![CDATA[Not all expected messages were received]]></Description> +</Incident> +</TestFunction> <TestFunction name="testMissingWarningsWithData"> <Message type="info" file="" line="0"> <DataTag><![CDATA[first row]]></DataTag> diff --git a/tests/auto/testlib/selftests/expected_warnings.xunitxml b/tests/auto/testlib/selftests/expected_warnings.xunitxml index 3e3b9ce18e..7be47174c6 100644 --- a/tests/auto/testlib/selftests/expected_warnings.xunitxml +++ b/tests/auto/testlib/selftests/expected_warnings.xunitxml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<testsuite errors="12" failures="3" tests="5" name="tst_Warnings"> +<testsuite errors="15" failures="4" tests="6" name="tst_Warnings"> <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> @@ -12,12 +12,18 @@ <!-- message="Debug" type="qdebug" --> <!-- message="Baba" type="qdebug" --> <!-- message="Baba" type="qdebug" --> + <!-- message="Bubublabla" type="qdebug" --> + <!-- message="Babablabla" type="qwarn" --> </testcase> <testcase result="fail" name="testMissingWarnings"> <!-- message="Did not receive message: "Warning0"" type="info" --> <!-- message="Did not receive message: "Warning1"" type="info" --> <failure message="Not all expected messages were received" result="fail"/> </testcase> + <testcase result="fail" name="testMissingWarningsRegularExpression"> + <!-- message="Did not receive any message matching: "Warning\s\d"" type="info" --> + <failure message="Not all expected messages were received" result="fail"/> + </testcase> <testcase result="fail" name="testMissingWarningsWithData"> <!-- tag="first row" message="Did not receive message: "Warning0"" type="info" --> <!-- tag="first row" message="Did not receive message: "Warning1"" type="info" --> @@ -34,8 +40,11 @@ <![CDATA[Debug]]> <![CDATA[Baba]]> <![CDATA[Baba]]> +<![CDATA[Bubublabla]]> +<![CDATA[Babablabla]]> <![CDATA[Did not receive message: "Warning0"]]> <![CDATA[Did not receive message: "Warning1"]]> +<![CDATA[Did not receive any message matching: "Warning\s\d"]]> <![CDATA[Did not receive message: "Warning0"]]> <![CDATA[Did not receive message: "Warning1"]]> <![CDATA[Did not receive message: "Warning0"]]> diff --git a/tests/auto/testlib/selftests/expected_xunit.lightxml b/tests/auto/testlib/selftests/expected_xunit.lightxml index 0615f6fd61..b9194ce41f 100644 --- a/tests/auto/testlib/selftests/expected_xunit.lightxml +++ b/tests/auto/testlib/selftests/expected_xunit.lightxml @@ -6,7 +6,7 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="testFunc1"> -<Message type="warn" file="" line="0"> +<Message type="warn" file="tst_xunit.cpp" line="67"> <Description><![CDATA[just a QWARN() !]]></Description> </Message> <Incident type="pass" file="" line="0" /> @@ -15,36 +15,36 @@ <Message type="qdebug" file="" line="0"> <Description><![CDATA[a qDebug() call with comment-ending stuff -->]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp" line="74"> +<Incident type="fail" file="tst_xunit.cpp" line="74"> <Description><![CDATA[Compared values are not the same Actual (2): 2 Expected (3): 3]]></Description> </Incident> </TestFunction> <TestFunction name="testFunc3"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp" line="79"> +<Message type="skip" file="tst_xunit.cpp" line="79"> <Description><![CDATA[skipping this function!]]></Description> </Message> </TestFunction> <TestFunction name="testFunc4"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp" line="84"> +<Incident type="fail" file="tst_xunit.cpp" line="84"> <Description><![CDATA[a forced failure!]]></Description> </Incident> </TestFunction> <TestFunction name="testFunc5"> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp" line="98"> +<Incident type="xfail" file="tst_xunit.cpp" line="98"> <Description><![CDATA[this failure is expected]]></Description> </Incident> <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="testFunc6"> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp" line="104"> +<Incident type="xfail" file="tst_xunit.cpp" line="104"> <Description><![CDATA[this failure is also expected]]></Description> </Incident> <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="testFunc7"> -<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp" line="110"> +<Incident type="xpass" file="tst_xunit.cpp" line="110"> <Description><![CDATA['true' returned TRUE unexpectedly. ()]]></Description> </Incident> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_xunit.txt b/tests/auto/testlib/selftests/expected_xunit.txt index 722db18de4..f0b14752f0 100644 --- a/tests/auto/testlib/selftests/expected_xunit.txt +++ b/tests/auto/testlib/selftests/expected_xunit.txt @@ -2,25 +2,25 @@ Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Xunit::initTestCase() WARNING: tst_Xunit::testFunc1() just a QWARN() ! - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp(67)] + Loc: [tst_xunit.cpp(67)] PASS : tst_Xunit::testFunc1() QDEBUG : tst_Xunit::testFunc2() a qDebug() call with comment-ending stuff --> FAIL! : tst_Xunit::testFunc2() Compared values are not the same Actual (2): 2 Expected (3): 3 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp(74)] + Loc: [tst_xunit.cpp(74)] SKIP : tst_Xunit::testFunc3() skipping this function! - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp(79)] + Loc: [tst_xunit.cpp(79)] FAIL! : tst_Xunit::testFunc4() a forced failure! - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp(84)] + Loc: [tst_xunit.cpp(84)] XFAIL : tst_Xunit::testFunc5() this failure is expected - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp(98)] + Loc: [tst_xunit.cpp(98)] PASS : tst_Xunit::testFunc5() XFAIL : tst_Xunit::testFunc6() this failure is also expected - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp(104)] + Loc: [tst_xunit.cpp(104)] PASS : tst_Xunit::testFunc6() XPASS : tst_Xunit::testFunc7() 'true' returned TRUE unexpectedly. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp(110)] + Loc: [tst_xunit.cpp(110)] PASS : tst_Xunit::cleanupTestCase() Totals: 5 passed, 3 failed, 1 skipped ********* Finished testing of tst_Xunit ********* diff --git a/tests/auto/testlib/selftests/expected_xunit.xml b/tests/auto/testlib/selftests/expected_xunit.xml index e5d2876e20..948023e32c 100644 --- a/tests/auto/testlib/selftests/expected_xunit.xml +++ b/tests/auto/testlib/selftests/expected_xunit.xml @@ -8,7 +8,7 @@ <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="testFunc1"> -<Message type="warn" file="" line="0"> +<Message type="warn" file="tst_xunit.cpp" line="67"> <Description><![CDATA[just a QWARN() !]]></Description> </Message> <Incident type="pass" file="" line="0" /> @@ -17,36 +17,36 @@ <Message type="qdebug" file="" line="0"> <Description><![CDATA[a qDebug() call with comment-ending stuff -->]]></Description> </Message> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp" line="74"> +<Incident type="fail" file="tst_xunit.cpp" line="74"> <Description><![CDATA[Compared values are not the same Actual (2): 2 Expected (3): 3]]></Description> </Incident> </TestFunction> <TestFunction name="testFunc3"> -<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp" line="79"> +<Message type="skip" file="tst_xunit.cpp" line="79"> <Description><![CDATA[skipping this function!]]></Description> </Message> </TestFunction> <TestFunction name="testFunc4"> -<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp" line="84"> +<Incident type="fail" file="tst_xunit.cpp" line="84"> <Description><![CDATA[a forced failure!]]></Description> </Incident> </TestFunction> <TestFunction name="testFunc5"> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp" line="98"> +<Incident type="xfail" file="tst_xunit.cpp" line="98"> <Description><![CDATA[this failure is expected]]></Description> </Incident> <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="testFunc6"> -<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp" line="104"> +<Incident type="xfail" file="tst_xunit.cpp" line="104"> <Description><![CDATA[this failure is also expected]]></Description> </Incident> <Incident type="pass" file="" line="0" /> </TestFunction> <TestFunction name="testFunc7"> -<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp" line="110"> +<Incident type="xpass" file="tst_xunit.cpp" line="110"> <Description><![CDATA['true' returned TRUE unexpectedly. ()]]></Description> </Incident> </TestFunction> diff --git a/tests/auto/testlib/selftests/generate_expected_output.py b/tests/auto/testlib/selftests/generate_expected_output.py new file mode 100755 index 0000000000..bf1e808e22 --- /dev/null +++ b/tests/auto/testlib/selftests/generate_expected_output.py @@ -0,0 +1,119 @@ +#!/usr/bin/env python3 +############################################################################# +## +## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +## Contact: http://www.qt-project.org/legal +## +## This file is part of the release tools of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and Digia. For licensing terms and +## conditions see http://qt.digia.com/licensing. For further information +## use the contact form at http://qt.digia.com/contact-us. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Digia gives you certain additional +## rights. These rights are described in the Digia Qt LGPL Exception +## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3.0 as published by the Free Software +## Foundation and appearing in the file LICENSE.GPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU General Public License version 3.0 requirements will be +## met: http://www.gnu.org/copyleft/gpl.html. +## +## +## $QT_END_LICENSE$ +## +############################################################################# + +#regenerate all test's output + +import os +import sys +import subprocess +import re + +formats = ['xml', 'txt', 'xunitxml', 'lightxml'] + +qtver = subprocess.check_output(['qmake', '-query', 'QT_VERSION']).strip().decode('utf-8') +rootPath = os.getcwd() + +isWindows = sys.platform == 'win32' + +replacements = [ + (qtver, r'@INSERT_QT_VERSION_HERE@'), + (rootPath.encode('unicode-escape').decode('utf-8'), r''), + (r'<Duration msecs="\d+"/>', r'<Duration msecs="0"/>'), +] + +extraArgs = { + "commandlinedata": "fiveTablePasses fiveTablePasses:fiveTablePasses_data1 -v2", + "benchlibcallgrind": "-callgrind", + "benchlibeventcounter": "-eventcounter", + "benchliboptions": "-eventcounter", + "benchlibtickcounter": "-tickcounter", + "badxml": "-eventcounter", + "benchlibcounting": "-eventcounter", + "printdatatags": "-datatags", + "printdatatagswithglobaltags": "-datatags", + "silent": "-silent", + "verbose1": "-v1", + "verbose2": "-v2", +} + +# Replace all occurrences of searchExp in one file +def replaceInFile(file): + import sys + import fileinput + for line in fileinput.input(file, inplace=1): + for searchExp, replaceExp in replacements: + line = re.sub(searchExp, replaceExp, line) + sys.stdout.write(line) + +def subdirs(): + for path in os.listdir('.'): + if os.path.isdir('./' + path): + yield path + +def getTestForPath(path): + if isWindows: + testpath = path + '\\' + path + '.exe' + else: + testpath = path + '/' + path + return testpath + +def generateTestData(testname): + print(" running " + testname) + for format in formats: + cmd = [getTestForPath(testname) + ' -' + format + ' ' + extraArgs.get(testname, '')] + result = 'expected_' + testname + '.' + format + data = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True).communicate()[0] + out = open(result, 'w') + out.write(data.decode('utf-8')) + out.close() + replaceInFile(result) + +if isWindows: + print("This script does not work on Windows.") + exit() + +print("Generating test results for: " + qtver + " in: " + rootPath) +for path in subdirs(): + if os.path.isfile(getTestForPath(path)): + generateTestData(path) + else: + print("Warning: directory " + path + " contains no test executable") diff --git a/tests/auto/testlib/selftests/selftests.pri b/tests/auto/testlib/selftests/selftests.pri index c9474419eb..7b706735a9 100644 --- a/tests/auto/testlib/selftests/selftests.pri +++ b/tests/auto/testlib/selftests/selftests.pri @@ -41,5 +41,6 @@ SUBPROGRAMS = \ subtest \ verbose1 \ verbose2 \ + verifyexceptionthrown \ warnings \ xunit diff --git a/tests/auto/testlib/selftests/selftests.qrc b/tests/auto/testlib/selftests/selftests.qrc index 03de05fb89..e7ca7138b2 100644 --- a/tests/auto/testlib/selftests/selftests.qrc +++ b/tests/auto/testlib/selftests/selftests.qrc @@ -134,6 +134,10 @@ <file>expected_verbose2.txt</file> <file>expected_verbose2.xml</file> <file>expected_verbose2.xunitxml</file> + <file>expected_verifyexceptionthrown.lightxml</file> + <file>expected_verifyexceptionthrown.txt</file> + <file>expected_verifyexceptionthrown.xml</file> + <file>expected_verifyexceptionthrown.xunitxml</file> <file>expected_warnings.lightxml</file> <file>expected_warnings.txt</file> <file>expected_warnings.xml</file> diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index e332f01861..1a8e336b55 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -381,6 +381,10 @@ void tst_Selftests::runSubTest_data() << "subtest" << "verbose1" << "verbose2" +#ifndef QT_NO_EXCEPTIONS + // this test will test nothing if the exceptions are disabled + << "verifyexceptionthrown" +#endif //!QT_NO_EXCEPTIONS << "warnings" << "xunit" ; diff --git a/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp b/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp new file mode 100644 index 0000000000..fc57f19c4f --- /dev/null +++ b/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp @@ -0,0 +1,162 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include <QtTest/QtTest> + + +#ifndef QT_NO_EXCEPTIONS +# include <stdexcept> +#endif + + +#ifndef QT_NO_EXCEPTIONS + +class MyBaseException +{ + +}; + +class MyDerivedException: public MyBaseException, public std::domain_error +{ +public: + MyDerivedException(): std::domain_error("MyDerivedException") {} +}; + + +#endif // !QT_NO_EXCEPTIONS + + +class tst_VerifyExceptionThrown: public QObject +{ + Q_OBJECT +private: + void doSomething() const {} + +private slots: +// Remove all test cases if exceptions are not available +#ifndef QT_NO_EXCEPTIONS + void testCorrectStdTypes() const; + void testCorrectStdExceptions() const; + void testCorrectMyExceptions() const; + + void testFailInt() const; + void testFailStdString() const; + void testFailStdRuntimeError() const; + void testFailMyException() const; + void testFailMyDerivedException() const; + + void testFailNoException() const; +#endif // !QT_NO_EXCEPTIONS +}; + + + +#ifndef QT_NO_EXCEPTIONS + +void tst_VerifyExceptionThrown::testCorrectStdTypes() const +{ + QVERIFY_EXCEPTION_THROWN(throw int(5), int); + QVERIFY_EXCEPTION_THROWN(throw float(9.8), float); + QVERIFY_EXCEPTION_THROWN(throw bool(true), bool); + QVERIFY_EXCEPTION_THROWN(throw std::string("some string"), std::string); +} + +void tst_VerifyExceptionThrown::testCorrectStdExceptions() const +{ + // same type + QVERIFY_EXCEPTION_THROWN(throw std::exception(), std::exception); + QVERIFY_EXCEPTION_THROWN(throw std::runtime_error("runtime error"), std::runtime_error); + QVERIFY_EXCEPTION_THROWN(throw std::overflow_error("overflow error"), std::overflow_error); + + // inheritance + QVERIFY_EXCEPTION_THROWN(throw std::overflow_error("overflow error"), std::runtime_error); + QVERIFY_EXCEPTION_THROWN(throw std::overflow_error("overflow error"), std::exception); +} + +void tst_VerifyExceptionThrown::testCorrectMyExceptions() const +{ + // same type + QVERIFY_EXCEPTION_THROWN(throw MyBaseException(), MyBaseException); + QVERIFY_EXCEPTION_THROWN(throw MyDerivedException(), MyDerivedException); + + // inheritance + QVERIFY_EXCEPTION_THROWN(throw MyDerivedException(), MyBaseException); + QVERIFY_EXCEPTION_THROWN(throw MyDerivedException(), std::domain_error); +} + +void tst_VerifyExceptionThrown::testFailInt() const +{ + QVERIFY_EXCEPTION_THROWN(throw int(5), double); +} + +void tst_VerifyExceptionThrown::testFailStdString() const +{ + QVERIFY_EXCEPTION_THROWN(throw std::string("some string"), char*); +} + +void tst_VerifyExceptionThrown::testFailStdRuntimeError() const +{ + QVERIFY_EXCEPTION_THROWN(throw std::logic_error("logic error"), std::runtime_error); +} + +void tst_VerifyExceptionThrown::testFailMyException() const +{ + QVERIFY_EXCEPTION_THROWN(throw std::logic_error("logic error"), MyBaseException); +} + +void tst_VerifyExceptionThrown::testFailMyDerivedException() const +{ + QVERIFY_EXCEPTION_THROWN(throw MyDerivedException(), std::runtime_error); +} + +void tst_VerifyExceptionThrown::testFailNoException() const +{ + QVERIFY_EXCEPTION_THROWN(doSomething(), std::exception); +} + +#endif // !QT_NO_EXCEPTIONS + + + +QTEST_MAIN(tst_VerifyExceptionThrown) + +#include "tst_verifyexceptionthrown.moc" diff --git a/tests/auto/testlib/selftests/verifyexceptionthrown/verifyexceptionthrown.pro b/tests/auto/testlib/selftests/verifyexceptionthrown/verifyexceptionthrown.pro new file mode 100644 index 0000000000..51f108c9d7 --- /dev/null +++ b/tests/auto/testlib/selftests/verifyexceptionthrown/verifyexceptionthrown.pro @@ -0,0 +1,8 @@ +SOURCES += tst_verifyexceptionthrown.cpp +QT = core testlib + +mac:CONFIG -= app_bundle +CONFIG -= debug_and_release_target +CONFIG += exceptions + +TARGET = verifyexceptionthrown diff --git a/tests/auto/testlib/selftests/warnings/tst_warnings.cpp b/tests/auto/testlib/selftests/warnings/tst_warnings.cpp index 20f53fdc91..4e3620caab 100644 --- a/tests/auto/testlib/selftests/warnings/tst_warnings.cpp +++ b/tests/auto/testlib/selftests/warnings/tst_warnings.cpp @@ -41,6 +41,7 @@ #include <QtCore/QCoreApplication> +#include <QtCore/QRegularExpression> #include <QtTest/QtTest> class tst_Warnings: public QObject @@ -49,6 +50,7 @@ class tst_Warnings: public QObject private slots: void testWarnings(); void testMissingWarnings(); + void testMissingWarningsRegularExpression(); void testMissingWarningsWithData_data(); void testMissingWarningsWithData(); }; @@ -73,6 +75,17 @@ void tst_Warnings::testWarnings() qDebug("Baba"); qDebug("Bubu"); qDebug("Baba"); + + QTest::ignoreMessage(QtDebugMsg, QRegularExpression("^Bubu.*")); + QTest::ignoreMessage(QtWarningMsg, QRegularExpression("^Baba.*")); + qDebug("Bubublabla"); + qWarning("Babablabla"); + qDebug("Bubublabla"); + qWarning("Babablabla"); + + // accept redundant space at end to keep compatibility with Qt < 5.2 + QTest::ignoreMessage(QtDebugMsg, "Bubu "); + qDebug() << "Bubu"; } void tst_Warnings::testMissingWarnings() @@ -84,6 +97,14 @@ void tst_Warnings::testMissingWarnings() qWarning("Warning2"); } +void tst_Warnings::testMissingWarningsRegularExpression() +{ + QTest::ignoreMessage(QtWarningMsg, QRegularExpression("Warning\\d\\d")); + QTest::ignoreMessage(QtWarningMsg, QRegularExpression("Warning\\s\\d")); + + qWarning("Warning11"); +} + void tst_Warnings::testMissingWarningsWithData_data() { QTest::addColumn<int>("dummy"); diff --git a/tests/auto/tools/moc/moc.pro b/tests/auto/tools/moc/moc.pro index 779e992881..320887637d 100644 --- a/tests/auto/tools/moc/moc.pro +++ b/tests/auto/tools/moc/moc.pro @@ -24,7 +24,10 @@ HEADERS += using-namespaces.h no-keywords.h task87883.h c-comments.h backslash-n parse-defines.h \ function-with-attributes.h \ plugin_metadata.h \ - single-quote-digit-separator-n3781.h + single-quote-digit-separator-n3781.h \ + related-metaobjects-in-namespaces.h \ + qtbug-35657-gadget.h \ + related-metaobjects-in-gadget.h if(*-g++*|*-icc*|*-clang*|*-llvm):!irix-*:!win32-*: HEADERS += os9-newlines.h win-newlines.h diff --git a/tests/auto/tools/moc/qtbug-35657-gadget.h b/tests/auto/tools/moc/qtbug-35657-gadget.h new file mode 100644 index 0000000000..1f25ce1b1d --- /dev/null +++ b/tests/auto/tools/moc/qtbug-35657-gadget.h @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QObject> + +namespace QTBUG_35657 { + class A { + Q_GADGET + Q_ENUMS(SomeEnum) + public: + enum SomeEnum { SomeEnumValue = 0 }; + }; +} diff --git a/tests/auto/tools/moc/related-metaobjects-in-gadget.h b/tests/auto/tools/moc/related-metaobjects-in-gadget.h new file mode 100644 index 0000000000..5665a79251 --- /dev/null +++ b/tests/auto/tools/moc/related-metaobjects-in-gadget.h @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QObject> +#include "qtbug-35657-gadget.h" + +namespace QTBUG_35657 { + class B : public QObject + { + Q_OBJECT + Q_PROPERTY(A::SomeEnum blah READ blah) + public: + + A::SomeEnum blah() const { return A::SomeEnumValue; } + }; +} diff --git a/tests/auto/tools/moc/related-metaobjects-in-namespaces.h b/tests/auto/tools/moc/related-metaobjects-in-namespaces.h new file mode 100644 index 0000000000..0a3e9ed77d --- /dev/null +++ b/tests/auto/tools/moc/related-metaobjects-in-namespaces.h @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QObject> + +namespace QTBUG_2151 { + class A : public QObject { + Q_OBJECT + Q_ENUMS(SomeEnum) + public: + enum SomeEnum { SomeEnumValue = 0 }; + }; + + class B : public QObject + { + Q_OBJECT + Q_PROPERTY(A::SomeEnum blah READ blah) + public: + + A::SomeEnum blah() const { return A::SomeEnumValue; } + }; +} diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp index 7fae29e5ca..e0e6129075 100644 --- a/tests/auto/tools/moc/tst_moc.cpp +++ b/tests/auto/tools/moc/tst_moc.cpp @@ -76,6 +76,8 @@ #include "cxx11-explicit-override-control.h" #include "parse-defines.h" +#include "related-metaobjects-in-namespaces.h" +#include "related-metaobjects-in-gadget.h" QT_USE_NAMESPACE @@ -568,6 +570,9 @@ private slots: void preprocessorOnly(); void unterminatedFunctionMacro(); void QTBUG32933_relatedObjectsDontIncludeItself(); + void writeEnumFromUnrelatedClass(); + void relatedMetaObjectsWithinNamespaces(); + void relatedMetaObjectsInGadget(); signals: void sigWithUnsignedArg(unsigned foo); @@ -884,7 +889,7 @@ void tst_Moc::testExtraDataForEnum() const QMetaObject *mobjUser = &EnumUserClass::staticMetaObject; QCOMPARE(mobjUser->enumeratorCount(), 0); - const QMetaObject **objects = mobjUser->d.relatedMetaObjects; + const QMetaObject * const *objects = mobjUser->d.relatedMetaObjects; QVERIFY(objects); QVERIFY(objects[0] == mobjSource); QVERIFY(objects[1] == 0); @@ -3098,12 +3103,76 @@ namespace QTBUG32933_relatedObjectsDontIncludeItself { void tst_Moc::QTBUG32933_relatedObjectsDontIncludeItself() { const QMetaObject *mo = &QTBUG32933_relatedObjectsDontIncludeItself::NS::Obj::staticMetaObject; - const QMetaObject **objects = mo->d.relatedMetaObjects; + const QMetaObject * const *objects = mo->d.relatedMetaObjects; // the related objects should be empty because the enums is in the same object. QVERIFY(!objects); } +class UnrelatedClass : public QObject +{ + Q_OBJECT + Q_ENUMS(UnrelatedEnum) +public: + enum UnrelatedEnum { + UnrelatedInvalidValue = -1, + UnrelatedValue = 42 + }; +}; + +// The presence of this macro used to confuse moc and prevent +// UnrelatedClass from being listed in the related meta objects. +Q_DECLARE_METATYPE(UnrelatedClass::UnrelatedEnum) + +class TestClassReferencingUnrelatedEnum : public QObject +{ + Q_OBJECT + Q_PROPERTY(UnrelatedClass::UnrelatedEnum enumProperty READ enumProperty WRITE setEnumProperty) +public: + TestClassReferencingUnrelatedEnum() + : m_enumProperty(UnrelatedClass::UnrelatedInvalidValue) + {} + + UnrelatedClass::UnrelatedEnum enumProperty() const { + return m_enumProperty; + } + + void setEnumProperty(UnrelatedClass::UnrelatedEnum arg) { + m_enumProperty = arg; + } + +private: + UnrelatedClass::UnrelatedEnum m_enumProperty; +}; + +void tst_Moc::writeEnumFromUnrelatedClass() +{ + TestClassReferencingUnrelatedEnum obj; + QString enumValueAsString("UnrelatedValue"); + obj.setProperty("enumProperty", enumValueAsString); + QCOMPARE(int(obj.enumProperty()), int(UnrelatedClass::UnrelatedValue)); +} + + + +void tst_Moc::relatedMetaObjectsWithinNamespaces() +{ + const QMetaObject *relatedMo = &QTBUG_2151::A::staticMetaObject; + + const QMetaObject *testMo = &QTBUG_2151::B::staticMetaObject; + QVERIFY(testMo->d.relatedMetaObjects); + QVERIFY(testMo->d.relatedMetaObjects[0] == relatedMo); +} + +void tst_Moc::relatedMetaObjectsInGadget() +{ + const QMetaObject *relatedMo = &QTBUG_35657::A::staticMetaObject; + + const QMetaObject *testMo = &QTBUG_35657::B::staticMetaObject; + QVERIFY(testMo->d.relatedMetaObjects); + QVERIFY(testMo->d.relatedMetaObjects[0] == relatedMo); +} + QTEST_MAIN(tst_Moc) // the generated code must compile with QT_NO_KEYWORDS diff --git a/tests/auto/tools/uic/baseline/translation/Dialog_without_Buttons_tr.h b/tests/auto/tools/uic/baseline/translation/Dialog_without_Buttons_tr.h new file mode 100644 index 0000000000..597728e207 --- /dev/null +++ b/tests/auto/tools/uic/baseline/translation/Dialog_without_Buttons_tr.h @@ -0,0 +1,50 @@ +/******************************************************************************** +** Form generated from reading UI file 'Dialog_without_Buttons.ui' +** +** Created by: Qt User Interface Compiler version 5.3.0 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef DIALOG_WITHOUT_BUTTONS_TR_H +#define DIALOG_WITHOUT_BUTTONS_TR_H + +#include <QtCore/QVariant> +#include <QtWidgets/QAction> +#include <QtWidgets/QApplication> +#include <QtWidgets/QButtonGroup> +#include <QtWidgets/QDialog> +#include <QtWidgets/QHeaderView> +#include <ki18n.h> + +QT_BEGIN_NAMESPACE + +class Ui_Dialog +{ +public: + + void setupUi(QDialog *Dialog) + { + if (Dialog->objectName().isEmpty()) + Dialog->setObjectName(QStringLiteral("Dialog")); + Dialog->resize(400, 300); + + retranslateUi(Dialog); + + QMetaObject::connectSlotsByName(Dialog); + } // setupUi + + void retranslateUi(QDialog *Dialog) + { + Dialog->setWindowTitle(i18n("Dialog", 0)); + } // retranslateUi + +}; + +namespace Ui { + class Dialog: public Ui_Dialog {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // DIALOG_WITHOUT_BUTTONS_TR_H diff --git a/tests/auto/tools/uic/tst_uic.cpp b/tests/auto/tools/uic/tst_uic.cpp index c6e8466d89..02a19c0c33 100644 --- a/tests/auto/tools/uic/tst_uic.cpp +++ b/tests/auto/tools/uic/tst_uic.cpp @@ -64,9 +64,13 @@ private Q_SLOTS: void run(); void run_data() const; + void runTranslation(); + void compare(); void compare_data() const; + void runCompare(); + private: const QString m_command; QString m_baseline; @@ -220,5 +224,53 @@ void tst_uic::compare_data() const } } +void tst_uic::runTranslation() +{ + QProcess process; + + QDir baseline(m_baseline); + + QDir generated(m_generated.path()); + generated.mkdir(QLatin1String("translation")); + QString generatedFile = generated.absolutePath() + QLatin1String("/translation/Dialog_without_Buttons_tr.h"); + + process.start(m_command, QStringList(baseline.filePath("Dialog_without_Buttons.ui")) + << QString(QLatin1String("-tr")) << "i18n" + << QString(QLatin1String("-include")) << "ki18n.h" + << QString(QLatin1String("-o")) << generatedFile); + QVERIFY2(process.waitForStarted(), msgProcessStartFailed(m_command, process.errorString())); + QVERIFY(process.waitForFinished()); + QCOMPARE(process.exitStatus(), QProcess::NormalExit); + QCOMPARE(process.exitCode(), 0); + QCOMPARE(QFileInfo(generatedFile).exists(), true); +} + + +void tst_uic::runCompare() +{ + QFile orgFile(m_baseline + QLatin1String("/translation/Dialog_without_Buttons_tr.h")); + + QDir generated(m_generated.path()); + QFile genFile(generated.absolutePath() + QLatin1String("/translation/Dialog_without_Buttons_tr.h")); + + if (!orgFile.open(QIODevice::ReadOnly | QIODevice::Text)) { + QString err(QLatin1String("Could not read file: %1...")); + QFAIL(err.arg(orgFile.fileName()).toUtf8()); + } + + if (!genFile.open(QIODevice::ReadOnly | QIODevice::Text)) { + QString err(QLatin1String("Could not read file: %1...")); + QFAIL(err.arg(genFile.fileName()).toUtf8()); + } + + QString originalFile = orgFile.readAll(); + originalFile.replace(QRegExp(QLatin1String("Created by: Qt User Interface Compiler version [.\\d]{5,5}")), ""); + + QString generatedFile = genFile.readAll(); + generatedFile.replace(QRegExp(QLatin1String("Created by: Qt User Interface Compiler version [.\\d]{5,5}")), ""); + + QCOMPARE(generatedFile, originalFile); +} + QTEST_MAIN(tst_uic) #include "tst_uic.moc" diff --git a/tests/auto/widgets/dialogs/dialogs.pro b/tests/auto/widgets/dialogs/dialogs.pro index acff1df5ba..c5f2c409dd 100644 --- a/tests/auto/widgets/dialogs/dialogs.pro +++ b/tests/auto/widgets/dialogs/dialogs.pro @@ -1,6 +1,5 @@ TEMPLATE=subdirs SUBDIRS=\ - qabstractprintdialog \ qcolordialog \ qdialog \ qerrormessage \ @@ -14,8 +13,6 @@ SUBDIRS=\ qsidebar \ qwizard \ -wince*|!qtHaveModule(printsupport):SUBDIRS -= qabstractprintdialog - !contains(QT_CONFIG, private_tests): SUBDIRS -= \ qsidebar \ diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp index 9cb391d5f4..3a1f650351 100644 --- a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp +++ b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp @@ -424,7 +424,14 @@ bool tst_QFileSystemModel::createFiles(const QString &test_path, const QStringLi wchar_t nativeHiddenFile[MAX_PATH]; memset(nativeHiddenFile, 0, sizeof(nativeHiddenFile)); hiddenFile.toWCharArray(nativeHiddenFile); +#ifndef Q_OS_WINRT DWORD currentAttributes = ::GetFileAttributes(nativeHiddenFile); +#else // !Q_OS_WINRT + WIN32_FILE_ATTRIBUTE_DATA attributeData; + if (!::GetFileAttributesEx(nativeHiddenFile, GetFileExInfoStandard, &attributeData)) + attributeData.dwFileAttributes = 0xFFFFFFFF; + DWORD currentAttributes = attributeData.dwFileAttributes; +#endif // Q_OS_WINRT if (currentAttributes == 0xFFFFFFFF) { qErrnoWarning("failed to get file attributes: %s", qPrintable(hiddenFile)); return false; diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro b/tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro index 0c3b46c5d5..527f62b22d 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro +++ b/tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro @@ -5,5 +5,5 @@ QT += core-private gui-private SOURCES += tst_qgraphicsitem.cpp DEFINES += QT_NO_CAST_TO_ASCII -win32:!wince*: LIBS += -luser32 +win32:!wince*:!winrt: LIBS += -luser32 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp index fc1d0e34cb..de7c528825 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp @@ -71,7 +71,7 @@ Q_DECLARE_METATYPE(QPainterPath) #include "../../../qtest-config.h" -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) #include <windows.h> #define Q_CHECK_PAINTEVENTS \ if (::SwitchDesktop(::GetThreadDesktop(::GetCurrentThreadId())) == 0) \ diff --git a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp index 6366f86250..8f7a3a3255 100644 --- a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp @@ -1,3 +1,4 @@ + /**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). @@ -47,6 +48,8 @@ #include <qgraphicsscene.h> #include <qgraphicsview.h> #include <qapplication.h> +#include <QtWidgets/qstyle.h> +#include <QtWidgets/qproxystyle.h> class tst_QGraphicsLinearLayout : public QObject { Q_OBJECT @@ -86,6 +89,7 @@ private slots: void removeItem(); void setGeometry_data(); void setGeometry(); + void defaultSpacing(); void setSpacing_data(); void setSpacing(); void setItemSpacing_data(); @@ -909,6 +913,94 @@ void tst_QGraphicsLinearLayout::setGeometry() delete widget; } +class LayoutStyle : public QProxyStyle +{ +public: + LayoutStyle(const QString &key) + : QProxyStyle(key), + horizontalSpacing(-1), verticalSpacing(-1) {} + + virtual int pixelMetric(QStyle::PixelMetric pm, const QStyleOption *option = 0, const QWidget *widget = 0) const Q_DECL_OVERRIDE + { + if (pm == QStyle::PM_LayoutHorizontalSpacing && horizontalSpacing >= 0) { + return horizontalSpacing; + } else if (pm == QStyle::PM_LayoutVerticalSpacing && verticalSpacing >= 0) { + return verticalSpacing; + } + return QProxyStyle::pixelMetric(pm, option, widget); + } + + int horizontalSpacing; + int verticalSpacing; +}; + +void tst_QGraphicsLinearLayout::defaultSpacing() +{ + QGraphicsScene scene; + QGraphicsView view(&scene); + LayoutStyle *style = new LayoutStyle(QLatin1String("windows")); + style->horizontalSpacing = 5; + style->verticalSpacing = 3; + LayoutStyle *style2 = new LayoutStyle(QLatin1String("windows")); + style2->horizontalSpacing = 25; + style2->verticalSpacing = 23; + + QGraphicsWidget *widget = new QGraphicsWidget(0, Qt::Window); + widget->setStyle(style); + + // Horizontal layout + SubQGraphicsLinearLayout *layout = new SubQGraphicsLinearLayout(Qt::Horizontal); + widget->setLayout(layout); + Q_ASSERT(widget->style()); + scene.addItem(widget); + layout->setContentsMargins(0, 0, 0, 0); + view.show(); + + for (int i = 0; i < 2; ++i) { + QGraphicsWidget *w = new QGraphicsWidget; + layout->addItem(w); + } + + // Horizontal layout + qreal styleSpacing = (qreal)style->pixelMetric(QStyle::PM_LayoutHorizontalSpacing); + QCOMPARE(styleSpacing, qreal(5)); + QCOMPARE(styleSpacing, layout->spacing()); + QCOMPARE(layout->effectiveSizeHint(Qt::PreferredSize).width(), qreal(105)); + style->horizontalSpacing = 15; + // If the style method changes return value, the layout must be invalidated by the application + layout->invalidate(); + styleSpacing = (qreal)style->pixelMetric(QStyle::PM_LayoutHorizontalSpacing); + QCOMPARE(styleSpacing, qreal(15)); + QCOMPARE(styleSpacing, layout->spacing()); + QCOMPARE(layout->effectiveSizeHint(Qt::PreferredSize).width(), qreal(115)); + widget->setStyle(style2); + // If the style itself changes, the layout will pick that up + QCOMPARE(layout->effectiveSizeHint(Qt::PreferredSize).width(), qreal(125)); + QCOMPARE(layout->spacing(), qreal(25)); + + // Vertical layout + widget->setStyle(style); + layout->setOrientation(Qt::Vertical); + styleSpacing = (qreal)style->pixelMetric(QStyle::PM_LayoutVerticalSpacing); + QCOMPARE(styleSpacing, qreal(3)); + QCOMPARE(styleSpacing, layout->spacing()); + QCOMPARE(layout->effectiveSizeHint(Qt::PreferredSize).height(), qreal(103)); + style->verticalSpacing = 13; + // If the style method changes return value, the layout must be invalidated by the application + layout->invalidate(); + styleSpacing = (qreal)style->pixelMetric(QStyle::PM_LayoutVerticalSpacing); + QCOMPARE(styleSpacing, qreal(13)); + QCOMPARE(styleSpacing, layout->spacing()); + QCOMPARE(layout->effectiveSizeHint(Qt::PreferredSize).height(), qreal(113)); + widget->setStyle(style2); + // If the style itself changes, the layout will pick that up + QCOMPARE(layout->effectiveSizeHint(Qt::PreferredSize).height(), qreal(123)); + QCOMPARE(layout->spacing(), qreal(23)); + + + delete widget; +} + void tst_QGraphicsLinearLayout::setSpacing_data() { QTest::addColumn<qreal>("spacing"); diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro b/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro index 8d00931ef1..a6022e0d7d 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro +++ b/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro @@ -4,7 +4,7 @@ QT += widgets widgets-private testlib QT += core-private gui-private SOURCES += tst_qgraphicsscene.cpp RESOURCES += images.qrc -win32:!wince*: LIBS += -luser32 +win32:!wince*:!winrt: LIBS += -luser32 !wince*:DEFINES += SRCDIR=\\\"$$PWD\\\" DEFINES += QT_NO_CAST_TO_ASCII diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp index 15c92663ec..dfc8465210 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp @@ -54,7 +54,7 @@ #include "../../../shared/platforminputcontext.h" #include <private/qinputmethod_p.h> -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) #include <windows.h> #define Q_CHECK_PAINTEVENTS \ if (::SwitchDesktop(::GetThreadDesktop(::GetCurrentThreadId())) == 0) \ diff --git a/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro b/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro index cb935fd2fd..313cadd6a1 100644 --- a/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro +++ b/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro @@ -3,4 +3,4 @@ TARGET = tst_qitemdelegate QT += widgets testlib SOURCES += tst_qitemdelegate.cpp -win32:!wince*: LIBS += -luser32 +win32:!wince*:!winrt: LIBS += -luser32 diff --git a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp index 439725b257..addb226101 100644 --- a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp +++ b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp @@ -66,7 +66,7 @@ Q_DECLARE_METATYPE(QAbstractItemDelegate::EndEditHint) -#if defined (Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined (Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) #include <windows.h> #define Q_CHECK_PAINTEVENTS \ if (::SwitchDesktop(::GetThreadDesktop(::GetCurrentThreadId())) == 0) \ diff --git a/tests/auto/widgets/itemviews/qlistview/qlistview.pro b/tests/auto/widgets/itemviews/qlistview/qlistview.pro index 413304bdcf..1ea8beb8df 100644 --- a/tests/auto/widgets/itemviews/qlistview/qlistview.pro +++ b/tests/auto/widgets/itemviews/qlistview/qlistview.pro @@ -2,4 +2,4 @@ CONFIG += testcase TARGET = tst_qlistview QT += widgets gui-private widgets-private core-private testlib SOURCES += tst_qlistview.cpp -win32:!wince*: LIBS += -luser32 +win32:!wince*:!winrt: LIBS += -luser32 diff --git a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp index 268276bd4a..9f5484983d 100644 --- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp +++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp @@ -1484,7 +1484,7 @@ void tst_QListView::wordWrap() QTRY_COMPARE(lv.verticalScrollBar()->isVisible(), true); } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) class SetCurrentIndexAfterAppendRowCrashDialog : public QDialog { Q_OBJECT @@ -1525,7 +1525,7 @@ private: }; #endif -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && WINVER >= 0x0500 +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) && WINVER >= 0x0500 // This test only makes sense on windows 2000 and higher. void tst_QListView::setCurrentIndexAfterAppendRowCrash() { diff --git a/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp b/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp index 83ba1ddcda..d2625c400a 100644 --- a/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp +++ b/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp @@ -1758,9 +1758,7 @@ void tst_QTreeWidget::setData() QCOMPARE(qvariant_cast<QTreeWidgetItem*>(args.at(0)), item); QCOMPARE(qvariant_cast<int>(args.at(1)), j); item->setIcon(j, icon); - // #### shouldn't cause dataChanged() - QCOMPARE(itemChangedSpy.count(), 1); - itemChangedSpy.clear(); + QCOMPARE(itemChangedSpy.count(), 0); QString toolTip = QString("toolTip %0").arg(i); item->setToolTip(j, toolTip); diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index 091927abe4..e13dfe836f 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -179,6 +179,8 @@ private slots: void globalStaticObjectDestruction(); // run this last void abortQuitOnShow(); + + void settableStyleHints(); // Needs to run last as it changes style hints. }; class EventSpy : public QObject @@ -1949,7 +1951,7 @@ void tst_QApplication::windowsCommandLine_data() void tst_QApplication::windowsCommandLine() { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) QFETCH(QString, args); QFETCH(QString, expected); @@ -2305,6 +2307,22 @@ void tst_QApplication::abortQuitOnShow() QCOMPARE(app.exec(), 1); } +void tst_QApplication::settableStyleHints() +{ + int argc = 0; + QApplication app(argc, 0); + QApplication::setCursorFlashTime(437); + QCOMPARE(QApplication::cursorFlashTime(), 437); + QApplication::setDoubleClickInterval(128); + QCOMPARE(QApplication::doubleClickInterval(), 128); + QApplication::setStartDragDistance(122000); + QCOMPARE(QApplication::startDragDistance(), 122000); + QApplication::setStartDragTime(834); + QCOMPARE(QApplication::startDragTime(), 834); + QApplication::setKeyboardInputInterval(309); + QCOMPARE(QApplication::keyboardInputInterval(), 309); +} + /* This test is meant to ensure that certain objects (public & commonly used) can safely be used in a Q_GLOBAL_STATIC such that their destructors are @@ -2314,7 +2332,9 @@ Q_GLOBAL_STATIC(QLocale, tst_qapp_locale); #ifndef QT_NO_PROCESS Q_GLOBAL_STATIC(QProcess, tst_qapp_process); #endif +#ifndef QT_NO_FILESYSTEMWATCHER Q_GLOBAL_STATIC(QFileSystemWatcher, tst_qapp_fileSystemWatcher); +#endif #ifndef QT_NO_SHAREDMEMORY Q_GLOBAL_STATIC(QSharedMemory, tst_qapp_sharedMemory); #endif @@ -2337,7 +2357,9 @@ void tst_QApplication::globalStaticObjectDestruction() #ifndef QT_NO_PROCESS QVERIFY(tst_qapp_process()); #endif +#ifndef QT_NO_FILESYSTEMWATCHER QVERIFY(tst_qapp_fileSystemWatcher()); +#endif #ifndef QT_NO_SHAREDMEMORY QVERIFY(tst_qapp_sharedMemory()); #endif diff --git a/tests/auto/widgets/kernel/qwidget/qwidget.pro b/tests/auto/widgets/kernel/qwidget/qwidget.pro index a4fcde8a34..3eedfa1d3a 100644 --- a/tests/auto/widgets/kernel/qwidget/qwidget.pro +++ b/tests/auto/widgets/kernel/qwidget/qwidget.pro @@ -20,7 +20,7 @@ x11 { LIBS += $$QMAKE_LIBS_X11 } -!wince*:win32: LIBS += -luser32 -lgdi32 +!wince*:win32:!winrt: LIBS += -luser32 -lgdi32 mac:CONFIG+=insignificant_test # QTBUG-25300, QTBUG-23695 linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):DEFINES+=UBUNTU_ONEIRIC # QTBUG-30566
\ No newline at end of file diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 9090f97ce6..fc3b0d983c 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -117,11 +117,13 @@ static bool qt_wince_is_platform(const QString &platformString) { } static inline bool qt_wince_is_smartphone() { return qt_wince_is_platform(QString::fromLatin1("Smartphone")); } # endif // Q_OS_WINCE_WM -# else // Q_OS_WINCE +# elif !defined(Q_OS_WINRT) // Q_OS_WINCE # define Q_CHECK_PAINTEVENTS \ if (::SwitchDesktop(::GetThreadDesktop(::GetCurrentThreadId())) == 0) \ QSKIP("desktop is not visible, this test would fail"); -# endif // !Q_OS_WINCE +# else // !Q_OS_WINCE && !Q_OS_WINRT +# define Q_CHECK_PAINTEVENTS +# endif // Q_OS_WINRT #else // Q_OS_WIN # define Q_CHECK_PAINTEVENTS #endif // else Q_OS_WIN @@ -304,7 +306,7 @@ private slots: void subtractOpaqueSiblings(); #endif -#if defined (Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined (Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) void setGeometry_win(); #endif @@ -374,7 +376,7 @@ private slots: void quitOnCloseAttribute(); void moveRect(); -#if defined (Q_OS_WIN) +#if defined (Q_OS_WIN) && !defined(Q_OS_WINRT) void gdiPainting(); void paintOnScreenPossible(); #endif @@ -592,7 +594,7 @@ void tst_QWidget::getSetCheck() QCOMPARE(true, obj1.autoFillBackground()); var1.reset(); -#if defined (Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined (Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) obj1.setWindowFlags(Qt::FramelessWindowHint | Qt::WindowSystemMenuHint); const HWND handle = reinterpret_cast<HWND>(obj1.winId()); // explicitly create window handle QVERIFY(GetWindowLong(handle, GWL_STYLE) & WS_POPUP); @@ -1283,7 +1285,7 @@ void tst_QWidget::visible_setWindowOpacity() testWidget->hide(); QVERIFY( !testWidget->isVisible() ); testWidget->setWindowOpacity(0.5); -#ifdef Q_OS_WIN +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) QVERIFY(!::IsWindowVisible(winHandleOf(testWidget))); #endif testWidget->setWindowOpacity(1.0); @@ -3623,7 +3625,7 @@ void tst_QWidget::optimizedResize_topLevel() topLevel.partial = false; topLevel.paintedRegion = QRegion(); -#ifndef Q_OS_WIN +#if !defined(Q_OS_WIN32) && !defined(Q_OS_WINCE) topLevel.resize(topLevel.size() + QSize(10, 10)); #else // Static contents does not work when programmatically resizing @@ -4555,7 +4557,7 @@ void tst_QWidget::setWindowGeometry() } } -#if defined (Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined (Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) void tst_QWidget::setGeometry_win() { QWidget widget; @@ -4573,7 +4575,7 @@ void tst_QWidget::setGeometry_win() QVERIFY(rt.left <= 0); QVERIFY(rt.top <= 0); } -#endif // defined (Q_OS_WIN) && !defined(Q_OS_WINCE) +#endif // defined (Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) // Since X11 WindowManager operation are all async, and we have no way to know if the window // manager has finished playing with the window geometry, this test can't be reliable on X11. @@ -8118,7 +8120,7 @@ void tst_QWidget::moveRect() child.move(10, 10); // Don't crash. } -#ifdef Q_OS_WIN +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) class GDIWidget : public QDialog { Q_OBJECT @@ -8185,7 +8187,7 @@ void tst_QWidget::paintOnScreenPossible() w2.setAttribute(Qt::WA_PaintOnScreen); QVERIFY(w2.testAttribute(Qt::WA_PaintOnScreen)); } -#endif // Q_OS_WIN +#endif // Q_OS_WIN && !Q_OS_WINRT void tst_QWidget::reparentStaticWidget() { diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index eabb7aaa17..509ccc37b6 100644 --- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp @@ -162,6 +162,7 @@ private slots: void highlightedSignal(); void itemData(); void task_QTBUG_31146_popupCompletion(); + void keyboardSelection(); }; class MyAbstractItemDelegate : public QAbstractItemDelegate @@ -1848,7 +1849,7 @@ void tst_QComboBox::flaggedItems_data() itemList << "nine" << "ten"; keyMovementList << Qt::Key_T; - QTest::newRow(testCase.toLatin1() + "search same start letter") << itemList << deselectFlagList << disableFlagList << keyMovementList << bool(editable) << 9; + QTest::newRow(testCase.toLatin1() + "search same start letter") << itemList << deselectFlagList << disableFlagList << keyMovementList << bool(editable) << 2; keyMovementList.clear(); keyMovementList << Qt::Key_T << Qt::Key_H; @@ -2946,5 +2947,32 @@ void tst_QComboBox::task_QTBUG_31146_popupCompletion() QCOMPARE(comboBox.currentIndex(), 0); } +void tst_QComboBox::keyboardSelection() +{ + QComboBox comboBox; + const int keyboardInterval = QApplication::keyboardInputInterval(); + QStringList list; + list << "OA" << "OB" << "OC" << "OO" << "OP" << "PP"; + comboBox.addItems(list); + + // Clear any remaining keyboard input from previous tests. + QTest::qWait(keyboardInterval); + QTest::keyClicks(&comboBox, "oo", Qt::NoModifier, 50); + QCOMPARE(comboBox.currentText(), list.at(3)); + + QTest::qWait(keyboardInterval); + QTest::keyClicks(&comboBox, "op", Qt::NoModifier, 50); + QCOMPARE(comboBox.currentText(), list.at(4)); + + QTest::keyClick(&comboBox, Qt::Key_P, Qt::NoModifier, keyboardInterval); + QCOMPARE(comboBox.currentText(), list.at(5)); + + QTest::keyClick(&comboBox, Qt::Key_O, Qt::NoModifier, keyboardInterval); + QCOMPARE(comboBox.currentText(), list.at(0)); + + QTest::keyClick(&comboBox, Qt::Key_O, Qt::NoModifier, keyboardInterval); + QCOMPARE(comboBox.currentText(), list.at(1)); +} + QTEST_MAIN(tst_QComboBox) #include "tst_qcombobox.moc" diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp index bfffa357a8..ded3e55283 100644 --- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp +++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp @@ -346,7 +346,7 @@ void tst_QDateTimeEdit::cleanupTestCase() void tst_QDateTimeEdit::init() { QLocale::setDefault(QLocale(QLocale::C)); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) SetThreadLocale(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT)); #endif testWidget->setDisplayFormat("dd/MM/yyyy"); // Nice default to have diff --git a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp index b880ebe078..49f058862d 100644 --- a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp +++ b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp @@ -145,6 +145,9 @@ private slots: void taskQTBUG_6670_selectAllWithPrefix(); void taskQTBUG_6496_fiddlingWithPrecision(); + void setGroupSeparatorShown_data(); + void setGroupSeparatorShown(); + public slots: void valueChangedHelper(const QString &); void valueChangedHelper(double); @@ -156,6 +159,9 @@ private: typedef QList<double> DoubleList; +Q_DECLARE_METATYPE(QLocale::Language) +Q_DECLARE_METATYPE(QLocale::Country) + tst_QDoubleSpinBox::tst_QDoubleSpinBox() { @@ -1099,5 +1105,45 @@ void tst_QDoubleSpinBox::taskQTBUG_6496_fiddlingWithPrecision() QCOMPARE(dsb.maximum(), 0.991); } +void tst_QDoubleSpinBox::setGroupSeparatorShown_data() +{ + QTest::addColumn<QLocale::Language>("lang"); + QTest::addColumn<QLocale::Country>("country"); + + QTest::newRow("data0") << QLocale::English << QLocale::UnitedStates; + QTest::newRow("data1") << QLocale::Swedish << QLocale::Sweden; + QTest::newRow("data2") << QLocale::German << QLocale::Germany; + QTest::newRow("data3") << QLocale::Georgian << QLocale::Georgia; + QTest::newRow("data3") << QLocale::Macedonian << QLocale::Macedonia; +} + +void tst_QDoubleSpinBox::setGroupSeparatorShown() +{ + QFETCH(QLocale::Language, lang); + QFETCH(QLocale::Country, country); + + QLocale loc(lang, country); + QLocale::setDefault(loc); + DoubleSpinBox spinBox; + spinBox.setMaximum(99999999); + spinBox.setValue(1300000.00); + spinBox.setGroupSeparatorShown(true); + QCOMPARE(spinBox.lineEdit()->text(), spinBox.locale().toString(1300000.00, 'f', 2)); + QCOMPARE(spinBox.isGroupSeparatorShown(), true); + QCOMPARE(spinBox.textFromValue(23421),spinBox.locale().toString(23421.00, 'f', 2)); + + spinBox.setGroupSeparatorShown(false); + QCOMPARE(spinBox.lineEdit()->text(), spinBox.locale().toString(1300000.00, 'f', 2).remove( + spinBox.locale().groupSeparator())); + QCOMPARE(spinBox.isGroupSeparatorShown(), false); + + spinBox.setMaximum(72000); + spinBox.lineEdit()->setText(spinBox.locale().toString(32000.64, 'f', 2)); + QCOMPARE(spinBox.value()+1000, 33000.64); + + spinBox.lineEdit()->setText(spinBox.locale().toString(32000.44, 'f', 2)); + QCOMPARE(spinBox.value()+1000, 33000.44); +} + QTEST_MAIN(tst_QDoubleSpinBox) #include "tst_qdoublespinbox.moc" diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp index a9f5cb686c..e9cc1e6abd 100644 --- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp +++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp @@ -53,7 +53,7 @@ #include "qstandarditemmodel.h" #include <qpa/qplatformtheme.h> #include "qstylehints.h" -#include <private/qguiapplication_p.h> +#include <private/qapplication_p.h> #include "qclipboard.h" #ifdef Q_OS_MAC @@ -71,6 +71,7 @@ #include <qstringlistmodel.h> #include <qsortfilterproxymodel.h> #include <qdebug.h> +#include <qscreen.h> #include "qcommonstyle.h" #include "qstyleoption.h" @@ -87,6 +88,17 @@ QT_BEGIN_NAMESPACE class QPainter; QT_END_NAMESPACE +static inline void centerOnScreen(QWidget *w, const QSize &size) +{ + const QPoint offset = QPoint(size.width() / 2, size.height() / 2); + w->move(QGuiApplication::primaryScreen()->availableGeometry().center() - offset); +} + +static inline void centerOnScreen(QWidget *w) +{ + centerOnScreen(w, w->geometry().size()); +} + class StyleOptionTestStyle : public QCommonStyle { private: @@ -300,6 +312,9 @@ private slots: void clearButton(); void sideWidgets(); + void shouldShowPlaceholderText_data(); + void shouldShowPlaceholderText(); + protected slots: void editingFinished(); @@ -313,6 +328,7 @@ private: // keyClicks(..) is moved to QtTestCase void psKeyClick(QWidget *target, Qt::Key key, Qt::KeyboardModifiers pressState = 0); void psKeyClick(QTestEventList &keys, Qt::Key key, Qt::KeyboardModifiers pressState = 0); + QLineEdit *ensureTestWidget(); bool validInput; QString changed_string; @@ -322,7 +338,7 @@ private: int selection_count; int lastCursorPos; int newCursorPos; - QLineEdit *testWidget; + QLineEdit *m_testWidget; int m_keyboardScheme; PlatformInputContext m_platformInputContext; }; @@ -351,7 +367,7 @@ void tst_QLineEdit::getSetCheck() QCOMPARE(true, obj1.dragEnabled()); } -tst_QLineEdit::tst_QLineEdit() : validInput(false), m_keyboardScheme(0) +tst_QLineEdit::tst_QLineEdit() : validInput(false), m_testWidget(0), m_keyboardScheme(0) { if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) m_keyboardScheme = theme->themeHint(QPlatformTheme::KeyboardScheme).toInt(); @@ -367,23 +383,24 @@ tst_QLineEdit::~tst_QLineEdit() { } +QLineEdit *tst_QLineEdit::ensureTestWidget() +{ + if (!m_testWidget) { + m_testWidget = new QLineEdit; + m_testWidget->setObjectName("testWidget"); + connect(m_testWidget, SIGNAL(cursorPositionChanged(int,int)), this, SLOT(onCursorPositionChanged(int,int))); + connect(m_testWidget, SIGNAL(textChanged(QString)), this, SLOT(onTextChanged(QString))); + connect(m_testWidget, SIGNAL(textEdited(QString)), this, SLOT(onTextEdited(QString))); + connect(m_testWidget, SIGNAL(returnPressed()), this, SLOT(onReturnPressed())); + connect(m_testWidget, SIGNAL(selectionChanged()), this, SLOT(onSelectionChanged())); + connect(m_testWidget, SIGNAL(editingFinished()), this, SLOT(editingFinished())); + m_testWidget->resize(200,50); + } + return m_testWidget; +} + void tst_QLineEdit::initTestCase() { - testWidget = new QLineEdit(0); - testWidget->setObjectName("testWidget"); - connect(testWidget, SIGNAL(cursorPositionChanged(int,int)), this, SLOT(onCursorPositionChanged(int,int))); - connect(testWidget, SIGNAL(textChanged(QString)), this, SLOT(onTextChanged(QString))); - connect(testWidget, SIGNAL(textEdited(QString)), this, SLOT(onTextEdited(QString))); - connect(testWidget, SIGNAL(returnPressed()), this, SLOT(onReturnPressed())); - connect(testWidget, SIGNAL(selectionChanged()), this, SLOT(onSelectionChanged())); - connect(testWidget, SIGNAL(editingFinished()), this, SLOT(editingFinished())); - - testWidget->resize(200,50); - testWidget->show(); - QVERIFY(QTest::qWaitForWindowExposed(testWidget)); - QApplication::setActiveWindow(testWidget); - QTRY_VERIFY(testWidget->hasFocus()); - changed_count = 0; edited_count = 0; selection_count = 0; @@ -394,7 +411,6 @@ void tst_QLineEdit::initTestCase() void tst_QLineEdit::cleanupTestCase() { - delete testWidget; QInputMethodPrivate *inputMethodPrivate = QInputMethodPrivate::get(qApp->inputMethod()); inputMethodPrivate->testContext = 0; } @@ -402,23 +418,17 @@ void tst_QLineEdit::cleanupTestCase() void tst_QLineEdit::init() { return_count = 0; - testWidget->clear(); - testWidget->setEchoMode(QLineEdit::Normal); - testWidget->setMaxLength(32767); - testWidget->setReadOnly(false); - testWidget->setText(""); - testWidget->setInputMask(""); - testWidget->setFrame(true); - testWidget->setValidator(0); - testWidget->setDragEnabled(true); } void tst_QLineEdit::cleanup() { + delete m_testWidget; + m_testWidget = 0; } void tst_QLineEdit::experimental() { + QLineEdit *testWidget = ensureTestWidget(); QIntValidator intValidator(3, 7, 0); testWidget->setValidator(&intValidator); testWidget->setText(""); @@ -436,8 +446,7 @@ void tst_QLineEdit::experimental() void tst_QLineEdit::upperAndLowercase() { - testWidget->setInputMask(""); - testWidget->setText(""); + QLineEdit *testWidget = ensureTestWidget(); QTest::keyClicks(testWidget, "aAzZ`1234567890-=~!@#$%^&*()_+[]{}\\|;:'\",.<>/?"); qApp->processEvents(); @@ -659,6 +668,7 @@ void tst_QLineEdit::setInputMask() QEXPECT_FAIL( "insert blank=input", "To eat blanks or not? Known issue. Task 43172", Abort); // First set the input mask + QLineEdit *testWidget = ensureTestWidget(); testWidget->setInputMask(mask); // then either insert using insert() or keyboard @@ -702,12 +712,14 @@ void tst_QLineEdit::inputMask() QFETCH(QString, mask); QFETCH(QString, expectedMask); + QLineEdit *testWidget = ensureTestWidget(); testWidget->setInputMask(mask); QCOMPARE(testWidget->inputMask(), expectedMask); } void tst_QLineEdit::clearInputMask() { + QLineEdit *testWidget = ensureTestWidget(); testWidget->setInputMask("000.000.000.000"); QVERIFY(testWidget->inputMask() != QString::null); testWidget->setInputMask(QString::null); @@ -789,6 +801,7 @@ void tst_QLineEdit::keypress_inputMask() QFETCH(QString, expectedText); QFETCH(QString, expectedDisplayText); + QLineEdit *testWidget = ensureTestWidget(); testWidget->setInputMask(mask); keys.simulate(testWidget); @@ -825,6 +838,7 @@ void tst_QLineEdit::hasAcceptableInputMask() QFETCH(QString, valid); // test that invalid input (for required) work for optionalMask + QLineEdit *testWidget = ensureTestWidget(); testWidget->setInputMask(optionalMask); validInput = false; testWidget->setText(invalid); @@ -876,6 +890,7 @@ public: void tst_QLineEdit::hasAcceptableInputValidator() { + QLineEdit *testWidget = ensureTestWidget(); QSignalSpy spyChanged(testWidget, SIGNAL(textChanged(QString))); QSignalSpy spyEdited(testWidget, SIGNAL(textEdited(QString))); @@ -926,6 +941,7 @@ void tst_QLineEdit::maskCharacter() QFETCH(QString, input); QFETCH(bool, expectedValid); + QLineEdit *testWidget = ensureTestWidget(); QFocusEvent lostFocus(QEvent::FocusOut); testWidget->setInputMask(mask); @@ -1076,6 +1092,7 @@ void tst_QLineEdit::undo() QFETCH(QStringList, expectedString); QFETCH(bool, use_keys); + QLineEdit *testWidget = ensureTestWidget(); QVERIFY(!testWidget->isUndoAvailable()); int i; @@ -1167,6 +1184,7 @@ void tst_QLineEdit::redo() QFETCH(IntList, insertIndex); QFETCH(QStringList, expectedString); + QLineEdit *testWidget = ensureTestWidget(); QVERIFY(!testWidget->isUndoAvailable()); QVERIFY(!testWidget->isRedoAvailable()); @@ -1436,6 +1454,7 @@ void tst_QLineEdit::undo_keypressevents() QFETCH(QTestEventList, keys); QFETCH(QStringList, expectedString); + QLineEdit *testWidget = ensureTestWidget(); keys.simulate(testWidget); for (int i=0; i<expectedString.size(); ++i) { @@ -1480,6 +1499,7 @@ void tst_QLineEdit::QTBUG5786_undoPaste() void tst_QLineEdit::clear() { // checking that clear of empty/nullstring doesn't add to undo history + QLineEdit *testWidget = ensureTestWidget(); int max = 5000; while (max > 0 && testWidget->isUndoAvailable()) { max--; @@ -1501,7 +1521,7 @@ void tst_QLineEdit::clear() void tst_QLineEdit::editingFinished() { - if (testWidget->hasAcceptableInput()) + if (m_testWidget->hasAcceptableInput()) validInput = true; else validInput = false; @@ -1523,6 +1543,7 @@ void tst_QLineEdit::text_data() void tst_QLineEdit::text() { QFETCH(QString, insertString); + QLineEdit *testWidget = ensureTestWidget(); testWidget->setText(insertString); QCOMPARE(testWidget->text(), insertString); } @@ -1537,6 +1558,7 @@ void tst_QLineEdit::textMask_data() void tst_QLineEdit::textMask() { QFETCH( QString, insertString ); + QLineEdit *testWidget = ensureTestWidget(); testWidget->setInputMask( "#" ); testWidget->setText( insertString ); QCOMPARE( testWidget->text(), insertString ); @@ -1544,6 +1566,7 @@ void tst_QLineEdit::textMask() void tst_QLineEdit::setText() { + QLineEdit *testWidget = ensureTestWidget(); QSignalSpy editedSpy(testWidget, SIGNAL(textEdited(QString))); QSignalSpy changedSpy(testWidget, SIGNAL(textChanged(QString))); testWidget->setText("hello"); @@ -1613,7 +1636,7 @@ void tst_QLineEdit::displayText_data() m << bool(use_setText); s = key_mode_str + "Password"; m = QLineEdit::Password; - QChar passChar = qApp->style()->styleHint(QStyle::SH_LineEdit_PasswordCharacter, 0, testWidget); + QChar passChar = qApp->style()->styleHint(QStyle::SH_LineEdit_PasswordCharacter, 0, m_testWidget); QString input; QString pass; input = "Hello World"; @@ -1645,6 +1668,7 @@ void tst_QLineEdit::displayText() QFETCH(QLineEdit::EchoMode, mode); //QFETCH(bool, use_setText); Currently unused. + QLineEdit *testWidget = ensureTestWidget(); testWidget->setEchoMode(mode); testWidget->setText(insertString); QCOMPARE(testWidget->displayText(), expectedString); @@ -1654,11 +1678,15 @@ void tst_QLineEdit::displayText() void tst_QLineEdit::passwordEchoOnEdit() { QStyleOptionFrameV2 opt; + QLineEdit *testWidget = ensureTestWidget(); QChar fillChar = testWidget->style()->styleHint(QStyle::SH_LineEdit_PasswordCharacter, &opt, testWidget); testWidget->setEchoMode(QLineEdit::PasswordEchoOnEdit); testWidget->setFocus(); + centerOnScreen(testWidget); + testWidget->show(); testWidget->raise(); + QVERIFY(QTest::qWaitForWindowExposed(testWidget)); QTRY_VERIFY(testWidget->hasFocus()); QTest::keyPress(testWidget, '0'); @@ -1683,6 +1711,7 @@ void tst_QLineEdit::passwordEchoOnEdit() void tst_QLineEdit::passwordEchoDelay() { + QLineEdit *testWidget = ensureTestWidget(); int delay = qGuiApp->styleHints()->passwordMaskDelay(); #if defined QT_BUILD_INTERNAL QLineEditPrivate *priv = QLineEditPrivate::get(testWidget); @@ -1698,7 +1727,10 @@ void tst_QLineEdit::passwordEchoDelay() testWidget->setEchoMode(QLineEdit::Password); testWidget->setFocus(); + centerOnScreen(testWidget); + testWidget->show(); testWidget->raise(); + QVERIFY(QTest::qWaitForWindowExposed(testWidget)); QTRY_VERIFY(testWidget->hasFocus()); QTest::keyPress(testWidget, '0'); @@ -1757,6 +1789,7 @@ void tst_QLineEdit::maxLength_mask() QFETCH(QString, mask); QFETCH(int, expectedLength); + QLineEdit *testWidget = ensureTestWidget(); testWidget->setInputMask(mask); QCOMPARE(testWidget->maxLength(), expectedLength); @@ -1789,6 +1822,7 @@ void tst_QLineEdit::maxLength() QFETCH(bool, use_setText); // in some cases we set the maxLength _before_ entering the text. + QLineEdit *testWidget = ensureTestWidget(); if (!insertBeforeSettingMaxLength) testWidget->setMaxLength(length); @@ -1820,6 +1854,7 @@ void tst_QLineEdit::maxLength() void tst_QLineEdit::isReadOnly() { + QLineEdit *testWidget = ensureTestWidget(); QVERIFY(!testWidget->isReadOnly()); // start with a basic text @@ -1863,6 +1898,7 @@ void tst_QLineEdit::noCursorBlinkWhenReadOnly() if (cursorFlashTime == 0) return; BlinkTestLineEdit le; + centerOnScreen(&le); le.show(); le.setFocus(); QTest::qWaitForWindowActive(&le); @@ -1928,6 +1964,7 @@ void tst_QLineEdit::psKeyClick(QTestEventList &keys, Qt::Key key, Qt::KeyboardMo void tst_QLineEdit::cursorPosition() { + QLineEdit *testWidget = ensureTestWidget(); QVERIFY(testWidget->cursorPosition() == 0); // start with a basic text @@ -2015,7 +2052,7 @@ void tst_QLineEdit::cursorPositionChanged_data() QTestEventList keys; keys.addKeyClick(Qt::Key_A); - QTest::newRow("a") << keys << 0 << 1; + QTest::newRow("a") << keys << -1 << 1; keys.clear(); keys.addKeyClick(Qt::Key_A); @@ -2146,6 +2183,7 @@ void tst_QLineEdit::cursorPositionChanged() lastCursorPos = 0; newCursorPos = 0; + QLineEdit *testWidget = ensureTestWidget(); input.simulate(testWidget); QCOMPARE(lastCursorPos, lastPos); QCOMPARE(newCursorPos, newPos); @@ -2156,6 +2194,7 @@ void tst_QLineEdit::selectedText() QString testString = "Abc defg hijklmno, p 'qrst' uvw xyz"; // start with a basic text + QLineEdit *testWidget = ensureTestWidget(); testWidget->setText(testString); selection_count = 0; @@ -2225,6 +2264,7 @@ void tst_QLineEdit::textChangedAndTextEdited() changed_count = 0; edited_count = 0; + QLineEdit *testWidget = ensureTestWidget(); QTest::keyClick(testWidget, Qt::Key_A); QCOMPARE(changed_count, 1); QVERIFY(edited_count == changed_count); @@ -2283,6 +2323,7 @@ void tst_QLineEdit::returnPressed() { return_count = 0; + QLineEdit *testWidget = ensureTestWidget(); QTest::keyClick(testWidget, Qt::Key_Return); QVERIFY(return_count == 1); return_count = 0; @@ -2431,6 +2472,7 @@ void tst_QLineEdit::returnPressed_maskvalidator() QFETCH(bool, returnPressed); QEXPECT_FAIL("mask '999', intfix validator(0,999), input '12<cr>'", "QIntValidator has changed behaviour. Does not accept spaces. Task 43082.", Abort); + QLineEdit *testWidget = ensureTestWidget(); testWidget->setInputMask(inputMask); if (hasValidator) @@ -2451,6 +2493,7 @@ void tst_QLineEdit::onReturnPressed() void tst_QLineEdit::setValidator() { // Verify that we can set and re-set a validator. + QLineEdit *testWidget = ensureTestWidget(); QVERIFY(!testWidget->validator()); QIntValidator iv1(0); @@ -2601,6 +2644,7 @@ void tst_QLineEdit::setValidator_QIntValidator() QFETCH(bool, is_valid); QIntValidator intValidator(mini, maxi, 0); + QLineEdit *testWidget = ensureTestWidget(); testWidget->setValidator(&intValidator); QVERIFY(testWidget->text().isEmpty()); //qDebug("1 input: '" + input + "' Exp: '" + expectedText + "'"); @@ -2637,6 +2681,7 @@ void tst_QLineEdit::frame_data() void tst_QLineEdit::frame() { + QLineEdit *testWidget = ensureTestWidget(); testWidget->setFrame(false); // verify that the editor is shown without a frame #ifndef NO_PIXMAP_TESTS @@ -2674,6 +2719,7 @@ void tst_QLineEdit::setAlignment_data() void tst_QLineEdit::setAlignment() { + QLineEdit *testWidget = ensureTestWidget(); testWidget->setText("left"); testWidget->setAlignment(Qt::AlignLeft); #ifndef NO_PIXMAP_TESTS @@ -2713,6 +2759,7 @@ void tst_QLineEdit::setAlignment() void tst_QLineEdit::isModified() { + QLineEdit *testWidget = ensureTestWidget(); QVERIFY(!testWidget->isModified()); testWidget->setText("bla"); QVERIFY(!testWidget->isModified()); @@ -2747,6 +2794,7 @@ void tst_QLineEdit::isModified() void tst_QLineEdit::edited() { + QLineEdit *testWidget = ensureTestWidget(); QVERIFY(!testWidget->isModified()); testWidget->setText("bla"); QVERIFY(!testWidget->isModified()); @@ -2778,6 +2826,7 @@ void tst_QLineEdit::edited() void tst_QLineEdit::insert() { + QLineEdit *testWidget = ensureTestWidget(); testWidget->insert("This"); testWidget->insert(" is"); testWidget->insert(" a"); @@ -2854,6 +2903,7 @@ void tst_QLineEdit::setSelection() QFETCH(QString, expectedText); QFETCH(bool, expectedHasSelectedText); + QLineEdit *testWidget = ensureTestWidget(); testWidget->setText(text); testWidget->setSelection(start, length); QCOMPARE(testWidget->hasSelectedText(), expectedHasSelectedText); @@ -2869,6 +2919,7 @@ void tst_QLineEdit::cut() QSKIP("Autotests run from cron and pasteboard don't get along quite ATM"); // test newlines in cut'n'paste + QLineEdit *testWidget = ensureTestWidget(); testWidget->setText("A\nB\nC\n"); testWidget->setSelection(0, 6); testWidget->cut(); @@ -2964,6 +3015,7 @@ void tst_QLineEdit::inputMaskAndValidator() QFETCH(QString, validateText); QFETCH(int, validatePos); + QLineEdit *testWidget = ensureTestWidget(); InputMaskValidator imv(testWidget); testWidget->setValidator(&imv); @@ -2977,6 +3029,7 @@ void tst_QLineEdit::inputMaskAndValidator() void tst_QLineEdit::maxLengthAndInputMask() { // Really a test for #30447 + QLineEdit *testWidget = ensureTestWidget(); QVERIFY(testWidget->inputMask().isNull()); testWidget->setMaxLength(10); QVERIFY(testWidget->maxLength() == 10); @@ -3016,6 +3069,7 @@ Q_DECLARE_METATYPE(LineEdit::State); void tst_QLineEdit::returnPressedKeyEvent() { LineEdit lineedit; + centerOnScreen(&lineedit); lineedit.show(); QCOMPARE((int)lineedit.state, (int)LineEdit::Other); QTest::keyClick(&lineedit, Qt::Key_Enter); @@ -3032,6 +3086,7 @@ void tst_QLineEdit::returnPressedKeyEvent() void tst_QLineEdit::keepSelectionOnTabFocusIn() { + QLineEdit *testWidget = ensureTestWidget(); testWidget->setText("hello world"); { QFocusEvent e(QEvent::FocusIn, Qt::TabFocusReason); @@ -3049,6 +3104,7 @@ void tst_QLineEdit::keepSelectionOnTabFocusIn() void tst_QLineEdit::readOnlyStyleOption() { + QLineEdit *testWidget = ensureTestWidget(); bool wasReadOnly = testWidget->isReadOnly(); QStyle *oldStyle = testWidget->style(); @@ -3071,6 +3127,7 @@ void tst_QLineEdit::readOnlyStyleOption() void tst_QLineEdit::validateOnFocusOut() { + QLineEdit *testWidget = ensureTestWidget(); QSignalSpy editingFinishedSpy(testWidget, SIGNAL(editingFinished())); testWidget->setValidator(new QIntValidator(100, 999, 0)); QTest::keyPress(testWidget, '1'); @@ -3080,8 +3137,11 @@ void tst_QLineEdit::validateOnFocusOut() QCOMPARE(editingFinishedSpy.count(), 0); testWidget->setFocus(); + centerOnScreen(testWidget); + testWidget->show(); testWidget->activateWindow(); - QTRY_VERIFY(testWidget->hasFocus()); + QVERIFY(QTest::qWaitForWindowActive(testWidget)); + QVERIFY(testWidget->hasFocus()); QTest::keyPress(testWidget, '0'); QTRY_COMPARE(testWidget->text(), QString("100")); @@ -3092,6 +3152,7 @@ void tst_QLineEdit::validateOnFocusOut() void tst_QLineEdit::editInvalidText() { + QLineEdit *testWidget = ensureTestWidget(); testWidget->clear(); testWidget->setValidator(new QIntValidator(0, 120, 0)); testWidget->setText("1234"); @@ -3119,6 +3180,7 @@ void tst_QLineEdit::editInvalidText() void tst_QLineEdit::charWithAltOrCtrlModifier() { + QLineEdit *testWidget = ensureTestWidget(); testWidget->clear(); QCOMPARE(testWidget->text(), QString("")); QTest::keyPress(testWidget, Qt::Key_Plus); @@ -3133,6 +3195,7 @@ void tst_QLineEdit::charWithAltOrCtrlModifier() void tst_QLineEdit::leftKeyOnSelectedText() { + QLineEdit *testWidget = ensureTestWidget(); testWidget->clear(); testWidget->setText("0123"); testWidget->setCursorPosition(4); @@ -3155,6 +3218,7 @@ void tst_QLineEdit::leftKeyOnSelectedText() void tst_QLineEdit::inlineCompletion() { + QLineEdit *testWidget = ensureTestWidget(); testWidget->clear(); QStandardItemModel *model = new QStandardItemModel; QStandardItem *root = model->invisibleRootItem(); @@ -3169,6 +3233,9 @@ void tst_QLineEdit::inlineCompletion() QCompleter *completer = new QCompleter(model); completer->setCompletionMode(QCompleter::InlineCompletion); completer->setCaseSensitivity(Qt::CaseInsensitive); + centerOnScreen(testWidget); + testWidget->show(); + QTest::qWaitForWindowExposed(testWidget); testWidget->setFocus(); QTRY_COMPARE(qApp->activeWindow(), (QWidget*)testWidget); testWidget->setCompleter(completer); @@ -3235,6 +3302,7 @@ void tst_QLineEdit::inlineCompletion() void tst_QLineEdit::noTextEditedOnClear() { + QLineEdit *testWidget = ensureTestWidget(); testWidget->setText("Test"); QSignalSpy textEditedSpy(testWidget, SIGNAL(textEdited(QString))); testWidget->clear(); @@ -3298,6 +3366,7 @@ void tst_QLineEdit::textMargin() sizeHint.setHeight(sizeHint.height() + top +bottom); QCOMPARE(testWidget.sizeHint(), sizeHint); testWidget.setFrame(false); + centerOnScreen(&tlw); tlw.show(); int l; @@ -3317,6 +3386,7 @@ void tst_QLineEdit::textMargin() #ifndef QTEST_NO_CURSOR void tst_QLineEdit::cursor() { + QLineEdit *testWidget = ensureTestWidget(); testWidget->setReadOnly(false); QCOMPARE(testWidget->cursor().shape(), Qt::IBeamCursor); testWidget->setReadOnly(true); @@ -3556,12 +3626,16 @@ void tst_QLineEdit::task233101_cursorPosAfterInputMethod() void tst_QLineEdit::task241436_passwordEchoOnEditRestoreEchoMode() { QStyleOptionFrameV2 opt; + QLineEdit *testWidget = ensureTestWidget(); QChar fillChar = testWidget->style()->styleHint(QStyle::SH_LineEdit_PasswordCharacter, &opt, testWidget); testWidget->setEchoMode(QLineEdit::PasswordEchoOnEdit); testWidget->setFocus(); + centerOnScreen(testWidget); + testWidget->show(); QApplication::setActiveWindow(testWidget); - QTRY_VERIFY(testWidget->hasFocus()); + QVERIFY(QTest::qWaitForWindowActive(testWidget)); + QVERIFY(testWidget->hasFocus()); QTest::keyPress(testWidget, '0'); QCOMPARE(testWidget->displayText(), QString("0")); @@ -3585,6 +3659,7 @@ void tst_QLineEdit::task241436_passwordEchoOnEditRestoreEchoMode() void tst_QLineEdit::task248948_redoRemovedSelection() { + QLineEdit *testWidget = ensureTestWidget(); testWidget->setText("a"); testWidget->selectAll(); QTest::keyPress(testWidget, Qt::Key_Delete); @@ -3599,12 +3674,15 @@ void tst_QLineEdit::taskQTBUG_4401_enterKeyClearsPassword() { QString password("Wanna guess?"); + QLineEdit *testWidget = ensureTestWidget(); testWidget->setText(password); testWidget->setEchoMode(QLineEdit::PasswordEchoOnEdit); testWidget->setFocus(); testWidget->selectAll(); + centerOnScreen(testWidget); + testWidget->show(); QApplication::setActiveWindow(testWidget); - QTRY_VERIFY(testWidget->hasFocus()); + QVERIFY(QTest::qWaitForWindowActive(testWidget)); QTest::keyPress(testWidget, Qt::Key_Enter); QTRY_COMPARE(testWidget->text(), password); @@ -3614,6 +3692,7 @@ void tst_QLineEdit::taskQTBUG_4679_moveToStartEndOfBlock() { #ifdef Q_OS_MAC const QString text("there are no blocks for lineEdit"); + QLineEdit *testWidget = ensureTestWidget(); testWidget->setText(text); testWidget->setCursorPosition(5); QCOMPARE(testWidget->cursorPosition(), 5); @@ -3629,6 +3708,7 @@ void tst_QLineEdit::taskQTBUG_4679_selectToStartEndOfBlock() { #ifdef Q_OS_MAC const QString text("there are no blocks for lineEdit, select all"); + QLineEdit *testWidget = ensureTestWidget(); testWidget->setText(text); testWidget->setCursorPosition(5); QCOMPARE(testWidget->cursorPosition(), 5); @@ -3898,6 +3978,7 @@ void tst_QLineEdit::bidiLogicalMovement() void tst_QLineEdit::selectAndCursorPosition() { + QLineEdit *testWidget = ensureTestWidget(); testWidget->setText("This is a long piece of text"); testWidget->setSelection(0, 5); @@ -3908,6 +3989,10 @@ void tst_QLineEdit::selectAndCursorPosition() void tst_QLineEdit::inputMethod() { + QLineEdit *testWidget = ensureTestWidget(); + centerOnScreen(testWidget); + testWidget->show(); + QVERIFY(QTest::qWaitForWindowExposed(testWidget)); // widget accepts input QInputMethodQueryEvent queryEvent(Qt::ImEnabled); QApplication::sendEvent(testWidget, &queryEvent); @@ -3942,6 +4027,7 @@ void tst_QLineEdit::inputMethod() void tst_QLineEdit::inputMethodSelection() { + QLineEdit *testWidget = ensureTestWidget(); testWidget->setText("Lorem ipsum dolor sit amet, consectetur adipiscing elit."); testWidget->setSelection(0,0); QSignalSpy selectionSpy(testWidget, SIGNAL(selectionChanged())); @@ -3989,6 +4075,7 @@ void tst_QLineEdit::inputMethodQueryImHints_data() void tst_QLineEdit::inputMethodQueryImHints() { QFETCH(Qt::InputMethodHints, hints); + QLineEdit *testWidget = ensureTestWidget(); testWidget->setInputMethodHints(hints); QVariant value = testWidget->inputMethodQuery(Qt::ImHints); @@ -4031,7 +4118,7 @@ void tst_QLineEdit::undoRedoAndEchoModes() QFETCH(QStringList, expected); // create some history for the QLineEdit - testWidget->clear(); + QLineEdit *testWidget = ensureTestWidget(); testWidget->setEchoMode(QLineEdit::EchoMode(echoMode)); testWidget->insert(input.at(0)); testWidget->selectAll(); @@ -4136,5 +4223,59 @@ void tst_QLineEdit::sideWidgets() lineEdit->addAction(iconAction); } +Q_DECLARE_METATYPE(Qt::AlignmentFlag) +void tst_QLineEdit::shouldShowPlaceholderText_data() +{ + QTest::addColumn<QString>("text"); + QTest::addColumn<bool>("hasFocus"); + QTest::addColumn<Qt::AlignmentFlag>("alignment"); + QTest::addColumn<bool>("shouldShowPlaceholderText"); + + QTest::newRow("empty, non-focused, left") << QString() << false << Qt::AlignLeft << true; + QTest::newRow("empty, focused, left") << QString() << true << Qt::AlignLeft << true; + QTest::newRow("non-empty, non-focused, left") << QStringLiteral("Qt") << false << Qt::AlignLeft << false; + QTest::newRow("non-empty, focused, left") << QStringLiteral("Qt") << true << Qt::AlignLeft << false; + + QTest::newRow("empty, non-focused, center") << QString() << false << Qt::AlignHCenter << true; + QTest::newRow("empty, focused, center") << QString() << true << Qt::AlignHCenter << false; + QTest::newRow("non-empty, non-focused, center") << QStringLiteral("Qt") << false << Qt::AlignHCenter << false; + QTest::newRow("non-empty, focused, center") << QStringLiteral("Qt") << true << Qt::AlignHCenter << false; + + QTest::newRow("empty, non-focused, right") << QString() << false << Qt::AlignRight << true; + QTest::newRow("empty, focused, right") << QString() << true << Qt::AlignRight << true; + QTest::newRow("non-empty, non-focused, right") << QStringLiteral("Qt") << false << Qt::AlignRight << false; + QTest::newRow("non-empty, focused, right") << QStringLiteral("Qt") << true << Qt::AlignRight << false; +} + +void tst_QLineEdit::shouldShowPlaceholderText() +{ +#ifndef QT_BUILD_INTERNAL + QSKIP("This test requires a developer build."); +#else + QFETCH(QString, text); + QFETCH(bool, hasFocus); + QFETCH(Qt::AlignmentFlag, alignment); + QFETCH(bool, shouldShowPlaceholderText); + + QLineEdit lineEdit; + + // avoid "Test input context to commit without focused object" warnings + lineEdit.setAttribute(Qt::WA_InputMethodEnabled, false); + + if (hasFocus) { + lineEdit.show(); + QApplicationPrivate::setFocusWidget(&lineEdit, Qt::NoFocusReason); + } + QCOMPARE(lineEdit.hasFocus(), hasFocus); + + lineEdit.setText(text); + lineEdit.setAlignment(alignment); + + QLineEditPrivate *priv = QLineEditPrivate::get(&lineEdit); + QCOMPARE(priv->shouldShowPlaceholderText(), shouldShowPlaceholderText); +#endif + +} + QTEST_MAIN(tst_QLineEdit) #include "tst_qlineedit.moc" diff --git a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp index a21f2d70a0..21034e8f1b 100644 --- a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp +++ b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp @@ -144,6 +144,10 @@ private slots: void lineEditReturnPressed(); void positiveSign(); + + void setGroupSeparatorShown_data(); + void setGroupSeparatorShown(); + public slots: void valueChangedHelper(const QString &); void valueChangedHelper(int); @@ -154,6 +158,9 @@ private: typedef QList<int> IntList; +Q_DECLARE_METATYPE(QLocale::Language) +Q_DECLARE_METATYPE(QLocale::Country) + // Testing get/set functions void tst_QSpinBox::getSetCheck() { @@ -1128,5 +1135,47 @@ void tst_QSpinBox::positiveSign() QCOMPARE(spinBox.text(), QLatin1String("+20")); } +void tst_QSpinBox::setGroupSeparatorShown_data() +{ + QTest::addColumn<QLocale::Language>("lang"); + QTest::addColumn<QLocale::Country>("country"); + + QTest::newRow("data0") << QLocale::English << QLocale::UnitedStates; + QTest::newRow("data1") << QLocale::Swedish << QLocale::Sweden; + QTest::newRow("data2") << QLocale::German << QLocale::Germany; + QTest::newRow("data3") << QLocale::Georgian << QLocale::Georgia; + QTest::newRow("data3") << QLocale::Macedonian << QLocale::Macedonia; +} + +void tst_QSpinBox::setGroupSeparatorShown() +{ + QFETCH(QLocale::Language, lang); + QFETCH(QLocale::Country, country); + + QLocale loc(lang, country); + QLocale::setDefault(loc); + SpinBox spinBox; + spinBox.setMaximum(99999); + spinBox.setValue(13000); + spinBox.setGroupSeparatorShown(true); + QCOMPARE(spinBox.lineEdit()->text(), spinBox.locale().toString(13000)); + QCOMPARE(spinBox.isGroupSeparatorShown(), true); + QCOMPARE(spinBox.textFromValue(23421),spinBox.locale().toString(23421)); + + spinBox.setGroupSeparatorShown(false); + QCOMPARE(spinBox.lineEdit()->text(), QStringLiteral("13000")); + QCOMPARE(spinBox.isGroupSeparatorShown(), false); + + spinBox.setMaximum(72000); + spinBox.lineEdit()->setText(spinBox.locale().toString(32000)); + QCOMPARE(spinBox.value()+1000, 33000); + + spinBox.lineEdit()->setText(QStringLiteral("32000")); + QCOMPARE(spinBox.value()+1000, 33000); + + spinBox.lineEdit()->setText(QStringLiteral("32,000")); + QCOMPARE(spinBox.value()+1000, 33000); +} + QTEST_MAIN(tst_QSpinBox) #include "tst_qspinbox.moc" diff --git a/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro b/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro index 72956a6867..c367959cbc 100644 --- a/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro +++ b/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro @@ -8,4 +8,4 @@ INCLUDEPATH += ../ HEADERS += SOURCES += tst_qtabwidget.cpp -win32:!wince*:LIBS += -luser32 +win32:!wince*:!winrt:LIBS += -luser32 diff --git a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp index fa518e6afd..e55438f3d3 100644 --- a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp +++ b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp @@ -48,7 +48,7 @@ #include <qlabel.h> #include <QtWidgets/qboxlayout.h> -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) # include <qt_windows.h> #define Q_CHECK_PAINTEVENTS \ if (::SwitchDesktop(::GetThreadDesktop(::GetCurrentThreadId())) == 0) \ diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp index 11bb5c88a1..d06807eedb 100644 --- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp +++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp @@ -203,6 +203,8 @@ private slots: void highlightLongLine(); + void countTextChangedOnRemove(); + private: void createSelection(); int blockCount() const; @@ -2499,6 +2501,19 @@ void tst_QTextEdit::highlightLongLine() QVERIFY(true); } +//check for bug 15003, are there multiple textChanged() signals on remove? +void tst_QTextEdit::countTextChangedOnRemove() +{ + QTextEdit edit; + edit.insertPlainText("Hello"); + + QSignalSpy spy(&edit, SIGNAL(textChanged())); + + QKeyEvent event(QEvent::KeyPress, Qt::Key_Backspace, Qt::NoModifier); + QCoreApplication::instance()->notify(&edit, &event); + + QCOMPARE(spy.count(), 1); +} QTEST_MAIN(tst_QTextEdit) #include "tst_qtextedit.moc" |