diff options
Diffstat (limited to 'tests/auto/testlib')
233 files changed, 12341 insertions, 5245 deletions
diff --git a/tests/auto/testlib/CMakeLists.txt b/tests/auto/testlib/CMakeLists.txt index ad895108e7..35a26a8e34 100644 --- a/tests/auto/testlib/CMakeLists.txt +++ b/tests/auto/testlib/CMakeLists.txt @@ -1,10 +1,11 @@ -# Generated from testlib.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause -# add_subdirectory(initmain) # special case missing project -# add_subdirectory(outformat) # special case missing project add_subdirectory(qsignalspy) -# QTBUG-88507 # special case -if(NOT ANDROID) +add_subdirectory(tostring) + +# QTBUG-88507 +if(QT_FEATURE_process AND NOT ANDROID) add_subdirectory(selftests) endif() if(TARGET Qt::Widgets) diff --git a/tests/auto/testlib/initmain/tst_initmain.cpp b/tests/auto/testlib/initmain/tst_initmain.cpp index 079fe1493f..75a0d9ceb4 100644 --- a/tests/auto/testlib/initmain/tst_initmain.cpp +++ b/tests/auto/testlib/initmain/tst_initmain.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2019 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> diff --git a/tests/auto/testlib/outformat/tst_outformat.cpp b/tests/auto/testlib/outformat/tst_outformat.cpp index bc5fe5a0b9..90eb42d843 100644 --- a/tests/auto/testlib/outformat/tst_outformat.cpp +++ b/tests/auto/testlib/outformat/tst_outformat.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> diff --git a/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt b/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt index 4719937e53..20329a95f1 100644 --- a/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt +++ b/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt @@ -1,16 +1,25 @@ -# Generated from qabstractitemmodeltester.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## tst_qabstractitemmodeltester Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qabstractitemmodeltester LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qabstractitemmodeltester SOURCES ../../other/qabstractitemmodelutils/dynamictreemodel.cpp ../../other/qabstractitemmodelutils/dynamictreemodel.h tst_qabstractitemmodeltester.cpp + NO_PCH_SOURCES + tst_qabstractitemmodeltester.cpp # undef QT_NO_FOREACH INCLUDE_DIRECTORIES ../../other/qabstractitemmodelutils - PUBLIC_LIBRARIES + LIBRARIES Qt::Gui Qt::Widgets ) diff --git a/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp b/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp index e8f8d0c390..c7c833fa09 100644 --- a/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp +++ b/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp @@ -1,30 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses #include <QTest> #include <QAbstractItemModelTester> @@ -79,6 +56,7 @@ void tst_QAbstractItemModelTester::treeWidgetModel() new QTreeWidgetItem(root, QStringList(QString::number(i))); QTreeWidgetItem *remove = root->child(2); root->removeChild(remove); + delete remove; QTreeWidgetItem *parent = new QTreeWidgetItem(&widget, QStringList("parent")); new QTreeWidgetItem(parent, QStringList("child")); parent->setHidden(true); @@ -161,14 +139,8 @@ class AccessibleProxyModel : public QSortFilterProxyModel { Q_OBJECT public: - AccessibleProxyModel(QObject *parent = nullptr) : QSortFilterProxyModel(parent) - { - } - - QModelIndexList persistent() - { - return persistentIndexList(); - } + using QSortFilterProxyModel::QSortFilterProxyModel; + using QSortFilterProxyModel::persistentIndexList; }; class ObservingObject : public QObject @@ -181,15 +153,18 @@ public: storePersistentFailureCount(0), checkPersistentFailureCount(0) { - connect(m_proxy, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)), - SLOT(storePersistent())); - connect(m_proxy, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), - SLOT(checkPersistent())); + // moveRows signals can not come through because the proxy might sort/filter + // out some of the moved rows. therefore layoutChanged signals are sent from + // the QSFPM and we have to listen to them here to get properly notified + connect(m_proxy, &QAbstractProxyModel::layoutAboutToBeChanged, this, + &ObservingObject::storePersistent); + connect(m_proxy, &QAbstractProxyModel::layoutChanged, this, + &ObservingObject::checkPersistent); } public slots: - void storePersistent(const QModelIndex &parent) + void storePersistentRecursive(const QModelIndex &parent) { for (int row = 0; row < m_proxy->rowCount(parent); ++row) { QModelIndex proxyIndex = m_proxy->index(row, 0, parent); @@ -205,26 +180,27 @@ public slots: m_persistentSourceIndexes.append(sourceIndex); m_persistentProxyIndexes.append(proxyIndex); if (m_proxy->hasChildren(proxyIndex)) - storePersistent(proxyIndex); + storePersistentRecursive(proxyIndex); } } - void storePersistent() + void storePersistent(const QList<QPersistentModelIndex> &parents = {}) { - // This method is called from rowsAboutToBeMoved. Persistent indexes should be valid + // This method is called from source model rowsAboutToBeMoved. Persistent indexes should be valid foreach (const QModelIndex &idx, m_persistentProxyIndexes) if (!idx.isValid()) { qWarning("%s: persistentProxyIndexes contains invalid index", Q_FUNC_INFO); ++storePersistentFailureCount; } - - if (!m_proxy->persistent().isEmpty()) { - qWarning("%s: proxy should have no persistent indexes when storePersistent called", + const auto validCount = std::count_if(parents.begin(), parents.end(), + [](const auto &idx) { return idx.isValid(); }); + if (m_proxy->persistentIndexList().size() != validCount) { + qWarning("%s: proxy should have no additional persistent indexes when storePersistent called", Q_FUNC_INFO); ++storePersistentFailureCount; } - storePersistent(QModelIndex()); - if (m_proxy->persistent().isEmpty()) { + storePersistentRecursive(QModelIndex()); + if (m_proxy->persistentIndexList().isEmpty()) { qWarning("%s: proxy should have persistent index after storePersistent called", Q_FUNC_INFO); ++storePersistentFailureCount; @@ -233,6 +209,9 @@ public slots: void checkPersistent() { + QVERIFY(!m_persistentProxyIndexes.isEmpty()); + QVERIFY(!m_persistentSourceIndexes.isEmpty()); + for (int row = 0; row < m_persistentProxyIndexes.size(); ++row) { m_persistentProxyIndexes.at(row); m_persistentSourceIndexes.at(row); diff --git a/tests/auto/testlib/qsignalspy/CMakeLists.txt b/tests/auto/testlib/qsignalspy/CMakeLists.txt index ebec346460..3c62050de5 100644 --- a/tests/auto/testlib/qsignalspy/CMakeLists.txt +++ b/tests/auto/testlib/qsignalspy/CMakeLists.txt @@ -1,9 +1,16 @@ -# Generated from qsignalspy.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## tst_qsignalspy Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qsignalspy LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qsignalspy SOURCES tst_qsignalspy.cpp diff --git a/tests/auto/testlib/qsignalspy/tst_qsignalspy.cpp b/tests/auto/testlib/qsignalspy/tst_qsignalspy.cpp index e618671381..66f8b00505 100644 --- a/tests/auto/testlib/qsignalspy/tst_qsignalspy.cpp +++ b/tests/auto/testlib/qsignalspy/tst_qsignalspy.cpp @@ -1,39 +1,16 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> #include <QSignalSpy> #include <QTimer> - #include <qdatetime.h> +using namespace std::chrono_literals; +using namespace Qt::StringLiterals; + class tst_QSignalSpy : public QObject { Q_OBJECT @@ -73,6 +50,8 @@ private slots: void spyOnMetaMethod_invalid(); void spyOnMetaMethod_invalid_data(); + + void signalSpyDoesNotRaceOnCrossThreadSignal(); }; struct CustomType {}; @@ -104,15 +83,15 @@ void tst_QSignalSpy::spyWithoutArgs() QtTestObject obj; QSignalSpy spy(&obj, SIGNAL(sig0())); - QCOMPARE(spy.count(), 0); + QCOMPARE(spy.size(), 0); emit obj.sig0(); - QCOMPARE(spy.count(), 1); + QCOMPARE(spy.size(), 1); emit obj.sig0(); - QCOMPARE(spy.count(), 2); + QCOMPARE(spy.size(), 2); QList<QVariant> args = spy.takeFirst(); - QCOMPARE(args.count(), 0); + QCOMPARE(args.size(), 0); } void tst_QSignalSpy::spyWithBasicArgs() @@ -121,10 +100,10 @@ void tst_QSignalSpy::spyWithBasicArgs() QSignalSpy spy(&obj, SIGNAL(sig1(int,int))); emit obj.sig1(1, 2); - QCOMPARE(spy.count(), 1); + QCOMPARE(spy.size(), 1); QList<QVariant> args = spy.takeFirst(); - QCOMPARE(args.count(), 2); + QCOMPARE(args.size(), 2); QCOMPARE(args.at(0).toInt(), 1); QCOMPARE(args.at(1).toInt(), 2); @@ -132,7 +111,7 @@ void tst_QSignalSpy::spyWithBasicArgs() emit obj.sigLong(1l, 2l); args = spyl.takeFirst(); - QCOMPARE(args.count(), 2); + QCOMPARE(args.size(), 2); QCOMPARE(qvariant_cast<long>(args.at(0)), 1l); QCOMPARE(qvariant_cast<long>(args.at(1)), 2l); } @@ -149,10 +128,10 @@ void tst_QSignalSpy::spyWithPointers() int i2 = 2; emit obj.sig2(&i1, &i2); - QCOMPARE(spy.count(), 1); + QCOMPARE(spy.size(), 1); QList<QVariant> args = spy.takeFirst(); - QCOMPARE(args.count(), 2); + QCOMPARE(args.size(), 2); QCOMPARE(*static_cast<int * const *>(args.at(0).constData()), &i1); QCOMPARE(*static_cast<int * const *>(args.at(1).constData()), &i2); } @@ -180,15 +159,15 @@ void tst_QSignalSpy::spyWithBasicQtClasses() QSignalSpy spy(&obj, SIGNAL(sig(QString))); emit obj.sig(QString("bubu")); - QCOMPARE(spy.count(), 1); - QCOMPARE(spy.at(0).count(), 1); + QCOMPARE(spy.size(), 1); + QCOMPARE(spy.at(0).size(), 1); QCOMPARE(spy.at(0).at(0).toString(), QString("bubu")); QSignalSpy spy2(&obj, SIGNAL(sig5(QVariant))); QVariant val(45); emit obj.sig5(val); - QCOMPARE(spy2.count(), 1); - QCOMPARE(spy2.at(0).count(), 1); + QCOMPARE(spy2.size(), 1); + QCOMPARE(spy2.at(0).size(), 1); QCOMPARE(spy2.at(0).at(0), val); QCOMPARE(qvariant_cast<QVariant>(spy2.at(0).at(0)), val); } @@ -201,8 +180,8 @@ void tst_QSignalSpy::spyWithQtClasses() QSignalSpy spy(&obj, SIGNAL(sig2(QDateTime))); QDateTime dt = QDateTime::currentDateTime(); emit obj.sig2(dt); - QCOMPARE(spy.count(), 1); - QCOMPARE(spy.at(0).count(), 1); + QCOMPARE(spy.size(), 1); + QCOMPARE(spy.at(0).size(), 1); QCOMPARE(spy.at(0).at(0).typeName(), "QDateTime"); QCOMPARE(*static_cast<const QDateTime *>(spy.at(0).at(0).constData()), dt); QCOMPARE(spy.at(0).at(0).toDateTime(), dt); @@ -273,7 +252,7 @@ void tst_QSignalSpy::wait_signalEmittedTooLate() QTimer::singleShot(500, this, SIGNAL(sigFoo())); QSignalSpy spy(this, SIGNAL(sigFoo())); QVERIFY(!spy.wait(200)); - QTRY_COMPARE(spy.count(), 1); + QTRY_COMPARE(spy.size(), 1); } void tst_QSignalSpy::wait_signalEmittedMultipleTimes() @@ -282,13 +261,13 @@ void tst_QSignalSpy::wait_signalEmittedMultipleTimes() QTimer::singleShot(800, this, SIGNAL(sigFoo())); QSignalSpy spy(this, SIGNAL(sigFoo())); QVERIFY(spy.wait()); - QCOMPARE(spy.count(), 1); // we don't wait for the second signal... + QCOMPARE(spy.size(), 1); // we don't wait for the second signal... QVERIFY(spy.wait()); - QCOMPARE(spy.count(), 2); + QCOMPARE(spy.size(), 2); QVERIFY(!spy.wait(1)); QTimer::singleShot(10, this, SIGNAL(sigFoo())); QVERIFY(spy.wait()); - QCOMPARE(spy.count(), 3); + QCOMPARE(spy.size(), 3); } void tst_QSignalSpy::spyFunctionPointerWithoutArgs() @@ -296,15 +275,15 @@ void tst_QSignalSpy::spyFunctionPointerWithoutArgs() QtTestObject obj; QSignalSpy spy(&obj, &QtTestObject::sig0); - QCOMPARE(spy.count(), 0); + QCOMPARE(spy.size(), 0); emit obj.sig0(); - QCOMPARE(spy.count(), 1); + QCOMPARE(spy.size(), 1); emit obj.sig0(); - QCOMPARE(spy.count(), 2); + QCOMPARE(spy.size(), 2); QList<QVariant> args = spy.takeFirst(); - QCOMPARE(args.count(), 0); + QCOMPARE(args.size(), 0); } void tst_QSignalSpy::spyFunctionPointerWithBasicArgs() @@ -313,10 +292,10 @@ void tst_QSignalSpy::spyFunctionPointerWithBasicArgs() QSignalSpy spy(&obj, &QtTestObject::sig1); emit obj.sig1(1, 2); - QCOMPARE(spy.count(), 1); + QCOMPARE(spy.size(), 1); QList<QVariant> args = spy.takeFirst(); - QCOMPARE(args.count(), 2); + QCOMPARE(args.size(), 2); QCOMPARE(args.at(0).toInt(), 1); QCOMPARE(args.at(1).toInt(), 2); @@ -324,7 +303,7 @@ void tst_QSignalSpy::spyFunctionPointerWithBasicArgs() emit obj.sigLong(1l, 2l); args = spyl.takeFirst(); - QCOMPARE(args.count(), 2); + QCOMPARE(args.size(), 2); QCOMPARE(qvariant_cast<long>(args.at(0)), 1l); QCOMPARE(qvariant_cast<long>(args.at(1)), 2l); } @@ -341,10 +320,10 @@ void tst_QSignalSpy::spyFunctionPointerWithPointers() int i2 = 2; emit obj.sig2(&i1, &i2); - QCOMPARE(spy.count(), 1); + QCOMPARE(spy.size(), 1); QList<QVariant> args = spy.takeFirst(); - QCOMPARE(args.count(), 2); + QCOMPARE(args.size(), 2); QCOMPARE(*static_cast<int * const *>(args.at(0).constData()), &i1); QCOMPARE(*static_cast<int * const *>(args.at(1).constData()), &i2); } @@ -355,15 +334,15 @@ void tst_QSignalSpy::spyFunctionPointerWithBasicQtClasses() QSignalSpy spy(&obj, &QtTestObject2::sig); emit obj.sig(QString("bubu")); - QCOMPARE(spy.count(), 1); - QCOMPARE(spy.at(0).count(), 1); + QCOMPARE(spy.size(), 1); + QCOMPARE(spy.at(0).size(), 1); QCOMPARE(spy.at(0).at(0).toString(), QString("bubu")); QSignalSpy spy2(&obj, &QtTestObject2::sig5); QVariant val(45); emit obj.sig5(val); - QCOMPARE(spy2.count(), 1); - QCOMPARE(spy2.at(0).count(), 1); + QCOMPARE(spy2.size(), 1); + QCOMPARE(spy2.at(0).size(), 1); QCOMPARE(spy2.at(0).at(0), val); QCOMPARE(qvariant_cast<QVariant>(spy2.at(0).at(0)), val); } @@ -375,8 +354,8 @@ void tst_QSignalSpy::spyFunctionPointerWithQtClasses() QSignalSpy spy(&obj, &QtTestObject2::sig2); QDateTime dt = QDateTime::currentDateTime(); emit obj.sig2(dt); - QCOMPARE(spy.count(), 1); - QCOMPARE(spy.at(0).count(), 1); + QCOMPARE(spy.size(), 1); + QCOMPARE(spy.at(0).size(), 1); QCOMPARE(spy.at(0).at(0).typeName(), "QDateTime"); QCOMPARE(*static_cast<const QDateTime *>(spy.at(0).at(0).constData()), dt); QCOMPARE(spy.at(0).at(0).toDateTime(), dt); @@ -398,8 +377,8 @@ void tst_QSignalSpy::spyFunctionPointerWithCustomClass() { QSignalSpy spy(&obj, &QtTestObject2::sig6); emit obj.sig6({}); - QCOMPARE(spy.count(), 1); - QCOMPARE(spy.at(0).count(), 1); + QCOMPARE(spy.size(), 1); + QCOMPARE(spy.at(0).size(), 1); QCOMPARE(spy.at(0).at(0).typeName(), "CustomType"); } @@ -445,7 +424,7 @@ void tst_QSignalSpy::waitFunctionPointer_signalEmittedTooLate() QSignalSpy spy(this, &tst_QSignalSpy::sigFoo); QVERIFY(!spy.wait(200)); QTest::qWait(400); - QCOMPARE(spy.count(), 1); + QCOMPARE(spy.size(), 1); } void tst_QSignalSpy::waitFunctionPointer_signalEmittedMultipleTimes() @@ -454,13 +433,13 @@ void tst_QSignalSpy::waitFunctionPointer_signalEmittedMultipleTimes() QTimer::singleShot(800, this, SIGNAL(sigFoo())); QSignalSpy spy(this, &tst_QSignalSpy::sigFoo); QVERIFY(spy.wait()); - QCOMPARE(spy.count(), 1); // we don't wait for the second signal... + QCOMPARE(spy.size(), 1); // we don't wait for the second signal... QVERIFY(spy.wait()); - QCOMPARE(spy.count(), 2); + QCOMPARE(spy.size(), 2); QVERIFY(!spy.wait(1)); QTimer::singleShot(10, this, SIGNAL(sigFoo())); QVERIFY(spy.wait()); - QCOMPARE(spy.count(), 3); + QCOMPARE(spy.size(), 3); } void tst_QSignalSpy::spyOnMetaMethod() @@ -479,36 +458,68 @@ void tst_QSignalSpy::spyOnMetaMethod() QVERIFY(spy.isValid()); obj.setObjectName("A new object name"); - QCOMPARE(spy.count(), 1); + QCOMPARE(spy.size(), 1); } Q_DECLARE_METATYPE(QMetaMethod); void tst_QSignalSpy::spyOnMetaMethod_invalid() { + QFETCH(const QByteArray, message); QFETCH(QObject*, object); QFETCH(QMetaMethod, signal); + QTest::ignoreMessage(QtWarningMsg, message.data()); QSignalSpy spy(object, signal); QVERIFY(!spy.isValid()); } void tst_QSignalSpy::spyOnMetaMethod_invalid_data() { + QTest::addColumn<QByteArray>("message"); QTest::addColumn<QObject*>("object"); QTest::addColumn<QMetaMethod>("signal"); QTest::addRow("Invalid object") + << "QSignalSpy: Cannot spy on a null object"_ba << static_cast<QObject*>(nullptr) << QMetaMethod(); QTest::addRow("Empty signal") + << "QSignalSpy: Null signal is not valid"_ba << new QObject(this) << QMetaMethod(); QTest::addRow("Method is not a signal") + << "QSignalSpy: Not a signal: 'deleteLater()'"_ba << new QObject(this) << QObject::staticMetaObject.method(QObject::staticMetaObject.indexOfMethod("deleteLater()")); } +class EmitSignal_Thread : public QThread +{ + Q_OBJECT +public: + void run() override + { + emit valueChanged(42, u"is the answer"_s); + } + +Q_SIGNALS: + void valueChanged(int value, const QString &str); +}; + +void tst_QSignalSpy::signalSpyDoesNotRaceOnCrossThreadSignal() +{ + EmitSignal_Thread thread; + QSignalSpy valueChangedSpy(&thread, &EmitSignal_Thread::valueChanged); + QVERIFY(valueChangedSpy.isValid()); + + thread.start(); + QVERIFY(valueChangedSpy.wait(5s)); + QCOMPARE(valueChangedSpy[0][0].toInt(), 42); + QCOMPARE(valueChangedSpy[0][1].toString(), u"is the answer"_s); + QVERIFY(thread.wait(5s)); +} + QTEST_MAIN(tst_QSignalSpy) #include "tst_qsignalspy.moc" diff --git a/tests/auto/testlib/selftests/CMakeLists.txt b/tests/auto/testlib/selftests/CMakeLists.txt index 2dd26211f2..9e17638a66 100644 --- a/tests/auto/testlib/selftests/CMakeLists.txt +++ b/tests/auto/testlib/selftests/CMakeLists.txt @@ -1,9 +1,25 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # The whole file is written manually. +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_selftests LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + include(../../../../src/testlib/selfcover.cmake) # ------------- Test runner ------------- +# Resources: + +file(GLOB qmake_expected_files_resource_files RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "expected_*") +foreach(file IN LISTS qmake_expected_files_resource_files) + set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/${file}" PROPERTIES QT_RESOURCE_ALIAS "${file}") +endforeach() + qt_internal_add_test(tst_selftests OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/" EXCEPTIONS @@ -11,8 +27,12 @@ qt_internal_add_test(tst_selftests SOURCES tst_selftests.cpp catch.cpp - PUBLIC_LIBRARIES + NO_PCH_SOURCES + tst_selftests.cpp # undef QT_NO_FOREACH + LIBRARIES Qt::TestPrivate + TESTDATA ${qmake_expected_files_resource_files} + BUILTIN_TESTDATA # These lines need to be commented out as they need to be enabled # COMPILE_OPTIONS # conditionally @@ -24,25 +44,6 @@ qt_internal_add_test(tst_selftests # "$$COVERAGE_OPTIONS" ) -file(GLOB resource_glob_0 RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "expected_*") -foreach(file IN LISTS resource_glob_0) - set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/${file}" PROPERTIES QT_RESOURCE_ALIAS "${file}") -endforeach() - -# Resources: -set(qmake_expected_files_resource_files - ${resource_glob_0} -) - -qt_internal_add_resource(tst_selftests "qmake_expected_files" - PREFIX - "/" - BASE - "${CMAKE_CURRENT_SOURCE_DIR}" - FILES - ${qmake_expected_files_resource_files} -) - qt_internal_apply_testlib_coverage_options(tst_selftests) # ------------- Sub tests ------------- @@ -66,9 +67,12 @@ set(subprograms deleteLater deleteLater_noApp differentexec + eventloop exceptionthrow expectfail + extendedcompare failcleanup + failcleanuptestcase faildatatype failfetchtype failinit @@ -87,10 +91,13 @@ set(subprograms printdatatagswithglobaltags qexecstringlist silent + silent_fatal signaldumper singleskip skip + skipblacklisted skipcleanup + skipcleanuptestcase skipinit skipinitdata sleep diff --git a/tests/auto/testlib/selftests/README b/tests/auto/testlib/selftests/README index 821bed45df..da6637d872 100644 --- a/tests/auto/testlib/selftests/README +++ b/tests/auto/testlib/selftests/README @@ -50,6 +50,13 @@ You can choose a specific subtest by passing the -c option: -c "Given: The QTestLog::Plain logger" \ -c 'And given: The "skip" subtest' +Note that on Windows, when using cmd.exe, you cannot use single +quotes, so the command above becomes: + + ❯ ./tst_selftests "Scenario: Test output of the loggers is as expected" \ + -c "Given: The QTestLog::Plain logger" \ + -c "And given: The ""skip"" subtest" + It's possible to pass only the first -c options, to e.g. run all tests with the Plain logger, but it's unfortunately not possible to pass only the last -c option, to run the 'skip' subtest with diff --git a/tests/auto/testlib/selftests/assert/CMakeLists.txt b/tests/auto/testlib/selftests/assert/CMakeLists.txt index 07f1dd6825..947c056d02 100644 --- a/tests/auto/testlib/selftests/assert/CMakeLists.txt +++ b/tests/auto/testlib/selftests/assert/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from assert.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## assert Binary: ##################################################################### qt_internal_add_executable(assert - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_assert.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(assert) -# special case end diff --git a/tests/auto/testlib/selftests/assert/tst_assert.cpp b/tests/auto/testlib/selftests/assert/tst_assert.cpp index 202e3eeb29..abba0f388e 100644 --- a/tests/auto/testlib/selftests/assert/tst_assert.cpp +++ b/tests/auto/testlib/selftests/assert/tst_assert.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only // Make sure we get a real Q_ASSERT even in release builds #ifdef QT_NO_DEBUG diff --git a/tests/auto/testlib/selftests/badxml/CMakeLists.txt b/tests/auto/testlib/selftests/badxml/CMakeLists.txt index 733d826f97..21544707d7 100644 --- a/tests/auto/testlib/selftests/badxml/CMakeLists.txt +++ b/tests/auto/testlib/selftests/badxml/CMakeLists.txt @@ -1,15 +1,17 @@ -# Generated from badxml.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## badxml Binary: ##################################################################### qt_internal_add_executable(badxml - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_badxml.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::CorePrivate Qt::Test ) @@ -17,6 +19,4 @@ qt_internal_add_executable(badxml ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(badxml) -# special case end diff --git a/tests/auto/testlib/selftests/badxml/tst_badxml.cpp b/tests/auto/testlib/selftests/badxml/tst_badxml.cpp index a50688ac95..a928a24d8a 100644 --- a/tests/auto/testlib/selftests/badxml/tst_badxml.cpp +++ b/tests/auto/testlib/selftests/badxml/tst_badxml.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> #include <QtCore/QStringList> @@ -105,9 +79,9 @@ void tst_BadXml::badDataTag_data() const { QTest::addColumn<bool>("shouldFail"); - foreach (char const* str, badStrings()) { - QTest::newRow(qPrintable(QString("fail %1").arg(str))) << true; - QTest::newRow(qPrintable(QString("pass %1").arg(str))) << false; + for (const QByteArray &ba: badStrings()) { + QTest::addRow("fail %s", ba.constData()) << true; + QTest::addRow("pass %s", ba.constData()) << false; } } @@ -148,9 +122,8 @@ void tst_BadXml::badMessage_data() const QTest::addColumn<QByteArray>("message"); int i = 0; - foreach (QByteArray const& str, badStrings()) { + for (const QByteArray &str : badStrings()) QTest::newRow(qPrintable(QString::fromLatin1("string %1").arg(i++))) << str; - } } /* @@ -158,13 +131,12 @@ void tst_BadXml::badMessage_data() const */ QList<QByteArray> const& tst_BadXml::badStrings() { - static QList<QByteArray> out; - if (out.isEmpty()) { - out << "end cdata ]]> text ]]> more text"; - out << "quotes \" text\" more text"; - out << "xml close > open < tags < text"; - out << "all > \" mixed ]]> up > \" in < the ]]> hopes < of triggering \"< ]]> bugs"; - } + static const QList<QByteArray> out = { + "end cdata ]]> text ]]> more text", + "quotes \" text\" more text", + "xml close > open < tags < text", + "all > \" mixed ]]> up > \" in < the ]]> hopes < of triggering \"< ]]> bugs", + }; return out; } @@ -205,16 +177,16 @@ int main(int argc, char** argv) if (badstring == -1) { tst_BadXml test; - return QTest::qExec(&test, args.count(), const_cast<char**>(args.data())); + return QTest::qExec(&test, args.size(), const_cast<char**>(args.data())); } QList<QByteArray> badstrings = tst_BadXml::badStrings(); - if (badstring >= badstrings.count()) + if (badstring >= badstrings.size()) qFatal("`-badstring %d' is out of range", badstring); tst_BadXmlSub test; test.className = badstrings[badstring].constData(); - return QTest::qExec(&test, args.count(), const_cast<char**>(args.data())); + return QTest::qExec(&test, args.size(), const_cast<char**>(args.data())); } #include "tst_badxml.moc" diff --git a/tests/auto/testlib/selftests/benchlibcallgrind/CMakeLists.txt b/tests/auto/testlib/selftests/benchlibcallgrind/CMakeLists.txt index 3dfc0d7916..033724406c 100644 --- a/tests/auto/testlib/selftests/benchlibcallgrind/CMakeLists.txt +++ b/tests/auto/testlib/selftests/benchlibcallgrind/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from benchlibcallgrind.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## benchlibcallgrind Binary: ##################################################################### qt_internal_add_executable(benchlibcallgrind - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_benchlibcallgrind.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(benchlibcallgrind) -# special case end diff --git a/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp b/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp index b3cf623375..fc7f0b013b 100644 --- a/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp +++ b/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> #include <QtCore/QCoreApplication> @@ -47,7 +22,7 @@ private slots: void tst_BenchlibCallgrind::failInChildProcess() { #ifdef HAVE_VALGRIND_H - static double f = 1.0; + [[maybe_unused]] static double f = 1.0; QBENCHMARK { for (int i = 0; i < 1000000; ++i) { f *= 1.1; @@ -88,7 +63,7 @@ QTEST_MAIN_WRAPPER(tst_BenchlibCallgrind, || qstrcmp(arg, "-callgrind") == 0; }) == args.end()) { args.push_back("-callgrind"); - argc = args.size(); + argc = int(args.size()); argv = const_cast<char**>(&args[0]); } QTEST_MAIN_SETUP()) diff --git a/tests/auto/testlib/selftests/benchlibcounting/CMakeLists.txt b/tests/auto/testlib/selftests/benchlibcounting/CMakeLists.txt index efc813bb27..76a1c96a44 100644 --- a/tests/auto/testlib/selftests/benchlibcounting/CMakeLists.txt +++ b/tests/auto/testlib/selftests/benchlibcounting/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from benchlibcounting.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## benchlibcounting Binary: ##################################################################### qt_internal_add_executable(benchlibcounting - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_benchlibcounting.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(tst_selftests) -# special case end diff --git a/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp b/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp index 9903a1bd59..8ac99a1f4e 100644 --- a/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp +++ b/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> #include <QTest> @@ -62,7 +37,7 @@ void tst_BenchlibCounting::failingBenchmark() QTEST_MAIN_WRAPPER(tst_BenchlibCounting, std::vector<const char*> args(argv, argv + argc); args.push_back("-eventcounter"); - argc = args.size(); + argc = int(args.size()); argv = const_cast<char**>(&args[0]); QTEST_MAIN_SETUP()) diff --git a/tests/auto/testlib/selftests/benchlibeventcounter/CMakeLists.txt b/tests/auto/testlib/selftests/benchlibeventcounter/CMakeLists.txt index 0c9c5fdc32..e91340512b 100644 --- a/tests/auto/testlib/selftests/benchlibeventcounter/CMakeLists.txt +++ b/tests/auto/testlib/selftests/benchlibeventcounter/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from benchlibeventcounter.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## benchlibeventcounter Binary: ##################################################################### qt_internal_add_executable(benchlibeventcounter - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_benchlibeventcounter.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(benchlibeventcounter) -# special case end diff --git a/tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp b/tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp index a2dec3a45b..53c8f50ff2 100644 --- a/tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp +++ b/tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp @@ -1,35 +1,12 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> #include <QTest> +#if defined(Q_OS_WIN32) #include <QWinEventNotifier> +#endif #include <QAbstractEventDispatcher> /* Custom event dispatcher to ensure we don't receive any spontaneous events */ @@ -96,7 +73,7 @@ int main(int argc, char** argv) { std::vector<const char*> args(argv, argv + argc); args.push_back("-eventcounter"); - argc = args.size(); + argc = int(args.size()); argv = const_cast<char**>(&args[0]); TestEventDispatcher dispatcher; diff --git a/tests/auto/testlib/selftests/benchliboptions/CMakeLists.txt b/tests/auto/testlib/selftests/benchliboptions/CMakeLists.txt index 94ee9dd501..1f6bfa9374 100644 --- a/tests/auto/testlib/selftests/benchliboptions/CMakeLists.txt +++ b/tests/auto/testlib/selftests/benchliboptions/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from benchliboptions.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## benchliboptions Binary: ##################################################################### qt_internal_add_executable(benchliboptions - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_benchliboptions.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(tst_selftests) -# special case end diff --git a/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp b/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp index 2795dbfabf..35ba5e5309 100644 --- a/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp +++ b/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp @@ -1,55 +1,29 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> #include <QTest> +#if defined(Q_OS_WIN32) #include <QWinEventNotifier> +#endif #include <QAbstractEventDispatcher> /* Custom event dispatcher to ensure we don't receive any spontaneous events */ -class TestEventDispatcher : public QAbstractEventDispatcher +class TestEventDispatcher : public QAbstractEventDispatcherV2 { Q_OBJECT public: - TestEventDispatcher(QObject* parent =0) - : QAbstractEventDispatcher(parent) - {} void interrupt() override {} bool processEvents(QEventLoop::ProcessEventsFlags) override { return false; } void registerSocketNotifier(QSocketNotifier*) override {} - void registerTimer(int,qint64,Qt::TimerType,QObject*) override {} - QList<TimerInfo> registeredTimers(QObject*) const override { return QList<TimerInfo>(); } + void registerTimer(Qt::TimerId,Duration,Qt::TimerType,QObject*) override {} + QList<TimerInfoV2> timersForObject(QObject*) const override { return {}; } void unregisterSocketNotifier(QSocketNotifier*) override {} - bool unregisterTimer(int) override { return false; } + bool unregisterTimer(Qt::TimerId) override { return false; } bool unregisterTimers(QObject*) override { return false; } - int remainingTime(int) override { return 0; } + Duration remainingTime(Qt::TimerId) const override { return {}; } void wakeUp() override {} #ifdef Q_OS_WIN diff --git a/tests/auto/testlib/selftests/benchlibtickcounter/CMakeLists.txt b/tests/auto/testlib/selftests/benchlibtickcounter/CMakeLists.txt index 463a74eaf7..639e75c8bb 100644 --- a/tests/auto/testlib/selftests/benchlibtickcounter/CMakeLists.txt +++ b/tests/auto/testlib/selftests/benchlibtickcounter/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from benchlibtickcounter.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## benchlibtickcounter Binary: ##################################################################### qt_internal_add_executable(benchlibtickcounter - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_benchlibtickcounter.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::TestPrivate ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(benchlibtickcounter) -# special case end diff --git a/tests/auto/testlib/selftests/benchlibtickcounter/tst_benchlibtickcounter.cpp b/tests/auto/testlib/selftests/benchlibtickcounter/tst_benchlibtickcounter.cpp index 97ac22bb94..204a28599e 100644 --- a/tests/auto/testlib/selftests/benchlibtickcounter/tst_benchlibtickcounter.cpp +++ b/tests/auto/testlib/selftests/benchlibtickcounter/tst_benchlibtickcounter.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> @@ -65,7 +40,7 @@ void tst_BenchlibTickCounter::threeBillionTicks() QTEST_MAIN_WRAPPER(tst_BenchlibTickCounter, std::vector<const char*> args(argv, argv + argc); args.push_back("-tickcounter"); - argc = args.size(); + argc = int(args.size()); argv = const_cast<char**>(&args[0]); QTEST_MAIN_SETUP()) diff --git a/tests/auto/testlib/selftests/benchlibwalltime/CMakeLists.txt b/tests/auto/testlib/selftests/benchlibwalltime/CMakeLists.txt index 830e415440..b4119726b3 100644 --- a/tests/auto/testlib/selftests/benchlibwalltime/CMakeLists.txt +++ b/tests/auto/testlib/selftests/benchlibwalltime/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from benchlibwalltime.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## benchlibwalltime Binary: ##################################################################### qt_internal_add_executable(benchlibwalltime - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_benchlibwalltime.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(benchlibwalltime) -# special case end diff --git a/tests/auto/testlib/selftests/benchlibwalltime/tst_benchlibwalltime.cpp b/tests/auto/testlib/selftests/benchlibwalltime/tst_benchlibwalltime.cpp index 96e84cb37a..ebe3de4585 100644 --- a/tests/auto/testlib/selftests/benchlibwalltime/tst_benchlibwalltime.cpp +++ b/tests/auto/testlib/selftests/benchlibwalltime/tst_benchlibwalltime.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> diff --git a/tests/auto/testlib/selftests/blacklisted/CMakeLists.txt b/tests/auto/testlib/selftests/blacklisted/CMakeLists.txt index 87caa5770c..8e84038002 100644 --- a/tests/auto/testlib/selftests/blacklisted/CMakeLists.txt +++ b/tests/auto/testlib/selftests/blacklisted/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from blacklisted.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## blacklisted Binary: ##################################################################### qt_internal_add_executable(blacklisted - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_blacklisted.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::TestPrivate ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(blacklisted) -# special case end diff --git a/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp b/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp index 90e7876f97..d59b6244c1 100644 --- a/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp +++ b/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp @@ -1,30 +1,8 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#undef QTEST_THROW_ON_FAILURE // fails ### investigate +#undef QTEST_THROW_ON_SKIP // fails ### investigate #include <QtCore/QCoreApplication> #include <QTest> @@ -90,6 +68,7 @@ void tst_Blacklisted::fail() void tst_Blacklisted::multiFail() // cf. ../subtest/'s similar tests { + const QTest::ThrowOnFailDisabler nothrow; // tests repeated QFAILs ++blacklisted; for (int i = 0; i < 10; ++i) []() { QFAIL("This failure message should be repeated ten times"); }(); @@ -98,6 +77,7 @@ void tst_Blacklisted::multiFail() // cf. ../subtest/'s similar tests void tst_Blacklisted::multiSkip() { + const QTest::ThrowOnSkipDisabler nothrow; // tests repeated QSKIPs // Similar to multiFail() ++skipped; for (int i = 0; i < 10; ++i) diff --git a/tests/auto/testlib/selftests/catch.cpp b/tests/auto/testlib/selftests/catch.cpp index 5d27d400e3..37457fcca5 100644 --- a/tests/auto/testlib/selftests/catch.cpp +++ b/tests/auto/testlib/selftests/catch.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2020 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtTest module 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/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 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #define CATCH_CONFIG_RUNNER #define CATCH_CLARA_CONFIG_CONSOLE_WIDTH 1000 diff --git a/tests/auto/testlib/selftests/catch_p.h b/tests/auto/testlib/selftests/catch_p.h index bbe8786d8d..2c217922a8 100644 --- a/tests/auto/testlib/selftests/catch_p.h +++ b/tests/auto/testlib/selftests/catch_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2020 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtTest module 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/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 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef QCATCH_P_H #define QCATCH_P_H diff --git a/tests/auto/testlib/selftests/catch_p_p.h b/tests/auto/testlib/selftests/catch_p_p.h index 47a31f9079..f22183557d 100644 --- a/tests/auto/testlib/selftests/catch_p_p.h +++ b/tests/auto/testlib/selftests/catch_p_p.h @@ -1,9 +1,9 @@ /* - * Catch v2.11.3 - * Generated: 2020-03-19 13:44:21.042491 + * Catch v2.13.10 + * Generated: 2022-10-16 11:01:23.452308 * ---------------------------------------------------------- * This file has been merged from multiple headers. Please don't edit it directly - * Copyright (c) 2020 Two Blue Cubes Ltd. All rights reserved. + * Copyright (c) 2022 Two Blue Cubes Ltd. All rights reserved. * * Distributed under the Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -14,8 +14,8 @@ #define CATCH_VERSION_MAJOR 2 -#define CATCH_VERSION_MINOR 11 -#define CATCH_VERSION_PATCH 3 +#define CATCH_VERSION_MINOR 13 +#define CATCH_VERSION_PATCH 10 #ifdef __clang__ # pragma clang system_header @@ -66,13 +66,16 @@ #if !defined(CATCH_CONFIG_IMPL_ONLY) // start catch_platform.h +// See e.g.: +// https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h.auto.html #ifdef __APPLE__ -# include <TargetConditionals.h> -# if TARGET_OS_OSX == 1 -# define CATCH_PLATFORM_MAC -# elif TARGET_OS_IPHONE == 1 -# define CATCH_PLATFORM_IPHONE -# endif +# include <TargetConditionals.h> +# if (defined(TARGET_OS_OSX) && TARGET_OS_OSX == 1) || \ + (defined(TARGET_OS_MAC) && TARGET_OS_MAC == 1) +# define CATCH_PLATFORM_MAC +# elif (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE == 1) +# define CATCH_PLATFORM_IPHONE +# endif #elif defined(linux) || defined(__linux) || defined(__linux__) # define CATCH_PLATFORM_LINUX @@ -132,13 +135,9 @@ namespace Catch { #endif -#if defined(CATCH_CPP17_OR_GREATER) -# define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS -#endif - -// We have to avoid both ICC and Clang, because they try to mask themselves -// as gcc, and we want only GCC in this block -#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) +// Only GCC compiler should be used in this block, so other compilers trying to +// mask themselves as GCC should be ignored. +#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__CUDACC__) && !defined(__LCC__) # define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic push" ) # define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic pop" ) @@ -151,7 +150,20 @@ namespace Catch { # define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic push" ) # define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic pop" ) -# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) +// As of this writing, IBM XL's implementation of __builtin_constant_p has a bug +// which results in calls to destructors being emitted for each temporary, +// without a matching initialization. In practice, this can result in something +// like `std::string::~string` being called on an uninitialized value. +// +// For example, this code will likely segfault under IBM XL: +// ``` +// REQUIRE(std::string("12") + "34" == "1234") +// ``` +// +// Therefore, `CATCH_INTERNAL_IGNORE_BUT_WARN` is not implemented. +# if !defined(__ibmxl__) && !defined(__CUDACC__) +# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg, hicpp-vararg) */ +# endif # define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ _Pragma( "clang diagnostic ignored \"-Wexit-time-destructors\"" ) \ @@ -228,22 +240,26 @@ namespace Catch { // Visual C++ #if defined(_MSC_VER) -# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION __pragma( warning(push) ) -# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION __pragma( warning(pop) ) - -# if _MSC_VER >= 1900 // Visual Studio 2015 or newer -# define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS +// Universal Windows platform does not support SEH +// Or console colours (or console at all...) +# if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) +# define CATCH_CONFIG_COLOUR_NONE +# else +# define CATCH_INTERNAL_CONFIG_WINDOWS_SEH # endif -# define CATCH_INTERNAL_CONFIG_WINDOWS_SEH +# if !defined(__clang__) // Handle Clang masquerading for msvc // MSVC traditional preprocessor needs some workaround for __VA_ARGS__ // _MSVC_TRADITIONAL == 0 means new conformant preprocessor // _MSVC_TRADITIONAL == 1 means old traditional non-conformant preprocessor -# if !defined(__clang__) // Handle Clang masquerading for msvc # if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL) # define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR # endif // MSVC_TRADITIONAL + +// Only do this if we're not using clang on Windows, which uses `diagnostic push` & `diagnostic pop` +# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION __pragma( warning(push) ) +# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION __pragma( warning(pop) ) # endif // __clang__ #endif // _MSC_VER @@ -311,7 +327,10 @@ namespace Catch { // Check if byte is available and usable # if __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER) - # define CATCH_INTERNAL_CONFIG_CPP17_BYTE + # include <cstddef> + # if defined(__cpp_lib_byte) && (__cpp_lib_byte > 0) + # define CATCH_INTERNAL_CONFIG_CPP17_BYTE + # endif # endif // __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER) // Check if variant is available and usable @@ -354,10 +373,6 @@ namespace Catch { # define CATCH_CONFIG_CPP17_OPTIONAL #endif -#if defined(CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) && !defined(CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS) && !defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) -# define CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS -#endif - #if defined(CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_NO_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_CPP17_STRING_VIEW) # define CATCH_CONFIG_CPP17_STRING_VIEW #endif @@ -756,7 +771,7 @@ constexpr auto operator "" _catch_sr( char const* rawChars, std::size_t size ) n #define INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_0, _1, _2, _3) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_1, _2, _3) #define INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_0, _1, _2, _3, _4) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_1, _2, _3, _4) #define INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_0, _1, _2, _3, _4, _5) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_1, _2, _3, _4, _5) -#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _4, _5, _6) +#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _3, _4, _5, _6) #define INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_0, _1, _2, _3, _4, _5, _6, _7) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_1, _2, _3, _4, _5, _6, _7) #define INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_1, _2, _3, _4, _5, _6, _7, _8) #define INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9) @@ -925,13 +940,13 @@ namespace Catch { #if defined(__cpp_lib_is_invocable) && __cpp_lib_is_invocable >= 201703 // std::result_of is deprecated in C++17 and removed in C++20. Hence, it is - // replaced with std::invoke_result here. Also *_t format is preferred over - // typename *::type format. - template <typename Func, typename U> - using FunctionReturnType = std::remove_reference_t<std::remove_cv_t<std::invoke_result_t<Func, U>>>; + // replaced with std::invoke_result here. + template <typename Func, typename... U> + using FunctionReturnType = std::remove_reference_t<std::remove_cv_t<std::invoke_result_t<Func, U...>>>; #else - template <typename Func, typename U> - using FunctionReturnType = typename std::remove_reference<typename std::remove_cv<typename std::result_of<Func(U)>::type>::type>::type; + // Keep ::type here because we still support C++11 + template <typename Func, typename... U> + using FunctionReturnType = typename std::remove_reference<typename std::remove_cv<typename std::result_of<Func(U...)>::type>::type>::type; #endif } // namespace Catch @@ -997,34 +1012,34 @@ struct AutoReg : NonCopyable { #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(Name, Tags, ...) \ - INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ ) + INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename TestType, __VA_ARGS__ ) #else #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(Name, Tags, ...) \ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename TestType, __VA_ARGS__ ) ) #endif #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(Name, Tags, Signature, ...) \ - INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__ ) + INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ ) #else #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(Name, Tags, Signature, ...) \ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ ) ) #endif #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION( ClassName, Name, Tags,... ) \ - INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) + INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) #else #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION( ClassName, Name, Tags,... ) \ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) ) #endif #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION( ClassName, Name, Tags, Signature, ... ) \ - INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) + INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) #else #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION( ClassName, Name, Tags, Signature, ... ) \ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) ) #endif #endif @@ -1037,7 +1052,7 @@ struct AutoReg : NonCopyable { CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ static void TestName() #define INTERNAL_CATCH_TESTCASE( ... ) \ - INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), __VA_ARGS__ ) + INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ), __VA_ARGS__ ) /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, ... ) \ @@ -1059,7 +1074,7 @@ struct AutoReg : NonCopyable { CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ void TestName::test() #define INTERNAL_CATCH_TEST_CASE_METHOD( ClassName, ... ) \ - INTERNAL_CATCH_TEST_CASE_METHOD2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), ClassName, __VA_ARGS__ ) + INTERNAL_CATCH_TEST_CASE_METHOD2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ), ClassName, __VA_ARGS__ ) /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_REGISTER_TESTCASE( Function, ... ) \ @@ -1086,7 +1101,7 @@ struct AutoReg : NonCopyable { int index = 0; \ constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, __VA_ARGS__)};\ using expander = int[];\ - (void)expander{(reg_test(Types{}, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++, 0)... };/* NOLINT */ \ + (void)expander{(reg_test(Types{}, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \ }\ };\ static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\ @@ -1100,18 +1115,18 @@ struct AutoReg : NonCopyable { #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags, ...) \ - INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ ) + INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename TestType, __VA_ARGS__ ) #else #define INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags, ...) \ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename TestType, __VA_ARGS__ ) ) #endif #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG(Name, Tags, Signature, ...) \ - INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__ ) + INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ ) #else #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG(Name, Tags, Signature, ...) \ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ ) ) #endif #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(TestName, TestFuncName, Name, Tags, Signature, TmplTypes, TypesList) \ @@ -1132,7 +1147,7 @@ struct AutoReg : NonCopyable { constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\ constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\ constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\ - (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFuncName<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + "<" + std::string(types_list[index % num_types]) + ">", Tags } ), index++, 0)... };/* NOLINT */\ + (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFuncName<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + "<" + std::string(types_list[index % num_types]) + ">", Tags } ), index++)... };/* NOLINT */\ } \ }; \ static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \ @@ -1149,18 +1164,18 @@ struct AutoReg : NonCopyable { #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags, ...)\ - INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename T,__VA_ARGS__) + INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename T,__VA_ARGS__) #else #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags, ...)\ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename T, __VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename T, __VA_ARGS__ ) ) #endif #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG(Name, Tags, Signature, ...)\ - INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__) + INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__) #else #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG(Name, Tags, Signature, ...)\ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ ) ) #endif #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_2(TestName, TestFunc, Name, Tags, TmplList)\ @@ -1176,7 +1191,7 @@ struct AutoReg : NonCopyable { void reg_tests() { \ int index = 0; \ using expander = int[]; \ - (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + " - " + std::to_string(index), Tags } ), index++, 0)... };/* NOLINT */\ + (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + " - " + std::to_string(index), Tags } ), index++)... };/* NOLINT */\ } \ };\ static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \ @@ -1191,7 +1206,7 @@ struct AutoReg : NonCopyable { static void TestFunc() #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE(Name, Tags, TmplList) \ - INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, TmplList ) + INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, TmplList ) #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags, Signature, ... ) \ CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ @@ -1210,7 +1225,7 @@ struct AutoReg : NonCopyable { int index = 0; \ constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, __VA_ARGS__)};\ using expander = int[];\ - (void)expander{(reg_test(Types{}, #ClassName, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++, 0)... };/* NOLINT */ \ + (void)expander{(reg_test(Types{}, #ClassName, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \ }\ };\ static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\ @@ -1224,18 +1239,18 @@ struct AutoReg : NonCopyable { #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( ClassName, Name, Tags,... ) \ - INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) + INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) #else #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( ClassName, Name, Tags,... ) \ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) ) #endif #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... ) \ - INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) + INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) #else #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... ) \ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) ) #endif #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, Signature, TmplTypes, TypesList)\ @@ -1259,7 +1274,7 @@ struct AutoReg : NonCopyable { constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\ constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\ constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\ - (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + "<" + std::string(types_list[index % num_types]) + ">", Tags } ), index++, 0)... };/* NOLINT */ \ + (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + "<" + std::string(types_list[index % num_types]) + ">", Tags } ), index++)... };/* NOLINT */ \ }\ };\ static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\ @@ -1276,18 +1291,18 @@ struct AutoReg : NonCopyable { #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( ClassName, Name, Tags, ... )\ - INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, typename T, __VA_ARGS__ ) + INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, typename T, __VA_ARGS__ ) #else #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( ClassName, Name, Tags, ... )\ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, typename T,__VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, typename T,__VA_ARGS__ ) ) #endif #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... )\ - INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, Signature, __VA_ARGS__ ) + INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, Signature, __VA_ARGS__ ) #else #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... )\ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, Signature,__VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, Signature,__VA_ARGS__ ) ) #endif #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags, TmplList) \ @@ -1306,7 +1321,7 @@ struct AutoReg : NonCopyable { void reg_tests(){\ int index = 0;\ using expander = int[];\ - (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name " - " + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + " - " + std::to_string(index), Tags } ), index++, 0)... };/* NOLINT */ \ + (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name " - " + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + " - " + std::to_string(index), Tags } ), index++)... };/* NOLINT */ \ }\ };\ static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\ @@ -1321,7 +1336,7 @@ struct AutoReg : NonCopyable { void TestName<TestType>::test() #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD(ClassName, Name, Tags, TmplList) \ - INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, TmplList ) + INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, TmplList ) // end catch_test_registry.h // start catch_capture.hpp @@ -1810,8 +1825,8 @@ namespace Catch { #endif namespace Detail { - template<typename InputIterator> - std::string rangeToString(InputIterator first, InputIterator last) { + template<typename InputIterator, typename Sentinel = InputIterator> + std::string rangeToString(InputIterator first, Sentinel last) { ReusableStringStream rss; rss << "{ "; if (first != last) { @@ -1969,20 +1984,27 @@ namespace Catch { #endif // CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER namespace Catch { - struct not_this_one {}; // Tag type for detecting which begin/ end are being selected - - // Import begin/ end from std here so they are considered alongside the fallback (...) overloads in this namespace + // Import begin/ end from std here using std::begin; using std::end; - not_this_one begin( ... ); - not_this_one end( ... ); + namespace detail { + template <typename...> + struct void_type { + using type = void; + }; + + template <typename T, typename = void> + struct is_range_impl : std::false_type { + }; + + template <typename T> + struct is_range_impl<T, typename void_type<decltype(begin(std::declval<T>()))>::type> : std::true_type { + }; + } // namespace detail template <typename T> - struct is_range { - static const bool value = - !std::is_same<decltype(begin(std::declval<T>())), not_this_one>::value && - !std::is_same<decltype(end(std::declval<T>())), not_this_one>::value; + struct is_range : detail::is_range_impl<T> { }; #if defined(_MANAGED) // Managed types are never ranges @@ -2350,6 +2372,18 @@ namespace Catch { auto operator <= ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const { return { static_cast<bool>(m_lhs <= rhs), m_lhs, "<=", rhs }; } + template <typename RhsT> + auto operator | (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const { + return { static_cast<bool>(m_lhs | rhs), m_lhs, "|", rhs }; + } + template <typename RhsT> + auto operator & (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const { + return { static_cast<bool>(m_lhs & rhs), m_lhs, "&", rhs }; + } + template <typename RhsT> + auto operator ^ (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const { + return { static_cast<bool>(m_lhs ^ rhs), m_lhs, "^", rhs }; + } template<typename RhsT> auto operator && ( RhsT const& ) -> BinaryExpr<LhsT, RhsT const&> const { @@ -2430,7 +2464,7 @@ namespace Catch { virtual void sectionEnded( SectionEndInfo const& endInfo ) = 0; virtual void sectionEndedEarly( SectionEndInfo const& endInfo ) = 0; - virtual auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& = 0; + virtual auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& = 0; #if defined(CATCH_CONFIG_ENABLE_BENCHMARKING) virtual void benchmarkPreparing( std::string const& name ) = 0; @@ -2994,6 +3028,9 @@ namespace Catch { {} std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const override { +#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) + return ""; +#else try { if( it == itEnd ) std::rethrow_exception(std::current_exception()); @@ -3003,6 +3040,7 @@ namespace Catch { catch( T& ex ) { return m_translateFunction( ex ); } +#endif } protected: @@ -3055,7 +3093,7 @@ namespace Detail { Approx operator-() const; template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type> - Approx operator()( T const& value ) { + Approx operator()( T const& value ) const { Approx approx( static_cast<double>(value) ); approx.m_epsilon = m_epsilon; approx.m_margin = m_margin; @@ -3565,12 +3603,12 @@ namespace Catch { namespace Matchers { namespace Vector { - template<typename T> - struct ContainsElementMatcher : MatcherBase<std::vector<T>> { + template<typename T, typename Alloc> + struct ContainsElementMatcher : MatcherBase<std::vector<T, Alloc>> { ContainsElementMatcher(T const &comparator) : m_comparator( comparator) {} - bool match(std::vector<T> const &v) const override { + bool match(std::vector<T, Alloc> const &v) const override { for (auto const& el : v) { if (el == m_comparator) { return true; @@ -3586,12 +3624,12 @@ namespace Matchers { T const& m_comparator; }; - template<typename T> - struct ContainsMatcher : MatcherBase<std::vector<T>> { + template<typename T, typename AllocComp, typename AllocMatch> + struct ContainsMatcher : MatcherBase<std::vector<T, AllocMatch>> { - ContainsMatcher(std::vector<T> const &comparator) : m_comparator( comparator ) {} + ContainsMatcher(std::vector<T, AllocComp> const &comparator) : m_comparator( comparator ) {} - bool match(std::vector<T> const &v) const override { + bool match(std::vector<T, AllocMatch> const &v) const override { // !TBD: see note in EqualsMatcher if (m_comparator.size() > v.size()) return false; @@ -3613,18 +3651,18 @@ namespace Matchers { return "Contains: " + ::Catch::Detail::stringify( m_comparator ); } - std::vector<T> const& m_comparator; + std::vector<T, AllocComp> const& m_comparator; }; - template<typename T> - struct EqualsMatcher : MatcherBase<std::vector<T>> { + template<typename T, typename AllocComp, typename AllocMatch> + struct EqualsMatcher : MatcherBase<std::vector<T, AllocMatch>> { - EqualsMatcher(std::vector<T> const &comparator) : m_comparator( comparator ) {} + EqualsMatcher(std::vector<T, AllocComp> const &comparator) : m_comparator( comparator ) {} - bool match(std::vector<T> const &v) const override { + bool match(std::vector<T, AllocMatch> const &v) const override { // !TBD: This currently works if all elements can be compared using != // - a more general approach would be via a compare template that defaults - // to using !=. but could be specialised for, e.g. std::vector<T> etc + // to using !=. but could be specialised for, e.g. std::vector<T, Alloc> etc // - then just call that directly if (m_comparator.size() != v.size()) return false; @@ -3636,15 +3674,15 @@ namespace Matchers { std::string describe() const override { return "Equals: " + ::Catch::Detail::stringify( m_comparator ); } - std::vector<T> const& m_comparator; + std::vector<T, AllocComp> const& m_comparator; }; - template<typename T> - struct ApproxMatcher : MatcherBase<std::vector<T>> { + template<typename T, typename AllocComp, typename AllocMatch> + struct ApproxMatcher : MatcherBase<std::vector<T, AllocMatch>> { - ApproxMatcher(std::vector<T> const& comparator) : m_comparator( comparator ) {} + ApproxMatcher(std::vector<T, AllocComp> const& comparator) : m_comparator( comparator ) {} - bool match(std::vector<T> const &v) const override { + bool match(std::vector<T, AllocMatch> const &v) const override { if (m_comparator.size() != v.size()) return false; for (std::size_t i = 0; i < v.size(); ++i) @@ -3671,16 +3709,14 @@ namespace Matchers { return *this; } - std::vector<T> const& m_comparator; + std::vector<T, AllocComp> const& m_comparator; mutable Catch::Detail::Approx approx = Catch::Detail::Approx::custom(); }; - template<typename T> - struct UnorderedEqualsMatcher : MatcherBase<std::vector<T>> { - UnorderedEqualsMatcher(std::vector<T> const& target) : m_target(target) {} - bool match(std::vector<T> const& vec) const override { - // Note: This is a reimplementation of std::is_permutation, - // because I don't want to include <algorithm> inside the common path + template<typename T, typename AllocComp, typename AllocMatch> + struct UnorderedEqualsMatcher : MatcherBase<std::vector<T, AllocMatch>> { + UnorderedEqualsMatcher(std::vector<T, AllocComp> const& target) : m_target(target) {} + bool match(std::vector<T, AllocMatch> const& vec) const override { if (m_target.size() != vec.size()) { return false; } @@ -3691,7 +3727,7 @@ namespace Matchers { return "UnorderedEquals: " + ::Catch::Detail::stringify(m_target); } private: - std::vector<T> const& m_target; + std::vector<T, AllocComp> const& m_target; }; } // namespace Vector @@ -3699,29 +3735,29 @@ namespace Matchers { // The following functions create the actual matcher objects. // This allows the types to be inferred - template<typename T> - Vector::ContainsMatcher<T> Contains( std::vector<T> const& comparator ) { - return Vector::ContainsMatcher<T>( comparator ); + template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp> + Vector::ContainsMatcher<T, AllocComp, AllocMatch> Contains( std::vector<T, AllocComp> const& comparator ) { + return Vector::ContainsMatcher<T, AllocComp, AllocMatch>( comparator ); } - template<typename T> - Vector::ContainsElementMatcher<T> VectorContains( T const& comparator ) { - return Vector::ContainsElementMatcher<T>( comparator ); + template<typename T, typename Alloc = std::allocator<T>> + Vector::ContainsElementMatcher<T, Alloc> VectorContains( T const& comparator ) { + return Vector::ContainsElementMatcher<T, Alloc>( comparator ); } - template<typename T> - Vector::EqualsMatcher<T> Equals( std::vector<T> const& comparator ) { - return Vector::EqualsMatcher<T>( comparator ); + template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp> + Vector::EqualsMatcher<T, AllocComp, AllocMatch> Equals( std::vector<T, AllocComp> const& comparator ) { + return Vector::EqualsMatcher<T, AllocComp, AllocMatch>( comparator ); } - template<typename T> - Vector::ApproxMatcher<T> Approx( std::vector<T> const& comparator ) { - return Vector::ApproxMatcher<T>( comparator ); + template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp> + Vector::ApproxMatcher<T, AllocComp, AllocMatch> Approx( std::vector<T, AllocComp> const& comparator ) { + return Vector::ApproxMatcher<T, AllocComp, AllocMatch>( comparator ); } - template<typename T> - Vector::UnorderedEqualsMatcher<T> UnorderedEquals(std::vector<T> const& target) { - return Vector::UnorderedEqualsMatcher<T>(target); + template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp> + Vector::UnorderedEqualsMatcher<T, AllocComp, AllocMatch> UnorderedEquals(std::vector<T, AllocComp> const& target) { + return Vector::UnorderedEqualsMatcher<T, AllocComp, AllocMatch>( target ); } } // namespace Matchers @@ -4040,16 +4076,16 @@ namespace Generators { return makeGenerators( value( T( std::forward<U>( val ) ) ), std::forward<Gs>( moreGenerators )... ); } - auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker&; + auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker&; template<typename L> // Note: The type after -> is weird, because VS2015 cannot parse // the expression used in the typedef inside, when it is in // return type. Yeah. - auto generate( SourceLineInfo const& lineInfo, L const& generatorExpression ) -> decltype(std::declval<decltype(generatorExpression())>().get()) { + auto generate( StringRef generatorName, SourceLineInfo const& lineInfo, L const& generatorExpression ) -> decltype(std::declval<decltype(generatorExpression())>().get()) { using UnderlyingType = typename decltype(generatorExpression())::type; - IGeneratorTracker& tracker = acquireGeneratorTracker( lineInfo ); + IGeneratorTracker& tracker = acquireGeneratorTracker( generatorName, lineInfo ); if (!tracker.hasGenerator()) { tracker.setGenerator(pf::make_unique<Generators<UnderlyingType>>(generatorExpression())); } @@ -4062,11 +4098,17 @@ namespace Generators { } // namespace Catch #define GENERATE( ... ) \ - Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, [ ]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) + Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \ + CATCH_INTERNAL_LINEINFO, \ + [ ]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) #define GENERATE_COPY( ... ) \ - Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, [=]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) + Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \ + CATCH_INTERNAL_LINEINFO, \ + [=]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) #define GENERATE_REF( ... ) \ - Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, [&]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) + Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \ + CATCH_INTERNAL_LINEINFO, \ + [&]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) // end catch_generators.hpp // start catch_generators_generic.hpp @@ -4123,7 +4165,7 @@ namespace Generators { if (!m_predicate(m_generator.get())) { // It might happen that there are no values that pass the // filter. In that case we throw an exception. - auto has_initial_value = next(); + auto has_initial_value = nextImpl(); if (!has_initial_value) { Catch::throw_exception(GeneratorException("No valid value found in filtered generator")); } @@ -4135,6 +4177,11 @@ namespace Generators { } bool next() override { + return nextImpl(); + } + + private: + bool nextImpl() { bool success = m_generator.next(); if (!success) { return false; @@ -4476,6 +4523,7 @@ namespace Catch { virtual int abortAfter() const = 0; virtual bool showInvisibles() const = 0; virtual ShowDurations::OrNot showDurations() const = 0; + virtual double minDuration() const = 0; virtual TestSpec const& testSpec() const = 0; virtual bool hasTestFilters() const = 0; virtual std::vector<std::string> const& getTestsOrTags() const = 0; @@ -5248,6 +5296,7 @@ namespace Catch { Verbosity verbosity = Verbosity::Normal; WarnAbout::What warnings = WarnAbout::Nothing; ShowDurations::OrNot showDurations = ShowDurations::DefaultForReporter; + double minDuration = -1; RunTests::InWhatOrder runOrder = RunTests::InDeclarationOrder; UseColour::YesOrNo useColour = UseColour::Auto; WaitForKeypress::When waitForKeypress = WaitForKeypress::Never; @@ -5298,6 +5347,7 @@ namespace Catch { bool warnAboutMissingAssertions() const override; bool warnAboutNoTests() const override; ShowDurations::OrNot showDurations() const override; + double minDuration() const override; RunTests::InWhatOrder runOrder() const override; unsigned int rngSeed() const override; UseColour::YesOrNo useColour() const override; @@ -5415,6 +5465,8 @@ namespace Catch { } // namespace Catch // end catch_outlier_classification.hpp + +#include <iterator> #endif // CATCH_CONFIG_ENABLE_BENCHMARKING #include <string> @@ -5675,6 +5727,9 @@ namespace Catch { // Returns double formatted as %.3f (format expected on output) std::string getFormattedDuration( double duration ); + //! Should the reporter show + bool shouldShowDuration( IConfig const& config, double duration ); + std::string serializeFilters( std::vector<std::string> const& container ); template<typename DerivedT> @@ -6068,8 +6123,6 @@ namespace Catch { static std::string getDescription(); - ReporterPreferences getPreferences() const override; - void noMatchingTestCases(std::string const& spec) override; void assertionStarting(AssertionInfo const&) override; @@ -6298,9 +6351,10 @@ namespace Catch { void writeTestCase(TestCaseNode const& testCaseNode); - void writeSection(std::string const& className, - std::string const& rootName, - SectionNode const& sectionNode); + void writeSection( std::string const& className, + std::string const& rootName, + SectionNode const& sectionNode, + bool testOkToFail ); void writeAssertions(SectionNode const& sectionNode); void writeAssertion(AssertionStats const& stats); @@ -6517,20 +6571,18 @@ namespace Catch { return {}; } }; - template <typename Sig> - using ResultOf_t = typename std::result_of<Sig>::type; // invoke and not return void :( template <typename Fun, typename... Args> - CompleteType_t<ResultOf_t<Fun(Args...)>> complete_invoke(Fun&& fun, Args&&... args) { - return CompleteInvoker<ResultOf_t<Fun(Args...)>>::invoke(std::forward<Fun>(fun), std::forward<Args>(args)...); + CompleteType_t<FunctionReturnType<Fun, Args...>> complete_invoke(Fun&& fun, Args&&... args) { + return CompleteInvoker<FunctionReturnType<Fun, Args...>>::invoke(std::forward<Fun>(fun), std::forward<Args>(args)...); } const std::string benchmarkErrorMsg = "a benchmark failed to run successfully"; } // namespace Detail template <typename Fun> - Detail::CompleteType_t<Detail::ResultOf_t<Fun()>> user_code(Fun&& fun) { + Detail::CompleteType_t<FunctionReturnType<Fun>> user_code(Fun&& fun) { CATCH_TRY{ return Detail::complete_invoke(std::forward<Fun>(fun)); } CATCH_CATCH_ALL{ @@ -6775,8 +6827,8 @@ namespace Catch { Result result; int iterations; }; - template <typename Clock, typename Sig> - using TimingOf = Timing<ClockDuration<Clock>, Detail::CompleteType_t<Detail::ResultOf_t<Sig>>>; + template <typename Clock, typename Func, typename... Args> + using TimingOf = Timing<ClockDuration<Clock>, Detail::CompleteType_t<FunctionReturnType<Func, Args...>>>; } // namespace Benchmark } // namespace Catch @@ -6787,7 +6839,7 @@ namespace Catch { namespace Benchmark { namespace Detail { template <typename Clock, typename Fun, typename... Args> - TimingOf<Clock, Fun(Args...)> measure(Fun&& fun, Args&&... args) { + TimingOf<Clock, Fun, Args...> measure(Fun&& fun, Args&&... args) { auto start = Clock::now(); auto&& r = Detail::complete_invoke(fun, std::forward<Args>(args)...); auto end = Clock::now(); @@ -6806,11 +6858,11 @@ namespace Catch { namespace Benchmark { namespace Detail { template <typename Clock, typename Fun> - TimingOf<Clock, Fun(int)> measure_one(Fun&& fun, int iters, std::false_type) { + TimingOf<Clock, Fun, int> measure_one(Fun&& fun, int iters, std::false_type) { return Detail::measure<Clock>(fun, iters); } template <typename Clock, typename Fun> - TimingOf<Clock, Fun(Chronometer)> measure_one(Fun&& fun, int iters, std::true_type) { + TimingOf<Clock, Fun, Chronometer> measure_one(Fun&& fun, int iters, std::true_type) { Detail::ChronometerModel<Clock> meter; auto&& result = Detail::complete_invoke(fun, Chronometer(meter, iters)); @@ -6827,7 +6879,7 @@ namespace Catch { }; template <typename Clock, typename Fun> - TimingOf<Clock, Fun(run_for_at_least_argument_t<Clock, Fun>)> run_for_at_least(ClockDuration<Clock> how_long, int seed, Fun&& fun) { + TimingOf<Clock, Fun, run_for_at_least_argument_t<Clock, Fun>> run_for_at_least(ClockDuration<Clock> how_long, int seed, Fun&& fun) { auto iters = seed; while (iters < (1 << 30)) { auto&& Timing = measure_one<Clock>(fun, iters, is_callable<Fun(Chronometer)>()); @@ -6837,7 +6889,7 @@ namespace Catch { } iters *= 2; } - throw optimized_away_error{}; + Catch::throw_exception(optimized_away_error{}); } } // namespace Detail } // namespace Benchmark @@ -6845,6 +6897,7 @@ namespace Catch { // end catch_run_for_at_least.hpp #include <algorithm> +#include <iterator> namespace Catch { namespace Benchmark { @@ -7015,8 +7068,8 @@ namespace Catch { double b2 = bias - z1; double a1 = a(b1); double a2 = a(b2); - auto lo = std::max(cumn(a1), 0); - auto hi = std::min(cumn(a2), n - 1); + auto lo = (std::max)(cumn(a1), 0); + auto hi = (std::min)(cumn(a2), n - 1); return { point, resample[lo], resample[hi], confidence_level }; } @@ -7085,7 +7138,9 @@ namespace Catch { } template <typename Clock> EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_cost(FloatDuration<Clock> resolution) { - auto time_limit = std::min(resolution * clock_cost_estimation_tick_limit, FloatDuration<Clock>(clock_cost_estimation_time_limit)); + auto time_limit = (std::min)( + resolution * clock_cost_estimation_tick_limit, + FloatDuration<Clock>(clock_cost_estimation_time_limit)); auto time_clock = [](int k) { return Detail::measure<Clock>([k] { for (int i = 0; i < k; ++i) { @@ -7340,8 +7395,6 @@ namespace Catch { template <typename T, bool Destruct> struct ObjectStorage { - using TStorage = typename std::aligned_storage<sizeof(T), std::alignment_of<T>::value>::type; - ObjectStorage() : data() {} ObjectStorage(const ObjectStorage& other) @@ -7384,7 +7437,7 @@ namespace Catch { return *static_cast<T*>(static_cast<void*>(&data)); } - TStorage data; + struct { alignas(T) unsigned char data[sizeof(T)]; } data; }; } @@ -7425,23 +7478,37 @@ namespace TestCaseTracking { SourceLineInfo location; NameAndLocation( std::string const& _name, SourceLineInfo const& _location ); + friend bool operator==(NameAndLocation const& lhs, NameAndLocation const& rhs) { + return lhs.name == rhs.name + && lhs.location == rhs.location; + } }; - struct ITracker; + class ITracker; using ITrackerPtr = std::shared_ptr<ITracker>; - struct ITracker { - virtual ~ITracker(); + class ITracker { + NameAndLocation m_nameAndLocation; + + public: + ITracker(NameAndLocation const& nameAndLoc) : + m_nameAndLocation(nameAndLoc) + {} // static queries - virtual NameAndLocation const& nameAndLocation() const = 0; + NameAndLocation const& nameAndLocation() const { + return m_nameAndLocation; + } + + virtual ~ITracker(); // dynamic queries virtual bool isComplete() const = 0; // Successfully completed or failed virtual bool isSuccessfullyCompleted() const = 0; virtual bool isOpen() const = 0; // Started but not complete virtual bool hasChildren() const = 0; + virtual bool hasStarted() const = 0; virtual ITracker& parent() = 0; @@ -7496,7 +7563,6 @@ namespace TestCaseTracking { }; using Children = std::vector<ITrackerPtr>; - NameAndLocation m_nameAndLocation; TrackerContext& m_ctx; ITracker* m_parent; Children m_children; @@ -7505,11 +7571,13 @@ namespace TestCaseTracking { public: TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ); - NameAndLocation const& nameAndLocation() const override; bool isComplete() const override; bool isSuccessfullyCompleted() const override; bool isOpen() const override; bool hasChildren() const override; + bool hasStarted() const override { + return m_runState != NotStarted; + } void addChild( ITrackerPtr const& child ) override; @@ -7548,6 +7616,10 @@ namespace TestCaseTracking { void addInitialFilters( std::vector<std::string> const& filters ); void addNextFilters( std::vector<std::string> const& filters ); + //! Returns filters active in this tracker + std::vector<std::string> const& getFilters() const; + //! Returns whitespace-trimmed name of the tracked section + std::string const& trimmedName() const; }; } // namespace TestCaseTracking @@ -7713,7 +7785,7 @@ namespace Catch { double sb = stddev.point; double mn = mean.point / n; double mg_min = mn / 2.; - double sg = std::min(mg_min / 4., sb / std::sqrt(n)); + double sg = (std::min)(mg_min / 4., sb / std::sqrt(n)); double sg2 = sg * sg; double sb2 = sb * sb; @@ -7732,7 +7804,7 @@ namespace Catch { return (nc / n) * (sb2 - nc * sg2); }; - return std::min(var_out(1), var_out(std::min(c_max(0.), c_max(mg_min)))) / sb2; + return (std::min)(var_out(1), var_out((std::min)(c_max(0.), c_max(mg_min)))) / sb2; } bootstrap_analysis analyse_samples(double confidence_level, int n_resamples, std::vector<double>::iterator first, std::vector<double>::iterator last) { @@ -7872,13 +7944,11 @@ namespace Catch { #ifdef CATCH_PLATFORM_MAC - // taken from Catch v3.0.0-preview.3 #if defined(__i386__) || defined(__x86_64__) #define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */ #elif defined(__aarch64__) - #define CATCH_TRAP() __asm__(".inst 0xd4200000") + #define CATCH_TRAP() __asm__(".inst 0xd43e0000") #endif - // end taken from Catch v3.0.0-preview.3 #elif defined(CATCH_PLATFORM_IPHONE) @@ -7924,86 +7994,58 @@ namespace Catch { // start catch_fatal_condition.h -// start catch_windows_h_proxy.h - - -#if defined(CATCH_PLATFORM_WINDOWS) - -#if !defined(NOMINMAX) && !defined(CATCH_CONFIG_NO_NOMINMAX) -# define CATCH_DEFINED_NOMINMAX -# define NOMINMAX -#endif -#if !defined(WIN32_LEAN_AND_MEAN) && !defined(CATCH_CONFIG_NO_WIN32_LEAN_AND_MEAN) -# define CATCH_DEFINED_WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -#endif - -#ifdef __AFXDLL -#include <AfxWin.h> -#else -#include <windows.h> -#endif - -#ifdef CATCH_DEFINED_NOMINMAX -# undef NOMINMAX -#endif -#ifdef CATCH_DEFINED_WIN32_LEAN_AND_MEAN -# undef WIN32_LEAN_AND_MEAN -#endif - -#endif // defined(CATCH_PLATFORM_WINDOWS) - -// end catch_windows_h_proxy.h -#if defined( CATCH_CONFIG_WINDOWS_SEH ) +#include <cassert> namespace Catch { - struct FatalConditionHandler { - - static LONG CALLBACK handleVectoredException(PEXCEPTION_POINTERS ExceptionInfo); + // Wrapper for platform-specific fatal error (signals/SEH) handlers + // + // Tries to be cooperative with other handlers, and not step over + // other handlers. This means that unknown structured exceptions + // are passed on, previous signal handlers are called, and so on. + // + // Can only be instantiated once, and assumes that once a signal + // is caught, the binary will end up terminating. Thus, there + class FatalConditionHandler { + bool m_started = false; + + // Install/disengage implementation for specific platform. + // Should be if-defed to work on current platform, can assume + // engage-disengage 1:1 pairing. + void engage_platform(); + void disengage_platform(); + public: + // Should also have platform-specific implementations as needed FatalConditionHandler(); - static void reset(); ~FatalConditionHandler(); - private: - static bool isSet; - static ULONG guaranteeSize; - static PVOID exceptionHandlerHandle; - }; - -} // namespace Catch - -#elif defined ( CATCH_CONFIG_POSIX_SIGNALS ) - -#include <signal.h> - -namespace Catch { - - struct FatalConditionHandler { - - static bool isSet; - static struct sigaction oldSigActions[]; - static stack_t oldSigStack; - static char altStackMem[]; - - static void handleSignal( int sig ); + void engage() { + assert(!m_started && "Handler cannot be installed twice."); + m_started = true; + engage_platform(); + } - FatalConditionHandler(); - ~FatalConditionHandler(); - static void reset(); + void disengage() { + assert(m_started && "Handler cannot be uninstalled without being installed first"); + m_started = false; + disengage_platform(); + } }; -} // namespace Catch - -#else - -namespace Catch { - struct FatalConditionHandler { - void reset(); + //! Simple RAII guard for (dis)engaging the FatalConditionHandler + class FatalConditionHandlerGuard { + FatalConditionHandler* m_handler; + public: + FatalConditionHandlerGuard(FatalConditionHandler* handler): + m_handler(handler) { + m_handler->engage(); + } + ~FatalConditionHandlerGuard() { + m_handler->disengage(); + } }; -} -#endif +} // end namespace Catch // end catch_fatal_condition.h #include <string> @@ -8063,7 +8105,7 @@ namespace Catch { void sectionEnded( SectionEndInfo const& endInfo ) override; void sectionEndedEarly( SectionEndInfo const& endInfo ) override; - auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& override; + auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& override; #if defined(CATCH_CONFIG_ENABLE_BENCHMARKING) void benchmarkPreparing( std::string const& name ) override; @@ -8129,6 +8171,7 @@ namespace Catch { std::vector<SectionEndInfo> m_unfinishedSections; std::vector<ITracker*> m_activeSections; TrackerContext m_trackerContext; + FatalConditionHandler m_fatalConditionhandler; bool m_lastAssertionPassed = false; bool m_shouldReportUnexpected = true; bool m_includeSuccessfulResults; @@ -8368,7 +8411,6 @@ namespace Catch { #define CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH #undef CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH #endif - #if 0 // Disabled by Qt so that test failures are not line-broken #define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_CONFIG_CONSOLE_WIDTH-1 #endif @@ -9042,7 +9084,7 @@ namespace detail { } inline auto convertInto( std::string const &source, bool &target ) -> ParserResult { std::string srcLC = source; - std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( char c ) { return static_cast<char>( std::tolower(c) ); } ); + std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( unsigned char c ) { return static_cast<char>( std::tolower(c) ); } ); if (srcLC == "y" || srcLC == "1" || srcLC == "true" || srcLC == "yes" || srcLC == "on") target = true; else if (srcLC == "n" || srcLC == "0" || srcLC == "false" || srcLC == "no" || srcLC == "off") @@ -9811,6 +9853,9 @@ namespace Catch { | Opt( [&]( bool flag ) { config.showDurations = flag ? ShowDurations::Always : ShowDurations::Never; }, "yes|no" ) ["-d"]["--durations"] ( "show test durations" ) + | Opt( config.minDuration, "seconds" ) + ["-D"]["--min-duration"] + ( "show test durations for tests taking at least the given number of seconds" ) | Opt( loadTestNamesFromFile, "filename" ) ["-f"]["--input-file"] ( "load test names to run from a file" ) @@ -9958,6 +10003,7 @@ namespace Catch { bool Config::warnAboutMissingAssertions() const { return !!(m_data.warnings & WarnAbout::NoAssertions); } bool Config::warnAboutNoTests() const { return !!(m_data.warnings & WarnAbout::NoTests); } ShowDurations::OrNot Config::showDurations() const { return m_data.showDurations; } + double Config::minDuration() const { return m_data.minDuration; } RunTests::InWhatOrder Config::runOrder() const { return m_data.runOrder; } unsigned int Config::rngSeed() const { return m_data.rngSeed; } UseColour::YesOrNo Config::useColour() const { return m_data.useColour; } @@ -10000,6 +10046,36 @@ namespace Catch { } // end catch_errno_guard.h +// start catch_windows_h_proxy.h + + +#if defined(CATCH_PLATFORM_WINDOWS) + +#if !defined(NOMINMAX) && !defined(CATCH_CONFIG_NO_NOMINMAX) +# define CATCH_DEFINED_NOMINMAX +# define NOMINMAX +#endif +#if !defined(WIN32_LEAN_AND_MEAN) && !defined(CATCH_CONFIG_NO_WIN32_LEAN_AND_MEAN) +# define CATCH_DEFINED_WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif + +#ifdef __AFXDLL +#include <AfxWin.h> +#else +#include <windows.h> +#endif + +#ifdef CATCH_DEFINED_NOMINMAX +# undef NOMINMAX +#endif +#ifdef CATCH_DEFINED_WIN32_LEAN_AND_MEAN +# undef WIN32_LEAN_AND_MEAN +#endif + +#endif // defined(CATCH_PLATFORM_WINDOWS) + +// end catch_windows_h_proxy.h #include <sstream> namespace Catch { @@ -10322,8 +10398,7 @@ namespace Catch { #if defined(CATCH_PLATFORM_MAC) || defined(CATCH_PLATFORM_IPHONE) -# include <assert.h> -# include <stdbool.h> +# include <cassert> # include <sys/types.h> # include <unistd.h> # include <cstddef> @@ -10517,7 +10592,7 @@ namespace Catch { // Extracts the actual name part of an enum instance // In other words, it returns the Blue part of Bikeshed::Colour::Blue StringRef extractInstanceName(StringRef enumInstance) { - // Find last occurence of ":" + // Find last occurrence of ":" size_t name_start = enumInstance.size(); while (name_start > 0 && enumInstance[name_start - 1] != ':') { --name_start; @@ -10679,25 +10754,47 @@ namespace Catch { // end catch_exception_translator_registry.cpp // start catch_fatal_condition.cpp -#if defined(__GNUC__) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wmissing-field-initializers" -#endif +#include <algorithm> + +#if !defined( CATCH_CONFIG_WINDOWS_SEH ) && !defined( CATCH_CONFIG_POSIX_SIGNALS ) + +namespace Catch { + + // If neither SEH nor signal handling is required, the handler impls + // do not have to do anything, and can be empty. + void FatalConditionHandler::engage_platform() {} + void FatalConditionHandler::disengage_platform() {} + FatalConditionHandler::FatalConditionHandler() = default; + FatalConditionHandler::~FatalConditionHandler() = default; + +} // end namespace Catch + +#endif // !CATCH_CONFIG_WINDOWS_SEH && !CATCH_CONFIG_POSIX_SIGNALS + +#if defined( CATCH_CONFIG_WINDOWS_SEH ) && defined( CATCH_CONFIG_POSIX_SIGNALS ) +#error "Inconsistent configuration: Windows' SEH handling and POSIX signals cannot be enabled at the same time" +#endif // CATCH_CONFIG_WINDOWS_SEH && CATCH_CONFIG_POSIX_SIGNALS #if defined( CATCH_CONFIG_WINDOWS_SEH ) || defined( CATCH_CONFIG_POSIX_SIGNALS ) namespace { - // Report the error condition + //! Signals fatal error message to the run context void reportFatal( char const * const message ) { Catch::getCurrentContext().getResultCapture()->handleFatalErrorCondition( message ); } -} -#endif // signals/SEH handling + //! Minimal size Catch2 needs for its own fatal error handling. + //! Picked anecdotally, so it might not be sufficient on all + //! platforms, and for all configurations. + constexpr std::size_t minStackSizeForErrors = 32 * 1024; +} // end unnamed namespace + +#endif // CATCH_CONFIG_WINDOWS_SEH || CATCH_CONFIG_POSIX_SIGNALS #if defined( CATCH_CONFIG_WINDOWS_SEH ) namespace Catch { + struct SignalDefs { DWORD id; const char* name; }; // There is no 1-1 mapping between signals and windows exceptions. @@ -10710,7 +10807,7 @@ namespace Catch { { static_cast<DWORD>(EXCEPTION_INT_DIVIDE_BY_ZERO), "Divide by zero error" }, }; - LONG CALLBACK FatalConditionHandler::handleVectoredException(PEXCEPTION_POINTERS ExceptionInfo) { + static LONG CALLBACK handleVectoredException(PEXCEPTION_POINTERS ExceptionInfo) { for (auto const& def : signalDefs) { if (ExceptionInfo->ExceptionRecord->ExceptionCode == def.id) { reportFatal(def.name); @@ -10721,38 +10818,50 @@ namespace Catch { return EXCEPTION_CONTINUE_SEARCH; } + // Since we do not support multiple instantiations, we put these + // into global variables and rely on cleaning them up in outlined + // constructors/destructors + static PVOID exceptionHandlerHandle = nullptr; + + // For MSVC, we reserve part of the stack memory for handling + // memory overflow structured exception. FatalConditionHandler::FatalConditionHandler() { - isSet = true; - // 32k seems enough for Catch to handle stack overflow, - // but the value was found experimentally, so there is no strong guarantee - guaranteeSize = 32 * 1024; - exceptionHandlerHandle = nullptr; + ULONG guaranteeSize = static_cast<ULONG>(minStackSizeForErrors); + if (!SetThreadStackGuarantee(&guaranteeSize)) { + // We do not want to fully error out, because needing + // the stack reserve should be rare enough anyway. + Catch::cerr() + << "Failed to reserve piece of stack." + << " Stack overflows will not be reported successfully."; + } + } + + // We do not attempt to unset the stack guarantee, because + // Windows does not support lowering the stack size guarantee. + FatalConditionHandler::~FatalConditionHandler() = default; + + void FatalConditionHandler::engage_platform() { // Register as first handler in current chain exceptionHandlerHandle = AddVectoredExceptionHandler(1, handleVectoredException); - // Pass in guarantee size to be filled - SetThreadStackGuarantee(&guaranteeSize); + if (!exceptionHandlerHandle) { + CATCH_RUNTIME_ERROR("Could not register vectored exception handler"); + } } - void FatalConditionHandler::reset() { - if (isSet) { - RemoveVectoredExceptionHandler(exceptionHandlerHandle); - SetThreadStackGuarantee(&guaranteeSize); - exceptionHandlerHandle = nullptr; - isSet = false; + void FatalConditionHandler::disengage_platform() { + if (!RemoveVectoredExceptionHandler(exceptionHandlerHandle)) { + CATCH_RUNTIME_ERROR("Could not unregister vectored exception handler"); } + exceptionHandlerHandle = nullptr; } - FatalConditionHandler::~FatalConditionHandler() { - reset(); - } +} // end namespace Catch -bool FatalConditionHandler::isSet = false; -ULONG FatalConditionHandler::guaranteeSize = 0; -PVOID FatalConditionHandler::exceptionHandlerHandle = nullptr; +#endif // CATCH_CONFIG_WINDOWS_SEH -} // namespace Catch +#if defined( CATCH_CONFIG_POSIX_SIGNALS ) -#elif defined( CATCH_CONFIG_POSIX_SIGNALS ) +#include <signal.h> namespace Catch { @@ -10761,10 +10870,6 @@ namespace Catch { const char* name; }; - // 32kb for the alternate stack seems to be sufficient. However, this value - // is experimentally determined, so that's not guaranteed. - static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ; - static SignalDefs signalDefs[] = { { SIGINT, "SIGINT - Terminal interrupt signal" }, { SIGILL, "SIGILL - Illegal instruction signal" }, @@ -10774,7 +10879,32 @@ namespace Catch { { SIGABRT, "SIGABRT - Abort (abnormal termination) signal" } }; - void FatalConditionHandler::handleSignal( int sig ) { +// Older GCCs trigger -Wmissing-field-initializers for T foo = {} +// which is zero initialization, but not explicit. We want to avoid +// that. +#if defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wmissing-field-initializers" +#endif + + static char* altStackMem = nullptr; + static std::size_t altStackSize = 0; + static stack_t oldSigStack{}; + static struct sigaction oldSigActions[sizeof(signalDefs) / sizeof(SignalDefs)]{}; + + static void restorePreviousSignalHandlers() { + // We set signal handlers back to the previous ones. Hopefully + // nobody overwrote them in the meantime, and doesn't expect + // their signal handlers to live past ours given that they + // installed them after ours.. + for (std::size_t i = 0; i < sizeof(signalDefs) / sizeof(SignalDefs); ++i) { + sigaction(signalDefs[i].id, &oldSigActions[i], nullptr); + } + // Return the old stack + sigaltstack(&oldSigStack, nullptr); + } + + static void handleSignal( int sig ) { char const * name = "<unknown signal>"; for (auto const& def : signalDefs) { if (sig == def.id) { @@ -10782,16 +10912,33 @@ namespace Catch { break; } } - reset(); - reportFatal(name); + // We need to restore previous signal handlers and let them do + // their thing, so that the users can have the debugger break + // when a signal is raised, and so on. + restorePreviousSignalHandlers(); + reportFatal( name ); raise( sig ); } FatalConditionHandler::FatalConditionHandler() { - isSet = true; + assert(!altStackMem && "Cannot initialize POSIX signal handler when one already exists"); + if (altStackSize == 0) { + altStackSize = std::max(static_cast<size_t>(SIGSTKSZ), minStackSizeForErrors); + } + altStackMem = new char[altStackSize](); + } + + FatalConditionHandler::~FatalConditionHandler() { + delete[] altStackMem; + // We signal that another instance can be constructed by zeroing + // out the pointer. + altStackMem = nullptr; + } + + void FatalConditionHandler::engage_platform() { stack_t sigStack; sigStack.ss_sp = altStackMem; - sigStack.ss_size = sigStackSize; + sigStack.ss_size = altStackSize; sigStack.ss_flags = 0; sigaltstack(&sigStack, &oldSigStack); struct sigaction sa = { }; @@ -10803,40 +10950,17 @@ namespace Catch { } } - FatalConditionHandler::~FatalConditionHandler() { - reset(); - } +#if defined(__GNUC__) +# pragma GCC diagnostic pop +#endif - void FatalConditionHandler::reset() { - if( isSet ) { - // Set signals back to previous values -- hopefully nobody overwrote them in the meantime - for( std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i ) { - sigaction(signalDefs[i].id, &oldSigActions[i], nullptr); - } - // Return the old stack - sigaltstack(&oldSigStack, nullptr); - isSet = false; - } + void FatalConditionHandler::disengage_platform() { + restorePreviousSignalHandlers(); } - bool FatalConditionHandler::isSet = false; - struct sigaction FatalConditionHandler::oldSigActions[sizeof(signalDefs)/sizeof(SignalDefs)] = {}; - stack_t FatalConditionHandler::oldSigStack = {}; - char FatalConditionHandler::altStackMem[sigStackSize] = {}; - -} // namespace Catch - -#else - -namespace Catch { - void FatalConditionHandler::reset() {} -} - -#endif // signals/SEH handling +} // end namespace Catch -#if defined(__GNUC__) -# pragma GCC diagnostic pop -#endif +#endif // CATCH_CONFIG_POSIX_SIGNALS // end catch_fatal_condition.cpp // start catch_generators.cpp @@ -10855,8 +10979,8 @@ namespace Generators { GeneratorUntypedBase::~GeneratorUntypedBase() {} - auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& { - return getResultCapture().acquireGeneratorTracker( lineInfo ); + auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& { + return getResultCapture().acquireGeneratorTracker( generatorName, lineInfo ); } } // namespace Generators @@ -11391,7 +11515,8 @@ namespace { return lhs == rhs; } - auto ulpDiff = std::abs(lc - rc); + // static cast as a workaround for IBM XLC + auto ulpDiff = std::abs(static_cast<FP>(lc - rc)); return static_cast<uint64_t>(ulpDiff) <= maxUlpDiff; } @@ -11565,7 +11690,6 @@ Floating::WithinRelMatcher WithinRel(float target) { } // namespace Matchers } // namespace Catch - // end catch_matchers_floating.cpp // start catch_matchers_generic.cpp @@ -11743,10 +11867,10 @@ namespace Catch { Capturer::Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names ) { auto trimmed = [&] (size_t start, size_t end) { - while (names[start] == ',' || isspace(names[start])) { + while (names[start] == ',' || isspace(static_cast<unsigned char>(names[start]))) { ++start; } - while (names[end] == ',' || isspace(names[end])) { + while (names[end] == ',' || isspace(static_cast<unsigned char>(names[end]))) { --end; } return names.substr(start, end - start + 1); @@ -11981,7 +12105,7 @@ namespace Catch { if (tmpnam_s(m_buffer)) { CATCH_RUNTIME_ERROR("Could not get a temp filename"); } - if (fopen_s(&m_file, m_buffer, "w")) { + if (fopen_s(&m_file, m_buffer, "w+")) { char buffer[100]; if (strerror_s(buffer, errno)) { CATCH_RUNTIME_ERROR("Could not translate errno to a string"); @@ -12276,11 +12400,13 @@ namespace Catch { namespace Catch { class StartupExceptionRegistry { +#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) public: void add(std::exception_ptr const& exception) noexcept; std::vector<std::exception_ptr> const& getExceptions() const noexcept; private: std::vector<std::exception_ptr> m_exceptions; +#endif }; } // end namespace Catch @@ -12363,7 +12489,11 @@ namespace Catch { m_tagAliasRegistry.add( alias, tag, lineInfo ); } void registerStartupException() noexcept override { +#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) m_exceptionRegistry.add(std::current_exception()); +#else + CATCH_INTERNAL_ERROR("Attempted to register active exception under CATCH_CONFIG_DISABLE_EXCEPTIONS!"); +#endif } IMutableEnumValuesRegistry& getMutableEnumValuesRegistry() override { return m_enumValuesRegistry; @@ -12467,17 +12597,32 @@ namespace Catch { std::shared_ptr<GeneratorTracker> tracker; ITracker& currentTracker = ctx.currentTracker(); - if( TestCaseTracking::ITrackerPtr childTracker = currentTracker.findChild( nameAndLocation ) ) { + // Under specific circumstances, the generator we want + // to acquire is also the current tracker. If this is + // the case, we have to avoid looking through current + // tracker's children, and instead return the current + // tracker. + // A case where this check is important is e.g. + // for (int i = 0; i < 5; ++i) { + // int n = GENERATE(1, 2); + // } + // + // without it, the code above creates 5 nested generators. + if (currentTracker.nameAndLocation() == nameAndLocation) { + auto thisTracker = currentTracker.parent().findChild(nameAndLocation); + assert(thisTracker); + assert(thisTracker->isGeneratorTracker()); + tracker = std::static_pointer_cast<GeneratorTracker>(thisTracker); + } else if ( TestCaseTracking::ITrackerPtr childTracker = currentTracker.findChild( nameAndLocation ) ) { assert( childTracker ); assert( childTracker->isGeneratorTracker() ); tracker = std::static_pointer_cast<GeneratorTracker>( childTracker ); - } - else { + } else { tracker = std::make_shared<GeneratorTracker>( nameAndLocation, ctx, ¤tTracker ); currentTracker.addChild( tracker ); } - if( !ctx.completedCycle() && !tracker->isComplete() ) { + if( !tracker->isComplete() ) { tracker->open(); } @@ -12491,8 +12636,68 @@ namespace Catch { } void close() override { TrackerBase::close(); - // Generator interface only finds out if it has another item on atual move - if (m_runState == CompletedSuccessfully && m_generator->next()) { + // If a generator has a child (it is followed by a section) + // and none of its children have started, then we must wait + // until later to start consuming its values. + // This catches cases where `GENERATE` is placed between two + // `SECTION`s. + // **The check for m_children.empty cannot be removed**. + // doing so would break `GENERATE` _not_ followed by `SECTION`s. + const bool should_wait_for_child = [&]() { + // No children -> nobody to wait for + if ( m_children.empty() ) { + return false; + } + // If at least one child started executing, don't wait + if ( std::find_if( + m_children.begin(), + m_children.end(), + []( TestCaseTracking::ITrackerPtr tracker ) { + return tracker->hasStarted(); + } ) != m_children.end() ) { + return false; + } + + // No children have started. We need to check if they _can_ + // start, and thus we should wait for them, or they cannot + // start (due to filters), and we shouldn't wait for them + auto* parent = m_parent; + // This is safe: there is always at least one section + // tracker in a test case tracking tree + while ( !parent->isSectionTracker() ) { + parent = &( parent->parent() ); + } + assert( parent && + "Missing root (test case) level section" ); + + auto const& parentSection = + static_cast<SectionTracker&>( *parent ); + auto const& filters = parentSection.getFilters(); + // No filters -> no restrictions on running sections + if ( filters.empty() ) { + return true; + } + + for ( auto const& child : m_children ) { + if ( child->isSectionTracker() && + std::find( filters.begin(), + filters.end(), + static_cast<SectionTracker&>( *child ) + .trimmedName() ) != + filters.end() ) { + return true; + } + } + return false; + }(); + + // This check is a bit tricky, because m_generator->next() + // has a side-effect, where it consumes generator's current + // value, but we do not want to invoke the side-effect if + // this generator is still waiting for any child to start. + if ( should_wait_for_child || + ( m_runState == CompletedSuccessfully && + m_generator->next() ) ) { m_children.clear(); m_runState = Executing; } @@ -12628,10 +12833,10 @@ namespace Catch { return true; } - auto RunContext::acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& { + auto RunContext::acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& { using namespace Generators; - GeneratorTracker& tracker = GeneratorTracker::acquire( m_trackerContext, TestCaseTracking::NameAndLocation( "generator", lineInfo ) ); - assert( tracker.isOpen() ); + GeneratorTracker& tracker = GeneratorTracker::acquire(m_trackerContext, + TestCaseTracking::NameAndLocation( static_cast<std::string>(generatorName), lineInfo ) ); m_lastAssertionInfo.lineInfo = lineInfo; return tracker; } @@ -12674,17 +12879,17 @@ namespace Catch { #if defined(CATCH_CONFIG_ENABLE_BENCHMARKING) void RunContext::benchmarkPreparing(std::string const& name) { - m_reporter->benchmarkPreparing(name); - } + m_reporter->benchmarkPreparing(name); + } void RunContext::benchmarkStarting( BenchmarkInfo const& info ) { m_reporter->benchmarkStarting( info ); } void RunContext::benchmarkEnded( BenchmarkStats<> const& stats ) { m_reporter->benchmarkEnded( stats ); } - void RunContext::benchmarkFailed(std::string const & error) { - m_reporter->benchmarkFailed(error); - } + void RunContext::benchmarkFailed(std::string const & error) { + m_reporter->benchmarkFailed(error); + } #endif // CATCH_CONFIG_ENABLE_BENCHMARKING void RunContext::pushScopedMessage(MessageInfo const & message) { @@ -12818,9 +13023,8 @@ namespace Catch { } void RunContext::invokeActiveTestCase() { - FatalConditionHandler fatalConditionHandler; // Handle signals + FatalConditionHandlerGuard _(&m_fatalConditionhandler); m_activeTestCase->invoke(); - fatalConditionHandler.reset(); } void RunContext::handleUnfinishedSections() { @@ -13188,6 +13392,10 @@ namespace Catch { filename.erase(0, lastSlash); filename[0] = '#'; } + else + { + filename.insert(0, "#"); + } auto lastDot = filename.find_last_of('.'); if (lastDot != std::string::npos) { @@ -13350,7 +13558,7 @@ namespace Catch { // Handle list request if( Option<std::size_t> listed = list( m_config ) ) - return static_cast<int>( *listed ); + return (std::min) (MaxExitCode, static_cast<int>(*listed)); TestGroup tests { m_config }; auto const totals = tests.execute(); @@ -13405,6 +13613,7 @@ namespace Catch { // end catch_singletons.cpp // start catch_startup_exception_registry.cpp +#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) namespace Catch { void StartupExceptionRegistry::add( std::exception_ptr const& exception ) noexcept { CATCH_TRY { @@ -13420,6 +13629,7 @@ void StartupExceptionRegistry::add( std::exception_ptr const& exception ) noexce } } // end namespace Catch +#endif // end catch_startup_exception_registry.cpp // start catch_stream.cpp @@ -13604,7 +13814,7 @@ namespace Catch { namespace { char toLowerCh(char c) { - return static_cast<char>( std::tolower( c ) ); + return static_cast<char>( std::tolower( static_cast<unsigned char>(c) ) ); } } @@ -13980,27 +14190,81 @@ namespace Catch { // end catch_test_case_info.cpp // start catch_test_case_registry_impl.cpp +#include <algorithm> #include <sstream> namespace Catch { - std::vector<TestCase> sortTests( IConfig const& config, std::vector<TestCase> const& unsortedTestCases ) { + namespace { + struct TestHasher { + using hash_t = uint64_t; + + explicit TestHasher( hash_t hashSuffix ): + m_hashSuffix{ hashSuffix } {} + + uint32_t operator()( TestCase const& t ) const { + // FNV-1a hash with multiplication fold. + const hash_t prime = 1099511628211u; + hash_t hash = 14695981039346656037u; + for ( const char c : t.name ) { + hash ^= c; + hash *= prime; + } + hash ^= m_hashSuffix; + hash *= prime; + const uint32_t low{ static_cast<uint32_t>( hash ) }; + const uint32_t high{ static_cast<uint32_t>( hash >> 32 ) }; + return low * high; + } - std::vector<TestCase> sorted = unsortedTestCases; + private: + hash_t m_hashSuffix; + }; + } // end unnamed namespace + std::vector<TestCase> sortTests( IConfig const& config, std::vector<TestCase> const& unsortedTestCases ) { switch( config.runOrder() ) { - case RunTests::InLexicographicalOrder: - std::sort( sorted.begin(), sorted.end() ); - break; - case RunTests::InRandomOrder: - seedRng( config ); - std::shuffle( sorted.begin(), sorted.end(), rng() ); - break; case RunTests::InDeclarationOrder: // already in declaration order break; + + case RunTests::InLexicographicalOrder: { + std::vector<TestCase> sorted = unsortedTestCases; + std::sort( sorted.begin(), sorted.end() ); + return sorted; + } + + case RunTests::InRandomOrder: { + seedRng( config ); + TestHasher h{ config.rngSeed() }; + + using hashedTest = std::pair<TestHasher::hash_t, TestCase const*>; + std::vector<hashedTest> indexed_tests; + indexed_tests.reserve( unsortedTestCases.size() ); + + for (auto const& testCase : unsortedTestCases) { + indexed_tests.emplace_back(h(testCase), &testCase); + } + + std::sort(indexed_tests.begin(), indexed_tests.end(), + [](hashedTest const& lhs, hashedTest const& rhs) { + if (lhs.first == rhs.first) { + return lhs.second->name < rhs.second->name; + } + return lhs.first < rhs.first; + }); + + std::vector<TestCase> sorted; + sorted.reserve( indexed_tests.size() ); + + for (auto const& hashed : indexed_tests) { + sorted.emplace_back(*hashed.second); + } + + return sorted; + } } - return sorted; + return unsortedTestCases; } bool isThrowSafe( TestCase const& testCase, IConfig const& config ) { @@ -14137,15 +14401,12 @@ namespace TestCaseTracking { m_currentTracker = tracker; } - TrackerBase::TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ) - : m_nameAndLocation( nameAndLocation ), + TrackerBase::TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ): + ITracker(nameAndLocation), m_ctx( ctx ), m_parent( parent ) {} - NameAndLocation const& TrackerBase::nameAndLocation() const { - return m_nameAndLocation; - } bool TrackerBase::isComplete() const { return m_runState == CompletedSuccessfully || m_runState == Failed; } @@ -14261,7 +14522,8 @@ namespace TestCaseTracking { bool SectionTracker::isComplete() const { bool complete = true; - if ((m_filters.empty() || m_filters[0] == "") + if (m_filters.empty() + || m_filters[0] == "" || std::find(m_filters.begin(), m_filters.end(), m_trimmed_name) != m_filters.end()) { complete = TrackerBase::isComplete(); } @@ -14306,6 +14568,14 @@ namespace TestCaseTracking { m_filters.insert( m_filters.end(), filters.begin()+1, filters.end() ); } + std::vector<std::string> const& SectionTracker::getFilters() const { + return m_filters; + } + + std::string const& SectionTracker::trimmedName() const { + return m_trimmed_name; + } + } // namespace TestCaseTracking using TestCaseTracking::ITracker; @@ -14594,6 +14864,7 @@ namespace Catch { m_pos = m_arg.size(); m_substring.clear(); m_patternName.clear(); + m_realPatternPos = 0; return false; } endMode(); @@ -14612,6 +14883,7 @@ namespace Catch { } m_patternName.clear(); + m_realPatternPos = 0; return token; } @@ -15038,11 +15310,48 @@ namespace Catch { // end catch_totals.cpp // start catch_uncaught_exceptions.cpp +// start catch_config_uncaught_exceptions.hpp + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#ifndef CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP +#define CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP + +#if defined(_MSC_VER) +# if _MSC_VER >= 1900 // Visual Studio 2015 or newer +# define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS +# endif +#endif + +#include <exception> + +#if defined(__cpp_lib_uncaught_exceptions) \ + && !defined(CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) + +# define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS +#endif // __cpp_lib_uncaught_exceptions + +#if defined(CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) \ + && !defined(CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS) \ + && !defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) + +# define CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS +#endif + +#endif // CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP +// end catch_config_uncaught_exceptions.hpp #include <exception> namespace Catch { bool uncaught_exceptions() { -#if defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) +#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) + return false; +#elif defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) return std::uncaught_exceptions() > 0; #else return std::uncaught_exception(); @@ -15082,7 +15391,7 @@ namespace Catch { } Version const& libraryVersion() { - static Version version( 2, 11, 3, "", 0 ); + static Version version( 2, 13, 10, "", 0 ); return version; } @@ -15484,6 +15793,17 @@ namespace Catch { return std::string(buffer); } + bool shouldShowDuration( IConfig const& config, double duration ) { + if ( config.showDurations() == ShowDurations::Always ) { + return true; + } + if ( config.showDurations() == ShowDurations::Never ) { + return false; + } + const double min = config.minDuration(); + return min >= 0 && duration >= min; + } + std::string serializeFilters( std::vector<std::string> const& container ) { ReusableStringStream oss; bool first = true; @@ -15750,10 +16070,6 @@ private: return "Reports test results on a single line, suitable for IDEs"; } - ReporterPreferences CompactReporter::getPreferences() const { - return m_reporterPrefs; - } - void CompactReporter::noMatchingTestCases( std::string const& spec ) { stream << "No test cases matched '" << spec << '\'' << std::endl; } @@ -15780,8 +16096,9 @@ private: } void CompactReporter::sectionEnded(SectionStats const& _sectionStats) { - if (m_config->showDurations() == ShowDurations::Always) { - stream << getFormattedDuration(_sectionStats.durationInSeconds) << " s: " << _sectionStats.sectionInfo.name << std::endl; + double dur = _sectionStats.durationInSeconds; + if ( shouldShowDuration( *m_config, dur ) ) { + stream << getFormattedDuration( dur ) << " s: " << _sectionStats.sectionInfo.name << std::endl; } } @@ -16145,7 +16462,7 @@ ConsoleReporter::ConsoleReporter(ReporterConfig const& config) else { return{ - { "benchmark name", CATCH_CONFIG_CONSOLE_WIDTH - 32, ColumnInfo::Left }, + { "benchmark name", CATCH_CONFIG_CONSOLE_WIDTH - 43, ColumnInfo::Left }, { "samples mean std dev", 14, ColumnInfo::Right }, { "iterations low mean low std dev", 14, ColumnInfo::Right }, { "estimated high mean high std dev", 14, ColumnInfo::Right } @@ -16201,8 +16518,9 @@ void ConsoleReporter::sectionEnded(SectionStats const& _sectionStats) { stream << "\nNo assertions in test case"; stream << " '" << _sectionStats.sectionInfo.name << "'\n" << std::endl; } - if (m_config->showDurations() == ShowDurations::Always) { - stream << getFormattedDuration(_sectionStats.durationInSeconds) << " s: " << _sectionStats.sectionInfo.name << std::endl; + double dur = _sectionStats.durationInSeconds; + if (shouldShowDuration(*m_config, dur)) { + stream << getFormattedDuration(dur) << " s: " << _sectionStats.sectionInfo.name << std::endl; } if (m_headerPrinted) { m_headerPrinted = false; @@ -16486,6 +16804,7 @@ CATCH_REGISTER_REPORTER("console", ConsoleReporter) #include <sstream> #include <ctime> #include <algorithm> +#include <iomanip> namespace Catch { @@ -16513,7 +16832,7 @@ namespace Catch { #else std::strftime(timeStamp, timeStampSize, fmt, timeInfo); #endif - return std::string(timeStamp); + return std::string(timeStamp, timeStampSize-1); } std::string fileNameTag(const std::vector<std::string> &tags) { @@ -16524,6 +16843,17 @@ namespace Catch { return it->substr(1); return std::string(); } + + // Formats the duration in seconds to 3 decimal places. + // This is done because some genius defined Maven Surefire schema + // in a way that only accepts 3 decimal places, and tools like + // Jenkins use that schema for validation JUnit reporter output. + std::string formatDuration( double seconds ) { + ReusableStringStream rss; + rss << std::fixed << std::setprecision( 3 ) << seconds; + return rss.str(); + } + } // anonymous namespace JunitReporter::JunitReporter( ReporterConfig const& _config ) @@ -16593,7 +16923,7 @@ namespace Catch { if( m_config->showDurations() == ShowDurations::Never ) xml.writeAttribute( "time", "" ); else - xml.writeAttribute( "time", suiteTime ); + xml.writeAttribute( "time", formatDuration( suiteTime ) ); xml.writeAttribute( "timestamp", getCurrentTimestamp() ); // Write properties if there are any @@ -16638,12 +16968,13 @@ namespace Catch { if ( !m_config->name().empty() ) className = m_config->name() + "." + className; - writeSection( className, "", rootSection ); + writeSection( className, "", rootSection, stats.testInfo.okToFail() ); } - void JunitReporter::writeSection( std::string const& className, - std::string const& rootName, - SectionNode const& sectionNode ) { + void JunitReporter::writeSection( std::string const& className, + std::string const& rootName, + SectionNode const& sectionNode, + bool testOkToFail) { std::string name = trim( sectionNode.stats.sectionInfo.name ); if( !rootName.empty() ) name = rootName + '/' + name; @@ -16660,7 +16991,17 @@ namespace Catch { xml.writeAttribute( "classname", className ); xml.writeAttribute( "name", name ); } - xml.writeAttribute( "time", ::Catch::Detail::stringify( sectionNode.stats.durationInSeconds ) ); + xml.writeAttribute( "time", formatDuration( sectionNode.stats.durationInSeconds ) ); + // This is not ideal, but it should be enough to mimic gtest's + // junit output. + // Ideally the JUnit reporter would also handle `skipTest` + // events and write those out appropriately. + xml.writeAttribute( "status", "run" ); + + if (sectionNode.stats.assertions.failedButOk) { + xml.scopedElement("skipped") + .writeAttribute("message", "TEST_CASE tagged with !mayfail"); + } writeAssertions( sectionNode ); @@ -16671,9 +17012,9 @@ namespace Catch { } for( auto const& childNode : sectionNode.childSections ) if( className.empty() ) - writeSection( name, "", *childNode ); + writeSection( name, "", *childNode, testOkToFail ); else - writeSection( className, name, *childNode ); + writeSection( className, name, *childNode, testOkToFail ); } void JunitReporter::writeAssertions( SectionNode const& sectionNode ) { @@ -17095,6 +17436,10 @@ namespace Catch { .writeAttribute( "successes", testGroupStats.totals.assertions.passed ) .writeAttribute( "failures", testGroupStats.totals.assertions.failed ) .writeAttribute( "expectedFailures", testGroupStats.totals.assertions.failedButOk ); + m_xml.scopedElement( "OverallResultsCases") + .writeAttribute( "successes", testGroupStats.totals.testCases.passed ) + .writeAttribute( "failures", testGroupStats.totals.testCases.failed ) + .writeAttribute( "expectedFailures", testGroupStats.totals.testCases.failedButOk ); m_xml.endElement(); } @@ -17104,6 +17449,10 @@ namespace Catch { .writeAttribute( "successes", testRunStats.totals.assertions.passed ) .writeAttribute( "failures", testRunStats.totals.assertions.failed ) .writeAttribute( "expectedFailures", testRunStats.totals.assertions.failedButOk ); + m_xml.scopedElement( "OverallResultsCases") + .writeAttribute( "successes", testRunStats.totals.testCases.passed ) + .writeAttribute( "failures", testRunStats.totals.testCases.failed ) + .writeAttribute( "expectedFailures", testRunStats.totals.testCases.failedButOk ); m_xml.endElement(); } @@ -17177,12 +17526,20 @@ namespace Catch { #ifndef __OBJC__ +#ifndef CATCH_INTERNAL_CDECL +#ifdef _MSC_VER +#define CATCH_INTERNAL_CDECL __cdecl +#else +#define CATCH_INTERNAL_CDECL +#endif +#endif + #if defined(CATCH_CONFIG_WCHAR) && defined(CATCH_PLATFORM_WINDOWS) && defined(_UNICODE) && !defined(DO_NOT_USE_WMAIN) // Standard C/C++ Win32 Unicode wmain entry point -extern "C" int wmain (int argc, wchar_t * argv[], wchar_t * []) { +extern "C" int CATCH_INTERNAL_CDECL wmain (int argc, wchar_t * argv[], wchar_t * []) { #else // Standard C/C++ main entry point -int main (int argc, char * argv[]) { +int CATCH_INTERNAL_CDECL main (int argc, char * argv[]) { #endif return Catch::Session().run( argc, argv ); @@ -17310,9 +17667,9 @@ int main (int argc, char * const argv[]) { #if defined(CATCH_CONFIG_ENABLE_BENCHMARKING) #define CATCH_BENCHMARK(...) \ - INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(____C_A_T_C_H____B_E_N_C_H____), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,)) + INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(C_A_T_C_H_B_E_N_C_H_), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,)) #define CATCH_BENCHMARK_ADVANCED(name) \ - INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(____C_A_T_C_H____B_E_N_C_H____), name) + INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(C_A_T_C_H_B_E_N_C_H_), name) #endif // CATCH_CONFIG_ENABLE_BENCHMARKING // If CATCH_CONFIG_PREFIX_ALL is not defined then the CATCH_ prefix is not required @@ -17414,9 +17771,9 @@ int main (int argc, char * const argv[]) { #if defined(CATCH_CONFIG_ENABLE_BENCHMARKING) #define BENCHMARK(...) \ - INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(____C_A_T_C_H____B_E_N_C_H____), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,)) + INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(C_A_T_C_H_B_E_N_C_H_), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,)) #define BENCHMARK_ADVANCED(name) \ - INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(____C_A_T_C_H____B_E_N_C_H____), name) + INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(C_A_T_C_H_B_E_N_C_H_), name) #endif // CATCH_CONFIG_ENABLE_BENCHMARKING using Catch::Detail::Approx; @@ -17463,8 +17820,8 @@ using Catch::Detail::Approx; #define CATCH_WARN( msg ) (void)(0) #define CATCH_CAPTURE( msg ) (void)(0) -#define CATCH_TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) -#define CATCH_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) +#define CATCH_TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ )) +#define CATCH_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ )) #define CATCH_METHOD_AS_TEST_CASE( method, ... ) #define CATCH_REGISTER_TEST_CASE( Function, ... ) (void)(0) #define CATCH_SECTION( ... ) @@ -17473,7 +17830,7 @@ using Catch::Detail::Approx; #define CATCH_FAIL_CHECK( ... ) (void)(0) #define CATCH_SUCCEED( ... ) (void)(0) -#define CATCH_ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) +#define CATCH_ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ )) #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__) @@ -17496,8 +17853,8 @@ using Catch::Detail::Approx; #endif // "BDD-style" convenience wrappers -#define CATCH_SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) -#define CATCH_SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), className ) +#define CATCH_SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ )) +#define CATCH_SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ), className ) #define CATCH_GIVEN( desc ) #define CATCH_AND_GIVEN( desc ) #define CATCH_WHEN( desc ) @@ -17545,10 +17902,10 @@ using Catch::Detail::Approx; #define INFO( msg ) (void)(0) #define UNSCOPED_INFO( msg ) (void)(0) #define WARN( msg ) (void)(0) -#define CAPTURE( msg ) (void)(0) +#define CAPTURE( ... ) (void)(0) -#define TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) -#define TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) +#define TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ )) +#define TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ )) #define METHOD_AS_TEST_CASE( method, ... ) #define REGISTER_TEST_CASE( Function, ... ) (void)(0) #define SECTION( ... ) @@ -17556,7 +17913,7 @@ using Catch::Detail::Approx; #define FAIL( ... ) (void)(0) #define FAIL_CHECK( ... ) (void)(0) #define SUCCEED( ... ) (void)(0) -#define ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) +#define ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ )) #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__) @@ -17586,8 +17943,8 @@ using Catch::Detail::Approx; #define CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION_NO_REG( INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator ), signature ) // "BDD-style" convenience wrappers -#define SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ) ) -#define SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), className ) +#define SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ) ) +#define SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ), className ) #define GIVEN( desc ) #define AND_GIVEN( desc ) diff --git a/tests/auto/testlib/selftests/cmptest/CMakeLists.txt b/tests/auto/testlib/selftests/cmptest/CMakeLists.txt index b5522fe4bb..67700db36e 100644 --- a/tests/auto/testlib/selftests/cmptest/CMakeLists.txt +++ b/tests/auto/testlib/selftests/cmptest/CMakeLists.txt @@ -1,15 +1,17 @@ -# Generated from cmptest.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## cmptest Binary: ##################################################################### qt_internal_add_executable(cmptest - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_cmptest.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) @@ -17,10 +19,8 @@ qt_internal_add_executable(cmptest ##################################################################### qt_internal_extend_target(cmptest CONDITION TARGET Qt::Gui - PUBLIC_LIBRARIES + LIBRARIES Qt::Gui ) -# special case begin qt_internal_apply_testlib_coverage_options(cmptest) -# special case end diff --git a/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp b/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp index 1df139c3f2..36e355c614 100644 --- a/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp +++ b/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp @@ -1,42 +1,21 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only - -#include <QtCore/QCoreApplication> #include <QTest> +#include <QtCore/QCoreApplication> +#include <QtCore/QTimer> #ifdef QT_GUI_LIB #include <QtGui/QColor> #include <QtGui/QImage> +#include <QtGui/QPalette> #include <QtGui/QPixmap> #include <QtGui/QVector2D> #include <QtGui/QVector3D> #include <QtGui/QVector4D> #endif +#include <QSet> +#include <vector> +using namespace Qt::StringLiterals; /* XPM test data for QPixmap, QImage tests (use drag cursors as example) */ @@ -139,6 +118,8 @@ private slots: void compare_pointerfuncs(); void compare_tostring(); void compare_tostring_data(); + void compare_unknown(); + void compare_textFromDebug(); void compareQObjects(); void compareQStringLists(); void compareQStringLists_data(); @@ -149,6 +130,7 @@ private slots: void compareQListIntToInitializerList_data(); void compareQListIntToInitializerList(); void compareQListDouble(); + void compareContainerToInitializerList(); #ifdef QT_GUI_LIB void compareQColor_data(); void compareQColor(); @@ -161,7 +143,10 @@ private slots: void compareQVector2D(); void compareQVector3D(); void compareQVector4D(); + void compareQPalettes_data(); + void compareQPalettes(); #endif + void tryCompare(); void verify(); void verify2(); void tryVerify(); @@ -348,6 +333,40 @@ void tst_Cmptest::compare_tostring() QCOMPARE(actual, expected); } +struct UnknownType +{ + int value; + bool operator==(const UnknownType &rhs) const { return value == rhs.value; } +}; + +void tst_Cmptest::compare_unknown() +{ + UnknownType a{1}; + UnknownType b{2}; + + QCOMPARE(a, b); +} + +struct CustomType +{ + int value; + bool operator==(const CustomType &rhs) const { return value == rhs.value; } +}; + +QDebug operator<<(QDebug dbg, const CustomType &val) +{ + dbg << "QDebug stream: " << val.value; + return dbg; +} + +void tst_Cmptest::compare_textFromDebug() +{ + CustomType a{0}; + CustomType b{1}; + + QCOMPARE(a, b); +} + void tst_Cmptest::compareQStringLists_data() { QTest::addColumn<QStringList>("opA"); @@ -493,6 +512,24 @@ void tst_Cmptest::compareQListDouble() QCOMPARE(double1, double2); } +void tst_Cmptest::compareContainerToInitializerList() +{ + // Protect ',' in the list +#define ARG(...) __VA_ARGS__ + QSet<int> set{1, 2, 3}; + QCOMPARE(set, ARG({1, 2, 3})); + + std::vector<int> vec{1, 2, 3}; + QCOMPARE(vec, ARG({1, 2, 3})); + + vec.clear(); + QCOMPARE(vec, {}); + + vec.push_back(42); + QCOMPARE(vec, {42}); +#undef ARG +} + #ifdef QT_GUI_LIB void tst_Cmptest::compareQColor_data() { @@ -619,6 +656,54 @@ void tst_Cmptest::compareQVector4D() v4b.setY(3); QCOMPARE(v4a, v4b); } + +void tst_Cmptest::compareQPalettes_data() +{ + QTest::addColumn<QPalette>("actualPalette"); + QTest::addColumn<QPalette>("expectedPalette"); + + // Initialize both to black, as the default palette values change + // depending on whether the test is run directly from a shell + // vs through generate_expected_output.py. We're not testing + // the defaults, we're testing that the full output is printed + // (QTBUG-5903 and QTBUG-87039). + QPalette actualPalette; + for (int i = 0; i < QPalette::NColorRoles; ++i) { + const auto role = QPalette::ColorRole(i); + actualPalette.setColor(QPalette::All, role, QColorConstants::Black); + } + QPalette expectedPalette; + for (int i = 0; i < QPalette::NColorRoles; ++i) { + const auto role = QPalette::ColorRole(i); + expectedPalette.setColor(QPalette::All, role, QColorConstants::Black); + } + + for (int i = 0; i < QPalette::NColorRoles; ++i) { + const auto role = QPalette::ColorRole(i); + const auto color = QColor::fromRgb(i); + actualPalette.setColor(role, color); + } + QTest::newRow("all roles are different") << actualPalette << expectedPalette; + + for (int i = 0; i < QPalette::NColorRoles - 1; ++i) { + const auto role = QPalette::ColorRole(i); + const auto color = QColor::fromRgb(i); + expectedPalette.setColor(role, color); + } + QTest::newRow("one role is different") << actualPalette << expectedPalette; + + const auto lastRole = QPalette::ColorRole(QPalette::NColorRoles - 1); + expectedPalette.setColor(lastRole, QColor::fromRgb(lastRole)); + QTest::newRow("all roles are the same") << actualPalette << expectedPalette; +} + +void tst_Cmptest::compareQPalettes() +{ + QFETCH(QPalette, actualPalette); + QFETCH(QPalette, expectedPalette); + + QCOMPARE(actualPalette, expectedPalette); +} #endif // QT_GUI_LIB static int opaqueFunc() @@ -635,19 +720,94 @@ void tst_Cmptest::verify() void tst_Cmptest::verify2() { QVERIFY2(opaqueFunc() > 2, QByteArray::number(opaqueFunc()).constData()); - QVERIFY2(opaqueFunc() < 2, QByteArray::number(opaqueFunc()).constData()); + QVERIFY2(opaqueFunc() < 2, + // Message with parenthetical part, to catch mis-parses of the + // resulting message: + u"%1 >= 2 (as expected, in fact)"_s.arg(opaqueFunc()).toUtf8().constData()); +} + +class DeferredFlag : public QObject // Can't be const. +{ + Q_OBJECT + bool m_flag; +public: + // A boolean that either starts out true or decays to true after 50 ms. + // However, that decay will only happen when the event loop is run. + explicit DeferredFlag(bool initial = false) : m_flag(initial) + { + if (!initial) + QTimer::singleShot(50, this, &DeferredFlag::onTimeOut); + } + explicit operator bool() const { return m_flag; } + bool operator!() const { return !m_flag; } + friend bool operator==(const DeferredFlag &a, const DeferredFlag &b) + { + return bool(a) == bool(b); + } +public slots: + void onTimeOut() { m_flag = true; } +}; + +char *toString(const DeferredFlag &val) +{ + return qstrdup(bool(val) ? "DeferredFlag(true)" : "DeferredFlag(false)"); +} + +void tst_Cmptest::tryCompare() +{ + /* Note that expected values given as DeferredFlag() shall be re-evaluated + each time the comparison is checked, hence supply a fresh false instance, + that'll be discarded before it has a chance to decay, hence only compare + equal to a false instance. Do not replace them with a local variable + initialized to false, as it would (of course) decay. + */ + DeferredFlag trueAlready(true); + { + DeferredFlag c; + // QTRY should check before looping, so be equal to the fresh false immediately. + QTRY_COMPARE(c, DeferredFlag()); + // Given time, it'll end up equal to a true one. + QTRY_COMPARE(c, trueAlready); + } + { + DeferredFlag c; + QTRY_COMPARE_WITH_TIMEOUT(c, DeferredFlag(), 300ms); + QVERIFY(!c); // Instantly equal, so succeeded without delay. + QTRY_COMPARE_WITH_TIMEOUT(c, trueAlready, 1s); + qInfo("Should now time out and fail"); + QTRY_COMPARE_WITH_TIMEOUT(c, DeferredFlag(), 200); + } } void tst_Cmptest::tryVerify() { - QTRY_VERIFY(opaqueFunc() > 2); - QTRY_VERIFY_WITH_TIMEOUT(opaqueFunc() < 2, 1); + { + DeferredFlag c; + QTRY_VERIFY(!c); + QTRY_VERIFY(c); + } + { + DeferredFlag c; + QTRY_VERIFY_WITH_TIMEOUT(!c, 300ms); + QTRY_VERIFY_WITH_TIMEOUT(c, 200); + qInfo("Should now time out and fail"); + QTRY_VERIFY_WITH_TIMEOUT(!c, 200); + } } void tst_Cmptest::tryVerify2() { - QTRY_VERIFY2(opaqueFunc() > 2, QByteArray::number(opaqueFunc()).constData()); - QTRY_VERIFY2_WITH_TIMEOUT(opaqueFunc() < 2, QByteArray::number(opaqueFunc()).constData(), 1); + { + DeferredFlag c; + QTRY_VERIFY2(!c, "Failed to check before looping"); + QTRY_VERIFY2(c, "Failed to trigger single-shot"); + } + { + DeferredFlag c; + QTRY_VERIFY2_WITH_TIMEOUT(!c, "Failed to check before looping", 300ms); + QTRY_VERIFY2_WITH_TIMEOUT(c, "Failed to trigger single-shot", 200); + QTRY_VERIFY2_WITH_TIMEOUT(!c, "Should time out and fail", 200); + } } void tst_Cmptest::verifyExplicitOperatorBool() diff --git a/tests/auto/testlib/selftests/commandlinedata/CMakeLists.txt b/tests/auto/testlib/selftests/commandlinedata/CMakeLists.txt index ce5847db93..c563f9919a 100644 --- a/tests/auto/testlib/selftests/commandlinedata/CMakeLists.txt +++ b/tests/auto/testlib/selftests/commandlinedata/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from commandlinedata.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## commandlinedata Binary: ##################################################################### qt_internal_add_executable(commandlinedata - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_commandlinedata.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(commandlinedata) -# special case end diff --git a/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp b/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp index 9759436ef9..c895ae4ed8 100644 --- a/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp +++ b/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> diff --git a/tests/auto/testlib/selftests/counting/CMakeLists.txt b/tests/auto/testlib/selftests/counting/CMakeLists.txt index bbcd3543d1..58fa751477 100644 --- a/tests/auto/testlib/selftests/counting/CMakeLists.txt +++ b/tests/auto/testlib/selftests/counting/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from counting.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## counting Binary: ##################################################################### qt_internal_add_executable(counting - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_counting.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(counting) -# special case end diff --git a/tests/auto/testlib/selftests/counting/tst_counting.cpp b/tests/auto/testlib/selftests/counting/tst_counting.cpp index 69cfc91b40..d521ea0238 100644 --- a/tests/auto/testlib/selftests/counting/tst_counting.cpp +++ b/tests/auto/testlib/selftests/counting/tst_counting.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> #include <QTest> diff --git a/tests/auto/testlib/selftests/crashes/CMakeLists.txt b/tests/auto/testlib/selftests/crashes/CMakeLists.txt index c09049a933..c11bab90d0 100644 --- a/tests/auto/testlib/selftests/crashes/CMakeLists.txt +++ b/tests/auto/testlib/selftests/crashes/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from crashes.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## crashes Binary: ##################################################################### qt_internal_add_executable(crashes - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_crashes.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(crashes) -# special case end diff --git a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp index 99f7ad4137..4ba8a426e6 100644 --- a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp +++ b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> @@ -32,6 +7,8 @@ #ifdef Q_OS_WIN #include <qt_windows.h> +#else +#include <sys/resource.h> #endif class tst_Crashes: public QObject @@ -47,6 +24,12 @@ void tst_Crashes::crash() #if defined(Q_OS_WIN) //we avoid the error dialogbox to appear on windows SetErrorMode( SEM_NOGPFAULTERRORBOX | SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); +#elif defined(RLIMIT_CORE) + // Unix: set our core dump limit to zero to request no dialogs. + if (struct rlimit rlim; getrlimit(RLIMIT_CORE, &rlim) == 0) { + rlim.rlim_cur = 0; + setrlimit(RLIMIT_CORE, &rlim); + } #endif /* We deliberately dereference an invalid but non-zero address; @@ -55,7 +38,11 @@ void tst_Crashes::crash() rather than SIGSEGV). */ int *i = 0; + +QT_WARNING_PUSH +QT_WARNING_DISABLE_GCC("-Warray-bounds") i[1] = 1; +QT_WARNING_POP } QTEST_MAIN(tst_Crashes) diff --git a/tests/auto/testlib/selftests/datatable/CMakeLists.txt b/tests/auto/testlib/selftests/datatable/CMakeLists.txt index 66bfa4a208..7bac0d2a63 100644 --- a/tests/auto/testlib/selftests/datatable/CMakeLists.txt +++ b/tests/auto/testlib/selftests/datatable/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from datatable.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## datatable Binary: ##################################################################### qt_internal_add_executable(datatable - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_datatable.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(datatable) -# special case end diff --git a/tests/auto/testlib/selftests/datatable/tst_datatable.cpp b/tests/auto/testlib/selftests/datatable/tst_datatable.cpp index b0626bc421..598908ac0e 100644 --- a/tests/auto/testlib/selftests/datatable/tst_datatable.cpp +++ b/tests/auto/testlib/selftests/datatable/tst_datatable.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> diff --git a/tests/auto/testlib/selftests/datetime/CMakeLists.txt b/tests/auto/testlib/selftests/datetime/CMakeLists.txt index 5a3df8085d..e644d7200a 100644 --- a/tests/auto/testlib/selftests/datetime/CMakeLists.txt +++ b/tests/auto/testlib/selftests/datetime/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from datetime.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## datetime Binary: ##################################################################### qt_internal_add_executable(datetime - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_datetime.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(datetime) -# special case end diff --git a/tests/auto/testlib/selftests/datetime/tst_datetime.cpp b/tests/auto/testlib/selftests/datetime/tst_datetime.cpp index e2066a4002..68e47d0868 100644 --- a/tests/auto/testlib/selftests/datetime/tst_datetime.cpp +++ b/tests/auto/testlib/selftests/datetime/tst_datetime.cpp @@ -1,34 +1,10 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> #include <QtCore/QDateTime> +#include <QtCore/QTimeZone> #include <QTest> /*! @@ -46,8 +22,10 @@ private slots: void tst_DateTime::dateTime() const { - const QDateTime utc(QDate(2000, 5, 3), QTime(4, 3, 4), Qt::UTC); - const QDateTime local(QDate(2000, 5, 3), QTime(4, 3, 4), Qt::OffsetFromUTC, 120 /* 2 minutes */); + const auto twoMinutes = std::chrono::minutes{2}; + const QDateTime utc(QDate(2000, 5, 3), QTime(4, 3, 4), QTimeZone::UTC); + const QDateTime local(QDate(2000, 5, 3), QTime(4, 3, 4), + QTimeZone::fromDurationAheadOfUtc(twoMinutes)); QCOMPARE(local, utc); } diff --git a/tests/auto/testlib/selftests/deleteLater/CMakeLists.txt b/tests/auto/testlib/selftests/deleteLater/CMakeLists.txt index ca42199665..ededc5bf7d 100644 --- a/tests/auto/testlib/selftests/deleteLater/CMakeLists.txt +++ b/tests/auto/testlib/selftests/deleteLater/CMakeLists.txt @@ -1,18 +1,18 @@ -# Generated from deleteLater.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## deleteLater Binary: ##################################################################### qt_internal_add_executable(deleteLater - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_deleteLater.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) -# special case begin qt_internal_apply_testlib_coverage_options(deleteLater) -# special case end diff --git a/tests/auto/testlib/selftests/deleteLater/tst_deleteLater.cpp b/tests/auto/testlib/selftests/deleteLater/tst_deleteLater.cpp index dbaaa72496..871a46afc3 100644 --- a/tests/auto/testlib/selftests/deleteLater/tst_deleteLater.cpp +++ b/tests/auto/testlib/selftests/deleteLater/tst_deleteLater.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author David Faure <david.faure@kdab.com> -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author David Faure <david.faure@kdab.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> diff --git a/tests/auto/testlib/selftests/deleteLater_noApp/CMakeLists.txt b/tests/auto/testlib/selftests/deleteLater_noApp/CMakeLists.txt index 0ebdc89cb8..feebd9f00e 100644 --- a/tests/auto/testlib/selftests/deleteLater_noApp/CMakeLists.txt +++ b/tests/auto/testlib/selftests/deleteLater_noApp/CMakeLists.txt @@ -1,18 +1,18 @@ -# Generated from deleteLater_noApp.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## deleteLater_noApp Binary: ##################################################################### qt_internal_add_executable(deleteLater_noApp - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_deleteLater_noApp.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) -# special case begin qt_internal_apply_testlib_coverage_options(deleteLater_noApp) -# special case end diff --git a/tests/auto/testlib/selftests/deleteLater_noApp/tst_deleteLater_noApp.cpp b/tests/auto/testlib/selftests/deleteLater_noApp/tst_deleteLater_noApp.cpp index 2ad2556f8f..eecc67dd36 100644 --- a/tests/auto/testlib/selftests/deleteLater_noApp/tst_deleteLater_noApp.cpp +++ b/tests/auto/testlib/selftests/deleteLater_noApp/tst_deleteLater_noApp.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author David Faure <david.faure@kdab.com> -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author David Faure <david.faure@kdab.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> diff --git a/tests/auto/testlib/selftests/differentexec/CMakeLists.txt b/tests/auto/testlib/selftests/differentexec/CMakeLists.txt index e13817f1e1..b92814742e 100644 --- a/tests/auto/testlib/selftests/differentexec/CMakeLists.txt +++ b/tests/auto/testlib/selftests/differentexec/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from differentexec.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## differentexec Binary: ##################################################################### qt_internal_add_executable(differentexec - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_differentexec.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(differentexec) -# special case end diff --git a/tests/auto/testlib/selftests/differentexec/tst_differentexec.cpp b/tests/auto/testlib/selftests/differentexec/tst_differentexec.cpp index 7ddc1e8311..92233a0147 100644 --- a/tests/auto/testlib/selftests/differentexec/tst_differentexec.cpp +++ b/tests/auto/testlib/selftests/differentexec/tst_differentexec.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> diff --git a/tests/auto/testlib/selftests/eventloop/CMakeLists.txt b/tests/auto/testlib/selftests/eventloop/CMakeLists.txt new file mode 100644 index 0000000000..afaf766f69 --- /dev/null +++ b/tests/auto/testlib/selftests/eventloop/CMakeLists.txt @@ -0,0 +1,19 @@ +# Copyright (C) 2024 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause +##################################################################### +## eventloop Binary: +##################################################################### + +qt_internal_add_executable(eventloop + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + SOURCES + tst_eventloop.cpp + LIBRARIES + Qt::Test +) + +## Scopes: +##################################################################### +qt_internal_apply_testlib_coverage_options(eventloop) diff --git a/tests/auto/testlib/selftests/eventloop/tst_eventloop.cpp b/tests/auto/testlib/selftests/eventloop/tst_eventloop.cpp new file mode 100644 index 0000000000..3f3a7e303e --- /dev/null +++ b/tests/auto/testlib/selftests/eventloop/tst_eventloop.cpp @@ -0,0 +1,106 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <QTest> +#include <QTestEventLoop> +#include <QtCore/QTimer> + +using namespace std::chrono_literals; + +// Tests for QTestEventLoop (and some QTRY_* details) +class tst_EventLoop: public QObject +{ +Q_OBJECT + + bool m_inTestFunction = false; +private slots: + void cleanup(); + void fail(); + void skip(); + void pass(); +}; + +class DeferredFlag : public QObject // Can't be const. +{ + Q_OBJECT + bool m_flag; +public: + // A boolean that either starts out true or decays to true after 50 ms. + // However, that decay will only happen when the event loop is run. + explicit DeferredFlag(bool initial = false) : m_flag(initial) + { + if (!initial) + QTimer::singleShot(50, this, &DeferredFlag::onTimeOut); + } + explicit operator bool() const { return m_flag; } + bool operator!() const { return !m_flag; } + friend bool operator==(const DeferredFlag &a, const DeferredFlag &b) + { + return bool(a) == bool(b); + } +public slots: + void onTimeOut() { m_flag = true; } +}; + +char *toString(const DeferredFlag &val) +{ + return qstrdup(bool(val) ? "DeferredFlag(true)" : "DeferredFlag(false)"); +} + +void tst_EventLoop::cleanup() +{ + // QTBUG-104441: looping didn't happen in cleanup() if test failed or skipped. + { + DeferredFlag flag; + auto &loop = QTestEventLoop::instance(); + loop.enterLoop(100ms); + QVERIFY2(loop.timeout(), "QTestEventLoop exited prematurely in cleanup()"); + QVERIFY(flag); + } + { + DeferredFlag flag; + QTRY_VERIFY2(flag, "QTRY_* loop exited prematurely in cleanup()"); + } + + m_inTestFunction = false; +} + +void tst_EventLoop::fail() +{ + QVERIFY2(!std::exchange(m_inTestFunction, true), "Earlier test failed to clean up"); + QFAIL("Failing test should still clean up"); +} + +void tst_EventLoop::skip() +{ + QVERIFY2(!std::exchange(m_inTestFunction, true), "Earlier test failed to clean up"); + QSKIP("Skipping test should still clean up"); +} + +void tst_EventLoop::pass() +{ + QVERIFY2(!std::exchange(m_inTestFunction, true), "Earlier test failed to clean up"); + { + DeferredFlag flag; + auto &loop = QTestEventLoop::instance(); + loop.enterLoop(100ms); + QVERIFY(loop.timeout()); + QVERIFY(flag); + } + { + DeferredFlag flag; + QTRY_VERIFY(flag); + } + DeferredFlag flag; + QTestEventLoop loop(this); + QVERIFY(!flag); + loop.enterLoop(1ms); + QVERIFY(loop.timeout()); + QVERIFY(!flag); + loop.enterLoop(100ms); + QVERIFY(loop.timeout()); + QVERIFY(flag); +} + +QTEST_MAIN(tst_EventLoop) +#include "tst_eventloop.moc" diff --git a/tests/auto/testlib/selftests/exceptionthrow/CMakeLists.txt b/tests/auto/testlib/selftests/exceptionthrow/CMakeLists.txt index ba793db66c..0facbeace3 100644 --- a/tests/auto/testlib/selftests/exceptionthrow/CMakeLists.txt +++ b/tests/auto/testlib/selftests/exceptionthrow/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from exceptionthrow.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## exceptionthrow Binary: @@ -6,17 +7,15 @@ qt_internal_add_executable(exceptionthrow EXCEPTIONS - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_exceptionthrow.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(exceptionthrow) -# special case end diff --git a/tests/auto/testlib/selftests/exceptionthrow/tst_exceptionthrow.cpp b/tests/auto/testlib/selftests/exceptionthrow/tst_exceptionthrow.cpp index 0af3358261..ea5c6afc13 100644 --- a/tests/auto/testlib/selftests/exceptionthrow/tst_exceptionthrow.cpp +++ b/tests/auto/testlib/selftests/exceptionthrow/tst_exceptionthrow.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> diff --git a/tests/auto/testlib/selftests/expected_assert.tap b/tests/auto/testlib/selftests/expected_assert.tap index 0e8b73fab4..7def1706b3 100644 --- a/tests/auto/testlib/selftests/expected_assert.tap +++ b/tests/auto/testlib/selftests/expected_assert.tap @@ -2,13 +2,16 @@ TAP version 13 # tst_Assert ok 1 - initTestCase() ok 2 - testNumber1() -# ASSERT: "false" in file qtbase/tests/auto/testlib/selftests/assert/tst_assert.cpp, line 0 not ok 3 - testNumber2() --- # Received a fatal error. at: tst_Assert::testNumber2() (qtbase/tests/auto/testlib/selftests/assert/tst_assert.cpp:0) file: qtbase/tests/auto/testlib/selftests/assert/tst_assert.cpp line: 0 + extensions: + messages: + - severity: fatal + message: ASSERT: "false" in file qtbase/tests/auto/testlib/selftests/assert/tst_assert.cpp, line 0 ... 1..3 # tests 3 diff --git a/tests/auto/testlib/selftests/expected_blacklisted.tap b/tests/auto/testlib/selftests/expected_blacklisted.tap index 63a0e90e21..83def09e34 100644 --- a/tests/auto/testlib/selftests/expected_blacklisted.tap +++ b/tests/auto/testlib/selftests/expected_blacklisted.tap @@ -1,8 +1,13 @@ TAP version 13 # tst_Blacklisted ok 1 - initTestCase() -# This test should BPASS ok 2 - pass() # TODO + --- + extensions: + messages: + - severity: debug + message: This test should BPASS + ... ok 3 - skip() # SKIP This test should SKIP not ok 4 - fail() # TODO 'false' returned FALSE. (This test should BFAIL) --- @@ -18,10 +23,13 @@ not ok 4 - fail() # TODO 'false' returned FALSE. (This test should BFAIL) ... not ok 5 - xfail() # TODO This test should BXFAIL then BPASS --- - # This test should BXFAIL then BPASS - at: tst_Blacklisted::xfail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) - file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp - line: 0 + extensions: + messages: + - severity: xfail + message: This test should BXFAIL then BPASS + at: tst_Blacklisted::xfail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) + file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp + line: 0 ... ok 6 - multiSkip() # SKIP This skip should be repeated ten times ok 6 - multiSkip() # SKIP This skip should be repeated ten times @@ -36,102 +44,95 @@ ok 6 - multiSkip() # SKIP This skip should be repeated ten times ok 6 - multiSkip() # SKIP But this test should only contribute one to the skip count not ok 7 - multiFail() # TODO This failure message should be repeated ten times --- - # This failure message should be repeated ten times at: tst_Blacklisted::multiFail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp line: 0 ... not ok 7 - multiFail() # TODO This failure message should be repeated ten times --- - # This failure message should be repeated ten times at: tst_Blacklisted::multiFail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp line: 0 ... not ok 7 - multiFail() # TODO This failure message should be repeated ten times --- - # This failure message should be repeated ten times at: tst_Blacklisted::multiFail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp line: 0 ... not ok 7 - multiFail() # TODO This failure message should be repeated ten times --- - # This failure message should be repeated ten times at: tst_Blacklisted::multiFail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp line: 0 ... not ok 7 - multiFail() # TODO This failure message should be repeated ten times --- - # This failure message should be repeated ten times at: tst_Blacklisted::multiFail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp line: 0 ... not ok 7 - multiFail() # TODO This failure message should be repeated ten times --- - # This failure message should be repeated ten times at: tst_Blacklisted::multiFail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp line: 0 ... not ok 7 - multiFail() # TODO This failure message should be repeated ten times --- - # This failure message should be repeated ten times at: tst_Blacklisted::multiFail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp line: 0 ... not ok 7 - multiFail() # TODO This failure message should be repeated ten times --- - # This failure message should be repeated ten times at: tst_Blacklisted::multiFail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp line: 0 ... not ok 7 - multiFail() # TODO This failure message should be repeated ten times --- - # This failure message should be repeated ten times at: tst_Blacklisted::multiFail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp line: 0 ... not ok 7 - multiFail() # TODO This failure message should be repeated ten times --- - # This failure message should be repeated ten times at: tst_Blacklisted::multiFail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp line: 0 ... not ok 7 - multiFail() # TODO But this test should only contribute one to the blacklisted count --- - # But this test should only contribute one to the blacklisted count at: tst_Blacklisted::multiFail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp line: 0 ... -not ok 8 - xfailContinueSkip() # TODO This test should BXFAIL then SKIP +not ok 8 - xfailContinueSkip() # SKIP This skip should be seen and counted --- - # This test should BXFAIL then SKIP at: tst_Blacklisted::xfailContinueSkip() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp line: 0 - ... -ok 8 - xfailContinueSkip() # SKIP This skip should be seen and counted -not ok 9 - xfailContinueFail() # TODO This test should BXFAIL then BFAIL - --- - # This test should BXFAIL then BFAIL - at: tst_Blacklisted::xfailContinueFail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) - file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp - line: 0 + extensions: + messages: + - severity: xfail + message: This test should BXFAIL then SKIP + at: tst_Blacklisted::xfailContinueSkip() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) + file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp + line: 0 ... not ok 9 - xfailContinueFail() # TODO This fail should be seen and counted as blacklisted --- - # This fail should be seen and counted as blacklisted at: tst_Blacklisted::xfailContinueFail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp line: 0 + extensions: + messages: + - severity: xfail + message: This test should BXFAIL then BFAIL + at: tst_Blacklisted::xfailContinueFail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) + file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp + line: 0 ... ok 10 - xpass() # TODO 'true' returned TRUE unexpectedly. (This test should BXPASS) ok 11 - xpassContinueSkip() # TODO 'true' returned TRUE unexpectedly. (This test should BXPASS then SKIP) @@ -139,13 +140,17 @@ ok 11 - xpassContinueSkip() # SKIP This skip should be seen but not counted ok 12 - xpassContinueFail() # TODO 'true' returned TRUE unexpectedly. (This test should BXPASS then BFAIL) not ok 12 - xpassContinueFail() # TODO This fail should be seen and not counted (due to prior XPASS) --- - # This fail should be seen and not counted (due to prior XPASS) at: tst_Blacklisted::xpassContinueFail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp line: 0 ... -# Totals should add up to 13: 2 passed, 0 failed, 3 skipped, 8 blacklisted ok 13 - cleanupTestCase() + --- + extensions: + messages: + - severity: debug + message: Totals should add up to 13: 2 passed, 0 failed, 3 skipped, 8 blacklisted + ... 1..13 # tests 13 # pass 2 diff --git a/tests/auto/testlib/selftests/expected_cmptest.junitxml b/tests/auto/testlib/selftests/expected_cmptest.junitxml index 9509c067e2..134a188753 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.junitxml +++ b/tests/auto/testlib/selftests/expected_cmptest.junitxml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<testsuite name="tst_Cmptest" timestamp="@TEST_START_TIME@" hostname="@HOSTNAME@" tests="67" failures="46" errors="0" skipped="0" time="@TEST_DURATION@"> +<testsuite name="tst_Cmptest" timestamp="@TEST_START_TIME@" hostname="@HOSTNAME@" tests="74" failures="51" errors="0" skipped="0" time="@TEST_DURATION@"> <properties> <property name="QTestVersion" value="@INSERT_QT_VERSION_HERE@"/> <property name="QtVersion" value="@INSERT_QT_VERSION_HERE@"/> @@ -78,6 +78,18 @@ Expected (expected): QVariant(PhonyClass,<value not representable as string>)]]> </failure> </testcase> + <testcase name="compare_unknown" classname="tst_Cmptest" time="@TEST_DURATION@"> + <failure type="fail" message="Compared values are not the same"> + <![CDATA[ Actual : a + Expected : b]]> + </failure> + </testcase> + <testcase name="compare_textFromDebug" classname="tst_Cmptest" time="@TEST_DURATION@"> + <failure type="fail" message="Compared values are not the same"> + <![CDATA[ Actual (a): QDebug stream: 0 + Expected (b): QDebug stream: 1]]> + </failure> + </testcase> <testcase name="compareQObjects" classname="tst_Cmptest" time="@TEST_DURATION@"> <failure type="fail" message="Compared QObject pointers are not the same"> <![CDATA[ Actual (&object1): QObject/"object1" @@ -161,6 +173,7 @@ Expected (double2): 1]]> </failure> </testcase> + <testcase name="compareContainerToInitializerList" classname="tst_Cmptest" time="@TEST_DURATION@"/> <testcase name="compareQColor(Qt::yellow vs "yellow")" classname="tst_Cmptest" time="@TEST_DURATION@"/> <testcase name="compareQColor(Qt::yellow vs Qt::green)" classname="tst_Cmptest" time="@TEST_DURATION@"> <failure type="fail" message="Compared values are not the same"> @@ -270,17 +283,42 @@ Expected (v4b): QVector4D(1, 3, 3, 4)]]> </failure> </testcase> + <testcase name="compareQPalettes(all roles are different)" classname="tst_Cmptest" time="@TEST_DURATION@"> + <failure type="fail" message="Compared values are not the same"> + <![CDATA[ Actual (actualPalette) : QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000001,Disabled:#ff000001,Inactive:#ff000001],Light:[Active:#ff000002,Disabled:#ff000002,Inactive:#ff000002],Midlight:[Active:#ff000003,Disabled:#ff000003,Inactive:#ff000003],Dark:[Active:#ff000004,Disabled:#ff000004,Inactive:#ff000004],Mid:[Active:#ff000005,Disabled:#ff000005,Inactive:#ff000005],Text:[Active:#ff000006,Disabled:#ff000006,Inactive:#ff000006],BrightText:[Active:#ff000007,Disabled:#ff000007,Inactive:#ff000007],ButtonText:[Active:#ff000008,Disabled:#ff000008,Inactive:#ff000008],Base:[Active:#ff000009,Disabled:#ff000009,Inactive:#ff000009],Window:[Active:#ff00000a,Disabled:#ff00000a,Inactive:#ff00000a],Shadow:[Active:#ff00000b,Disabled:#ff00000b,Inactive:#ff00000b],Highlight:[Active:#ff00000c,Disabled:#ff00000c,Inactive:#ff00000c],HighlightedText:[Active:#ff00000d,Disabled:#ff00000d,Inactive:#ff00000d],Link:[Active:#ff00000e,Disabled:#ff00000e,Inactive:#ff00000e],LinkVisited:[Active:#ff00000f,Disabled:#ff00000f,Inactive:#ff00000f],AlternateBase:[Active:#ff000010,Disabled:#ff000010,Inactive:#ff000010],ToolTipBase:[Active:#ff000012,Disabled:#ff000012,Inactive:#ff000012],ToolTipText:[Active:#ff000013,Disabled:#ff000013,Inactive:#ff000013],PlaceholderText:[Active:#ff000014,Disabled:#ff000014,Inactive:#ff000014],Accent:[Active:#ff000015,Disabled:#ff000015,Inactive:#ff000015]") + Expected (expectedPalette): QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Light:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Midlight:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Dark:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Mid:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Text:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],BrightText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],ButtonText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Base:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Window:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Shadow:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Highlight:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],HighlightedText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Link:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],LinkVisited:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],AlternateBase:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],ToolTipBase:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],ToolTipText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],PlaceholderText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Accent:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000]")]]> + </failure> + </testcase> + <testcase name="compareQPalettes(one role is different)" classname="tst_Cmptest" time="@TEST_DURATION@"> + <failure type="fail" message="Compared values are not the same"> + <![CDATA[ Actual (actualPalette) : QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000001,Disabled:#ff000001,Inactive:#ff000001],Light:[Active:#ff000002,Disabled:#ff000002,Inactive:#ff000002],Midlight:[Active:#ff000003,Disabled:#ff000003,Inactive:#ff000003],Dark:[Active:#ff000004,Disabled:#ff000004,Inactive:#ff000004],Mid:[Active:#ff000005,Disabled:#ff000005,Inactive:#ff000005],Text:[Active:#ff000006,Disabled:#ff000006,Inactive:#ff000006],BrightText:[Active:#ff000007,Disabled:#ff000007,Inactive:#ff000007],ButtonText:[Active:#ff000008,Disabled:#ff000008,Inactive:#ff000008],Base:[Active:#ff000009,Disabled:#ff000009,Inactive:#ff000009],Window:[Active:#ff00000a,Disabled:#ff00000a,Inactive:#ff00000a],Shadow:[Active:#ff00000b,Disabled:#ff00000b,Inactive:#ff00000b],Highlight:[Active:#ff00000c,Disabled:#ff00000c,Inactive:#ff00000c],HighlightedText:[Active:#ff00000d,Disabled:#ff00000d,Inactive:#ff00000d],Link:[Active:#ff00000e,Disabled:#ff00000e,Inactive:#ff00000e],LinkVisited:[Active:#ff00000f,Disabled:#ff00000f,Inactive:#ff00000f],AlternateBase:[Active:#ff000010,Disabled:#ff000010,Inactive:#ff000010],ToolTipBase:[Active:#ff000012,Disabled:#ff000012,Inactive:#ff000012],ToolTipText:[Active:#ff000013,Disabled:#ff000013,Inactive:#ff000013],PlaceholderText:[Active:#ff000014,Disabled:#ff000014,Inactive:#ff000014],Accent:[Active:#ff000015,Disabled:#ff000015,Inactive:#ff000015]") + Expected (expectedPalette): QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000001,Disabled:#ff000001,Inactive:#ff000001],Light:[Active:#ff000002,Disabled:#ff000002,Inactive:#ff000002],Midlight:[Active:#ff000003,Disabled:#ff000003,Inactive:#ff000003],Dark:[Active:#ff000004,Disabled:#ff000004,Inactive:#ff000004],Mid:[Active:#ff000005,Disabled:#ff000005,Inactive:#ff000005],Text:[Active:#ff000006,Disabled:#ff000006,Inactive:#ff000006],BrightText:[Active:#ff000007,Disabled:#ff000007,Inactive:#ff000007],ButtonText:[Active:#ff000008,Disabled:#ff000008,Inactive:#ff000008],Base:[Active:#ff000009,Disabled:#ff000009,Inactive:#ff000009],Window:[Active:#ff00000a,Disabled:#ff00000a,Inactive:#ff00000a],Shadow:[Active:#ff00000b,Disabled:#ff00000b,Inactive:#ff00000b],Highlight:[Active:#ff00000c,Disabled:#ff00000c,Inactive:#ff00000c],HighlightedText:[Active:#ff00000d,Disabled:#ff00000d,Inactive:#ff00000d],Link:[Active:#ff00000e,Disabled:#ff00000e,Inactive:#ff00000e],LinkVisited:[Active:#ff00000f,Disabled:#ff00000f,Inactive:#ff00000f],AlternateBase:[Active:#ff000010,Disabled:#ff000010,Inactive:#ff000010],ToolTipBase:[Active:#ff000012,Disabled:#ff000012,Inactive:#ff000012],ToolTipText:[Active:#ff000013,Disabled:#ff000013,Inactive:#ff000013],PlaceholderText:[Active:#ff000014,Disabled:#ff000014,Inactive:#ff000014],Accent:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000]")]]> + </failure> + </testcase> + <testcase name="compareQPalettes(all roles are the same)" classname="tst_Cmptest" time="@TEST_DURATION@"/> + <testcase name="tryCompare" classname="tst_Cmptest" time="@TEST_DURATION@"> + <failure type="fail" message="Compared values are not the same"> + <![CDATA[ Actual (c) : DeferredFlag(true) + Expected (DeferredFlag()): DeferredFlag(false)]]> + </failure> + <system-out> + <![CDATA[Should now time out and fail]]> + </system-out> + </testcase> <testcase name="verify" classname="tst_Cmptest" time="@TEST_DURATION@"> <failure type="fail" message="'opaqueFunc() < 2' returned FALSE. ()"/> </testcase> <testcase name="verify2" classname="tst_Cmptest" time="@TEST_DURATION@"> - <failure type="fail" message="'opaqueFunc() < 2' returned FALSE. (42)"/> + <failure type="fail" message="'opaqueFunc() < 2' returned FALSE. (42 >= 2 (as expected, in fact))"/> </testcase> <testcase name="tryVerify" classname="tst_Cmptest" time="@TEST_DURATION@"> - <failure type="fail" message="'opaqueFunc() < 2' returned FALSE. ()"/> + <failure type="fail" message="'!c' returned FALSE. ()"/> + <system-out> + <![CDATA[Should now time out and fail]]> + </system-out> </testcase> <testcase name="tryVerify2" classname="tst_Cmptest" time="@TEST_DURATION@"> - <failure type="fail" message="'opaqueFunc() < 2' returned FALSE. (42)"/> + <failure type="fail" message="'!c' returned FALSE. (Should time out and fail)"/> </testcase> <testcase name="verifyExplicitOperatorBool" classname="tst_Cmptest" time="@TEST_DURATION@"/> <testcase name="cleanupTestCase" classname="tst_Cmptest" time="@TEST_DURATION@"/> diff --git a/tests/auto/testlib/selftests/expected_cmptest.lightxml b/tests/auto/testlib/selftests/expected_cmptest.lightxml index df00b1a884..9c54d20650 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.lightxml +++ b/tests/auto/testlib/selftests/expected_cmptest.lightxml @@ -109,6 +109,22 @@ </Incident> <Duration msecs="0"/> </TestFunction> + <TestFunction name="compare_unknown"> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> + <Description><![CDATA[Compared values are not the same + Actual : a + Expected : b]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="compare_textFromDebug"> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> + <Description><![CDATA[Compared values are not the same + Actual (a): QDebug stream: 0 + Expected (b): QDebug stream: 1]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> <TestFunction name="compareQObjects"> <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> <Description><![CDATA[Compared QObject pointers are not the same @@ -218,6 +234,10 @@ </Incident> <Duration msecs="0"/> </TestFunction> + <TestFunction name="compareContainerToInitializerList"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> <TestFunction name="compareQColor"> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[Qt::yellow vs "yellow"]]></DataTag> @@ -361,6 +381,35 @@ </Incident> <Duration msecs="0"/> </TestFunction> + <TestFunction name="compareQPalettes"> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> + <DataTag><![CDATA[all roles are different]]></DataTag> + <Description><![CDATA[Compared values are not the same + Actual (actualPalette) : QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000001,Disabled:#ff000001,Inactive:#ff000001],Light:[Active:#ff000002,Disabled:#ff000002,Inactive:#ff000002],Midlight:[Active:#ff000003,Disabled:#ff000003,Inactive:#ff000003],Dark:[Active:#ff000004,Disabled:#ff000004,Inactive:#ff000004],Mid:[Active:#ff000005,Disabled:#ff000005,Inactive:#ff000005],Text:[Active:#ff000006,Disabled:#ff000006,Inactive:#ff000006],BrightText:[Active:#ff000007,Disabled:#ff000007,Inactive:#ff000007],ButtonText:[Active:#ff000008,Disabled:#ff000008,Inactive:#ff000008],Base:[Active:#ff000009,Disabled:#ff000009,Inactive:#ff000009],Window:[Active:#ff00000a,Disabled:#ff00000a,Inactive:#ff00000a],Shadow:[Active:#ff00000b,Disabled:#ff00000b,Inactive:#ff00000b],Highlight:[Active:#ff00000c,Disabled:#ff00000c,Inactive:#ff00000c],HighlightedText:[Active:#ff00000d,Disabled:#ff00000d,Inactive:#ff00000d],Link:[Active:#ff00000e,Disabled:#ff00000e,Inactive:#ff00000e],LinkVisited:[Active:#ff00000f,Disabled:#ff00000f,Inactive:#ff00000f],AlternateBase:[Active:#ff000010,Disabled:#ff000010,Inactive:#ff000010],ToolTipBase:[Active:#ff000012,Disabled:#ff000012,Inactive:#ff000012],ToolTipText:[Active:#ff000013,Disabled:#ff000013,Inactive:#ff000013],PlaceholderText:[Active:#ff000014,Disabled:#ff000014,Inactive:#ff000014],Accent:[Active:#ff000015,Disabled:#ff000015,Inactive:#ff000015]") + Expected (expectedPalette): QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Light:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Midlight:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Dark:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Mid:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Text:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],BrightText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],ButtonText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Base:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Window:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Shadow:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Highlight:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],HighlightedText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Link:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],LinkVisited:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],AlternateBase:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],ToolTipBase:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],ToolTipText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],PlaceholderText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Accent:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000]")]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> + <DataTag><![CDATA[one role is different]]></DataTag> + <Description><![CDATA[Compared values are not the same + Actual (actualPalette) : QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000001,Disabled:#ff000001,Inactive:#ff000001],Light:[Active:#ff000002,Disabled:#ff000002,Inactive:#ff000002],Midlight:[Active:#ff000003,Disabled:#ff000003,Inactive:#ff000003],Dark:[Active:#ff000004,Disabled:#ff000004,Inactive:#ff000004],Mid:[Active:#ff000005,Disabled:#ff000005,Inactive:#ff000005],Text:[Active:#ff000006,Disabled:#ff000006,Inactive:#ff000006],BrightText:[Active:#ff000007,Disabled:#ff000007,Inactive:#ff000007],ButtonText:[Active:#ff000008,Disabled:#ff000008,Inactive:#ff000008],Base:[Active:#ff000009,Disabled:#ff000009,Inactive:#ff000009],Window:[Active:#ff00000a,Disabled:#ff00000a,Inactive:#ff00000a],Shadow:[Active:#ff00000b,Disabled:#ff00000b,Inactive:#ff00000b],Highlight:[Active:#ff00000c,Disabled:#ff00000c,Inactive:#ff00000c],HighlightedText:[Active:#ff00000d,Disabled:#ff00000d,Inactive:#ff00000d],Link:[Active:#ff00000e,Disabled:#ff00000e,Inactive:#ff00000e],LinkVisited:[Active:#ff00000f,Disabled:#ff00000f,Inactive:#ff00000f],AlternateBase:[Active:#ff000010,Disabled:#ff000010,Inactive:#ff000010],ToolTipBase:[Active:#ff000012,Disabled:#ff000012,Inactive:#ff000012],ToolTipText:[Active:#ff000013,Disabled:#ff000013,Inactive:#ff000013],PlaceholderText:[Active:#ff000014,Disabled:#ff000014,Inactive:#ff000014],Accent:[Active:#ff000015,Disabled:#ff000015,Inactive:#ff000015]") + Expected (expectedPalette): QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000001,Disabled:#ff000001,Inactive:#ff000001],Light:[Active:#ff000002,Disabled:#ff000002,Inactive:#ff000002],Midlight:[Active:#ff000003,Disabled:#ff000003,Inactive:#ff000003],Dark:[Active:#ff000004,Disabled:#ff000004,Inactive:#ff000004],Mid:[Active:#ff000005,Disabled:#ff000005,Inactive:#ff000005],Text:[Active:#ff000006,Disabled:#ff000006,Inactive:#ff000006],BrightText:[Active:#ff000007,Disabled:#ff000007,Inactive:#ff000007],ButtonText:[Active:#ff000008,Disabled:#ff000008,Inactive:#ff000008],Base:[Active:#ff000009,Disabled:#ff000009,Inactive:#ff000009],Window:[Active:#ff00000a,Disabled:#ff00000a,Inactive:#ff00000a],Shadow:[Active:#ff00000b,Disabled:#ff00000b,Inactive:#ff00000b],Highlight:[Active:#ff00000c,Disabled:#ff00000c,Inactive:#ff00000c],HighlightedText:[Active:#ff00000d,Disabled:#ff00000d,Inactive:#ff00000d],Link:[Active:#ff00000e,Disabled:#ff00000e,Inactive:#ff00000e],LinkVisited:[Active:#ff00000f,Disabled:#ff00000f,Inactive:#ff00000f],AlternateBase:[Active:#ff000010,Disabled:#ff000010,Inactive:#ff000010],ToolTipBase:[Active:#ff000012,Disabled:#ff000012,Inactive:#ff000012],ToolTipText:[Active:#ff000013,Disabled:#ff000013,Inactive:#ff000013],PlaceholderText:[Active:#ff000014,Disabled:#ff000014,Inactive:#ff000014],Accent:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000]")]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[all roles are the same]]></DataTag> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="tryCompare"> + <Message type="qinfo" file="" line="0"> + <Description><![CDATA[Should now time out and fail]]></Description> + </Message> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> + <Description><![CDATA[Compared values are not the same + Actual (c) : DeferredFlag(true) + Expected (DeferredFlag()): DeferredFlag(false)]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> <TestFunction name="verify"> <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> <Description><![CDATA['opaqueFunc() < 2' returned FALSE. ()]]></Description> @@ -369,19 +418,22 @@ </TestFunction> <TestFunction name="verify2"> <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> - <Description><![CDATA['opaqueFunc() < 2' returned FALSE. (42)]]></Description> + <Description><![CDATA['opaqueFunc() < 2' returned FALSE. (42 >= 2 (as expected, in fact))]]></Description> </Incident> <Duration msecs="0"/> </TestFunction> <TestFunction name="tryVerify"> + <Message type="qinfo" file="" line="0"> + <Description><![CDATA[Should now time out and fail]]></Description> + </Message> <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> - <Description><![CDATA['opaqueFunc() < 2' returned FALSE. ()]]></Description> + <Description><![CDATA['!c' returned FALSE. ()]]></Description> </Incident> <Duration msecs="0"/> </TestFunction> <TestFunction name="tryVerify2"> <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> - <Description><![CDATA['opaqueFunc() < 2' returned FALSE. (42)]]></Description> + <Description><![CDATA['!c' returned FALSE. (Should time out and fail)]]></Description> </Incident> <Duration msecs="0"/> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_cmptest.tap b/tests/auto/testlib/selftests/expected_cmptest.tap index a282fb1f4e..a5f5c3c8a2 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.tap +++ b/tests/auto/testlib/selftests/expected_cmptest.tap @@ -139,7 +139,28 @@ not ok 18 - compare_tostring(both non-null user type) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 19 - compareQObjects() +not ok 19 - compare_unknown() + --- + # Compared values are not the same + Actual : a + Expected : b + at: tst_Cmptest::compare_unknown() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:0) + file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp + line: 0 + ... +not ok 20 - compare_textFromDebug() + --- + type: QCOMPARE + message: Compared values are not the same + wanted: QDebug stream: 1 (b) + found: QDebug stream: 0 (a) + expected: QDebug stream: 1 (b) + actual: QDebug stream: 0 (a) + at: tst_Cmptest::compare_textFromDebug() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:0) + file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp + line: 0 + ... +not ok 21 - compareQObjects() --- type: QCOMPARE message: Compared QObject pointers are not the same @@ -151,9 +172,9 @@ not ok 19 - compareQObjects() file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -ok 20 - compareQStringLists(empty lists) -ok 21 - compareQStringLists(equal lists) -not ok 22 - compareQStringLists(last item different) +ok 22 - compareQStringLists(empty lists) +ok 23 - compareQStringLists(equal lists) +not ok 24 - compareQStringLists(last item different) --- type: QCOMPARE message: Compared lists differ at index 2. @@ -165,7 +186,7 @@ not ok 22 - compareQStringLists(last item different) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 23 - compareQStringLists(second-last item different) +not ok 25 - compareQStringLists(second-last item different) --- type: QCOMPARE message: Compared lists differ at index 2. @@ -177,7 +198,7 @@ not ok 23 - compareQStringLists(second-last item different) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 24 - compareQStringLists(prefix) +not ok 26 - compareQStringLists(prefix) --- # Compared lists have different sizes. Actual (opA) size: 2 @@ -186,7 +207,7 @@ not ok 24 - compareQStringLists(prefix) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 25 - compareQStringLists(short list second) +not ok 27 - compareQStringLists(short list second) --- # Compared lists have different sizes. Actual (opA) size: 12 @@ -195,7 +216,7 @@ not ok 25 - compareQStringLists(short list second) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 26 - compareQStringLists(short list first) +not ok 28 - compareQStringLists(short list first) --- # Compared lists have different sizes. Actual (opA) size: 1 @@ -204,8 +225,8 @@ not ok 26 - compareQStringLists(short list first) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -ok 27 - compareQListInt(match) -not ok 28 - compareQListInt(size mismatch) +ok 29 - compareQListInt(match) +not ok 30 - compareQListInt(size mismatch) --- # Compared lists have different sizes. Actual (actual) size: 2 @@ -214,7 +235,7 @@ not ok 28 - compareQListInt(size mismatch) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 29 - compareQListInt(value mismatch) +not ok 31 - compareQListInt(value mismatch) --- type: QCOMPARE message: Compared lists differ at index 2. @@ -226,8 +247,8 @@ not ok 29 - compareQListInt(value mismatch) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -ok 30 - compareQListIntToArray(match) -not ok 31 - compareQListIntToArray(size mismatch) +ok 32 - compareQListIntToArray(match) +not ok 33 - compareQListIntToArray(size mismatch) --- # Compared lists have different sizes. Actual (actual) size: 2 @@ -236,7 +257,7 @@ not ok 31 - compareQListIntToArray(size mismatch) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 32 - compareQListIntToArray(value mismatch) +not ok 34 - compareQListIntToArray(value mismatch) --- type: QCOMPARE message: Compared lists differ at index 2. @@ -248,8 +269,8 @@ not ok 32 - compareQListIntToArray(value mismatch) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -ok 33 - compareQListIntToInitializerList(match) -not ok 34 - compareQListIntToInitializerList(size mismatch) +ok 35 - compareQListIntToInitializerList(match) +not ok 36 - compareQListIntToInitializerList(size mismatch) --- # Compared lists have different sizes. Actual (actual) size: 2 @@ -258,7 +279,7 @@ not ok 34 - compareQListIntToInitializerList(size mismatch) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 35 - compareQListIntToInitializerList(value mismatch) +not ok 37 - compareQListIntToInitializerList(value mismatch) --- type: QCOMPARE message: Compared lists differ at index 2. @@ -270,7 +291,7 @@ not ok 35 - compareQListIntToInitializerList(value mismatch) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 36 - compareQListDouble() +not ok 38 - compareQListDouble() --- type: QCOMPARE message: Compared lists differ at index 0. @@ -282,8 +303,9 @@ not ok 36 - compareQListDouble() file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -ok 37 - compareQColor(Qt::yellow vs "yellow") -not ok 38 - compareQColor(Qt::yellow vs Qt::green) +ok 39 - compareContainerToInitializerList() +ok 40 - compareQColor(Qt::yellow vs "yellow") +not ok 41 - compareQColor(Qt::yellow vs Qt::green) --- type: QCOMPARE message: Compared values are not the same @@ -295,7 +317,7 @@ not ok 38 - compareQColor(Qt::yellow vs Qt::green) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 39 - compareQColor(0x88ff0000 vs 0xffff0000) +not ok 42 - compareQColor(0x88ff0000 vs 0xffff0000) --- type: QCOMPARE message: Compared values are not the same @@ -307,8 +329,8 @@ not ok 39 - compareQColor(0x88ff0000 vs 0xffff0000) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -ok 40 - compareQPixmaps(both null) -not ok 41 - compareQPixmaps(one null) +ok 43 - compareQPixmaps(both null) +not ok 44 - compareQPixmaps(one null) --- type: QCOMPARE message: Compared QPixmaps differ. @@ -320,7 +342,7 @@ not ok 41 - compareQPixmaps(one null) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 42 - compareQPixmaps(other null) +not ok 45 - compareQPixmaps(other null) --- type: QCOMPARE message: Compared QPixmaps differ. @@ -332,8 +354,8 @@ not ok 42 - compareQPixmaps(other null) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -ok 43 - compareQPixmaps(equal) -not ok 44 - compareQPixmaps(different size) +ok 46 - compareQPixmaps(equal) +not ok 47 - compareQPixmaps(different size) --- type: QCOMPARE message: Compared QPixmaps differ in size. @@ -345,14 +367,14 @@ not ok 44 - compareQPixmaps(different size) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 45 - compareQPixmaps(different pixels) +not ok 48 - compareQPixmaps(different pixels) --- # Compared values are not the same at: tst_Cmptest::compareQPixmaps() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:0) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 46 - compareQPixmaps(different dpr) +not ok 49 - compareQPixmaps(different dpr) --- type: QCOMPARE message: Compared QPixmaps differ in device pixel ratio. @@ -364,8 +386,8 @@ not ok 46 - compareQPixmaps(different dpr) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -ok 47 - compareQImages(both null) -not ok 48 - compareQImages(one null) +ok 50 - compareQImages(both null) +not ok 51 - compareQImages(one null) --- type: QCOMPARE message: Compared QImages differ. @@ -377,7 +399,7 @@ not ok 48 - compareQImages(one null) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 49 - compareQImages(other null) +not ok 52 - compareQImages(other null) --- type: QCOMPARE message: Compared QImages differ. @@ -389,8 +411,8 @@ not ok 49 - compareQImages(other null) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -ok 50 - compareQImages(equal) -not ok 51 - compareQImages(different size) +ok 53 - compareQImages(equal) +not ok 54 - compareQImages(different size) --- type: QCOMPARE message: Compared QImages differ in size. @@ -402,7 +424,7 @@ not ok 51 - compareQImages(different size) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 52 - compareQImages(different format) +not ok 55 - compareQImages(different format) --- type: QCOMPARE message: Compared QImages differ in format. @@ -414,14 +436,14 @@ not ok 52 - compareQImages(different format) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 53 - compareQImages(different pixels) +not ok 56 - compareQImages(different pixels) --- # Compared values are not the same at: tst_Cmptest::compareQImages() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:0) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 54 - compareQImages(different dpr) +not ok 57 - compareQImages(different dpr) --- type: QCOMPARE message: Compared QImages differ in device pixel ratio. @@ -433,8 +455,8 @@ not ok 54 - compareQImages(different dpr) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -ok 55 - compareQRegion(equal-empty) -not ok 56 - compareQRegion(1-empty) +ok 58 - compareQRegion(equal-empty) +not ok 59 - compareQRegion(1-empty) --- type: QCOMPARE message: Compared values are not the same @@ -446,8 +468,8 @@ not ok 56 - compareQRegion(1-empty) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -ok 57 - compareQRegion(equal) -not ok 58 - compareQRegion(different lists) +ok 60 - compareQRegion(equal) +not ok 61 - compareQRegion(different lists) --- type: QCOMPARE message: Compared values are not the same @@ -459,7 +481,7 @@ not ok 58 - compareQRegion(different lists) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 59 - compareQVector2D() +not ok 62 - compareQVector2D() --- type: QCOMPARE message: Compared values are not the same @@ -471,7 +493,7 @@ not ok 59 - compareQVector2D() file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 60 - compareQVector3D() +not ok 63 - compareQVector3D() --- type: QCOMPARE message: Compared values are not the same @@ -483,7 +505,7 @@ not ok 60 - compareQVector3D() file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 61 - compareQVector4D() +not ok 64 - compareQVector4D() --- type: QCOMPARE message: Compared values are not the same @@ -495,7 +517,48 @@ not ok 61 - compareQVector4D() file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 62 - verify() +not ok 65 - compareQPalettes(all roles are different) + --- + type: QCOMPARE + message: Compared values are not the same + wanted: QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Light:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Midlight:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Dark:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Mid:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Text:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],BrightText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],ButtonText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Base:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Window:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Shadow:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Highlight:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],HighlightedText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Link:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],LinkVisited:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],AlternateBase:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],ToolTipBase:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],ToolTipText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],PlaceholderText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Accent:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000]") (expectedPalette) + found: QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000001,Disabled:#ff000001,Inactive:#ff000001],Light:[Active:#ff000002,Disabled:#ff000002,Inactive:#ff000002],Midlight:[Active:#ff000003,Disabled:#ff000003,Inactive:#ff000003],Dark:[Active:#ff000004,Disabled:#ff000004,Inactive:#ff000004],Mid:[Active:#ff000005,Disabled:#ff000005,Inactive:#ff000005],Text:[Active:#ff000006,Disabled:#ff000006,Inactive:#ff000006],BrightText:[Active:#ff000007,Disabled:#ff000007,Inactive:#ff000007],ButtonText:[Active:#ff000008,Disabled:#ff000008,Inactive:#ff000008],Base:[Active:#ff000009,Disabled:#ff000009,Inactive:#ff000009],Window:[Active:#ff00000a,Disabled:#ff00000a,Inactive:#ff00000a],Shadow:[Active:#ff00000b,Disabled:#ff00000b,Inactive:#ff00000b],Highlight:[Active:#ff00000c,Disabled:#ff00000c,Inactive:#ff00000c],HighlightedText:[Active:#ff00000d,Disabled:#ff00000d,Inactive:#ff00000d],Link:[Active:#ff00000e,Disabled:#ff00000e,Inactive:#ff00000e],LinkVisited:[Active:#ff00000f,Disabled:#ff00000f,Inactive:#ff00000f],AlternateBase:[Active:#ff000010,Disabled:#ff000010,Inactive:#ff000010],ToolTipBase:[Active:#ff000012,Disabled:#ff000012,Inactive:#ff000012],ToolTipText:[Active:#ff000013,Disabled:#ff000013,Inactive:#ff000013],PlaceholderText:[Active:#ff000014,Disabled:#ff000014,Inactive:#ff000014],Accent:[Active:#ff000015,Disabled:#ff000015,Inactive:#ff000015]") (actualPalette) + expected: QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Light:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Midlight:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Dark:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Mid:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Text:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],BrightText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],ButtonText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Base:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Window:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Shadow:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Highlight:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],HighlightedText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Link:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],LinkVisited:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],AlternateBase:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],ToolTipBase:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],ToolTipText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],PlaceholderText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Accent:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000]") (expectedPalette) + actual: QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000001,Disabled:#ff000001,Inactive:#ff000001],Light:[Active:#ff000002,Disabled:#ff000002,Inactive:#ff000002],Midlight:[Active:#ff000003,Disabled:#ff000003,Inactive:#ff000003],Dark:[Active:#ff000004,Disabled:#ff000004,Inactive:#ff000004],Mid:[Active:#ff000005,Disabled:#ff000005,Inactive:#ff000005],Text:[Active:#ff000006,Disabled:#ff000006,Inactive:#ff000006],BrightText:[Active:#ff000007,Disabled:#ff000007,Inactive:#ff000007],ButtonText:[Active:#ff000008,Disabled:#ff000008,Inactive:#ff000008],Base:[Active:#ff000009,Disabled:#ff000009,Inactive:#ff000009],Window:[Active:#ff00000a,Disabled:#ff00000a,Inactive:#ff00000a],Shadow:[Active:#ff00000b,Disabled:#ff00000b,Inactive:#ff00000b],Highlight:[Active:#ff00000c,Disabled:#ff00000c,Inactive:#ff00000c],HighlightedText:[Active:#ff00000d,Disabled:#ff00000d,Inactive:#ff00000d],Link:[Active:#ff00000e,Disabled:#ff00000e,Inactive:#ff00000e],LinkVisited:[Active:#ff00000f,Disabled:#ff00000f,Inactive:#ff00000f],AlternateBase:[Active:#ff000010,Disabled:#ff000010,Inactive:#ff000010],ToolTipBase:[Active:#ff000012,Disabled:#ff000012,Inactive:#ff000012],ToolTipText:[Active:#ff000013,Disabled:#ff000013,Inactive:#ff000013],PlaceholderText:[Active:#ff000014,Disabled:#ff000014,Inactive:#ff000014],Accent:[Active:#ff000015,Disabled:#ff000015,Inactive:#ff000015]") (actualPalette) + at: tst_Cmptest::compareQPalettes() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:0) + file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp + line: 0 + ... +not ok 66 - compareQPalettes(one role is different) + --- + type: QCOMPARE + message: Compared values are not the same + wanted: QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000001,Disabled:#ff000001,Inactive:#ff000001],Light:[Active:#ff000002,Disabled:#ff000002,Inactive:#ff000002],Midlight:[Active:#ff000003,Disabled:#ff000003,Inactive:#ff000003],Dark:[Active:#ff000004,Disabled:#ff000004,Inactive:#ff000004],Mid:[Active:#ff000005,Disabled:#ff000005,Inactive:#ff000005],Text:[Active:#ff000006,Disabled:#ff000006,Inactive:#ff000006],BrightText:[Active:#ff000007,Disabled:#ff000007,Inactive:#ff000007],ButtonText:[Active:#ff000008,Disabled:#ff000008,Inactive:#ff000008],Base:[Active:#ff000009,Disabled:#ff000009,Inactive:#ff000009],Window:[Active:#ff00000a,Disabled:#ff00000a,Inactive:#ff00000a],Shadow:[Active:#ff00000b,Disabled:#ff00000b,Inactive:#ff00000b],Highlight:[Active:#ff00000c,Disabled:#ff00000c,Inactive:#ff00000c],HighlightedText:[Active:#ff00000d,Disabled:#ff00000d,Inactive:#ff00000d],Link:[Active:#ff00000e,Disabled:#ff00000e,Inactive:#ff00000e],LinkVisited:[Active:#ff00000f,Disabled:#ff00000f,Inactive:#ff00000f],AlternateBase:[Active:#ff000010,Disabled:#ff000010,Inactive:#ff000010],ToolTipBase:[Active:#ff000012,Disabled:#ff000012,Inactive:#ff000012],ToolTipText:[Active:#ff000013,Disabled:#ff000013,Inactive:#ff000013],PlaceholderText:[Active:#ff000014,Disabled:#ff000014,Inactive:#ff000014],Accent:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000]") (expectedPalette) + found: QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000001,Disabled:#ff000001,Inactive:#ff000001],Light:[Active:#ff000002,Disabled:#ff000002,Inactive:#ff000002],Midlight:[Active:#ff000003,Disabled:#ff000003,Inactive:#ff000003],Dark:[Active:#ff000004,Disabled:#ff000004,Inactive:#ff000004],Mid:[Active:#ff000005,Disabled:#ff000005,Inactive:#ff000005],Text:[Active:#ff000006,Disabled:#ff000006,Inactive:#ff000006],BrightText:[Active:#ff000007,Disabled:#ff000007,Inactive:#ff000007],ButtonText:[Active:#ff000008,Disabled:#ff000008,Inactive:#ff000008],Base:[Active:#ff000009,Disabled:#ff000009,Inactive:#ff000009],Window:[Active:#ff00000a,Disabled:#ff00000a,Inactive:#ff00000a],Shadow:[Active:#ff00000b,Disabled:#ff00000b,Inactive:#ff00000b],Highlight:[Active:#ff00000c,Disabled:#ff00000c,Inactive:#ff00000c],HighlightedText:[Active:#ff00000d,Disabled:#ff00000d,Inactive:#ff00000d],Link:[Active:#ff00000e,Disabled:#ff00000e,Inactive:#ff00000e],LinkVisited:[Active:#ff00000f,Disabled:#ff00000f,Inactive:#ff00000f],AlternateBase:[Active:#ff000010,Disabled:#ff000010,Inactive:#ff000010],ToolTipBase:[Active:#ff000012,Disabled:#ff000012,Inactive:#ff000012],ToolTipText:[Active:#ff000013,Disabled:#ff000013,Inactive:#ff000013],PlaceholderText:[Active:#ff000014,Disabled:#ff000014,Inactive:#ff000014],Accent:[Active:#ff000015,Disabled:#ff000015,Inactive:#ff000015]") (actualPalette) + expected: QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000001,Disabled:#ff000001,Inactive:#ff000001],Light:[Active:#ff000002,Disabled:#ff000002,Inactive:#ff000002],Midlight:[Active:#ff000003,Disabled:#ff000003,Inactive:#ff000003],Dark:[Active:#ff000004,Disabled:#ff000004,Inactive:#ff000004],Mid:[Active:#ff000005,Disabled:#ff000005,Inactive:#ff000005],Text:[Active:#ff000006,Disabled:#ff000006,Inactive:#ff000006],BrightText:[Active:#ff000007,Disabled:#ff000007,Inactive:#ff000007],ButtonText:[Active:#ff000008,Disabled:#ff000008,Inactive:#ff000008],Base:[Active:#ff000009,Disabled:#ff000009,Inactive:#ff000009],Window:[Active:#ff00000a,Disabled:#ff00000a,Inactive:#ff00000a],Shadow:[Active:#ff00000b,Disabled:#ff00000b,Inactive:#ff00000b],Highlight:[Active:#ff00000c,Disabled:#ff00000c,Inactive:#ff00000c],HighlightedText:[Active:#ff00000d,Disabled:#ff00000d,Inactive:#ff00000d],Link:[Active:#ff00000e,Disabled:#ff00000e,Inactive:#ff00000e],LinkVisited:[Active:#ff00000f,Disabled:#ff00000f,Inactive:#ff00000f],AlternateBase:[Active:#ff000010,Disabled:#ff000010,Inactive:#ff000010],ToolTipBase:[Active:#ff000012,Disabled:#ff000012,Inactive:#ff000012],ToolTipText:[Active:#ff000013,Disabled:#ff000013,Inactive:#ff000013],PlaceholderText:[Active:#ff000014,Disabled:#ff000014,Inactive:#ff000014],Accent:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000]") (expectedPalette) + actual: QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000001,Disabled:#ff000001,Inactive:#ff000001],Light:[Active:#ff000002,Disabled:#ff000002,Inactive:#ff000002],Midlight:[Active:#ff000003,Disabled:#ff000003,Inactive:#ff000003],Dark:[Active:#ff000004,Disabled:#ff000004,Inactive:#ff000004],Mid:[Active:#ff000005,Disabled:#ff000005,Inactive:#ff000005],Text:[Active:#ff000006,Disabled:#ff000006,Inactive:#ff000006],BrightText:[Active:#ff000007,Disabled:#ff000007,Inactive:#ff000007],ButtonText:[Active:#ff000008,Disabled:#ff000008,Inactive:#ff000008],Base:[Active:#ff000009,Disabled:#ff000009,Inactive:#ff000009],Window:[Active:#ff00000a,Disabled:#ff00000a,Inactive:#ff00000a],Shadow:[Active:#ff00000b,Disabled:#ff00000b,Inactive:#ff00000b],Highlight:[Active:#ff00000c,Disabled:#ff00000c,Inactive:#ff00000c],HighlightedText:[Active:#ff00000d,Disabled:#ff00000d,Inactive:#ff00000d],Link:[Active:#ff00000e,Disabled:#ff00000e,Inactive:#ff00000e],LinkVisited:[Active:#ff00000f,Disabled:#ff00000f,Inactive:#ff00000f],AlternateBase:[Active:#ff000010,Disabled:#ff000010,Inactive:#ff000010],ToolTipBase:[Active:#ff000012,Disabled:#ff000012,Inactive:#ff000012],ToolTipText:[Active:#ff000013,Disabled:#ff000013,Inactive:#ff000013],PlaceholderText:[Active:#ff000014,Disabled:#ff000014,Inactive:#ff000014],Accent:[Active:#ff000015,Disabled:#ff000015,Inactive:#ff000015]") (actualPalette) + at: tst_Cmptest::compareQPalettes() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:0) + file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp + line: 0 + ... +ok 67 - compareQPalettes(all roles are the same) +not ok 68 - tryCompare() + --- + type: QCOMPARE + message: Compared values are not the same + wanted: DeferredFlag(false) (DeferredFlag()) + found: DeferredFlag(true) (c) + expected: DeferredFlag(false) (DeferredFlag()) + actual: DeferredFlag(true) (c) + at: tst_Cmptest::tryCompare() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:0) + file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp + line: 0 + extensions: + messages: + - severity: info + message: Should now time out and fail + ... +not ok 69 - verify() --- type: QVERIFY message: Verification failed @@ -507,10 +570,10 @@ not ok 62 - verify() file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 63 - verify2() +not ok 70 - verify2() --- type: QVERIFY - message: 42 + message: 42 >= 2 (as expected, in fact) wanted: true (opaqueFunc() < 2) found: false (opaqueFunc() < 2) expected: true (opaqueFunc() < 2) @@ -519,33 +582,37 @@ not ok 63 - verify2() file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -not ok 64 - tryVerify() +not ok 71 - tryVerify() --- type: QVERIFY message: Verification failed - wanted: true (opaqueFunc() < 2) - found: false (opaqueFunc() < 2) - expected: true (opaqueFunc() < 2) - actual: false (opaqueFunc() < 2) + wanted: true (!c) + found: false (!c) + expected: true (!c) + actual: false (!c) at: tst_Cmptest::tryVerify() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:0) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 + extensions: + messages: + - severity: info + message: Should now time out and fail ... -not ok 65 - tryVerify2() +not ok 72 - tryVerify2() --- type: QVERIFY - message: 42 - wanted: true (opaqueFunc() < 2) - found: false (opaqueFunc() < 2) - expected: true (opaqueFunc() < 2) - actual: false (opaqueFunc() < 2) + message: Should time out and fail + wanted: true (!c) + found: false (!c) + expected: true (!c) + actual: false (!c) at: tst_Cmptest::tryVerify2() (qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp:0) file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp line: 0 ... -ok 66 - verifyExplicitOperatorBool() -ok 67 - cleanupTestCase() -1..67 -# tests 67 -# pass 21 -# fail 46 +ok 73 - verifyExplicitOperatorBool() +ok 74 - cleanupTestCase() +1..74 +# tests 74 +# pass 23 +# fail 51 diff --git a/tests/auto/testlib/selftests/expected_cmptest.teamcity b/tests/auto/testlib/selftests/expected_cmptest.teamcity index 6bddfef86f..b5ff675465 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.teamcity +++ b/tests/auto/testlib/selftests/expected_cmptest.teamcity @@ -46,6 +46,12 @@ ##teamcity[testStarted name='compare_tostring(both non-null user type)' flowId='tst_Cmptest'] ##teamcity[testFailed name='compare_tostring(both non-null user type)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared values are not the same|n Actual (actual) : QVariant(PhonyClass,<value not representable as string>)|n Expected (expected): QVariant(PhonyClass,<value not representable as string>)' flowId='tst_Cmptest'] ##teamcity[testFinished name='compare_tostring(both non-null user type)' flowId='tst_Cmptest'] +##teamcity[testStarted name='compare_unknown()' flowId='tst_Cmptest'] +##teamcity[testFailed name='compare_unknown()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared values are not the same|n Actual : a|n Expected : b' flowId='tst_Cmptest'] +##teamcity[testFinished name='compare_unknown()' flowId='tst_Cmptest'] +##teamcity[testStarted name='compare_textFromDebug()' flowId='tst_Cmptest'] +##teamcity[testFailed name='compare_textFromDebug()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared values are not the same|n Actual (a): QDebug stream: 0|n Expected (b): QDebug stream: 1' flowId='tst_Cmptest'] +##teamcity[testFinished name='compare_textFromDebug()' flowId='tst_Cmptest'] ##teamcity[testStarted name='compareQObjects()' flowId='tst_Cmptest'] ##teamcity[testFailed name='compareQObjects()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared QObject pointers are not the same|n Actual (&object1): QObject/"object1"|n Expected (&object2): QObject/"object2"' flowId='tst_Cmptest'] ##teamcity[testFinished name='compareQObjects()' flowId='tst_Cmptest'] @@ -95,6 +101,8 @@ ##teamcity[testStarted name='compareQListDouble()' flowId='tst_Cmptest'] ##teamcity[testFailed name='compareQListDouble()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared lists differ at index 0.|n Actual (double1): 1.5|n Expected (double2): 1' flowId='tst_Cmptest'] ##teamcity[testFinished name='compareQListDouble()' flowId='tst_Cmptest'] +##teamcity[testStarted name='compareContainerToInitializerList()' flowId='tst_Cmptest'] +##teamcity[testFinished name='compareContainerToInitializerList()' flowId='tst_Cmptest'] ##teamcity[testStarted name='compareQColor(Qt::yellow vs "yellow")' flowId='tst_Cmptest'] ##teamcity[testFinished name='compareQColor(Qt::yellow vs "yellow")' flowId='tst_Cmptest'] ##teamcity[testStarted name='compareQColor(Qt::yellow vs Qt::green)' flowId='tst_Cmptest'] @@ -163,17 +171,30 @@ ##teamcity[testStarted name='compareQVector4D()' flowId='tst_Cmptest'] ##teamcity[testFailed name='compareQVector4D()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared values are not the same|n Actual (v4a): QVector4D(1, 2, 3, 4)|n Expected (v4b): QVector4D(1, 3, 3, 4)' flowId='tst_Cmptest'] ##teamcity[testFinished name='compareQVector4D()' flowId='tst_Cmptest'] +##teamcity[testStarted name='compareQPalettes(all roles are different)' flowId='tst_Cmptest'] +##teamcity[testFailed name='compareQPalettes(all roles are different)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared values are not the same|n Actual (actualPalette) : QPalette(resolve=0x7fffffffffffffff,"WindowText:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],Button:|[Active:#ff000001,Disabled:#ff000001,Inactive:#ff000001|],Light:|[Active:#ff000002,Disabled:#ff000002,Inactive:#ff000002|],Midlight:|[Active:#ff000003,Disabled:#ff000003,Inactive:#ff000003|],Dark:|[Active:#ff000004,Disabled:#ff000004,Inactive:#ff000004|],Mid:|[Active:#ff000005,Disabled:#ff000005,Inactive:#ff000005|],Text:|[Active:#ff000006,Disabled:#ff000006,Inactive:#ff000006|],BrightText:|[Active:#ff000007,Disabled:#ff000007,Inactive:#ff000007|],ButtonText:|[Active:#ff000008,Disabled:#ff000008,Inactive:#ff000008|],Base:|[Active:#ff000009,Disabled:#ff000009,Inactive:#ff000009|],Window:|[Active:#ff00000a,Disabled:#ff00000a,Inactive:#ff00000a|],Shadow:|[Active:#ff00000b,Disabled:#ff00000b,Inactive:#ff00000b|],Highlight:|[Active:#ff00000c,Disabled:#ff00000c,Inactive:#ff00000c|],HighlightedText:|[Active:#ff00000d,Disabled:#ff00000d,Inactive:#ff00000d|],Link:|[Active:#ff00000e,Disabled:#ff00000e,Inactive:#ff00000e|],LinkVisited:|[Active:#ff00000f,Disabled:#ff00000f,Inactive:#ff00000f|],AlternateBase:|[Active:#ff000010,Disabled:#ff000010,Inactive:#ff000010|],ToolTipBase:|[Active:#ff000012,Disabled:#ff000012,Inactive:#ff000012|],ToolTipText:|[Active:#ff000013,Disabled:#ff000013,Inactive:#ff000013|],PlaceholderText:|[Active:#ff000014,Disabled:#ff000014,Inactive:#ff000014|],Accent:|[Active:#ff000015,Disabled:#ff000015,Inactive:#ff000015|]")|n Expected (expectedPalette): QPalette(resolve=0x7fffffffffffffff,"WindowText:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],Button:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],Light:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],Midlight:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],Dark:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],Mid:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],Text:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],BrightText:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],ButtonText:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],Base:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],Window:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],Shadow:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],Highlight:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],HighlightedText:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],Link:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],LinkVisited:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],AlternateBase:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],ToolTipBase:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],ToolTipText:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],PlaceholderText:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],Accent:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|]")' flowId='tst_Cmptest'] +##teamcity[testFinished name='compareQPalettes(all roles are different)' flowId='tst_Cmptest'] +##teamcity[testStarted name='compareQPalettes(one role is different)' flowId='tst_Cmptest'] +##teamcity[testFailed name='compareQPalettes(one role is different)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared values are not the same|n Actual (actualPalette) : QPalette(resolve=0x7fffffffffffffff,"WindowText:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],Button:|[Active:#ff000001,Disabled:#ff000001,Inactive:#ff000001|],Light:|[Active:#ff000002,Disabled:#ff000002,Inactive:#ff000002|],Midlight:|[Active:#ff000003,Disabled:#ff000003,Inactive:#ff000003|],Dark:|[Active:#ff000004,Disabled:#ff000004,Inactive:#ff000004|],Mid:|[Active:#ff000005,Disabled:#ff000005,Inactive:#ff000005|],Text:|[Active:#ff000006,Disabled:#ff000006,Inactive:#ff000006|],BrightText:|[Active:#ff000007,Disabled:#ff000007,Inactive:#ff000007|],ButtonText:|[Active:#ff000008,Disabled:#ff000008,Inactive:#ff000008|],Base:|[Active:#ff000009,Disabled:#ff000009,Inactive:#ff000009|],Window:|[Active:#ff00000a,Disabled:#ff00000a,Inactive:#ff00000a|],Shadow:|[Active:#ff00000b,Disabled:#ff00000b,Inactive:#ff00000b|],Highlight:|[Active:#ff00000c,Disabled:#ff00000c,Inactive:#ff00000c|],HighlightedText:|[Active:#ff00000d,Disabled:#ff00000d,Inactive:#ff00000d|],Link:|[Active:#ff00000e,Disabled:#ff00000e,Inactive:#ff00000e|],LinkVisited:|[Active:#ff00000f,Disabled:#ff00000f,Inactive:#ff00000f|],AlternateBase:|[Active:#ff000010,Disabled:#ff000010,Inactive:#ff000010|],ToolTipBase:|[Active:#ff000012,Disabled:#ff000012,Inactive:#ff000012|],ToolTipText:|[Active:#ff000013,Disabled:#ff000013,Inactive:#ff000013|],PlaceholderText:|[Active:#ff000014,Disabled:#ff000014,Inactive:#ff000014|],Accent:|[Active:#ff000015,Disabled:#ff000015,Inactive:#ff000015|]")|n Expected (expectedPalette): QPalette(resolve=0x7fffffffffffffff,"WindowText:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|],Button:|[Active:#ff000001,Disabled:#ff000001,Inactive:#ff000001|],Light:|[Active:#ff000002,Disabled:#ff000002,Inactive:#ff000002|],Midlight:|[Active:#ff000003,Disabled:#ff000003,Inactive:#ff000003|],Dark:|[Active:#ff000004,Disabled:#ff000004,Inactive:#ff000004|],Mid:|[Active:#ff000005,Disabled:#ff000005,Inactive:#ff000005|],Text:|[Active:#ff000006,Disabled:#ff000006,Inactive:#ff000006|],BrightText:|[Active:#ff000007,Disabled:#ff000007,Inactive:#ff000007|],ButtonText:|[Active:#ff000008,Disabled:#ff000008,Inactive:#ff000008|],Base:|[Active:#ff000009,Disabled:#ff000009,Inactive:#ff000009|],Window:|[Active:#ff00000a,Disabled:#ff00000a,Inactive:#ff00000a|],Shadow:|[Active:#ff00000b,Disabled:#ff00000b,Inactive:#ff00000b|],Highlight:|[Active:#ff00000c,Disabled:#ff00000c,Inactive:#ff00000c|],HighlightedText:|[Active:#ff00000d,Disabled:#ff00000d,Inactive:#ff00000d|],Link:|[Active:#ff00000e,Disabled:#ff00000e,Inactive:#ff00000e|],LinkVisited:|[Active:#ff00000f,Disabled:#ff00000f,Inactive:#ff00000f|],AlternateBase:|[Active:#ff000010,Disabled:#ff000010,Inactive:#ff000010|],ToolTipBase:|[Active:#ff000012,Disabled:#ff000012,Inactive:#ff000012|],ToolTipText:|[Active:#ff000013,Disabled:#ff000013,Inactive:#ff000013|],PlaceholderText:|[Active:#ff000014,Disabled:#ff000014,Inactive:#ff000014|],Accent:|[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000|]")' flowId='tst_Cmptest'] +##teamcity[testFinished name='compareQPalettes(one role is different)' flowId='tst_Cmptest'] +##teamcity[testStarted name='compareQPalettes(all roles are the same)' flowId='tst_Cmptest'] +##teamcity[testFinished name='compareQPalettes(all roles are the same)' flowId='tst_Cmptest'] +##teamcity[testStarted name='tryCompare()' flowId='tst_Cmptest'] +##teamcity[testFailed name='tryCompare()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared values are not the same|n Actual (c) : DeferredFlag(true)|n Expected (DeferredFlag()): DeferredFlag(false)' flowId='tst_Cmptest'] +##teamcity[testStdOut name='tryCompare()' out='QINFO: Should now time out and fail' flowId='tst_Cmptest'] +##teamcity[testFinished name='tryCompare()' flowId='tst_Cmptest'] ##teamcity[testStarted name='verify()' flowId='tst_Cmptest'] ##teamcity[testFailed name='verify()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='|'opaqueFunc() < 2|' returned FALSE. ()' flowId='tst_Cmptest'] ##teamcity[testFinished name='verify()' flowId='tst_Cmptest'] ##teamcity[testStarted name='verify2()' flowId='tst_Cmptest'] -##teamcity[testFailed name='verify2()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='|'opaqueFunc() < 2|' returned FALSE. (42)' flowId='tst_Cmptest'] +##teamcity[testFailed name='verify2()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='|'opaqueFunc() < 2|' returned FALSE. (42 >= 2 (as expected, in fact))' flowId='tst_Cmptest'] ##teamcity[testFinished name='verify2()' flowId='tst_Cmptest'] ##teamcity[testStarted name='tryVerify()' flowId='tst_Cmptest'] -##teamcity[testFailed name='tryVerify()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='|'opaqueFunc() < 2|' returned FALSE. ()' flowId='tst_Cmptest'] +##teamcity[testFailed name='tryVerify()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='|'!c|' returned FALSE. ()' flowId='tst_Cmptest'] +##teamcity[testStdOut name='tryVerify()' out='QINFO: Should now time out and fail' flowId='tst_Cmptest'] ##teamcity[testFinished name='tryVerify()' flowId='tst_Cmptest'] ##teamcity[testStarted name='tryVerify2()' flowId='tst_Cmptest'] -##teamcity[testFailed name='tryVerify2()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='|'opaqueFunc() < 2|' returned FALSE. (42)' flowId='tst_Cmptest'] +##teamcity[testFailed name='tryVerify2()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='|'!c|' returned FALSE. (Should time out and fail)' flowId='tst_Cmptest'] ##teamcity[testFinished name='tryVerify2()' flowId='tst_Cmptest'] ##teamcity[testStarted name='verifyExplicitOperatorBool()' flowId='tst_Cmptest'] ##teamcity[testFinished name='verifyExplicitOperatorBool()' flowId='tst_Cmptest'] diff --git a/tests/auto/testlib/selftests/expected_cmptest.txt b/tests/auto/testlib/selftests/expected_cmptest.txt index 0fe70cdef6..ff81a46397 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.txt +++ b/tests/auto/testlib/selftests/expected_cmptest.txt @@ -51,6 +51,14 @@ FAIL! : tst_Cmptest::compare_tostring(both non-null user type) Compared values Actual (actual) : QVariant(PhonyClass,<value not representable as string>) Expected (expected): QVariant(PhonyClass,<value not representable as string>) Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)] +FAIL! : tst_Cmptest::compare_unknown() Compared values are not the same + Actual : a + Expected : b + Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)] +FAIL! : tst_Cmptest::compare_textFromDebug() Compared values are not the same + Actual (a): QDebug stream: 0 + Expected (b): QDebug stream: 1 + Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)] FAIL! : tst_Cmptest::compareQObjects() Compared QObject pointers are not the same Actual (&object1): QObject/"object1" Expected (&object2): QObject/"object2" @@ -108,6 +116,7 @@ FAIL! : tst_Cmptest::compareQListDouble() Compared lists differ at index 0. Actual (double1): 1.5 Expected (double2): 1 Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)] +PASS : tst_Cmptest::compareContainerToInitializerList() PASS : tst_Cmptest::compareQColor(Qt::yellow vs "yellow") FAIL! : tst_Cmptest::compareQColor(Qt::yellow vs Qt::green) Compared values are not the same Actual (colorA): #ffffff00 @@ -183,15 +192,30 @@ FAIL! : tst_Cmptest::compareQVector4D() Compared values are not the same Actual (v4a): QVector4D(1, 2, 3, 4) Expected (v4b): QVector4D(1, 3, 3, 4) Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)] +FAIL! : tst_Cmptest::compareQPalettes(all roles are different) Compared values are not the same + Actual (actualPalette) : QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000001,Disabled:#ff000001,Inactive:#ff000001],Light:[Active:#ff000002,Disabled:#ff000002,Inactive:#ff000002],Midlight:[Active:#ff000003,Disabled:#ff000003,Inactive:#ff000003],Dark:[Active:#ff000004,Disabled:#ff000004,Inactive:#ff000004],Mid:[Active:#ff000005,Disabled:#ff000005,Inactive:#ff000005],Text:[Active:#ff000006,Disabled:#ff000006,Inactive:#ff000006],BrightText:[Active:#ff000007,Disabled:#ff000007,Inactive:#ff000007],ButtonText:[Active:#ff000008,Disabled:#ff000008,Inactive:#ff000008],Base:[Active:#ff000009,Disabled:#ff000009,Inactive:#ff000009],Window:[Active:#ff00000a,Disabled:#ff00000a,Inactive:#ff00000a],Shadow:[Active:#ff00000b,Disabled:#ff00000b,Inactive:#ff00000b],Highlight:[Active:#ff00000c,Disabled:#ff00000c,Inactive:#ff00000c],HighlightedText:[Active:#ff00000d,Disabled:#ff00000d,Inactive:#ff00000d],Link:[Active:#ff00000e,Disabled:#ff00000e,Inactive:#ff00000e],LinkVisited:[Active:#ff00000f,Disabled:#ff00000f,Inactive:#ff00000f],AlternateBase:[Active:#ff000010,Disabled:#ff000010,Inactive:#ff000010],ToolTipBase:[Active:#ff000012,Disabled:#ff000012,Inactive:#ff000012],ToolTipText:[Active:#ff000013,Disabled:#ff000013,Inactive:#ff000013],PlaceholderText:[Active:#ff000014,Disabled:#ff000014,Inactive:#ff000014],Accent:[Active:#ff000015,Disabled:#ff000015,Inactive:#ff000015]") + Expected (expectedPalette): QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Light:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Midlight:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Dark:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Mid:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Text:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],BrightText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],ButtonText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Base:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Window:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Shadow:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Highlight:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],HighlightedText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Link:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],LinkVisited:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],AlternateBase:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],ToolTipBase:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],ToolTipText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],PlaceholderText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Accent:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000]") + Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)] +FAIL! : tst_Cmptest::compareQPalettes(one role is different) Compared values are not the same + Actual (actualPalette) : QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000001,Disabled:#ff000001,Inactive:#ff000001],Light:[Active:#ff000002,Disabled:#ff000002,Inactive:#ff000002],Midlight:[Active:#ff000003,Disabled:#ff000003,Inactive:#ff000003],Dark:[Active:#ff000004,Disabled:#ff000004,Inactive:#ff000004],Mid:[Active:#ff000005,Disabled:#ff000005,Inactive:#ff000005],Text:[Active:#ff000006,Disabled:#ff000006,Inactive:#ff000006],BrightText:[Active:#ff000007,Disabled:#ff000007,Inactive:#ff000007],ButtonText:[Active:#ff000008,Disabled:#ff000008,Inactive:#ff000008],Base:[Active:#ff000009,Disabled:#ff000009,Inactive:#ff000009],Window:[Active:#ff00000a,Disabled:#ff00000a,Inactive:#ff00000a],Shadow:[Active:#ff00000b,Disabled:#ff00000b,Inactive:#ff00000b],Highlight:[Active:#ff00000c,Disabled:#ff00000c,Inactive:#ff00000c],HighlightedText:[Active:#ff00000d,Disabled:#ff00000d,Inactive:#ff00000d],Link:[Active:#ff00000e,Disabled:#ff00000e,Inactive:#ff00000e],LinkVisited:[Active:#ff00000f,Disabled:#ff00000f,Inactive:#ff00000f],AlternateBase:[Active:#ff000010,Disabled:#ff000010,Inactive:#ff000010],ToolTipBase:[Active:#ff000012,Disabled:#ff000012,Inactive:#ff000012],ToolTipText:[Active:#ff000013,Disabled:#ff000013,Inactive:#ff000013],PlaceholderText:[Active:#ff000014,Disabled:#ff000014,Inactive:#ff000014],Accent:[Active:#ff000015,Disabled:#ff000015,Inactive:#ff000015]") + Expected (expectedPalette): QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000001,Disabled:#ff000001,Inactive:#ff000001],Light:[Active:#ff000002,Disabled:#ff000002,Inactive:#ff000002],Midlight:[Active:#ff000003,Disabled:#ff000003,Inactive:#ff000003],Dark:[Active:#ff000004,Disabled:#ff000004,Inactive:#ff000004],Mid:[Active:#ff000005,Disabled:#ff000005,Inactive:#ff000005],Text:[Active:#ff000006,Disabled:#ff000006,Inactive:#ff000006],BrightText:[Active:#ff000007,Disabled:#ff000007,Inactive:#ff000007],ButtonText:[Active:#ff000008,Disabled:#ff000008,Inactive:#ff000008],Base:[Active:#ff000009,Disabled:#ff000009,Inactive:#ff000009],Window:[Active:#ff00000a,Disabled:#ff00000a,Inactive:#ff00000a],Shadow:[Active:#ff00000b,Disabled:#ff00000b,Inactive:#ff00000b],Highlight:[Active:#ff00000c,Disabled:#ff00000c,Inactive:#ff00000c],HighlightedText:[Active:#ff00000d,Disabled:#ff00000d,Inactive:#ff00000d],Link:[Active:#ff00000e,Disabled:#ff00000e,Inactive:#ff00000e],LinkVisited:[Active:#ff00000f,Disabled:#ff00000f,Inactive:#ff00000f],AlternateBase:[Active:#ff000010,Disabled:#ff000010,Inactive:#ff000010],ToolTipBase:[Active:#ff000012,Disabled:#ff000012,Inactive:#ff000012],ToolTipText:[Active:#ff000013,Disabled:#ff000013,Inactive:#ff000013],PlaceholderText:[Active:#ff000014,Disabled:#ff000014,Inactive:#ff000014],Accent:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000]") + Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)] +PASS : tst_Cmptest::compareQPalettes(all roles are the same) +QINFO : tst_Cmptest::tryCompare() Should now time out and fail +FAIL! : tst_Cmptest::tryCompare() Compared values are not the same + Actual (c) : DeferredFlag(true) + Expected (DeferredFlag()): DeferredFlag(false) + Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)] FAIL! : tst_Cmptest::verify() 'opaqueFunc() < 2' returned FALSE. () Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)] -FAIL! : tst_Cmptest::verify2() 'opaqueFunc() < 2' returned FALSE. (42) +FAIL! : tst_Cmptest::verify2() 'opaqueFunc() < 2' returned FALSE. (42 >= 2 (as expected, in fact)) Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)] -FAIL! : tst_Cmptest::tryVerify() 'opaqueFunc() < 2' returned FALSE. () +QINFO : tst_Cmptest::tryVerify() Should now time out and fail +FAIL! : tst_Cmptest::tryVerify() '!c' returned FALSE. () Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)] -FAIL! : tst_Cmptest::tryVerify2() 'opaqueFunc() < 2' returned FALSE. (42) +FAIL! : tst_Cmptest::tryVerify2() '!c' returned FALSE. (Should time out and fail) Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)] PASS : tst_Cmptest::verifyExplicitOperatorBool() PASS : tst_Cmptest::cleanupTestCase() -Totals: 21 passed, 46 failed, 0 skipped, 0 blacklisted, 0ms +Totals: 23 passed, 51 failed, 0 skipped, 0 blacklisted, 0ms ********* Finished testing of tst_Cmptest ********* diff --git a/tests/auto/testlib/selftests/expected_cmptest.xml b/tests/auto/testlib/selftests/expected_cmptest.xml index 509dca88b7..df4d8b28be 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.xml +++ b/tests/auto/testlib/selftests/expected_cmptest.xml @@ -111,6 +111,22 @@ </Incident> <Duration msecs="0"/> </TestFunction> + <TestFunction name="compare_unknown"> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> + <Description><![CDATA[Compared values are not the same + Actual : a + Expected : b]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="compare_textFromDebug"> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> + <Description><![CDATA[Compared values are not the same + Actual (a): QDebug stream: 0 + Expected (b): QDebug stream: 1]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> <TestFunction name="compareQObjects"> <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> <Description><![CDATA[Compared QObject pointers are not the same @@ -220,6 +236,10 @@ </Incident> <Duration msecs="0"/> </TestFunction> + <TestFunction name="compareContainerToInitializerList"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> <TestFunction name="compareQColor"> <Incident type="pass" file="" line="0"> <DataTag><![CDATA[Qt::yellow vs "yellow"]]></DataTag> @@ -363,6 +383,35 @@ </Incident> <Duration msecs="0"/> </TestFunction> + <TestFunction name="compareQPalettes"> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> + <DataTag><![CDATA[all roles are different]]></DataTag> + <Description><![CDATA[Compared values are not the same + Actual (actualPalette) : QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000001,Disabled:#ff000001,Inactive:#ff000001],Light:[Active:#ff000002,Disabled:#ff000002,Inactive:#ff000002],Midlight:[Active:#ff000003,Disabled:#ff000003,Inactive:#ff000003],Dark:[Active:#ff000004,Disabled:#ff000004,Inactive:#ff000004],Mid:[Active:#ff000005,Disabled:#ff000005,Inactive:#ff000005],Text:[Active:#ff000006,Disabled:#ff000006,Inactive:#ff000006],BrightText:[Active:#ff000007,Disabled:#ff000007,Inactive:#ff000007],ButtonText:[Active:#ff000008,Disabled:#ff000008,Inactive:#ff000008],Base:[Active:#ff000009,Disabled:#ff000009,Inactive:#ff000009],Window:[Active:#ff00000a,Disabled:#ff00000a,Inactive:#ff00000a],Shadow:[Active:#ff00000b,Disabled:#ff00000b,Inactive:#ff00000b],Highlight:[Active:#ff00000c,Disabled:#ff00000c,Inactive:#ff00000c],HighlightedText:[Active:#ff00000d,Disabled:#ff00000d,Inactive:#ff00000d],Link:[Active:#ff00000e,Disabled:#ff00000e,Inactive:#ff00000e],LinkVisited:[Active:#ff00000f,Disabled:#ff00000f,Inactive:#ff00000f],AlternateBase:[Active:#ff000010,Disabled:#ff000010,Inactive:#ff000010],ToolTipBase:[Active:#ff000012,Disabled:#ff000012,Inactive:#ff000012],ToolTipText:[Active:#ff000013,Disabled:#ff000013,Inactive:#ff000013],PlaceholderText:[Active:#ff000014,Disabled:#ff000014,Inactive:#ff000014],Accent:[Active:#ff000015,Disabled:#ff000015,Inactive:#ff000015]") + Expected (expectedPalette): QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Light:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Midlight:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Dark:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Mid:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Text:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],BrightText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],ButtonText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Base:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Window:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Shadow:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Highlight:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],HighlightedText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Link:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],LinkVisited:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],AlternateBase:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],ToolTipBase:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],ToolTipText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],PlaceholderText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Accent:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000]")]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> + <DataTag><![CDATA[one role is different]]></DataTag> + <Description><![CDATA[Compared values are not the same + Actual (actualPalette) : QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000001,Disabled:#ff000001,Inactive:#ff000001],Light:[Active:#ff000002,Disabled:#ff000002,Inactive:#ff000002],Midlight:[Active:#ff000003,Disabled:#ff000003,Inactive:#ff000003],Dark:[Active:#ff000004,Disabled:#ff000004,Inactive:#ff000004],Mid:[Active:#ff000005,Disabled:#ff000005,Inactive:#ff000005],Text:[Active:#ff000006,Disabled:#ff000006,Inactive:#ff000006],BrightText:[Active:#ff000007,Disabled:#ff000007,Inactive:#ff000007],ButtonText:[Active:#ff000008,Disabled:#ff000008,Inactive:#ff000008],Base:[Active:#ff000009,Disabled:#ff000009,Inactive:#ff000009],Window:[Active:#ff00000a,Disabled:#ff00000a,Inactive:#ff00000a],Shadow:[Active:#ff00000b,Disabled:#ff00000b,Inactive:#ff00000b],Highlight:[Active:#ff00000c,Disabled:#ff00000c,Inactive:#ff00000c],HighlightedText:[Active:#ff00000d,Disabled:#ff00000d,Inactive:#ff00000d],Link:[Active:#ff00000e,Disabled:#ff00000e,Inactive:#ff00000e],LinkVisited:[Active:#ff00000f,Disabled:#ff00000f,Inactive:#ff00000f],AlternateBase:[Active:#ff000010,Disabled:#ff000010,Inactive:#ff000010],ToolTipBase:[Active:#ff000012,Disabled:#ff000012,Inactive:#ff000012],ToolTipText:[Active:#ff000013,Disabled:#ff000013,Inactive:#ff000013],PlaceholderText:[Active:#ff000014,Disabled:#ff000014,Inactive:#ff000014],Accent:[Active:#ff000015,Disabled:#ff000015,Inactive:#ff000015]") + Expected (expectedPalette): QPalette(resolve=0x7fffffffffffffff,"WindowText:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000],Button:[Active:#ff000001,Disabled:#ff000001,Inactive:#ff000001],Light:[Active:#ff000002,Disabled:#ff000002,Inactive:#ff000002],Midlight:[Active:#ff000003,Disabled:#ff000003,Inactive:#ff000003],Dark:[Active:#ff000004,Disabled:#ff000004,Inactive:#ff000004],Mid:[Active:#ff000005,Disabled:#ff000005,Inactive:#ff000005],Text:[Active:#ff000006,Disabled:#ff000006,Inactive:#ff000006],BrightText:[Active:#ff000007,Disabled:#ff000007,Inactive:#ff000007],ButtonText:[Active:#ff000008,Disabled:#ff000008,Inactive:#ff000008],Base:[Active:#ff000009,Disabled:#ff000009,Inactive:#ff000009],Window:[Active:#ff00000a,Disabled:#ff00000a,Inactive:#ff00000a],Shadow:[Active:#ff00000b,Disabled:#ff00000b,Inactive:#ff00000b],Highlight:[Active:#ff00000c,Disabled:#ff00000c,Inactive:#ff00000c],HighlightedText:[Active:#ff00000d,Disabled:#ff00000d,Inactive:#ff00000d],Link:[Active:#ff00000e,Disabled:#ff00000e,Inactive:#ff00000e],LinkVisited:[Active:#ff00000f,Disabled:#ff00000f,Inactive:#ff00000f],AlternateBase:[Active:#ff000010,Disabled:#ff000010,Inactive:#ff000010],ToolTipBase:[Active:#ff000012,Disabled:#ff000012,Inactive:#ff000012],ToolTipText:[Active:#ff000013,Disabled:#ff000013,Inactive:#ff000013],PlaceholderText:[Active:#ff000014,Disabled:#ff000014,Inactive:#ff000014],Accent:[Active:#ff000000,Disabled:#ff000000,Inactive:#ff000000]")]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[all roles are the same]]></DataTag> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="tryCompare"> + <Message type="qinfo" file="" line="0"> + <Description><![CDATA[Should now time out and fail]]></Description> + </Message> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> + <Description><![CDATA[Compared values are not the same + Actual (c) : DeferredFlag(true) + Expected (DeferredFlag()): DeferredFlag(false)]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> <TestFunction name="verify"> <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> <Description><![CDATA['opaqueFunc() < 2' returned FALSE. ()]]></Description> @@ -371,19 +420,22 @@ </TestFunction> <TestFunction name="verify2"> <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> - <Description><![CDATA['opaqueFunc() < 2' returned FALSE. (42)]]></Description> + <Description><![CDATA['opaqueFunc() < 2' returned FALSE. (42 >= 2 (as expected, in fact))]]></Description> </Incident> <Duration msecs="0"/> </TestFunction> <TestFunction name="tryVerify"> + <Message type="qinfo" file="" line="0"> + <Description><![CDATA[Should now time out and fail]]></Description> + </Message> <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> - <Description><![CDATA['opaqueFunc() < 2' returned FALSE. ()]]></Description> + <Description><![CDATA['!c' returned FALSE. ()]]></Description> </Incident> <Duration msecs="0"/> </TestFunction> <TestFunction name="tryVerify2"> <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> - <Description><![CDATA['opaqueFunc() < 2' returned FALSE. (42)]]></Description> + <Description><![CDATA['!c' returned FALSE. (Should time out and fail)]]></Description> </Incident> <Duration msecs="0"/> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_commandlinedata.tap b/tests/auto/testlib/selftests/expected_commandlinedata.tap index 1e1abfba50..d623e73f40 100644 --- a/tests/auto/testlib/selftests/expected_commandlinedata.tap +++ b/tests/auto/testlib/selftests/expected_commandlinedata.tap @@ -1,18 +1,18 @@ TAP version 13 # tst_DataTable ok 1 - initTestCase() -# QVERIFY(test) ok 2 - fiveTablePasses(fiveTablePasses_data1) -# QVERIFY(test) + # inform: QVERIFY(test) ok 3 - fiveTablePasses(fiveTablePasses_data2) -# QVERIFY(test) + # inform: QVERIFY(test) ok 4 - fiveTablePasses(fiveTablePasses_data3) -# QVERIFY(test) + # inform: QVERIFY(test) ok 5 - fiveTablePasses(fiveTablePasses_data4) -# QVERIFY(test) + # inform: QVERIFY(test) ok 6 - fiveTablePasses(fiveTablePasses_data5) -# QVERIFY(test) + # inform: QVERIFY(test) ok 7 - fiveTablePasses(fiveTablePasses_data1) + # inform: QVERIFY(test) ok 8 - cleanupTestCase() 1..8 # tests 8 diff --git a/tests/auto/testlib/selftests/expected_counting.tap b/tests/auto/testlib/selftests/expected_counting.tap index a5ef13a973..63f1c83fb1 100644 --- a/tests/auto/testlib/selftests/expected_counting.tap +++ b/tests/auto/testlib/selftests/expected_counting.tap @@ -95,21 +95,32 @@ not ok 21 - testFailInInit(fail) ... ok 22 - testFailInInit(after) ok 23 - testFailInCleanup(before) -# This test function should execute and then QFAIL in cleanup() not ok 24 - testFailInCleanup(fail) --- # Fail in cleanup() at: tst_Counting::testFailInCleanup() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:0) file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp line: 0 + extensions: + messages: + - severity: debug + message: This test function should execute and then QFAIL in cleanup() ... ok 25 - testFailInCleanup(after) ok 26 - testSkipInInit(before) ok 27 - testSkipInInit(skip) # SKIP Skip in init() ok 28 - testSkipInInit(after) ok 29 - testSkipInCleanup(before) -# This test function should execute and then QSKIP in cleanup() ok 30 - testSkipInCleanup(skip) # SKIP Skip in cleanup() + --- + at: tst_Counting::testSkipInCleanup() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:0) + file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp + line: 0 + extensions: + messages: + - severity: debug + message: This test function should execute and then QSKIP in cleanup() + ... ok 31 - testSkipInCleanup(after) ok 32 - cleanupTestCase() 1..32 diff --git a/tests/auto/testlib/selftests/expected_crashes_3.txt b/tests/auto/testlib/selftests/expected_crashes_3.txt deleted file mode 100644 index c32ea53675..0000000000 --- a/tests/auto/testlib/selftests/expected_crashes_3.txt +++ /dev/null @@ -1,8 +0,0 @@ -********* Start testing of tst_Crashes ********* -Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ -PASS : tst_Crashes::initTestCase() -QFATAL : tst_Crashes::crash() Received signal 11 - Function time: ms Total time: ms -FAIL! : tst_Crashes::crash() Received a fatal error. -Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted -********* Finished testing of tst_Crashes ********* diff --git a/tests/auto/testlib/selftests/expected_crashes_4.txt b/tests/auto/testlib/selftests/expected_crashes_4.txt deleted file mode 100644 index 90ae91b8ba..0000000000 --- a/tests/auto/testlib/selftests/expected_crashes_4.txt +++ /dev/null @@ -1,6 +0,0 @@ -********* Start testing of tst_Crashes ********* -Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ -PASS : tst_Crashes::initTestCase() -QFATAL : tst_Crashes::crash() Received signal 11 - Function time: ms Total time: ms -FAIL! : tst_Crashes::crash() Received a fatal error. diff --git a/tests/auto/testlib/selftests/expected_crashes_5.txt b/tests/auto/testlib/selftests/expected_crashes_5.txt deleted file mode 100644 index 088b9c5324..0000000000 --- a/tests/auto/testlib/selftests/expected_crashes_5.txt +++ /dev/null @@ -1,5 +0,0 @@ -********* Start testing of tst_Crashes ********* -Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ -PASS : tst_Crashes::initTestCase() -QFATAL : tst_Crashes::crash() Received signal 11 - Function time: ms Total time: ms diff --git a/tests/auto/testlib/selftests/expected_eventloop.junitxml b/tests/auto/testlib/selftests/expected_eventloop.junitxml new file mode 100644 index 0000000000..566bc1605e --- /dev/null +++ b/tests/auto/testlib/selftests/expected_eventloop.junitxml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<testsuite name="tst_EventLoop" timestamp="@TEST_START_TIME@" hostname="@HOSTNAME@" tests="5" failures="1" errors="0" skipped="1" time="@TEST_DURATION@"> + <properties> + <property name="QTestVersion" value="@INSERT_QT_VERSION_HERE@"/> + <property name="QtVersion" value="@INSERT_QT_VERSION_HERE@"/> + <property name="QtBuild" value=""/> + </properties> + <testcase name="initTestCase" classname="tst_EventLoop" time="@TEST_DURATION@"/> + <testcase name="fail" classname="tst_EventLoop" time="@TEST_DURATION@"> + <failure type="fail" message="Failing test should still clean up"/> + </testcase> + <testcase name="skip" classname="tst_EventLoop" time="@TEST_DURATION@"> + <skipped message="Skipping test should still clean up"/> + </testcase> + <testcase name="pass" classname="tst_EventLoop" time="@TEST_DURATION@"/> + <testcase name="cleanupTestCase" classname="tst_EventLoop" time="@TEST_DURATION@"/> +</testsuite> diff --git a/tests/auto/testlib/selftests/expected_eventloop.lightxml b/tests/auto/testlib/selftests/expected_eventloop.lightxml new file mode 100644 index 0000000000..40880fde01 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_eventloop.lightxml @@ -0,0 +1,30 @@ + <Environment> + <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> + <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> + </Environment> + <TestFunction name="initTestCase"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="fail"> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/eventloop/tst_eventloop.cpp" line="0"> + <Description><![CDATA[Failing test should still clean up]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="skip"> + <Incident type="skip" file="qtbase/tests/auto/testlib/selftests/eventloop/tst_eventloop.cpp" line="0"> + <Description><![CDATA[Skipping test should still clean up]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="pass"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="cleanupTestCase"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <Duration msecs="0"/> diff --git a/tests/auto/testlib/selftests/expected_eventloop.tap b/tests/auto/testlib/selftests/expected_eventloop.tap new file mode 100644 index 0000000000..496a6e636a --- /dev/null +++ b/tests/auto/testlib/selftests/expected_eventloop.tap @@ -0,0 +1,17 @@ +TAP version 13 +# tst_EventLoop +ok 1 - initTestCase() +not ok 2 - fail() + --- + # Failing test should still clean up + at: tst_EventLoop::fail() (qtbase/tests/auto/testlib/selftests/eventloop/tst_eventloop.cpp:0) + file: qtbase/tests/auto/testlib/selftests/eventloop/tst_eventloop.cpp + line: 0 + ... +ok 3 - skip() # SKIP Skipping test should still clean up +ok 4 - pass() +ok 5 - cleanupTestCase() +1..5 +# tests 5 +# pass 3 +# fail 1 diff --git a/tests/auto/testlib/selftests/expected_eventloop.teamcity b/tests/auto/testlib/selftests/expected_eventloop.teamcity new file mode 100644 index 0000000000..a293a20135 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_eventloop.teamcity @@ -0,0 +1,14 @@ +##teamcity[testSuiteStarted name='tst_EventLoop' flowId='tst_EventLoop'] +##teamcity[testStarted name='initTestCase()' flowId='tst_EventLoop'] +##teamcity[testFinished name='initTestCase()' flowId='tst_EventLoop'] +##teamcity[testStarted name='fail()' flowId='tst_EventLoop'] +##teamcity[testFailed name='fail()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/eventloop/tst_eventloop.cpp(0)|]' details='Failing test should still clean up' flowId='tst_EventLoop'] +##teamcity[testFinished name='fail()' flowId='tst_EventLoop'] +##teamcity[testStarted name='skip()' flowId='tst_EventLoop'] +##teamcity[testIgnored name='skip()' message='Skipping test should still clean up |[Loc: qtbase/tests/auto/testlib/selftests/eventloop/tst_eventloop.cpp(0)|]' flowId='tst_EventLoop'] +##teamcity[testFinished name='skip()' flowId='tst_EventLoop'] +##teamcity[testStarted name='pass()' flowId='tst_EventLoop'] +##teamcity[testFinished name='pass()' flowId='tst_EventLoop'] +##teamcity[testStarted name='cleanupTestCase()' flowId='tst_EventLoop'] +##teamcity[testFinished name='cleanupTestCase()' flowId='tst_EventLoop'] +##teamcity[testSuiteFinished name='tst_EventLoop' flowId='tst_EventLoop'] diff --git a/tests/auto/testlib/selftests/expected_eventloop.txt b/tests/auto/testlib/selftests/expected_eventloop.txt new file mode 100644 index 0000000000..548ef393f6 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_eventloop.txt @@ -0,0 +1,11 @@ +********* Start testing of tst_EventLoop ********* +Config: Using QtTest library +PASS : tst_EventLoop::initTestCase() +FAIL! : tst_EventLoop::fail() Failing test should still clean up + Loc: [qtbase/tests/auto/testlib/selftests/eventloop/tst_eventloop.cpp(0)] +SKIP : tst_EventLoop::skip() Skipping test should still clean up + Loc: [qtbase/tests/auto/testlib/selftests/eventloop/tst_eventloop.cpp(0)] +PASS : tst_EventLoop::pass() +PASS : tst_EventLoop::cleanupTestCase() +Totals: 3 passed, 1 failed, 1 skipped, 0 blacklisted, 0ms +********* Finished testing of tst_EventLoop ********* diff --git a/tests/auto/testlib/selftests/expected_eventloop.xml b/tests/auto/testlib/selftests/expected_eventloop.xml new file mode 100644 index 0000000000..f9d9475666 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_eventloop.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<TestCase name="tst_EventLoop"> + <Environment> + <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> + <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> + </Environment> + <TestFunction name="initTestCase"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="fail"> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/eventloop/tst_eventloop.cpp" line="0"> + <Description><![CDATA[Failing test should still clean up]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="skip"> + <Incident type="skip" file="qtbase/tests/auto/testlib/selftests/eventloop/tst_eventloop.cpp" line="0"> + <Description><![CDATA[Skipping test should still clean up]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="pass"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="cleanupTestCase"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <Duration msecs="0"/> +</TestCase> diff --git a/tests/auto/testlib/selftests/expected_expectfail.tap b/tests/auto/testlib/selftests/expected_expectfail.tap index 8527acdaf1..8ad34c5f0a 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.tap +++ b/tests/auto/testlib/selftests/expected_expectfail.tap @@ -1,33 +1,54 @@ TAP version 13 # tst_ExpectFail ok 1 - initTestCase() -# begin not ok 2 - xfailAndContinue() # TODO This should xfail --- - at: tst_ExpectFail::xfailAndContinue() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) - file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp - line: 0 + extensions: + messages: + - severity: debug + message: begin + - severity: xfail + message: This should xfail + at: tst_ExpectFail::xfailAndContinue() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) + file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp + line: 0 + - severity: debug + message: after ... -# after -# begin not ok 3 - xfailAndAbort() # TODO This should xfail --- - at: tst_ExpectFail::xfailAndAbort() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) - file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp - line: 0 + extensions: + messages: + - severity: debug + message: begin + - severity: xfail + message: This should xfail + at: tst_ExpectFail::xfailAndAbort() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) + file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp + line: 0 ... -not ok 4 - xfailContinueSkip() # TODO This should xfail then skip +not ok 4 - xfailContinueSkip() # SKIP This skip should be reported and counted --- at: tst_ExpectFail::xfailContinueSkip() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp line: 0 + extensions: + messages: + - severity: xfail + message: This should xfail then skip + at: tst_ExpectFail::xfailContinueSkip() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) + file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp + line: 0 ... -ok 4 - xfailContinueSkip() # SKIP This skip should be reported and counted not ok 5 - xfailAbortSkip() # TODO This should xfail --- - at: tst_ExpectFail::xfailAbortSkip() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) - file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp - line: 0 + extensions: + messages: + - severity: xfail + message: This should xfail + at: tst_ExpectFail::xfailAbortSkip() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) + file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp + line: 0 ... not ok 6 - xfailTwice() --- @@ -66,107 +87,181 @@ not ok 10 - xfailDataDrivenTwice(Fail Continue) ... not ok 11 - xfailWithQString() # TODO A string --- - at: tst_ExpectFail::xfailWithQString() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) - file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp - line: 0 + extensions: + messages: + - severity: xfail + message: A string + at: tst_ExpectFail::xfailWithQString() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) + file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp + line: 0 + - severity: xfail + message: Bug 5 (The message) + at: tst_ExpectFail::xfailWithQString() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) + file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp + line: 0 ... ok 12 - xfailDataDrivenWithQString(Pass Abort) # SKIP Each Continue or Pass reports this and increments skip-count ok 13 - xfailDataDrivenWithQString(Pass Continue) # SKIP Each Continue or Pass reports this and increments skip-count not ok 14 - xfailDataDrivenWithQString(Fail Abort) # TODO A string --- - at: tst_ExpectFail::xfailDataDrivenWithQString() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) - file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp - line: 0 + extensions: + messages: + - severity: xfail + message: A string + at: tst_ExpectFail::xfailDataDrivenWithQString() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) + file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp + line: 0 ... -not ok 15 - xfailDataDrivenWithQString(Fail Continue) # TODO A string +not ok 15 - xfailDataDrivenWithQString(Fail Continue) # SKIP Each Continue or Pass reports this and increments skip-count --- at: tst_ExpectFail::xfailDataDrivenWithQString() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp line: 0 + extensions: + messages: + - severity: xfail + message: A string + at: tst_ExpectFail::xfailDataDrivenWithQString() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) + file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp + line: 0 + - severity: xfail + message: Bug 5 (The message) + at: tst_ExpectFail::xfailDataDrivenWithQString() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) + file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp + line: 0 ... -ok 15 - xfailDataDrivenWithQString(Fail Continue) # SKIP Each Continue or Pass reports this and increments skip-count ok 16 - xfailDataDrivenWithQVerify(Pass Abort) ok 17 - xfailDataDrivenWithQVerify(Pass Continue) not ok 18 - xfailDataDrivenWithQVerify(Fail Abort) # TODO This test should xfail --- - at: tst_ExpectFail::xfailDataDrivenWithQVerify() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) - file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp - line: 0 + extensions: + messages: + - severity: xfail + message: This test should xfail + at: tst_ExpectFail::xfailDataDrivenWithQVerify() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) + file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp + line: 0 ... not ok 19 - xfailDataDrivenWithQVerify(Fail Continue) # TODO This test should xfail --- - at: tst_ExpectFail::xfailDataDrivenWithQVerify() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) - file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp - line: 0 + extensions: + messages: + - severity: xfail + message: This test should xfail + at: tst_ExpectFail::xfailDataDrivenWithQVerify() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) + file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp + line: 0 ... ok 20 - xfailDataDrivenWithQCompare(Pass Abort) ok 21 - xfailDataDrivenWithQCompare(Pass Continue) not ok 22 - xfailDataDrivenWithQCompare(Fail Abort) # TODO This test should xfail --- - at: tst_ExpectFail::xfailDataDrivenWithQCompare() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) - file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp - line: 0 + extensions: + messages: + - severity: xfail + message: This test should xfail + at: tst_ExpectFail::xfailDataDrivenWithQCompare() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) + file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp + line: 0 ... not ok 23 - xfailDataDrivenWithQCompare(Fail Continue) # TODO This test should xfail --- - at: tst_ExpectFail::xfailDataDrivenWithQCompare() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) - file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp - line: 0 + extensions: + messages: + - severity: xfail + message: This test should xfail + at: tst_ExpectFail::xfailDataDrivenWithQCompare() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) + file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp + line: 0 ... -# Should pass (*not* xpass), despite test-case name ok 24 - xfailOnWrongRow(Fail Abort) -# Should pass (*not* xpass), despite test-case name + --- + extensions: + messages: + - severity: debug + message: Should pass (*not* xpass), despite test-case name + ... ok 25 - xfailOnWrongRow(Fail Continue) + --- + extensions: + messages: + - severity: debug + message: Should pass (*not* xpass), despite test-case name + ... not ok 26 - xfailOnAnyRow(Fail Abort) # TODO This test should xfail --- - at: tst_ExpectFail::xfailOnAnyRow() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) - file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp - line: 0 + extensions: + messages: + - severity: xfail + message: This test should xfail + at: tst_ExpectFail::xfailOnAnyRow() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) + file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp + line: 0 ... not ok 27 - xfailOnAnyRow(Fail Continue) # TODO This test should xfail --- - at: tst_ExpectFail::xfailOnAnyRow() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) - file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp - line: 0 + extensions: + messages: + - severity: xfail + message: This test should xfail + at: tst_ExpectFail::xfailOnAnyRow() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) + file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp + line: 0 ... -# Should fail (*not* xfail), despite test-case name not ok 28 - xfailWithoutCheck(Fail Abort) --- # QEXPECT_FAIL was called without any subsequent verification statements + extensions: + messages: + - severity: debug + message: Should fail (*not* xfail), despite test-case name ... -# Should fail (*not* xfail), despite test-case name not ok 29 - xfailWithoutCheck(Fail Continue) --- # QEXPECT_FAIL was called without any subsequent verification statements + extensions: + messages: + - severity: debug + message: Should fail (*not* xfail), despite test-case name ... ok 30 - xpassAbort() # TODO 'true' returned TRUE unexpectedly. () ok 31 - xpassAbortSkip() # TODO 'true' returned TRUE unexpectedly. () ok 32 - xpassAbortXfailContinue() # TODO 'true' returned TRUE unexpectedly. () ok 33 - xpassContinue() # TODO 'true' returned TRUE unexpectedly. () -# This should be reached +# debug: This should be reached ok 34 - xpassContinueSkip() # TODO 'true' returned TRUE unexpectedly. () ok 34 - xpassContinueSkip() # SKIP This should be reached but not increment skip-count ok 35 - xpassContinueXfailAbort() # TODO 'true' returned TRUE unexpectedly. () -not ok 36 - xpassContinueXfailAbort() # TODO This test should xfail but not add to totals - --- - at: tst_ExpectFail::xpassContinueXfailAbort() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) - file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp - line: 0 - ... + # xfail: This test should xfail but not add to totals ok 36 - xpassAbortDataDrivenWithQVerify(XPass) # TODO 'true' returned TRUE unexpectedly. () ok 37 - xpassAbortDataDrivenWithQVerify(Pass) ok 38 - xpassContinueDataDrivenWithQVerify(XPass) # TODO 'true' returned TRUE unexpectedly. () -# Test should Continue past XPASS -# Test should simply PASS +# debug: Test should Continue past XPASS ok 39 - xpassContinueDataDrivenWithQVerify(Pass) + --- + extensions: + messages: + - severity: debug + message: Test should simply PASS + ... ok 40 - xpassAbortDataDrivenWithQCompare(XPass) # TODO QCOMPARE(1, 1) returned TRUE unexpectedly. ok 41 - xpassAbortDataDrivenWithQCompare(Pass) ok 42 - xpassContinueDataDrivenWithQCompare(XPass) # TODO QCOMPARE(1, 1) returned TRUE unexpectedly. -# Test should Continue past XPASS -# Test should simply PASS +# debug: Test should Continue past XPASS ok 43 - xpassContinueDataDrivenWithQCompare(Pass) -# Totals should add up to 44: 23 passed, 17 failed, 4 skipped + --- + extensions: + messages: + - severity: debug + message: Test should simply PASS + ... ok 44 - cleanupTestCase() + --- + extensions: + messages: + - severity: debug + message: Totals should add up to 44: 23 passed, 17 failed, 4 skipped + ... 1..44 # tests 44 # pass 23 diff --git a/tests/auto/testlib/selftests/expected_extendedcompare.junitxml b/tests/auto/testlib/selftests/expected_extendedcompare.junitxml new file mode 100644 index 0000000000..b840773852 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_extendedcompare.junitxml @@ -0,0 +1,526 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<testsuite name="tst_ExtendedCompare" timestamp="@TEST_START_TIME@" hostname="@HOSTNAME@" tests="148" failures="74" errors="0" skipped="0" time="@TEST_DURATION@"> + <properties> + <property name="QTestVersion" value="@INSERT_QT_VERSION_HERE@"/> + <property name="QtVersion" value="@INSERT_QT_VERSION_HERE@"/> + <property name="QtBuild" value=""/> + </properties> + <testcase name="initTestCase" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareInts(EQ:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareInts(EQ:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): 2]]> + </failure> + </testcase> + <testcase name="compareInts(EQ:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 2 + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="compareInts(NE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be different from the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="compareInts(NE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareInts(NE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareInts(LT:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="compareInts(LT:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareInts(LT:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than the baseline, but is not"> + <![CDATA[ Computed (lhs): 2 + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="compareInts(LE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareInts(LE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareInts(LE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than or equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 2 + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="compareInts(GT:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="compareInts(GT:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): 2]]> + </failure> + </testcase> + <testcase name="compareInts(GT:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareInts(GE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareInts(GE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than or equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): 2]]> + </failure> + </testcase> + <testcase name="compareInts(GE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareFloats(EQ:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareFloats(EQ:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): 1.1]]> + </failure> + </testcase> + <testcase name="compareFloats(EQ:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 1.1 + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="compareFloats(NE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be different from the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="compareFloats(NE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareFloats(NE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareFloats(LT:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="compareFloats(LT:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareFloats(LT:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than the baseline, but is not"> + <![CDATA[ Computed (lhs): 1.1 + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="compareFloats(LE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareFloats(LE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareFloats(LE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than or equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 1.1 + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="compareFloats(GT:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="compareFloats(GT:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): 1.1]]> + </failure> + </testcase> + <testcase name="compareFloats(GT:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareFloats(GE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareFloats(GE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than or equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): 1.1]]> + </failure> + </testcase> + <testcase name="compareFloats(GE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareDoubles(EQ:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareDoubles(EQ:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 0 + Baseline (rhs): 0.1]]> + </failure> + </testcase> + <testcase name="compareDoubles(EQ:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 0.1 + Baseline (rhs): 0]]> + </failure> + </testcase> + <testcase name="compareDoubles(NE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be different from the baseline, but is not"> + <![CDATA[ Computed (lhs): 0 + Baseline (rhs): 0]]> + </failure> + </testcase> + <testcase name="compareDoubles(NE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareDoubles(NE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareDoubles(LT:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than the baseline, but is not"> + <![CDATA[ Computed (lhs): 0 + Baseline (rhs): 0]]> + </failure> + </testcase> + <testcase name="compareDoubles(LT:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareDoubles(LT:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than the baseline, but is not"> + <![CDATA[ Computed (lhs): 0.1 + Baseline (rhs): 0]]> + </failure> + </testcase> + <testcase name="compareDoubles(LE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareDoubles(LE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareDoubles(LE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than or equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 0.1 + Baseline (rhs): 0]]> + </failure> + </testcase> + <testcase name="compareDoubles(GT:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than the baseline, but is not"> + <![CDATA[ Computed (lhs): 0 + Baseline (rhs): 0]]> + </failure> + </testcase> + <testcase name="compareDoubles(GT:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than the baseline, but is not"> + <![CDATA[ Computed (lhs): 0 + Baseline (rhs): 0.1]]> + </failure> + </testcase> + <testcase name="compareDoubles(GT:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareDoubles(GE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareDoubles(GE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than or equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 0 + Baseline (rhs): 0.1]]> + </failure> + </testcase> + <testcase name="compareDoubles(GE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="comparePointers(EQ:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="comparePointers(EQ:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): 2]]> + </failure> + </testcase> + <testcase name="comparePointers(EQ:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 2 + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="comparePointers(NE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be different from the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="comparePointers(NE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="comparePointers(NE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="comparePointers(LT:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="comparePointers(LT:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="comparePointers(LT:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than the baseline, but is not"> + <![CDATA[ Computed (lhs): 2 + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="comparePointers(LE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="comparePointers(LE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="comparePointers(LE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than or equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 2 + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="comparePointers(GT:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="comparePointers(GT:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): 2]]> + </failure> + </testcase> + <testcase name="comparePointers(GT:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="comparePointers(GE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="comparePointers(GE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than or equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): 2]]> + </failure> + </testcase> + <testcase name="comparePointers(GE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareToNullptr(EQ:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareToNullptr(EQ:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): "nullptr" + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="compareToNullptr(EQ:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): "nullptr"]]> + </failure> + </testcase> + <testcase name="compareToNullptr(NE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be different from the baseline, but is not"> + <![CDATA[ Computed (lhs): "nullptr" + Baseline (rhs): "nullptr"]]> + </failure> + </testcase> + <testcase name="compareToNullptr(NE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareToNullptr(NE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareToNullptr(LT:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than the baseline, but is not"> + <![CDATA[ Computed (lhs): "nullptr" + Baseline (rhs): "nullptr"]]> + </failure> + </testcase> + <testcase name="compareToNullptr(LT:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareToNullptr(LT:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): "nullptr"]]> + </failure> + </testcase> + <testcase name="compareToNullptr(LE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareToNullptr(LE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareToNullptr(LE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than or equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): "nullptr"]]> + </failure> + </testcase> + <testcase name="compareToNullptr(GT:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than the baseline, but is not"> + <![CDATA[ Computed (lhs): "nullptr" + Baseline (rhs): "nullptr"]]> + </failure> + </testcase> + <testcase name="compareToNullptr(GT:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than the baseline, but is not"> + <![CDATA[ Computed (lhs): "nullptr" + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="compareToNullptr(GT:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareToNullptr(GE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareToNullptr(GE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than or equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): "nullptr" + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="compareToNullptr(GE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareUnregistereEnum(EQ:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareUnregistereEnum(EQ:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 0 + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="compareUnregistereEnum(EQ:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): 0]]> + </failure> + </testcase> + <testcase name="compareUnregistereEnum(NE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be different from the baseline, but is not"> + <![CDATA[ Computed (lhs): 0 + Baseline (rhs): 0]]> + </failure> + </testcase> + <testcase name="compareUnregistereEnum(NE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareUnregistereEnum(NE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareUnregistereEnum(LT:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than the baseline, but is not"> + <![CDATA[ Computed (lhs): 0 + Baseline (rhs): 0]]> + </failure> + </testcase> + <testcase name="compareUnregistereEnum(LT:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareUnregistereEnum(LT:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): 0]]> + </failure> + </testcase> + <testcase name="compareUnregistereEnum(LE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareUnregistereEnum(LE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareUnregistereEnum(LE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than or equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 1 + Baseline (rhs): 0]]> + </failure> + </testcase> + <testcase name="compareUnregistereEnum(GT:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than the baseline, but is not"> + <![CDATA[ Computed (lhs): 0 + Baseline (rhs): 0]]> + </failure> + </testcase> + <testcase name="compareUnregistereEnum(GT:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than the baseline, but is not"> + <![CDATA[ Computed (lhs): 0 + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="compareUnregistereEnum(GT:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareUnregistereEnum(GE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareUnregistereEnum(GE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than or equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): 0 + Baseline (rhs): 1]]> + </failure> + </testcase> + <testcase name="compareUnregistereEnum(GE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareRegistereEnum(EQ:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareRegistereEnum(EQ:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): Monday + Baseline (rhs): Sunday]]> + </failure> + </testcase> + <testcase name="compareRegistereEnum(EQ:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): Sunday + Baseline (rhs): Monday]]> + </failure> + </testcase> + <testcase name="compareRegistereEnum(NE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be different from the baseline, but is not"> + <![CDATA[ Computed (lhs): Monday + Baseline (rhs): Monday]]> + </failure> + </testcase> + <testcase name="compareRegistereEnum(NE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareRegistereEnum(NE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareRegistereEnum(LT:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than the baseline, but is not"> + <![CDATA[ Computed (lhs): Monday + Baseline (rhs): Monday]]> + </failure> + </testcase> + <testcase name="compareRegistereEnum(LT:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareRegistereEnum(LT:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than the baseline, but is not"> + <![CDATA[ Computed (lhs): Sunday + Baseline (rhs): Monday]]> + </failure> + </testcase> + <testcase name="compareRegistereEnum(LE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareRegistereEnum(LE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareRegistereEnum(LE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than or equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): Sunday + Baseline (rhs): Monday]]> + </failure> + </testcase> + <testcase name="compareRegistereEnum(GT:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than the baseline, but is not"> + <![CDATA[ Computed (lhs): Monday + Baseline (rhs): Monday]]> + </failure> + </testcase> + <testcase name="compareRegistereEnum(GT:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than the baseline, but is not"> + <![CDATA[ Computed (lhs): Monday + Baseline (rhs): Sunday]]> + </failure> + </testcase> + <testcase name="compareRegistereEnum(GT:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareRegistereEnum(GE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareRegistereEnum(GE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than or equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): Monday + Baseline (rhs): Sunday]]> + </failure> + </testcase> + <testcase name="compareRegistereEnum(GE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareCustomTypes(EQ:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareCustomTypes(EQ:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(2)]]> + </failure> + </testcase> + <testcase name="compareCustomTypes(EQ:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): MyClass(2) + Baseline (rhs): MyClass(1)]]> + </failure> + </testcase> + <testcase name="compareCustomTypes(NE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be different from the baseline, but is not"> + <![CDATA[ Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(1)]]> + </failure> + </testcase> + <testcase name="compareCustomTypes(NE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareCustomTypes(NE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareCustomTypes(LT:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than the baseline, but is not"> + <![CDATA[ Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(1)]]> + </failure> + </testcase> + <testcase name="compareCustomTypes(LT:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareCustomTypes(LT:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than the baseline, but is not"> + <![CDATA[ Computed (lhs): MyClass(2) + Baseline (rhs): MyClass(1)]]> + </failure> + </testcase> + <testcase name="compareCustomTypes(LE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareCustomTypes(LE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareCustomTypes(LE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than or equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): MyClass(2) + Baseline (rhs): MyClass(1)]]> + </failure> + </testcase> + <testcase name="compareCustomTypes(GT:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than the baseline, but is not"> + <![CDATA[ Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(1)]]> + </failure> + </testcase> + <testcase name="compareCustomTypes(GT:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than the baseline, but is not"> + <![CDATA[ Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(2)]]> + </failure> + </testcase> + <testcase name="compareCustomTypes(GT:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareCustomTypes(GE:left == right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="compareCustomTypes(GE:left < right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be greater than or equal to the baseline, but is not"> + <![CDATA[ Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(2)]]> + </failure> + </testcase> + <testcase name="compareCustomTypes(GE:left > right)" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> + <testcase name="checkComparisonForTemporaryObjects" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be equal to the baseline, but is not"> + <![CDATA[ Computed (getClassForValue(0).getValuePointer()): MyClass(2) on memory address with index 0 + Baseline (getClassForValue(1).getValuePointer()): MyClass(1) on memory address with index 1]]> + </failure> + </testcase> + <testcase name="checkComparisonWithTimeout" classname="tst_ExtendedCompare" time="@TEST_DURATION@"> + <failure type="fail" message="The computed value is expected to be less than the baseline, but is not"> + <![CDATA[ Computed (c) : ClassWithDeferredSetter(1) + Baseline (ClassWithDeferredSetter(0)): ClassWithDeferredSetter(0)]]> + </failure> + </testcase> + <testcase name="cleanupTestCase" classname="tst_ExtendedCompare" time="@TEST_DURATION@"/> +</testsuite> diff --git a/tests/auto/testlib/selftests/expected_extendedcompare.lightxml b/tests/auto/testlib/selftests/expected_extendedcompare.lightxml new file mode 100644 index 0000000000..fd6e486939 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_extendedcompare.lightxml @@ -0,0 +1,746 @@ + <Environment> + <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> + <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> + </Environment> + <TestFunction name="initTestCase"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="compareInts"> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[EQ:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 2]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 2 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[NE:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be different from the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left < right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left > right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LT:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 2 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left == right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LE:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): 2 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 2]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GT:left > right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GE:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 2]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left > right]]></DataTag> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="compareFloats"> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[EQ:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1.1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 1.1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[NE:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be different from the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left < right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left > right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LT:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 1.1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left == right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LE:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): 1.1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1.1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GT:left > right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GE:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1.1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left > right]]></DataTag> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="compareDoubles"> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[EQ:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0.1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 0.1 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[NE:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be different from the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left < right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left > right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LT:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 0.1 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left == right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LE:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): 0.1 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0.1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GT:left > right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GE:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0.1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left > right]]></DataTag> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="comparePointers"> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[EQ:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 2]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 2 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[NE:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be different from the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left < right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left > right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LT:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 2 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left == right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LE:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): 2 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 2]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GT:left > right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GE:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 2]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left > right]]></DataTag> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="compareToNullptr"> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[EQ:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): "nullptr" + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): "nullptr"]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[NE:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be different from the baseline, but is not + Computed (lhs): "nullptr" + Baseline (rhs): "nullptr"]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left < right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left > right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): "nullptr" + Baseline (rhs): "nullptr"]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LT:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): "nullptr"]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left == right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LE:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): "nullptr"]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): "nullptr" + Baseline (rhs): "nullptr"]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): "nullptr" + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GT:left > right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GE:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): "nullptr" + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left > right]]></DataTag> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="compareUnregistereEnum"> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[EQ:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[NE:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be different from the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left < right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left > right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LT:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left == right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LE:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GT:left > right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GE:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left > right]]></DataTag> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="compareRegistereEnum"> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[EQ:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): Monday + Baseline (rhs): Sunday]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): Sunday + Baseline (rhs): Monday]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[NE:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be different from the baseline, but is not + Computed (lhs): Monday + Baseline (rhs): Monday]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left < right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left > right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): Monday + Baseline (rhs): Monday]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LT:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): Sunday + Baseline (rhs): Monday]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left == right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LE:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): Sunday + Baseline (rhs): Monday]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): Monday + Baseline (rhs): Monday]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): Monday + Baseline (rhs): Sunday]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GT:left > right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GE:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): Monday + Baseline (rhs): Sunday]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left > right]]></DataTag> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="compareCustomTypes"> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[EQ:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(2)]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): MyClass(2) + Baseline (rhs): MyClass(1)]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[NE:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be different from the baseline, but is not + Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(1)]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left < right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left > right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(1)]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LT:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): MyClass(2) + Baseline (rhs): MyClass(1)]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left == right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LE:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): MyClass(2) + Baseline (rhs): MyClass(1)]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(1)]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(2)]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GT:left > right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GE:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(2)]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left > right]]></DataTag> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="checkComparisonForTemporaryObjects"> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (getClassForValue(0).getValuePointer()): MyClass(2) on memory address with index 0 + Baseline (getClassForValue(1).getValuePointer()): MyClass(1) on memory address with index 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LT]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (getClassForValue(0).getValuePointer()): MyClass(2) on memory address with index 0 + Baseline (getClassForValue(1).getValuePointer()): MyClass(1) on memory address with index 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GE]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than or equal to the baseline, but is not + Computed (getClassForValue(0).getValuePointer()): MyClass(2) on memory address with index 0 + Baseline (getClassForValue(1).getValuePointer()): MyClass(1) on memory address with index 1]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="checkComparisonWithTimeout"> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[EQ]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (c) : ClassWithDeferredSetter(1) + Baseline (ClassWithDeferredSetter(0)): ClassWithDeferredSetter(0)]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LE]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than or equal to the baseline, but is not + Computed (c) : ClassWithDeferredSetter(1) + Baseline (ClassWithDeferredSetter(-1)): ClassWithDeferredSetter(-1)]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (c) : ClassWithDeferredSetter(1) + Baseline (ClassWithDeferredSetter(1)): ClassWithDeferredSetter(1)]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE]]></DataTag> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="cleanupTestCase"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <Duration msecs="0"/> diff --git a/tests/auto/testlib/selftests/expected_extendedcompare.tap b/tests/auto/testlib/selftests/expected_extendedcompare.tap new file mode 100644 index 0000000000..25d30c3e08 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_extendedcompare.tap @@ -0,0 +1,1022 @@ +TAP version 13 +# tst_ExtendedCompare +ok 1 - initTestCase() +ok 2 - compareInts(EQ:left == right) +not ok 3 - compareInts(EQ:left < right) + --- + type: QCOMPARE_EQ + message: The computed value is expected to be equal to the baseline, but is not + wanted: == 2 (rhs) + found: 1 (lhs) + expected: == 2 (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::compareInts() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 4 - compareInts(EQ:left > right) + --- + type: QCOMPARE_EQ + message: The computed value is expected to be equal to the baseline, but is not + wanted: == 1 (rhs) + found: 2 (lhs) + expected: == 1 (rhs) + actual: 2 (lhs) + at: tst_ExtendedCompare::compareInts() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 5 - compareInts(NE:left == right) + --- + type: QCOMPARE_NE + message: The computed value is expected to be different from the baseline, but is not + wanted: != 1 (rhs) + found: 1 (lhs) + expected: != 1 (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::compareInts() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 6 - compareInts(NE:left < right) +ok 7 - compareInts(NE:left > right) +not ok 8 - compareInts(LT:left == right) + --- + type: QCOMPARE_LT + message: The computed value is expected to be less than the baseline, but is not + wanted: < 1 (rhs) + found: 1 (lhs) + expected: < 1 (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::compareInts() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 9 - compareInts(LT:left < right) +not ok 10 - compareInts(LT:left > right) + --- + type: QCOMPARE_LT + message: The computed value is expected to be less than the baseline, but is not + wanted: < 1 (rhs) + found: 2 (lhs) + expected: < 1 (rhs) + actual: 2 (lhs) + at: tst_ExtendedCompare::compareInts() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 11 - compareInts(LE:left == right) +ok 12 - compareInts(LE:left < right) +not ok 13 - compareInts(LE:left > right) + --- + type: QCOMPARE_LE + message: The computed value is expected to be less than or equal to the baseline, but is not + wanted: <= 1 (rhs) + found: 2 (lhs) + expected: <= 1 (rhs) + actual: 2 (lhs) + at: tst_ExtendedCompare::compareInts() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 14 - compareInts(GT:left == right) + --- + type: QCOMPARE_GT + message: The computed value is expected to be greater than the baseline, but is not + wanted: > 1 (rhs) + found: 1 (lhs) + expected: > 1 (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::compareInts() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 15 - compareInts(GT:left < right) + --- + type: QCOMPARE_GT + message: The computed value is expected to be greater than the baseline, but is not + wanted: > 2 (rhs) + found: 1 (lhs) + expected: > 2 (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::compareInts() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 16 - compareInts(GT:left > right) +ok 17 - compareInts(GE:left == right) +not ok 18 - compareInts(GE:left < right) + --- + type: QCOMPARE_GE + message: The computed value is expected to be greater than or equal to the baseline, but is not + wanted: >= 2 (rhs) + found: 1 (lhs) + expected: >= 2 (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::compareInts() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 19 - compareInts(GE:left > right) +ok 20 - compareFloats(EQ:left == right) +not ok 21 - compareFloats(EQ:left < right) + --- + type: QCOMPARE_EQ + message: The computed value is expected to be equal to the baseline, but is not + wanted: == 1.1 (rhs) + found: 1 (lhs) + expected: == 1.1 (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::compareFloats() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 22 - compareFloats(EQ:left > right) + --- + type: QCOMPARE_EQ + message: The computed value is expected to be equal to the baseline, but is not + wanted: == 1 (rhs) + found: 1.1 (lhs) + expected: == 1 (rhs) + actual: 1.1 (lhs) + at: tst_ExtendedCompare::compareFloats() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 23 - compareFloats(NE:left == right) + --- + type: QCOMPARE_NE + message: The computed value is expected to be different from the baseline, but is not + wanted: != 1 (rhs) + found: 1 (lhs) + expected: != 1 (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::compareFloats() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 24 - compareFloats(NE:left < right) +ok 25 - compareFloats(NE:left > right) +not ok 26 - compareFloats(LT:left == right) + --- + type: QCOMPARE_LT + message: The computed value is expected to be less than the baseline, but is not + wanted: < 1 (rhs) + found: 1 (lhs) + expected: < 1 (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::compareFloats() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 27 - compareFloats(LT:left < right) +not ok 28 - compareFloats(LT:left > right) + --- + type: QCOMPARE_LT + message: The computed value is expected to be less than the baseline, but is not + wanted: < 1 (rhs) + found: 1.1 (lhs) + expected: < 1 (rhs) + actual: 1.1 (lhs) + at: tst_ExtendedCompare::compareFloats() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 29 - compareFloats(LE:left == right) +ok 30 - compareFloats(LE:left < right) +not ok 31 - compareFloats(LE:left > right) + --- + type: QCOMPARE_LE + message: The computed value is expected to be less than or equal to the baseline, but is not + wanted: <= 1 (rhs) + found: 1.1 (lhs) + expected: <= 1 (rhs) + actual: 1.1 (lhs) + at: tst_ExtendedCompare::compareFloats() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 32 - compareFloats(GT:left == right) + --- + type: QCOMPARE_GT + message: The computed value is expected to be greater than the baseline, but is not + wanted: > 1 (rhs) + found: 1 (lhs) + expected: > 1 (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::compareFloats() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 33 - compareFloats(GT:left < right) + --- + type: QCOMPARE_GT + message: The computed value is expected to be greater than the baseline, but is not + wanted: > 1.1 (rhs) + found: 1 (lhs) + expected: > 1.1 (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::compareFloats() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 34 - compareFloats(GT:left > right) +ok 35 - compareFloats(GE:left == right) +not ok 36 - compareFloats(GE:left < right) + --- + type: QCOMPARE_GE + message: The computed value is expected to be greater than or equal to the baseline, but is not + wanted: >= 1.1 (rhs) + found: 1 (lhs) + expected: >= 1.1 (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::compareFloats() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 37 - compareFloats(GE:left > right) +ok 38 - compareDoubles(EQ:left == right) +not ok 39 - compareDoubles(EQ:left < right) + --- + type: QCOMPARE_EQ + message: The computed value is expected to be equal to the baseline, but is not + wanted: == 0.1 (rhs) + found: 0 (lhs) + expected: == 0.1 (rhs) + actual: 0 (lhs) + at: tst_ExtendedCompare::compareDoubles() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 40 - compareDoubles(EQ:left > right) + --- + type: QCOMPARE_EQ + message: The computed value is expected to be equal to the baseline, but is not + wanted: == 0 (rhs) + found: 0.1 (lhs) + expected: == 0 (rhs) + actual: 0.1 (lhs) + at: tst_ExtendedCompare::compareDoubles() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 41 - compareDoubles(NE:left == right) + --- + type: QCOMPARE_NE + message: The computed value is expected to be different from the baseline, but is not + wanted: != 0 (rhs) + found: 0 (lhs) + expected: != 0 (rhs) + actual: 0 (lhs) + at: tst_ExtendedCompare::compareDoubles() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 42 - compareDoubles(NE:left < right) +ok 43 - compareDoubles(NE:left > right) +not ok 44 - compareDoubles(LT:left == right) + --- + type: QCOMPARE_LT + message: The computed value is expected to be less than the baseline, but is not + wanted: < 0 (rhs) + found: 0 (lhs) + expected: < 0 (rhs) + actual: 0 (lhs) + at: tst_ExtendedCompare::compareDoubles() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 45 - compareDoubles(LT:left < right) +not ok 46 - compareDoubles(LT:left > right) + --- + type: QCOMPARE_LT + message: The computed value is expected to be less than the baseline, but is not + wanted: < 0 (rhs) + found: 0.1 (lhs) + expected: < 0 (rhs) + actual: 0.1 (lhs) + at: tst_ExtendedCompare::compareDoubles() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 47 - compareDoubles(LE:left == right) +ok 48 - compareDoubles(LE:left < right) +not ok 49 - compareDoubles(LE:left > right) + --- + type: QCOMPARE_LE + message: The computed value is expected to be less than or equal to the baseline, but is not + wanted: <= 0 (rhs) + found: 0.1 (lhs) + expected: <= 0 (rhs) + actual: 0.1 (lhs) + at: tst_ExtendedCompare::compareDoubles() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 50 - compareDoubles(GT:left == right) + --- + type: QCOMPARE_GT + message: The computed value is expected to be greater than the baseline, but is not + wanted: > 0 (rhs) + found: 0 (lhs) + expected: > 0 (rhs) + actual: 0 (lhs) + at: tst_ExtendedCompare::compareDoubles() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 51 - compareDoubles(GT:left < right) + --- + type: QCOMPARE_GT + message: The computed value is expected to be greater than the baseline, but is not + wanted: > 0.1 (rhs) + found: 0 (lhs) + expected: > 0.1 (rhs) + actual: 0 (lhs) + at: tst_ExtendedCompare::compareDoubles() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 52 - compareDoubles(GT:left > right) +ok 53 - compareDoubles(GE:left == right) +not ok 54 - compareDoubles(GE:left < right) + --- + type: QCOMPARE_GE + message: The computed value is expected to be greater than or equal to the baseline, but is not + wanted: >= 0.1 (rhs) + found: 0 (lhs) + expected: >= 0.1 (rhs) + actual: 0 (lhs) + at: tst_ExtendedCompare::compareDoubles() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 55 - compareDoubles(GE:left > right) +ok 56 - comparePointers(EQ:left == right) +not ok 57 - comparePointers(EQ:left < right) + --- + type: QCOMPARE_EQ + message: The computed value is expected to be equal to the baseline, but is not + wanted: == 2 (rhs) + found: 1 (lhs) + expected: == 2 (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::comparePointers() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 58 - comparePointers(EQ:left > right) + --- + type: QCOMPARE_EQ + message: The computed value is expected to be equal to the baseline, but is not + wanted: == 1 (rhs) + found: 2 (lhs) + expected: == 1 (rhs) + actual: 2 (lhs) + at: tst_ExtendedCompare::comparePointers() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 59 - comparePointers(NE:left == right) + --- + type: QCOMPARE_NE + message: The computed value is expected to be different from the baseline, but is not + wanted: != 1 (rhs) + found: 1 (lhs) + expected: != 1 (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::comparePointers() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 60 - comparePointers(NE:left < right) +ok 61 - comparePointers(NE:left > right) +not ok 62 - comparePointers(LT:left == right) + --- + type: QCOMPARE_LT + message: The computed value is expected to be less than the baseline, but is not + wanted: < 1 (rhs) + found: 1 (lhs) + expected: < 1 (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::comparePointers() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 63 - comparePointers(LT:left < right) +not ok 64 - comparePointers(LT:left > right) + --- + type: QCOMPARE_LT + message: The computed value is expected to be less than the baseline, but is not + wanted: < 1 (rhs) + found: 2 (lhs) + expected: < 1 (rhs) + actual: 2 (lhs) + at: tst_ExtendedCompare::comparePointers() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 65 - comparePointers(LE:left == right) +ok 66 - comparePointers(LE:left < right) +not ok 67 - comparePointers(LE:left > right) + --- + type: QCOMPARE_LE + message: The computed value is expected to be less than or equal to the baseline, but is not + wanted: <= 1 (rhs) + found: 2 (lhs) + expected: <= 1 (rhs) + actual: 2 (lhs) + at: tst_ExtendedCompare::comparePointers() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 68 - comparePointers(GT:left == right) + --- + type: QCOMPARE_GT + message: The computed value is expected to be greater than the baseline, but is not + wanted: > 1 (rhs) + found: 1 (lhs) + expected: > 1 (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::comparePointers() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 69 - comparePointers(GT:left < right) + --- + type: QCOMPARE_GT + message: The computed value is expected to be greater than the baseline, but is not + wanted: > 2 (rhs) + found: 1 (lhs) + expected: > 2 (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::comparePointers() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 70 - comparePointers(GT:left > right) +ok 71 - comparePointers(GE:left == right) +not ok 72 - comparePointers(GE:left < right) + --- + type: QCOMPARE_GE + message: The computed value is expected to be greater than or equal to the baseline, but is not + wanted: >= 2 (rhs) + found: 1 (lhs) + expected: >= 2 (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::comparePointers() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 73 - comparePointers(GE:left > right) +ok 74 - compareToNullptr(EQ:left == right) +not ok 75 - compareToNullptr(EQ:left < right) + --- + type: QCOMPARE_EQ + message: The computed value is expected to be equal to the baseline, but is not + wanted: == 1 (rhs) + found: "nullptr" (lhs) + expected: == 1 (rhs) + actual: "nullptr" (lhs) + at: tst_ExtendedCompare::compareToNullptr() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 76 - compareToNullptr(EQ:left > right) + --- + type: QCOMPARE_EQ + message: The computed value is expected to be equal to the baseline, but is not + wanted: == "nullptr" (rhs) + found: 1 (lhs) + expected: == "nullptr" (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::compareToNullptr() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 77 - compareToNullptr(NE:left == right) + --- + type: QCOMPARE_NE + message: The computed value is expected to be different from the baseline, but is not + wanted: != "nullptr" (rhs) + found: "nullptr" (lhs) + expected: != "nullptr" (rhs) + actual: "nullptr" (lhs) + at: tst_ExtendedCompare::compareToNullptr() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 78 - compareToNullptr(NE:left < right) +ok 79 - compareToNullptr(NE:left > right) +not ok 80 - compareToNullptr(LT:left == right) + --- + type: QCOMPARE_LT + message: The computed value is expected to be less than the baseline, but is not + wanted: < "nullptr" (rhs) + found: "nullptr" (lhs) + expected: < "nullptr" (rhs) + actual: "nullptr" (lhs) + at: tst_ExtendedCompare::compareToNullptr() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 81 - compareToNullptr(LT:left < right) +not ok 82 - compareToNullptr(LT:left > right) + --- + type: QCOMPARE_LT + message: The computed value is expected to be less than the baseline, but is not + wanted: < "nullptr" (rhs) + found: 1 (lhs) + expected: < "nullptr" (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::compareToNullptr() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 83 - compareToNullptr(LE:left == right) +ok 84 - compareToNullptr(LE:left < right) +not ok 85 - compareToNullptr(LE:left > right) + --- + type: QCOMPARE_LE + message: The computed value is expected to be less than or equal to the baseline, but is not + wanted: <= "nullptr" (rhs) + found: 1 (lhs) + expected: <= "nullptr" (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::compareToNullptr() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 86 - compareToNullptr(GT:left == right) + --- + type: QCOMPARE_GT + message: The computed value is expected to be greater than the baseline, but is not + wanted: > "nullptr" (rhs) + found: "nullptr" (lhs) + expected: > "nullptr" (rhs) + actual: "nullptr" (lhs) + at: tst_ExtendedCompare::compareToNullptr() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 87 - compareToNullptr(GT:left < right) + --- + type: QCOMPARE_GT + message: The computed value is expected to be greater than the baseline, but is not + wanted: > 1 (rhs) + found: "nullptr" (lhs) + expected: > 1 (rhs) + actual: "nullptr" (lhs) + at: tst_ExtendedCompare::compareToNullptr() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 88 - compareToNullptr(GT:left > right) +ok 89 - compareToNullptr(GE:left == right) +not ok 90 - compareToNullptr(GE:left < right) + --- + type: QCOMPARE_GE + message: The computed value is expected to be greater than or equal to the baseline, but is not + wanted: >= 1 (rhs) + found: "nullptr" (lhs) + expected: >= 1 (rhs) + actual: "nullptr" (lhs) + at: tst_ExtendedCompare::compareToNullptr() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 91 - compareToNullptr(GE:left > right) +ok 92 - compareUnregistereEnum(EQ:left == right) +not ok 93 - compareUnregistereEnum(EQ:left < right) + --- + type: QCOMPARE_EQ + message: The computed value is expected to be equal to the baseline, but is not + wanted: == 1 (rhs) + found: 0 (lhs) + expected: == 1 (rhs) + actual: 0 (lhs) + at: tst_ExtendedCompare::compareUnregistereEnum() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 94 - compareUnregistereEnum(EQ:left > right) + --- + type: QCOMPARE_EQ + message: The computed value is expected to be equal to the baseline, but is not + wanted: == 0 (rhs) + found: 1 (lhs) + expected: == 0 (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::compareUnregistereEnum() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 95 - compareUnregistereEnum(NE:left == right) + --- + type: QCOMPARE_NE + message: The computed value is expected to be different from the baseline, but is not + wanted: != 0 (rhs) + found: 0 (lhs) + expected: != 0 (rhs) + actual: 0 (lhs) + at: tst_ExtendedCompare::compareUnregistereEnum() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 96 - compareUnregistereEnum(NE:left < right) +ok 97 - compareUnregistereEnum(NE:left > right) +not ok 98 - compareUnregistereEnum(LT:left == right) + --- + type: QCOMPARE_LT + message: The computed value is expected to be less than the baseline, but is not + wanted: < 0 (rhs) + found: 0 (lhs) + expected: < 0 (rhs) + actual: 0 (lhs) + at: tst_ExtendedCompare::compareUnregistereEnum() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 99 - compareUnregistereEnum(LT:left < right) +not ok 100 - compareUnregistereEnum(LT:left > right) + --- + type: QCOMPARE_LT + message: The computed value is expected to be less than the baseline, but is not + wanted: < 0 (rhs) + found: 1 (lhs) + expected: < 0 (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::compareUnregistereEnum() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 101 - compareUnregistereEnum(LE:left == right) +ok 102 - compareUnregistereEnum(LE:left < right) +not ok 103 - compareUnregistereEnum(LE:left > right) + --- + type: QCOMPARE_LE + message: The computed value is expected to be less than or equal to the baseline, but is not + wanted: <= 0 (rhs) + found: 1 (lhs) + expected: <= 0 (rhs) + actual: 1 (lhs) + at: tst_ExtendedCompare::compareUnregistereEnum() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 104 - compareUnregistereEnum(GT:left == right) + --- + type: QCOMPARE_GT + message: The computed value is expected to be greater than the baseline, but is not + wanted: > 0 (rhs) + found: 0 (lhs) + expected: > 0 (rhs) + actual: 0 (lhs) + at: tst_ExtendedCompare::compareUnregistereEnum() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 105 - compareUnregistereEnum(GT:left < right) + --- + type: QCOMPARE_GT + message: The computed value is expected to be greater than the baseline, but is not + wanted: > 1 (rhs) + found: 0 (lhs) + expected: > 1 (rhs) + actual: 0 (lhs) + at: tst_ExtendedCompare::compareUnregistereEnum() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 106 - compareUnregistereEnum(GT:left > right) +ok 107 - compareUnregistereEnum(GE:left == right) +not ok 108 - compareUnregistereEnum(GE:left < right) + --- + type: QCOMPARE_GE + message: The computed value is expected to be greater than or equal to the baseline, but is not + wanted: >= 1 (rhs) + found: 0 (lhs) + expected: >= 1 (rhs) + actual: 0 (lhs) + at: tst_ExtendedCompare::compareUnregistereEnum() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 109 - compareUnregistereEnum(GE:left > right) +ok 110 - compareRegistereEnum(EQ:left == right) +not ok 111 - compareRegistereEnum(EQ:left < right) + --- + type: QCOMPARE_EQ + message: The computed value is expected to be equal to the baseline, but is not + wanted: == Sunday (rhs) + found: Monday (lhs) + expected: == Sunday (rhs) + actual: Monday (lhs) + at: tst_ExtendedCompare::compareRegistereEnum() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 112 - compareRegistereEnum(EQ:left > right) + --- + type: QCOMPARE_EQ + message: The computed value is expected to be equal to the baseline, but is not + wanted: == Monday (rhs) + found: Sunday (lhs) + expected: == Monday (rhs) + actual: Sunday (lhs) + at: tst_ExtendedCompare::compareRegistereEnum() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 113 - compareRegistereEnum(NE:left == right) + --- + type: QCOMPARE_NE + message: The computed value is expected to be different from the baseline, but is not + wanted: != Monday (rhs) + found: Monday (lhs) + expected: != Monday (rhs) + actual: Monday (lhs) + at: tst_ExtendedCompare::compareRegistereEnum() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 114 - compareRegistereEnum(NE:left < right) +ok 115 - compareRegistereEnum(NE:left > right) +not ok 116 - compareRegistereEnum(LT:left == right) + --- + type: QCOMPARE_LT + message: The computed value is expected to be less than the baseline, but is not + wanted: < Monday (rhs) + found: Monday (lhs) + expected: < Monday (rhs) + actual: Monday (lhs) + at: tst_ExtendedCompare::compareRegistereEnum() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 117 - compareRegistereEnum(LT:left < right) +not ok 118 - compareRegistereEnum(LT:left > right) + --- + type: QCOMPARE_LT + message: The computed value is expected to be less than the baseline, but is not + wanted: < Monday (rhs) + found: Sunday (lhs) + expected: < Monday (rhs) + actual: Sunday (lhs) + at: tst_ExtendedCompare::compareRegistereEnum() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 119 - compareRegistereEnum(LE:left == right) +ok 120 - compareRegistereEnum(LE:left < right) +not ok 121 - compareRegistereEnum(LE:left > right) + --- + type: QCOMPARE_LE + message: The computed value is expected to be less than or equal to the baseline, but is not + wanted: <= Monday (rhs) + found: Sunday (lhs) + expected: <= Monday (rhs) + actual: Sunday (lhs) + at: tst_ExtendedCompare::compareRegistereEnum() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 122 - compareRegistereEnum(GT:left == right) + --- + type: QCOMPARE_GT + message: The computed value is expected to be greater than the baseline, but is not + wanted: > Monday (rhs) + found: Monday (lhs) + expected: > Monday (rhs) + actual: Monday (lhs) + at: tst_ExtendedCompare::compareRegistereEnum() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 123 - compareRegistereEnum(GT:left < right) + --- + type: QCOMPARE_GT + message: The computed value is expected to be greater than the baseline, but is not + wanted: > Sunday (rhs) + found: Monday (lhs) + expected: > Sunday (rhs) + actual: Monday (lhs) + at: tst_ExtendedCompare::compareRegistereEnum() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 124 - compareRegistereEnum(GT:left > right) +ok 125 - compareRegistereEnum(GE:left == right) +not ok 126 - compareRegistereEnum(GE:left < right) + --- + type: QCOMPARE_GE + message: The computed value is expected to be greater than or equal to the baseline, but is not + wanted: >= Sunday (rhs) + found: Monday (lhs) + expected: >= Sunday (rhs) + actual: Monday (lhs) + at: tst_ExtendedCompare::compareRegistereEnum() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 127 - compareRegistereEnum(GE:left > right) +ok 128 - compareCustomTypes(EQ:left == right) +not ok 129 - compareCustomTypes(EQ:left < right) + --- + type: QCOMPARE_EQ + message: The computed value is expected to be equal to the baseline, but is not + wanted: == MyClass(2) (rhs) + found: MyClass(1) (lhs) + expected: == MyClass(2) (rhs) + actual: MyClass(1) (lhs) + at: tst_ExtendedCompare::compareCustomTypes() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 130 - compareCustomTypes(EQ:left > right) + --- + type: QCOMPARE_EQ + message: The computed value is expected to be equal to the baseline, but is not + wanted: == MyClass(1) (rhs) + found: MyClass(2) (lhs) + expected: == MyClass(1) (rhs) + actual: MyClass(2) (lhs) + at: tst_ExtendedCompare::compareCustomTypes() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 131 - compareCustomTypes(NE:left == right) + --- + type: QCOMPARE_NE + message: The computed value is expected to be different from the baseline, but is not + wanted: != MyClass(1) (rhs) + found: MyClass(1) (lhs) + expected: != MyClass(1) (rhs) + actual: MyClass(1) (lhs) + at: tst_ExtendedCompare::compareCustomTypes() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 132 - compareCustomTypes(NE:left < right) +ok 133 - compareCustomTypes(NE:left > right) +not ok 134 - compareCustomTypes(LT:left == right) + --- + type: QCOMPARE_LT + message: The computed value is expected to be less than the baseline, but is not + wanted: < MyClass(1) (rhs) + found: MyClass(1) (lhs) + expected: < MyClass(1) (rhs) + actual: MyClass(1) (lhs) + at: tst_ExtendedCompare::compareCustomTypes() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 135 - compareCustomTypes(LT:left < right) +not ok 136 - compareCustomTypes(LT:left > right) + --- + type: QCOMPARE_LT + message: The computed value is expected to be less than the baseline, but is not + wanted: < MyClass(1) (rhs) + found: MyClass(2) (lhs) + expected: < MyClass(1) (rhs) + actual: MyClass(2) (lhs) + at: tst_ExtendedCompare::compareCustomTypes() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 137 - compareCustomTypes(LE:left == right) +ok 138 - compareCustomTypes(LE:left < right) +not ok 139 - compareCustomTypes(LE:left > right) + --- + type: QCOMPARE_LE + message: The computed value is expected to be less than or equal to the baseline, but is not + wanted: <= MyClass(1) (rhs) + found: MyClass(2) (lhs) + expected: <= MyClass(1) (rhs) + actual: MyClass(2) (lhs) + at: tst_ExtendedCompare::compareCustomTypes() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 140 - compareCustomTypes(GT:left == right) + --- + type: QCOMPARE_GT + message: The computed value is expected to be greater than the baseline, but is not + wanted: > MyClass(1) (rhs) + found: MyClass(1) (lhs) + expected: > MyClass(1) (rhs) + actual: MyClass(1) (lhs) + at: tst_ExtendedCompare::compareCustomTypes() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 141 - compareCustomTypes(GT:left < right) + --- + type: QCOMPARE_GT + message: The computed value is expected to be greater than the baseline, but is not + wanted: > MyClass(2) (rhs) + found: MyClass(1) (lhs) + expected: > MyClass(2) (rhs) + actual: MyClass(1) (lhs) + at: tst_ExtendedCompare::compareCustomTypes() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 142 - compareCustomTypes(GT:left > right) +ok 143 - compareCustomTypes(GE:left == right) +not ok 144 - compareCustomTypes(GE:left < right) + --- + type: QCOMPARE_GE + message: The computed value is expected to be greater than or equal to the baseline, but is not + wanted: >= MyClass(2) (rhs) + found: MyClass(1) (lhs) + expected: >= MyClass(2) (rhs) + actual: MyClass(1) (lhs) + at: tst_ExtendedCompare::compareCustomTypes() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 145 - compareCustomTypes(GE:left > right) +not ok 146 - checkComparisonForTemporaryObjects(EQ) + --- + type: QCOMPARE_EQ + message: The computed value is expected to be equal to the baseline, but is not + wanted: == MyClass(1) on memory address with index 1 (getClassForValue(1).getValuePointer()) + found: MyClass(2) on memory address with index 0 (getClassForValue(0).getValuePointer()) + expected: == MyClass(1) on memory address with index 1 (getClassForValue(1).getValuePointer()) + actual: MyClass(2) on memory address with index 0 (getClassForValue(0).getValuePointer()) + at: tst_ExtendedCompare::checkComparisonForTemporaryObjects() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 147 - checkComparisonForTemporaryObjects(NE) +ok 148 - checkComparisonForTemporaryObjects(LT) +ok 149 - checkComparisonForTemporaryObjects(LE) +not ok 150 - checkComparisonForTemporaryObjects(GT) + --- + type: QCOMPARE_GT + message: The computed value is expected to be greater than the baseline, but is not + wanted: > MyClass(1) on memory address with index 1 (getClassForValue(1).getValuePointer()) + found: MyClass(2) on memory address with index 0 (getClassForValue(0).getValuePointer()) + expected: > MyClass(1) on memory address with index 1 (getClassForValue(1).getValuePointer()) + actual: MyClass(2) on memory address with index 0 (getClassForValue(0).getValuePointer()) + at: tst_ExtendedCompare::checkComparisonForTemporaryObjects() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 151 - checkComparisonForTemporaryObjects(GE) + --- + type: QCOMPARE_GE + message: The computed value is expected to be greater than or equal to the baseline, but is not + wanted: >= MyClass(1) on memory address with index 1 (getClassForValue(1).getValuePointer()) + found: MyClass(2) on memory address with index 0 (getClassForValue(0).getValuePointer()) + expected: >= MyClass(1) on memory address with index 1 (getClassForValue(1).getValuePointer()) + actual: MyClass(2) on memory address with index 0 (getClassForValue(0).getValuePointer()) + at: tst_ExtendedCompare::checkComparisonForTemporaryObjects() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 152 - checkComparisonWithTimeout(EQ) +ok 153 - checkComparisonWithTimeout(NE) +not ok 154 - checkComparisonWithTimeout(LT) + --- + type: QCOMPARE_LT + message: The computed value is expected to be less than the baseline, but is not + wanted: < ClassWithDeferredSetter(0) (ClassWithDeferredSetter(0)) + found: ClassWithDeferredSetter(1) (c) + expected: < ClassWithDeferredSetter(0) (ClassWithDeferredSetter(0)) + actual: ClassWithDeferredSetter(1) (c) + at: tst_ExtendedCompare::checkComparisonWithTimeout() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 155 - checkComparisonWithTimeout(LE) + --- + type: QCOMPARE_LE + message: The computed value is expected to be less than or equal to the baseline, but is not + wanted: <= ClassWithDeferredSetter(-1) (ClassWithDeferredSetter(-1)) + found: ClassWithDeferredSetter(1) (c) + expected: <= ClassWithDeferredSetter(-1) (ClassWithDeferredSetter(-1)) + actual: ClassWithDeferredSetter(1) (c) + at: tst_ExtendedCompare::checkComparisonWithTimeout() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +not ok 156 - checkComparisonWithTimeout(GT) + --- + type: QCOMPARE_GT + message: The computed value is expected to be greater than the baseline, but is not + wanted: > ClassWithDeferredSetter(1) (ClassWithDeferredSetter(1)) + found: ClassWithDeferredSetter(1) (c) + expected: > ClassWithDeferredSetter(1) (ClassWithDeferredSetter(1)) + actual: ClassWithDeferredSetter(1) (c) + at: tst_ExtendedCompare::checkComparisonWithTimeout() (qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp:0) + file: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp + line: 0 + ... +ok 157 - checkComparisonWithTimeout(GE) +ok 158 - cleanupTestCase() +1..158 +# tests 158 +# pass 80 +# fail 78 diff --git a/tests/auto/testlib/selftests/expected_extendedcompare.teamcity b/tests/auto/testlib/selftests/expected_extendedcompare.teamcity new file mode 100644 index 0000000000..4c76556138 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_extendedcompare.teamcity @@ -0,0 +1,396 @@ +##teamcity[testSuiteStarted name='tst_ExtendedCompare' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='initTestCase()' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='initTestCase()' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareInts(EQ:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareInts(EQ:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareInts(EQ:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareInts(EQ:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be equal to the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): 2' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareInts(EQ:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareInts(EQ:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareInts(EQ:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be equal to the baseline, but is not|n Computed (lhs): 2|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareInts(EQ:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareInts(NE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareInts(NE:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be different from the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareInts(NE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareInts(NE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareInts(NE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareInts(NE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareInts(NE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareInts(LT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareInts(LT:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareInts(LT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareInts(LT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareInts(LT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareInts(LT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareInts(LT:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than the baseline, but is not|n Computed (lhs): 2|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareInts(LT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareInts(LE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareInts(LE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareInts(LE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareInts(LE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareInts(LE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareInts(LE:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than or equal to the baseline, but is not|n Computed (lhs): 2|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareInts(LE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareInts(GT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareInts(GT:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareInts(GT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareInts(GT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareInts(GT:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): 2' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareInts(GT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareInts(GT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareInts(GT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareInts(GE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareInts(GE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareInts(GE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareInts(GE:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than or equal to the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): 2' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareInts(GE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareInts(GE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareInts(GE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareFloats(EQ:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareFloats(EQ:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareFloats(EQ:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareFloats(EQ:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be equal to the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): 1.1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareFloats(EQ:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareFloats(EQ:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareFloats(EQ:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be equal to the baseline, but is not|n Computed (lhs): 1.1|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareFloats(EQ:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareFloats(NE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareFloats(NE:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be different from the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareFloats(NE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareFloats(NE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareFloats(NE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareFloats(NE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareFloats(NE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareFloats(LT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareFloats(LT:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareFloats(LT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareFloats(LT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareFloats(LT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareFloats(LT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareFloats(LT:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than the baseline, but is not|n Computed (lhs): 1.1|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareFloats(LT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareFloats(LE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareFloats(LE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareFloats(LE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareFloats(LE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareFloats(LE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareFloats(LE:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than or equal to the baseline, but is not|n Computed (lhs): 1.1|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareFloats(LE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareFloats(GT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareFloats(GT:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareFloats(GT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareFloats(GT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareFloats(GT:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): 1.1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareFloats(GT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareFloats(GT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareFloats(GT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareFloats(GE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareFloats(GE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareFloats(GE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareFloats(GE:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than or equal to the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): 1.1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareFloats(GE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareFloats(GE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareFloats(GE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareDoubles(EQ:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareDoubles(EQ:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareDoubles(EQ:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareDoubles(EQ:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be equal to the baseline, but is not|n Computed (lhs): 0|n Baseline (rhs): 0.1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareDoubles(EQ:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareDoubles(EQ:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareDoubles(EQ:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be equal to the baseline, but is not|n Computed (lhs): 0.1|n Baseline (rhs): 0' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareDoubles(EQ:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareDoubles(NE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareDoubles(NE:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be different from the baseline, but is not|n Computed (lhs): 0|n Baseline (rhs): 0' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareDoubles(NE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareDoubles(NE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareDoubles(NE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareDoubles(NE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareDoubles(NE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareDoubles(LT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareDoubles(LT:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than the baseline, but is not|n Computed (lhs): 0|n Baseline (rhs): 0' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareDoubles(LT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareDoubles(LT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareDoubles(LT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareDoubles(LT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareDoubles(LT:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than the baseline, but is not|n Computed (lhs): 0.1|n Baseline (rhs): 0' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareDoubles(LT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareDoubles(LE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareDoubles(LE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareDoubles(LE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareDoubles(LE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareDoubles(LE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareDoubles(LE:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than or equal to the baseline, but is not|n Computed (lhs): 0.1|n Baseline (rhs): 0' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareDoubles(LE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareDoubles(GT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareDoubles(GT:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than the baseline, but is not|n Computed (lhs): 0|n Baseline (rhs): 0' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareDoubles(GT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareDoubles(GT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareDoubles(GT:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than the baseline, but is not|n Computed (lhs): 0|n Baseline (rhs): 0.1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareDoubles(GT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareDoubles(GT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareDoubles(GT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareDoubles(GE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareDoubles(GE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareDoubles(GE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareDoubles(GE:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than or equal to the baseline, but is not|n Computed (lhs): 0|n Baseline (rhs): 0.1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareDoubles(GE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareDoubles(GE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareDoubles(GE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='comparePointers(EQ:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='comparePointers(EQ:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='comparePointers(EQ:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='comparePointers(EQ:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be equal to the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): 2' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='comparePointers(EQ:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='comparePointers(EQ:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='comparePointers(EQ:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be equal to the baseline, but is not|n Computed (lhs): 2|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='comparePointers(EQ:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='comparePointers(NE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='comparePointers(NE:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be different from the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='comparePointers(NE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='comparePointers(NE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='comparePointers(NE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='comparePointers(NE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='comparePointers(NE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='comparePointers(LT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='comparePointers(LT:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='comparePointers(LT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='comparePointers(LT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='comparePointers(LT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='comparePointers(LT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='comparePointers(LT:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than the baseline, but is not|n Computed (lhs): 2|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='comparePointers(LT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='comparePointers(LE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='comparePointers(LE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='comparePointers(LE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='comparePointers(LE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='comparePointers(LE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='comparePointers(LE:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than or equal to the baseline, but is not|n Computed (lhs): 2|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='comparePointers(LE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='comparePointers(GT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='comparePointers(GT:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='comparePointers(GT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='comparePointers(GT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='comparePointers(GT:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): 2' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='comparePointers(GT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='comparePointers(GT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='comparePointers(GT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='comparePointers(GE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='comparePointers(GE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='comparePointers(GE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='comparePointers(GE:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than or equal to the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): 2' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='comparePointers(GE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='comparePointers(GE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='comparePointers(GE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareToNullptr(EQ:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareToNullptr(EQ:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareToNullptr(EQ:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareToNullptr(EQ:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be equal to the baseline, but is not|n Computed (lhs): "nullptr"|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareToNullptr(EQ:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareToNullptr(EQ:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareToNullptr(EQ:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be equal to the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): "nullptr"' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareToNullptr(EQ:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareToNullptr(NE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareToNullptr(NE:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be different from the baseline, but is not|n Computed (lhs): "nullptr"|n Baseline (rhs): "nullptr"' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareToNullptr(NE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareToNullptr(NE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareToNullptr(NE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareToNullptr(NE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareToNullptr(NE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareToNullptr(LT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareToNullptr(LT:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than the baseline, but is not|n Computed (lhs): "nullptr"|n Baseline (rhs): "nullptr"' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareToNullptr(LT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareToNullptr(LT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareToNullptr(LT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareToNullptr(LT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareToNullptr(LT:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): "nullptr"' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareToNullptr(LT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareToNullptr(LE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareToNullptr(LE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareToNullptr(LE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareToNullptr(LE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareToNullptr(LE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareToNullptr(LE:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than or equal to the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): "nullptr"' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareToNullptr(LE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareToNullptr(GT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareToNullptr(GT:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than the baseline, but is not|n Computed (lhs): "nullptr"|n Baseline (rhs): "nullptr"' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareToNullptr(GT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareToNullptr(GT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareToNullptr(GT:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than the baseline, but is not|n Computed (lhs): "nullptr"|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareToNullptr(GT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareToNullptr(GT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareToNullptr(GT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareToNullptr(GE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareToNullptr(GE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareToNullptr(GE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareToNullptr(GE:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than or equal to the baseline, but is not|n Computed (lhs): "nullptr"|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareToNullptr(GE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareToNullptr(GE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareToNullptr(GE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareUnregistereEnum(EQ:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareUnregistereEnum(EQ:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareUnregistereEnum(EQ:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareUnregistereEnum(EQ:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be equal to the baseline, but is not|n Computed (lhs): 0|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareUnregistereEnum(EQ:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareUnregistereEnum(EQ:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareUnregistereEnum(EQ:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be equal to the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): 0' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareUnregistereEnum(EQ:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareUnregistereEnum(NE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareUnregistereEnum(NE:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be different from the baseline, but is not|n Computed (lhs): 0|n Baseline (rhs): 0' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareUnregistereEnum(NE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareUnregistereEnum(NE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareUnregistereEnum(NE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareUnregistereEnum(NE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareUnregistereEnum(NE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareUnregistereEnum(LT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareUnregistereEnum(LT:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than the baseline, but is not|n Computed (lhs): 0|n Baseline (rhs): 0' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareUnregistereEnum(LT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareUnregistereEnum(LT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareUnregistereEnum(LT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareUnregistereEnum(LT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareUnregistereEnum(LT:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): 0' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareUnregistereEnum(LT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareUnregistereEnum(LE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareUnregistereEnum(LE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareUnregistereEnum(LE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareUnregistereEnum(LE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareUnregistereEnum(LE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareUnregistereEnum(LE:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than or equal to the baseline, but is not|n Computed (lhs): 1|n Baseline (rhs): 0' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareUnregistereEnum(LE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareUnregistereEnum(GT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareUnregistereEnum(GT:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than the baseline, but is not|n Computed (lhs): 0|n Baseline (rhs): 0' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareUnregistereEnum(GT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareUnregistereEnum(GT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareUnregistereEnum(GT:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than the baseline, but is not|n Computed (lhs): 0|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareUnregistereEnum(GT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareUnregistereEnum(GT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareUnregistereEnum(GT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareUnregistereEnum(GE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareUnregistereEnum(GE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareUnregistereEnum(GE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareUnregistereEnum(GE:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than or equal to the baseline, but is not|n Computed (lhs): 0|n Baseline (rhs): 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareUnregistereEnum(GE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareUnregistereEnum(GE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareUnregistereEnum(GE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareRegistereEnum(EQ:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareRegistereEnum(EQ:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareRegistereEnum(EQ:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareRegistereEnum(EQ:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be equal to the baseline, but is not|n Computed (lhs): Monday|n Baseline (rhs): Sunday' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareRegistereEnum(EQ:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareRegistereEnum(EQ:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareRegistereEnum(EQ:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be equal to the baseline, but is not|n Computed (lhs): Sunday|n Baseline (rhs): Monday' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareRegistereEnum(EQ:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareRegistereEnum(NE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareRegistereEnum(NE:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be different from the baseline, but is not|n Computed (lhs): Monday|n Baseline (rhs): Monday' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareRegistereEnum(NE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareRegistereEnum(NE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareRegistereEnum(NE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareRegistereEnum(NE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareRegistereEnum(NE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareRegistereEnum(LT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareRegistereEnum(LT:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than the baseline, but is not|n Computed (lhs): Monday|n Baseline (rhs): Monday' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareRegistereEnum(LT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareRegistereEnum(LT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareRegistereEnum(LT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareRegistereEnum(LT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareRegistereEnum(LT:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than the baseline, but is not|n Computed (lhs): Sunday|n Baseline (rhs): Monday' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareRegistereEnum(LT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareRegistereEnum(LE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareRegistereEnum(LE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareRegistereEnum(LE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareRegistereEnum(LE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareRegistereEnum(LE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareRegistereEnum(LE:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than or equal to the baseline, but is not|n Computed (lhs): Sunday|n Baseline (rhs): Monday' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareRegistereEnum(LE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareRegistereEnum(GT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareRegistereEnum(GT:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than the baseline, but is not|n Computed (lhs): Monday|n Baseline (rhs): Monday' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareRegistereEnum(GT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareRegistereEnum(GT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareRegistereEnum(GT:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than the baseline, but is not|n Computed (lhs): Monday|n Baseline (rhs): Sunday' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareRegistereEnum(GT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareRegistereEnum(GT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareRegistereEnum(GT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareRegistereEnum(GE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareRegistereEnum(GE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareRegistereEnum(GE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareRegistereEnum(GE:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than or equal to the baseline, but is not|n Computed (lhs): Monday|n Baseline (rhs): Sunday' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareRegistereEnum(GE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareRegistereEnum(GE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareRegistereEnum(GE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareCustomTypes(EQ:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareCustomTypes(EQ:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareCustomTypes(EQ:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareCustomTypes(EQ:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be equal to the baseline, but is not|n Computed (lhs): MyClass(1)|n Baseline (rhs): MyClass(2)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareCustomTypes(EQ:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareCustomTypes(EQ:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareCustomTypes(EQ:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be equal to the baseline, but is not|n Computed (lhs): MyClass(2)|n Baseline (rhs): MyClass(1)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareCustomTypes(EQ:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareCustomTypes(NE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareCustomTypes(NE:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be different from the baseline, but is not|n Computed (lhs): MyClass(1)|n Baseline (rhs): MyClass(1)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareCustomTypes(NE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareCustomTypes(NE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareCustomTypes(NE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareCustomTypes(NE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareCustomTypes(NE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareCustomTypes(LT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareCustomTypes(LT:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than the baseline, but is not|n Computed (lhs): MyClass(1)|n Baseline (rhs): MyClass(1)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareCustomTypes(LT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareCustomTypes(LT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareCustomTypes(LT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareCustomTypes(LT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareCustomTypes(LT:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than the baseline, but is not|n Computed (lhs): MyClass(2)|n Baseline (rhs): MyClass(1)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareCustomTypes(LT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareCustomTypes(LE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareCustomTypes(LE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareCustomTypes(LE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareCustomTypes(LE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareCustomTypes(LE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareCustomTypes(LE:left > right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than or equal to the baseline, but is not|n Computed (lhs): MyClass(2)|n Baseline (rhs): MyClass(1)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareCustomTypes(LE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareCustomTypes(GT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareCustomTypes(GT:left == right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than the baseline, but is not|n Computed (lhs): MyClass(1)|n Baseline (rhs): MyClass(1)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareCustomTypes(GT:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareCustomTypes(GT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareCustomTypes(GT:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than the baseline, but is not|n Computed (lhs): MyClass(1)|n Baseline (rhs): MyClass(2)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareCustomTypes(GT:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareCustomTypes(GT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareCustomTypes(GT:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareCustomTypes(GE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareCustomTypes(GE:left == right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareCustomTypes(GE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='compareCustomTypes(GE:left < right)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than or equal to the baseline, but is not|n Computed (lhs): MyClass(1)|n Baseline (rhs): MyClass(2)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareCustomTypes(GE:left < right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='compareCustomTypes(GE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='compareCustomTypes(GE:left > right)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='checkComparisonForTemporaryObjects(EQ)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='checkComparisonForTemporaryObjects(EQ)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be equal to the baseline, but is not|n Computed (getClassForValue(0).getValuePointer()): MyClass(2) on memory address with index 0|n Baseline (getClassForValue(1).getValuePointer()): MyClass(1) on memory address with index 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='checkComparisonForTemporaryObjects(EQ)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='checkComparisonForTemporaryObjects(NE)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='checkComparisonForTemporaryObjects(NE)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='checkComparisonForTemporaryObjects(LT)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='checkComparisonForTemporaryObjects(LT)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='checkComparisonForTemporaryObjects(LE)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='checkComparisonForTemporaryObjects(LE)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='checkComparisonForTemporaryObjects(GT)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='checkComparisonForTemporaryObjects(GT)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than the baseline, but is not|n Computed (getClassForValue(0).getValuePointer()): MyClass(2) on memory address with index 0|n Baseline (getClassForValue(1).getValuePointer()): MyClass(1) on memory address with index 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='checkComparisonForTemporaryObjects(GT)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='checkComparisonForTemporaryObjects(GE)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='checkComparisonForTemporaryObjects(GE)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than or equal to the baseline, but is not|n Computed (getClassForValue(0).getValuePointer()): MyClass(2) on memory address with index 0|n Baseline (getClassForValue(1).getValuePointer()): MyClass(1) on memory address with index 1' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='checkComparisonForTemporaryObjects(GE)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='checkComparisonWithTimeout(EQ)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='checkComparisonWithTimeout(EQ)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='checkComparisonWithTimeout(NE)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='checkComparisonWithTimeout(NE)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='checkComparisonWithTimeout(LT)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='checkComparisonWithTimeout(LT)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than the baseline, but is not|n Computed (c) : ClassWithDeferredSetter(1)|n Baseline (ClassWithDeferredSetter(0)): ClassWithDeferredSetter(0)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='checkComparisonWithTimeout(LT)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='checkComparisonWithTimeout(LE)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='checkComparisonWithTimeout(LE)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be less than or equal to the baseline, but is not|n Computed (c) : ClassWithDeferredSetter(1)|n Baseline (ClassWithDeferredSetter(-1)): ClassWithDeferredSetter(-1)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='checkComparisonWithTimeout(LE)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='checkComparisonWithTimeout(GT)' flowId='tst_ExtendedCompare'] +##teamcity[testFailed name='checkComparisonWithTimeout(GT)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)|]' details='The computed value is expected to be greater than the baseline, but is not|n Computed (c) : ClassWithDeferredSetter(1)|n Baseline (ClassWithDeferredSetter(1)): ClassWithDeferredSetter(1)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='checkComparisonWithTimeout(GT)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='checkComparisonWithTimeout(GE)' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='checkComparisonWithTimeout(GE)' flowId='tst_ExtendedCompare'] +##teamcity[testStarted name='cleanupTestCase()' flowId='tst_ExtendedCompare'] +##teamcity[testFinished name='cleanupTestCase()' flowId='tst_ExtendedCompare'] +##teamcity[testSuiteFinished name='tst_ExtendedCompare' flowId='tst_ExtendedCompare'] diff --git a/tests/auto/testlib/selftests/expected_extendedcompare.txt b/tests/auto/testlib/selftests/expected_extendedcompare.txt new file mode 100644 index 0000000000..08b6b6deb4 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_extendedcompare.txt @@ -0,0 +1,396 @@ +********* Start testing of tst_ExtendedCompare ********* +Config: Using QtTest library +PASS : tst_ExtendedCompare::initTestCase() +PASS : tst_ExtendedCompare::compareInts(EQ:left == right) +FAIL! : tst_ExtendedCompare::compareInts(EQ:left < right) The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 2 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareInts(EQ:left > right) The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 2 + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareInts(NE:left == right) The computed value is expected to be different from the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareInts(NE:left < right) +PASS : tst_ExtendedCompare::compareInts(NE:left > right) +FAIL! : tst_ExtendedCompare::compareInts(LT:left == right) The computed value is expected to be less than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareInts(LT:left < right) +FAIL! : tst_ExtendedCompare::compareInts(LT:left > right) The computed value is expected to be less than the baseline, but is not + Computed (lhs): 2 + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareInts(LE:left == right) +PASS : tst_ExtendedCompare::compareInts(LE:left < right) +FAIL! : tst_ExtendedCompare::compareInts(LE:left > right) The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): 2 + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareInts(GT:left == right) The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareInts(GT:left < right) The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 2 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareInts(GT:left > right) +PASS : tst_ExtendedCompare::compareInts(GE:left == right) +FAIL! : tst_ExtendedCompare::compareInts(GE:left < right) The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 2 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareInts(GE:left > right) +PASS : tst_ExtendedCompare::compareFloats(EQ:left == right) +FAIL! : tst_ExtendedCompare::compareFloats(EQ:left < right) The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1.1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareFloats(EQ:left > right) The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 1.1 + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareFloats(NE:left == right) The computed value is expected to be different from the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareFloats(NE:left < right) +PASS : tst_ExtendedCompare::compareFloats(NE:left > right) +FAIL! : tst_ExtendedCompare::compareFloats(LT:left == right) The computed value is expected to be less than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareFloats(LT:left < right) +FAIL! : tst_ExtendedCompare::compareFloats(LT:left > right) The computed value is expected to be less than the baseline, but is not + Computed (lhs): 1.1 + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareFloats(LE:left == right) +PASS : tst_ExtendedCompare::compareFloats(LE:left < right) +FAIL! : tst_ExtendedCompare::compareFloats(LE:left > right) The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): 1.1 + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareFloats(GT:left == right) The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareFloats(GT:left < right) The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1.1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareFloats(GT:left > right) +PASS : tst_ExtendedCompare::compareFloats(GE:left == right) +FAIL! : tst_ExtendedCompare::compareFloats(GE:left < right) The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1.1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareFloats(GE:left > right) +PASS : tst_ExtendedCompare::compareDoubles(EQ:left == right) +FAIL! : tst_ExtendedCompare::compareDoubles(EQ:left < right) The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0.1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareDoubles(EQ:left > right) The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 0.1 + Baseline (rhs): 0 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareDoubles(NE:left == right) The computed value is expected to be different from the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareDoubles(NE:left < right) +PASS : tst_ExtendedCompare::compareDoubles(NE:left > right) +FAIL! : tst_ExtendedCompare::compareDoubles(LT:left == right) The computed value is expected to be less than the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareDoubles(LT:left < right) +FAIL! : tst_ExtendedCompare::compareDoubles(LT:left > right) The computed value is expected to be less than the baseline, but is not + Computed (lhs): 0.1 + Baseline (rhs): 0 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareDoubles(LE:left == right) +PASS : tst_ExtendedCompare::compareDoubles(LE:left < right) +FAIL! : tst_ExtendedCompare::compareDoubles(LE:left > right) The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): 0.1 + Baseline (rhs): 0 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareDoubles(GT:left == right) The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareDoubles(GT:left < right) The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0.1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareDoubles(GT:left > right) +PASS : tst_ExtendedCompare::compareDoubles(GE:left == right) +FAIL! : tst_ExtendedCompare::compareDoubles(GE:left < right) The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0.1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareDoubles(GE:left > right) +PASS : tst_ExtendedCompare::comparePointers(EQ:left == right) +FAIL! : tst_ExtendedCompare::comparePointers(EQ:left < right) The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 2 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::comparePointers(EQ:left > right) The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 2 + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::comparePointers(NE:left == right) The computed value is expected to be different from the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::comparePointers(NE:left < right) +PASS : tst_ExtendedCompare::comparePointers(NE:left > right) +FAIL! : tst_ExtendedCompare::comparePointers(LT:left == right) The computed value is expected to be less than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::comparePointers(LT:left < right) +FAIL! : tst_ExtendedCompare::comparePointers(LT:left > right) The computed value is expected to be less than the baseline, but is not + Computed (lhs): 2 + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::comparePointers(LE:left == right) +PASS : tst_ExtendedCompare::comparePointers(LE:left < right) +FAIL! : tst_ExtendedCompare::comparePointers(LE:left > right) The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): 2 + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::comparePointers(GT:left == right) The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::comparePointers(GT:left < right) The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 2 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::comparePointers(GT:left > right) +PASS : tst_ExtendedCompare::comparePointers(GE:left == right) +FAIL! : tst_ExtendedCompare::comparePointers(GE:left < right) The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 2 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::comparePointers(GE:left > right) +PASS : tst_ExtendedCompare::compareToNullptr(EQ:left == right) +FAIL! : tst_ExtendedCompare::compareToNullptr(EQ:left < right) The computed value is expected to be equal to the baseline, but is not + Computed (lhs): "nullptr" + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareToNullptr(EQ:left > right) The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): "nullptr" + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareToNullptr(NE:left == right) The computed value is expected to be different from the baseline, but is not + Computed (lhs): "nullptr" + Baseline (rhs): "nullptr" + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareToNullptr(NE:left < right) +PASS : tst_ExtendedCompare::compareToNullptr(NE:left > right) +FAIL! : tst_ExtendedCompare::compareToNullptr(LT:left == right) The computed value is expected to be less than the baseline, but is not + Computed (lhs): "nullptr" + Baseline (rhs): "nullptr" + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareToNullptr(LT:left < right) +FAIL! : tst_ExtendedCompare::compareToNullptr(LT:left > right) The computed value is expected to be less than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): "nullptr" + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareToNullptr(LE:left == right) +PASS : tst_ExtendedCompare::compareToNullptr(LE:left < right) +FAIL! : tst_ExtendedCompare::compareToNullptr(LE:left > right) The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): "nullptr" + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareToNullptr(GT:left == right) The computed value is expected to be greater than the baseline, but is not + Computed (lhs): "nullptr" + Baseline (rhs): "nullptr" + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareToNullptr(GT:left < right) The computed value is expected to be greater than the baseline, but is not + Computed (lhs): "nullptr" + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareToNullptr(GT:left > right) +PASS : tst_ExtendedCompare::compareToNullptr(GE:left == right) +FAIL! : tst_ExtendedCompare::compareToNullptr(GE:left < right) The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): "nullptr" + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareToNullptr(GE:left > right) +PASS : tst_ExtendedCompare::compareUnregistereEnum(EQ:left == right) +FAIL! : tst_ExtendedCompare::compareUnregistereEnum(EQ:left < right) The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareUnregistereEnum(EQ:left > right) The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 0 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareUnregistereEnum(NE:left == right) The computed value is expected to be different from the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareUnregistereEnum(NE:left < right) +PASS : tst_ExtendedCompare::compareUnregistereEnum(NE:left > right) +FAIL! : tst_ExtendedCompare::compareUnregistereEnum(LT:left == right) The computed value is expected to be less than the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareUnregistereEnum(LT:left < right) +FAIL! : tst_ExtendedCompare::compareUnregistereEnum(LT:left > right) The computed value is expected to be less than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 0 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareUnregistereEnum(LE:left == right) +PASS : tst_ExtendedCompare::compareUnregistereEnum(LE:left < right) +FAIL! : tst_ExtendedCompare::compareUnregistereEnum(LE:left > right) The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 0 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareUnregistereEnum(GT:left == right) The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareUnregistereEnum(GT:left < right) The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareUnregistereEnum(GT:left > right) +PASS : tst_ExtendedCompare::compareUnregistereEnum(GE:left == right) +FAIL! : tst_ExtendedCompare::compareUnregistereEnum(GE:left < right) The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareUnregistereEnum(GE:left > right) +PASS : tst_ExtendedCompare::compareRegistereEnum(EQ:left == right) +FAIL! : tst_ExtendedCompare::compareRegistereEnum(EQ:left < right) The computed value is expected to be equal to the baseline, but is not + Computed (lhs): Monday + Baseline (rhs): Sunday + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareRegistereEnum(EQ:left > right) The computed value is expected to be equal to the baseline, but is not + Computed (lhs): Sunday + Baseline (rhs): Monday + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareRegistereEnum(NE:left == right) The computed value is expected to be different from the baseline, but is not + Computed (lhs): Monday + Baseline (rhs): Monday + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareRegistereEnum(NE:left < right) +PASS : tst_ExtendedCompare::compareRegistereEnum(NE:left > right) +FAIL! : tst_ExtendedCompare::compareRegistereEnum(LT:left == right) The computed value is expected to be less than the baseline, but is not + Computed (lhs): Monday + Baseline (rhs): Monday + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareRegistereEnum(LT:left < right) +FAIL! : tst_ExtendedCompare::compareRegistereEnum(LT:left > right) The computed value is expected to be less than the baseline, but is not + Computed (lhs): Sunday + Baseline (rhs): Monday + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareRegistereEnum(LE:left == right) +PASS : tst_ExtendedCompare::compareRegistereEnum(LE:left < right) +FAIL! : tst_ExtendedCompare::compareRegistereEnum(LE:left > right) The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): Sunday + Baseline (rhs): Monday + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareRegistereEnum(GT:left == right) The computed value is expected to be greater than the baseline, but is not + Computed (lhs): Monday + Baseline (rhs): Monday + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareRegistereEnum(GT:left < right) The computed value is expected to be greater than the baseline, but is not + Computed (lhs): Monday + Baseline (rhs): Sunday + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareRegistereEnum(GT:left > right) +PASS : tst_ExtendedCompare::compareRegistereEnum(GE:left == right) +FAIL! : tst_ExtendedCompare::compareRegistereEnum(GE:left < right) The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): Monday + Baseline (rhs): Sunday + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareRegistereEnum(GE:left > right) +PASS : tst_ExtendedCompare::compareCustomTypes(EQ:left == right) +FAIL! : tst_ExtendedCompare::compareCustomTypes(EQ:left < right) The computed value is expected to be equal to the baseline, but is not + Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(2) + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareCustomTypes(EQ:left > right) The computed value is expected to be equal to the baseline, but is not + Computed (lhs): MyClass(2) + Baseline (rhs): MyClass(1) + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareCustomTypes(NE:left == right) The computed value is expected to be different from the baseline, but is not + Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(1) + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareCustomTypes(NE:left < right) +PASS : tst_ExtendedCompare::compareCustomTypes(NE:left > right) +FAIL! : tst_ExtendedCompare::compareCustomTypes(LT:left == right) The computed value is expected to be less than the baseline, but is not + Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(1) + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareCustomTypes(LT:left < right) +FAIL! : tst_ExtendedCompare::compareCustomTypes(LT:left > right) The computed value is expected to be less than the baseline, but is not + Computed (lhs): MyClass(2) + Baseline (rhs): MyClass(1) + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareCustomTypes(LE:left == right) +PASS : tst_ExtendedCompare::compareCustomTypes(LE:left < right) +FAIL! : tst_ExtendedCompare::compareCustomTypes(LE:left > right) The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): MyClass(2) + Baseline (rhs): MyClass(1) + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareCustomTypes(GT:left == right) The computed value is expected to be greater than the baseline, but is not + Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(1) + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::compareCustomTypes(GT:left < right) The computed value is expected to be greater than the baseline, but is not + Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(2) + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareCustomTypes(GT:left > right) +PASS : tst_ExtendedCompare::compareCustomTypes(GE:left == right) +FAIL! : tst_ExtendedCompare::compareCustomTypes(GE:left < right) The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(2) + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::compareCustomTypes(GE:left > right) +FAIL! : tst_ExtendedCompare::checkComparisonForTemporaryObjects(EQ) The computed value is expected to be equal to the baseline, but is not + Computed (getClassForValue(0).getValuePointer()): MyClass(2) on memory address with index 0 + Baseline (getClassForValue(1).getValuePointer()): MyClass(1) on memory address with index 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::checkComparisonForTemporaryObjects(NE) +PASS : tst_ExtendedCompare::checkComparisonForTemporaryObjects(LT) +PASS : tst_ExtendedCompare::checkComparisonForTemporaryObjects(LE) +FAIL! : tst_ExtendedCompare::checkComparisonForTemporaryObjects(GT) The computed value is expected to be greater than the baseline, but is not + Computed (getClassForValue(0).getValuePointer()): MyClass(2) on memory address with index 0 + Baseline (getClassForValue(1).getValuePointer()): MyClass(1) on memory address with index 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::checkComparisonForTemporaryObjects(GE) The computed value is expected to be greater than or equal to the baseline, but is not + Computed (getClassForValue(0).getValuePointer()): MyClass(2) on memory address with index 0 + Baseline (getClassForValue(1).getValuePointer()): MyClass(1) on memory address with index 1 + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::checkComparisonWithTimeout(EQ) +PASS : tst_ExtendedCompare::checkComparisonWithTimeout(NE) +FAIL! : tst_ExtendedCompare::checkComparisonWithTimeout(LT) The computed value is expected to be less than the baseline, but is not + Computed (c) : ClassWithDeferredSetter(1) + Baseline (ClassWithDeferredSetter(0)): ClassWithDeferredSetter(0) + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::checkComparisonWithTimeout(LE) The computed value is expected to be less than or equal to the baseline, but is not + Computed (c) : ClassWithDeferredSetter(1) + Baseline (ClassWithDeferredSetter(-1)): ClassWithDeferredSetter(-1) + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +FAIL! : tst_ExtendedCompare::checkComparisonWithTimeout(GT) The computed value is expected to be greater than the baseline, but is not + Computed (c) : ClassWithDeferredSetter(1) + Baseline (ClassWithDeferredSetter(1)): ClassWithDeferredSetter(1) + Loc: [qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp(0)] +PASS : tst_ExtendedCompare::checkComparisonWithTimeout(GE) +PASS : tst_ExtendedCompare::cleanupTestCase() +Totals: 80 passed, 78 failed, 0 skipped, 0 blacklisted, 0ms +********* Finished testing of tst_ExtendedCompare ********* diff --git a/tests/auto/testlib/selftests/expected_extendedcompare.xml b/tests/auto/testlib/selftests/expected_extendedcompare.xml new file mode 100644 index 0000000000..ab55eebf89 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_extendedcompare.xml @@ -0,0 +1,749 @@ +<?xml version="1.0" encoding="UTF-8"?> +<TestCase name="tst_ExtendedCompare"> + <Environment> + <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> + <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> + </Environment> + <TestFunction name="initTestCase"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="compareInts"> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[EQ:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 2]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 2 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[NE:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be different from the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left < right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left > right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LT:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 2 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left == right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LE:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): 2 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 2]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GT:left > right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GE:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 2]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left > right]]></DataTag> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="compareFloats"> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[EQ:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1.1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 1.1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[NE:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be different from the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left < right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left > right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LT:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 1.1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left == right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LE:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): 1.1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1.1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GT:left > right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GE:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1.1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left > right]]></DataTag> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="compareDoubles"> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[EQ:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0.1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 0.1 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[NE:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be different from the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left < right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left > right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LT:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 0.1 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left == right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LE:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): 0.1 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0.1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GT:left > right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GE:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0.1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left > right]]></DataTag> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="comparePointers"> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[EQ:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 2]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 2 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[NE:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be different from the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left < right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left > right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LT:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 2 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left == right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LE:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): 2 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 2]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GT:left > right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GE:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 2]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left > right]]></DataTag> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="compareToNullptr"> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[EQ:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): "nullptr" + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): "nullptr"]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[NE:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be different from the baseline, but is not + Computed (lhs): "nullptr" + Baseline (rhs): "nullptr"]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left < right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left > right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): "nullptr" + Baseline (rhs): "nullptr"]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LT:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): "nullptr"]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left == right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LE:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): "nullptr"]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): "nullptr" + Baseline (rhs): "nullptr"]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): "nullptr" + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GT:left > right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GE:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): "nullptr" + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left > right]]></DataTag> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="compareUnregistereEnum"> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[EQ:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[NE:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be different from the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left < right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left > right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LT:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left == right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LE:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): 1 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 0]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GT:left > right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GE:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): 0 + Baseline (rhs): 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left > right]]></DataTag> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="compareRegistereEnum"> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[EQ:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): Monday + Baseline (rhs): Sunday]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): Sunday + Baseline (rhs): Monday]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[NE:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be different from the baseline, but is not + Computed (lhs): Monday + Baseline (rhs): Monday]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left < right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left > right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): Monday + Baseline (rhs): Monday]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LT:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): Sunday + Baseline (rhs): Monday]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left == right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LE:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): Sunday + Baseline (rhs): Monday]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): Monday + Baseline (rhs): Monday]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): Monday + Baseline (rhs): Sunday]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GT:left > right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GE:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): Monday + Baseline (rhs): Sunday]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left > right]]></DataTag> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="compareCustomTypes"> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[EQ:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(2)]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (lhs): MyClass(2) + Baseline (rhs): MyClass(1)]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[NE:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be different from the baseline, but is not + Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(1)]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left < right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE:left > right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(1)]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LT:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (lhs): MyClass(2) + Baseline (rhs): MyClass(1)]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left == right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE:left < right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LE:left > right]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than or equal to the baseline, but is not + Computed (lhs): MyClass(2) + Baseline (rhs): MyClass(1)]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left == right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(1)]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(2)]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GT:left > right]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left == right]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GE:left < right]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than or equal to the baseline, but is not + Computed (lhs): MyClass(1) + Baseline (rhs): MyClass(2)]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE:left > right]]></DataTag> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="checkComparisonForTemporaryObjects"> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[EQ]]></DataTag> + <Description><![CDATA[The computed value is expected to be equal to the baseline, but is not + Computed (getClassForValue(0).getValuePointer()): MyClass(2) on memory address with index 0 + Baseline (getClassForValue(1).getValuePointer()): MyClass(1) on memory address with index 1]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LT]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[LE]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (getClassForValue(0).getValuePointer()): MyClass(2) on memory address with index 0 + Baseline (getClassForValue(1).getValuePointer()): MyClass(1) on memory address with index 1]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GE]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than or equal to the baseline, but is not + Computed (getClassForValue(0).getValuePointer()): MyClass(2) on memory address with index 0 + Baseline (getClassForValue(1).getValuePointer()): MyClass(1) on memory address with index 1]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="checkComparisonWithTimeout"> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[EQ]]></DataTag> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[NE]]></DataTag> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LT]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than the baseline, but is not + Computed (c) : ClassWithDeferredSetter(1) + Baseline (ClassWithDeferredSetter(0)): ClassWithDeferredSetter(0)]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[LE]]></DataTag> + <Description><![CDATA[The computed value is expected to be less than or equal to the baseline, but is not + Computed (c) : ClassWithDeferredSetter(1) + Baseline (ClassWithDeferredSetter(-1)): ClassWithDeferredSetter(-1)]]></Description> + </Incident> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp" line="0"> + <DataTag><![CDATA[GT]]></DataTag> + <Description><![CDATA[The computed value is expected to be greater than the baseline, but is not + Computed (c) : ClassWithDeferredSetter(1) + Baseline (ClassWithDeferredSetter(1)): ClassWithDeferredSetter(1)]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[GE]]></DataTag> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="cleanupTestCase"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <Duration msecs="0"/> +</TestCase> diff --git a/tests/auto/testlib/selftests/expected_failcleanup.junitxml b/tests/auto/testlib/selftests/expected_failcleanup.junitxml index a40c724a46..8ea5799363 100644 --- a/tests/auto/testlib/selftests/expected_failcleanup.junitxml +++ b/tests/auto/testlib/selftests/expected_failcleanup.junitxml @@ -6,8 +6,8 @@ <property name="QtBuild" value=""/> </properties> <testcase name="initTestCase" classname="tst_FailCleanup" time="@TEST_DURATION@"/> - <testcase name="aTestFunction" classname="tst_FailCleanup" time="@TEST_DURATION@"/> - <testcase name="cleanupTestCase" classname="tst_FailCleanup" time="@TEST_DURATION@"> - <failure type="fail" message="'false' returned FALSE. (Fail inside cleanupTestCase)"/> + <testcase name="aTestFunction" classname="tst_FailCleanup" time="@TEST_DURATION@"> + <failure type="fail" message="'false' returned FALSE. (Fail inside cleanup)"/> </testcase> + <testcase name="cleanupTestCase" classname="tst_FailCleanup" time="@TEST_DURATION@"/> </testsuite> diff --git a/tests/auto/testlib/selftests/expected_failcleanup.lightxml b/tests/auto/testlib/selftests/expected_failcleanup.lightxml index ce9da0d2a8..a9d7a1361f 100644 --- a/tests/auto/testlib/selftests/expected_failcleanup.lightxml +++ b/tests/auto/testlib/selftests/expected_failcleanup.lightxml @@ -8,13 +8,13 @@ <Duration msecs="0"/> </TestFunction> <TestFunction name="aTestFunction"> - <Incident type="pass" file="" line="0" /> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp" line="0"> + <Description><![CDATA['false' returned FALSE. (Fail inside cleanup)]]></Description> + </Incident> <Duration msecs="0"/> </TestFunction> <TestFunction name="cleanupTestCase"> - <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp" line="0"> - <Description><![CDATA['false' returned FALSE. (Fail inside cleanupTestCase)]]></Description> - </Incident> + <Incident type="pass" file="" line="0" /> <Duration msecs="0"/> </TestFunction> <Duration msecs="0"/> diff --git a/tests/auto/testlib/selftests/expected_failcleanup.tap b/tests/auto/testlib/selftests/expected_failcleanup.tap index 8ec0aca6d4..64556b32b2 100644 --- a/tests/auto/testlib/selftests/expected_failcleanup.tap +++ b/tests/auto/testlib/selftests/expected_failcleanup.tap @@ -1,19 +1,19 @@ TAP version 13 # tst_FailCleanup ok 1 - initTestCase() -ok 2 - aTestFunction() -not ok 3 - cleanupTestCase() +not ok 2 - aTestFunction() --- type: QVERIFY - message: Fail inside cleanupTestCase + message: Fail inside cleanup wanted: true (false) found: false (false) expected: true (false) actual: false (false) - at: tst_FailCleanup::cleanupTestCase() (qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp:0) + at: tst_FailCleanup::aTestFunction() (qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp:0) file: qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp line: 0 ... +ok 3 - cleanupTestCase() 1..3 # tests 3 # pass 2 diff --git a/tests/auto/testlib/selftests/expected_failcleanup.teamcity b/tests/auto/testlib/selftests/expected_failcleanup.teamcity index 1f8d353581..12d7b2f154 100644 --- a/tests/auto/testlib/selftests/expected_failcleanup.teamcity +++ b/tests/auto/testlib/selftests/expected_failcleanup.teamcity @@ -2,8 +2,8 @@ ##teamcity[testStarted name='initTestCase()' flowId='tst_FailCleanup'] ##teamcity[testFinished name='initTestCase()' flowId='tst_FailCleanup'] ##teamcity[testStarted name='aTestFunction()' flowId='tst_FailCleanup'] +##teamcity[testFailed name='aTestFunction()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp(0)|]' details='|'false|' returned FALSE. (Fail inside cleanup)' flowId='tst_FailCleanup'] ##teamcity[testFinished name='aTestFunction()' flowId='tst_FailCleanup'] ##teamcity[testStarted name='cleanupTestCase()' flowId='tst_FailCleanup'] -##teamcity[testFailed name='cleanupTestCase()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp(0)|]' details='|'false|' returned FALSE. (Fail inside cleanupTestCase)' flowId='tst_FailCleanup'] ##teamcity[testFinished name='cleanupTestCase()' flowId='tst_FailCleanup'] ##teamcity[testSuiteFinished name='tst_FailCleanup' flowId='tst_FailCleanup'] diff --git a/tests/auto/testlib/selftests/expected_failcleanup.txt b/tests/auto/testlib/selftests/expected_failcleanup.txt index a5776e59bf..4fac7940fd 100644 --- a/tests/auto/testlib/selftests/expected_failcleanup.txt +++ b/tests/auto/testlib/selftests/expected_failcleanup.txt @@ -1,8 +1,8 @@ ********* Start testing of tst_FailCleanup ********* Config: Using QtTest library PASS : tst_FailCleanup::initTestCase() -PASS : tst_FailCleanup::aTestFunction() -FAIL! : tst_FailCleanup::cleanupTestCase() 'false' returned FALSE. (Fail inside cleanupTestCase) +FAIL! : tst_FailCleanup::aTestFunction() 'false' returned FALSE. (Fail inside cleanup) Loc: [qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp(0)] +PASS : tst_FailCleanup::cleanupTestCase() Totals: 2 passed, 1 failed, 0 skipped, 0 blacklisted, 0ms ********* Finished testing of tst_FailCleanup ********* diff --git a/tests/auto/testlib/selftests/expected_failcleanup.xml b/tests/auto/testlib/selftests/expected_failcleanup.xml index 3521802ca0..f4f041e704 100644 --- a/tests/auto/testlib/selftests/expected_failcleanup.xml +++ b/tests/auto/testlib/selftests/expected_failcleanup.xml @@ -10,13 +10,13 @@ <Duration msecs="0"/> </TestFunction> <TestFunction name="aTestFunction"> - <Incident type="pass" file="" line="0" /> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp" line="0"> + <Description><![CDATA['false' returned FALSE. (Fail inside cleanup)]]></Description> + </Incident> <Duration msecs="0"/> </TestFunction> <TestFunction name="cleanupTestCase"> - <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp" line="0"> - <Description><![CDATA['false' returned FALSE. (Fail inside cleanupTestCase)]]></Description> - </Incident> + <Incident type="pass" file="" line="0" /> <Duration msecs="0"/> </TestFunction> <Duration msecs="0"/> diff --git a/tests/auto/testlib/selftests/expected_failcleanuptestcase.junitxml b/tests/auto/testlib/selftests/expected_failcleanuptestcase.junitxml new file mode 100644 index 0000000000..8e694a4dfe --- /dev/null +++ b/tests/auto/testlib/selftests/expected_failcleanuptestcase.junitxml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<testsuite name="tst_FailCleanupTestCase" timestamp="@TEST_START_TIME@" hostname="@HOSTNAME@" tests="3" failures="1" errors="0" skipped="0" time="@TEST_DURATION@"> + <properties> + <property name="QTestVersion" value="@INSERT_QT_VERSION_HERE@"/> + <property name="QtVersion" value="@INSERT_QT_VERSION_HERE@"/> + <property name="QtBuild" value=""/> + </properties> + <testcase name="initTestCase" classname="tst_FailCleanupTestCase" time="@TEST_DURATION@"/> + <testcase name="aTestFunction" classname="tst_FailCleanupTestCase" time="@TEST_DURATION@"/> + <testcase name="cleanupTestCase" classname="tst_FailCleanupTestCase" time="@TEST_DURATION@"> + <failure type="fail" message="'false' returned FALSE. (Fail inside cleanupTestCase)"/> + </testcase> +</testsuite> diff --git a/tests/auto/testlib/selftests/expected_failcleanuptestcase.lightxml b/tests/auto/testlib/selftests/expected_failcleanuptestcase.lightxml new file mode 100644 index 0000000000..ed92e1e6b0 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_failcleanuptestcase.lightxml @@ -0,0 +1,20 @@ + <Environment> + <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> + <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> + </Environment> + <TestFunction name="initTestCase"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="aTestFunction"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="cleanupTestCase"> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/failcleanuptestcase/tst_failcleanuptestcase.cpp" line="0"> + <Description><![CDATA['false' returned FALSE. (Fail inside cleanupTestCase)]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <Duration msecs="0"/> diff --git a/tests/auto/testlib/selftests/expected_failcleanuptestcase.tap b/tests/auto/testlib/selftests/expected_failcleanuptestcase.tap new file mode 100644 index 0000000000..1bad92ce1f --- /dev/null +++ b/tests/auto/testlib/selftests/expected_failcleanuptestcase.tap @@ -0,0 +1,20 @@ +TAP version 13 +# tst_FailCleanupTestCase +ok 1 - initTestCase() +ok 2 - aTestFunction() +not ok 3 - cleanupTestCase() + --- + type: QVERIFY + message: Fail inside cleanupTestCase + wanted: true (false) + found: false (false) + expected: true (false) + actual: false (false) + at: tst_FailCleanupTestCase::cleanupTestCase() (qtbase/tests/auto/testlib/selftests/failcleanuptestcase/tst_failcleanuptestcase.cpp:0) + file: qtbase/tests/auto/testlib/selftests/failcleanuptestcase/tst_failcleanuptestcase.cpp + line: 0 + ... +1..3 +# tests 3 +# pass 2 +# fail 1 diff --git a/tests/auto/testlib/selftests/expected_failcleanuptestcase.teamcity b/tests/auto/testlib/selftests/expected_failcleanuptestcase.teamcity new file mode 100644 index 0000000000..b76c7e3f45 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_failcleanuptestcase.teamcity @@ -0,0 +1,9 @@ +##teamcity[testSuiteStarted name='tst_FailCleanupTestCase' flowId='tst_FailCleanupTestCase'] +##teamcity[testStarted name='initTestCase()' flowId='tst_FailCleanupTestCase'] +##teamcity[testFinished name='initTestCase()' flowId='tst_FailCleanupTestCase'] +##teamcity[testStarted name='aTestFunction()' flowId='tst_FailCleanupTestCase'] +##teamcity[testFinished name='aTestFunction()' flowId='tst_FailCleanupTestCase'] +##teamcity[testStarted name='cleanupTestCase()' flowId='tst_FailCleanupTestCase'] +##teamcity[testFailed name='cleanupTestCase()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/failcleanuptestcase/tst_failcleanuptestcase.cpp(0)|]' details='|'false|' returned FALSE. (Fail inside cleanupTestCase)' flowId='tst_FailCleanupTestCase'] +##teamcity[testFinished name='cleanupTestCase()' flowId='tst_FailCleanupTestCase'] +##teamcity[testSuiteFinished name='tst_FailCleanupTestCase' flowId='tst_FailCleanupTestCase'] diff --git a/tests/auto/testlib/selftests/expected_failcleanuptestcase.txt b/tests/auto/testlib/selftests/expected_failcleanuptestcase.txt new file mode 100644 index 0000000000..2e4619394b --- /dev/null +++ b/tests/auto/testlib/selftests/expected_failcleanuptestcase.txt @@ -0,0 +1,8 @@ +********* Start testing of tst_FailCleanupTestCase ********* +Config: Using QtTest library +PASS : tst_FailCleanupTestCase::initTestCase() +PASS : tst_FailCleanupTestCase::aTestFunction() +FAIL! : tst_FailCleanupTestCase::cleanupTestCase() 'false' returned FALSE. (Fail inside cleanupTestCase) + Loc: [qtbase/tests/auto/testlib/selftests/failcleanuptestcase/tst_failcleanuptestcase.cpp(0)] +Totals: 2 passed, 1 failed, 0 skipped, 0 blacklisted, 0ms +********* Finished testing of tst_FailCleanupTestCase ********* diff --git a/tests/auto/testlib/selftests/expected_failcleanuptestcase.xml b/tests/auto/testlib/selftests/expected_failcleanuptestcase.xml new file mode 100644 index 0000000000..1537440317 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_failcleanuptestcase.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<TestCase name="tst_FailCleanupTestCase"> + <Environment> + <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> + <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> + </Environment> + <TestFunction name="initTestCase"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="aTestFunction"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="cleanupTestCase"> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/failcleanuptestcase/tst_failcleanuptestcase.cpp" line="0"> + <Description><![CDATA['false' returned FALSE. (Fail inside cleanupTestCase)]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <Duration msecs="0"/> +</TestCase> diff --git a/tests/auto/testlib/selftests/expected_faildatatype.tap b/tests/auto/testlib/selftests/expected_faildatatype.tap index 4db7f717b5..05dcf90bca 100644 --- a/tests/auto/testlib/selftests/expected_faildatatype.tap +++ b/tests/auto/testlib/selftests/expected_faildatatype.tap @@ -1,14 +1,18 @@ TAP version 13 # tst_FailDataType ok 1 - initTestCase() -# expected data of type 'QString', got 'bool' for element 0 of data with tag 'bool-as-string' -# ASSERT: "false" in file qtbase/src/testlib/qtestdata.cpp, line 0 not ok 2 - value() --- # Received a fatal error. at: tst_FailDataType::value() (qtbase/src/testlib/qtestdata.cpp:0) file: qtbase/src/testlib/qtestdata.cpp line: 0 + extensions: + messages: + - severity: debug + message: expected data of type 'QString', got 'bool' for element 0 of data with tag 'bool-as-string' + - severity: fatal + message: ASSERT: "false" in file qtbase/src/testlib/qtestdata.cpp, line 0 ... 1..2 # tests 2 diff --git a/tests/auto/testlib/selftests/expected_failfetchtype.tap b/tests/auto/testlib/selftests/expected_failfetchtype.tap index 3e23f3a54f..465894d6bf 100644 --- a/tests/auto/testlib/selftests/expected_failfetchtype.tap +++ b/tests/auto/testlib/selftests/expected_failfetchtype.tap @@ -1,10 +1,13 @@ TAP version 13 # tst_FailFetchType ok 1 - initTestCase() -# Requested type 'QString' does not match available type 'bool'. not ok 2 - fetch(bool) --- # Received a fatal error. + extensions: + messages: + - severity: fatal + message: Requested type 'QString' does not match available type 'bool'. ... 1..2 # tests 2 diff --git a/tests/auto/testlib/selftests/expected_fetchbogus.tap b/tests/auto/testlib/selftests/expected_fetchbogus.tap index 895e247423..2cefff9b3b 100644 --- a/tests/auto/testlib/selftests/expected_fetchbogus.tap +++ b/tests/auto/testlib/selftests/expected_fetchbogus.tap @@ -1,10 +1,13 @@ TAP version 13 # tst_FetchBogus ok 1 - initTestCase() -# QFETCH: Requested testdata 'bubu' not available, check your _data function. not ok 2 - fetchBogus(foo) --- # Received a fatal error. + extensions: + messages: + - severity: fatal + message: QFETCH: Requested testdata 'bubu' not available, check your _data function. ... 1..2 # tests 2 diff --git a/tests/auto/testlib/selftests/expected_findtestdata.tap b/tests/auto/testlib/selftests/expected_findtestdata.tap index 0fb38d2822..1f8174cce2 100644 --- a/tests/auto/testlib/selftests/expected_findtestdata.tap +++ b/tests/auto/testlib/selftests/expected_findtestdata.tap @@ -1,8 +1,8 @@ TAP version 13 # FindTestData ok 1 - initTestCase() -# testdata testfile could not be located! ok 2 - paths() + # warn: testdata testfile could not be located! ok 3 - cleanupTestCase() 1..3 # tests 3 diff --git a/tests/auto/testlib/selftests/expected_globaldata.tap b/tests/auto/testlib/selftests/expected_globaldata.tap index 4d61b7437b..0616682cab 100644 --- a/tests/auto/testlib/selftests/expected_globaldata.tap +++ b/tests/auto/testlib/selftests/expected_globaldata.tap @@ -1,56 +1,160 @@ TAP version 13 # tst_globaldata -# initTestCase initTestCase (null) ok 1 - initTestCase() -# init testGlobal local=false -# global: false -# local: false -# cleanup testGlobal local=false + --- + extensions: + messages: + - severity: debug + message: initTestCase initTestCase (null) + ... ok 2 - testGlobal(global=false:local=false) -# init testGlobal local=true -# global: false -# local: true -# cleanup testGlobal local=true + --- + extensions: + messages: + - severity: debug + message: init testGlobal local=false + - severity: debug + message: global: false + - severity: debug + message: local: false + - severity: debug + message: cleanup testGlobal local=false + ... ok 3 - testGlobal(global=false:local=true) -# init testGlobal local=false -# global: true -# local: false -# cleanup testGlobal local=false + --- + extensions: + messages: + - severity: debug + message: init testGlobal local=true + - severity: debug + message: global: false + - severity: debug + message: local: true + - severity: debug + message: cleanup testGlobal local=true + ... ok 4 - testGlobal(global=true:local=false) -# init testGlobal local=true -# global: true -# local: true -# cleanup testGlobal local=true + --- + extensions: + messages: + - severity: debug + message: init testGlobal local=false + - severity: debug + message: global: true + - severity: debug + message: local: false + - severity: debug + message: cleanup testGlobal local=false + ... ok 5 - testGlobal(global=true:local=true) + --- + extensions: + messages: + - severity: debug + message: init testGlobal local=true + - severity: debug + message: global: true + - severity: debug + message: local: true + - severity: debug + message: cleanup testGlobal local=true + ... ok 6 - skip(global=false) # SKIP skipping -# init skipLocal local=false ok 7 - skipLocal(global=false:local=false) # SKIP skipping -# cleanup skipLocal local=false -# init skipLocal local=true + --- + at: tst_globaldata::skipLocal() (qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp:0) + file: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp + line: 0 + extensions: + messages: + - severity: debug + message: init skipLocal local=false + ... +# debug: cleanup skipLocal local=false ok 8 - skipLocal(global=false:local=true) # SKIP skipping -# cleanup skipLocal local=true -# init skipLocal local=false + --- + at: tst_globaldata::skipLocal() (qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp:0) + file: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp + line: 0 + extensions: + messages: + - severity: debug + message: init skipLocal local=true + ... +# debug: cleanup skipLocal local=true ok 9 - skipLocal(global=true:local=false) # SKIP skipping -# cleanup skipLocal local=false -# init skipLocal local=true + --- + at: tst_globaldata::skipLocal() (qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp:0) + file: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp + line: 0 + extensions: + messages: + - severity: debug + message: init skipLocal local=false + ... +# debug: cleanup skipLocal local=false ok 10 - skipLocal(global=true:local=true) # SKIP skipping -# cleanup skipLocal local=true -# init skipSingle local=false -# global: false local: false -# cleanup skipSingle local=false + --- + at: tst_globaldata::skipLocal() (qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp:0) + file: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp + line: 0 + extensions: + messages: + - severity: debug + message: init skipLocal local=true + ... +# debug: cleanup skipLocal local=true ok 11 - skipSingle(global=false:local=false) -# init skipSingle local=true + --- + extensions: + messages: + - severity: debug + message: init skipSingle local=false + - severity: debug + message: global: false local: false + - severity: debug + message: cleanup skipSingle local=false + ... ok 12 - skipSingle(global=false:local=true) # SKIP Skipping -# cleanup skipSingle local=true -# init skipSingle local=false + --- + at: tst_globaldata::skipSingle() (qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp:0) + file: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp + line: 0 + extensions: + messages: + - severity: debug + message: init skipSingle local=true + ... +# debug: cleanup skipSingle local=true ok 13 - skipSingle(global=true:local=false) # SKIP Skipping -# cleanup skipSingle local=false -# init skipSingle local=true -# global: true local: true -# cleanup skipSingle local=true + --- + at: tst_globaldata::skipSingle() (qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp:0) + file: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp + line: 0 + extensions: + messages: + - severity: debug + message: init skipSingle local=false + ... +# debug: cleanup skipSingle local=false ok 14 - skipSingle(global=true:local=true) -# cleanupTestCase cleanupTestCase (null) + --- + extensions: + messages: + - severity: debug + message: init skipSingle local=true + - severity: debug + message: global: true local: true + - severity: debug + message: cleanup skipSingle local=true + ... ok 15 - cleanupTestCase() + --- + extensions: + messages: + - severity: debug + message: cleanupTestCase cleanupTestCase (null) + ... 1..15 # tests 15 # pass 8 diff --git a/tests/auto/testlib/selftests/expected_globaldata.teamcity b/tests/auto/testlib/selftests/expected_globaldata.teamcity index 7c1c33e1de..2b15e06731 100644 --- a/tests/auto/testlib/selftests/expected_globaldata.teamcity +++ b/tests/auto/testlib/selftests/expected_globaldata.teamcity @@ -2,51 +2,51 @@ ##teamcity[testStarted name='initTestCase()' flowId='tst_globaldata'] ##teamcity[testStdOut name='initTestCase()' out='QDEBUG: initTestCase initTestCase (null)' flowId='tst_globaldata'] ##teamcity[testFinished name='initTestCase()' flowId='tst_globaldata'] -##teamcity[testStarted name='testGlobal(local=false)' flowId='tst_globaldata'] -##teamcity[testStdOut name='testGlobal(local=false)' out='QDEBUG: init testGlobal local=false|nQDEBUG: global: false|nQDEBUG: local: false|nQDEBUG: cleanup testGlobal local=false' flowId='tst_globaldata'] -##teamcity[testFinished name='testGlobal(local=false)' flowId='tst_globaldata'] -##teamcity[testStarted name='testGlobal(local=true)' flowId='tst_globaldata'] -##teamcity[testStdOut name='testGlobal(local=true)' out='QDEBUG: init testGlobal local=true|nQDEBUG: global: false|nQDEBUG: local: true|nQDEBUG: cleanup testGlobal local=true' flowId='tst_globaldata'] -##teamcity[testFinished name='testGlobal(local=true)' flowId='tst_globaldata'] -##teamcity[testStarted name='testGlobal(local=false)' flowId='tst_globaldata'] -##teamcity[testStdOut name='testGlobal(local=false)' out='QDEBUG: init testGlobal local=false|nQDEBUG: global: true|nQDEBUG: local: false|nQDEBUG: cleanup testGlobal local=false' flowId='tst_globaldata'] -##teamcity[testFinished name='testGlobal(local=false)' flowId='tst_globaldata'] -##teamcity[testStarted name='testGlobal(local=true)' flowId='tst_globaldata'] -##teamcity[testStdOut name='testGlobal(local=true)' out='QDEBUG: init testGlobal local=true|nQDEBUG: global: true|nQDEBUG: local: true|nQDEBUG: cleanup testGlobal local=true' flowId='tst_globaldata'] -##teamcity[testFinished name='testGlobal(local=true)' flowId='tst_globaldata'] -##teamcity[testStarted name='skip()' flowId='tst_globaldata'] -##teamcity[testIgnored name='skip()' message='skipping |[Loc: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(0)|]' flowId='tst_globaldata'] -##teamcity[testFinished name='skip()' flowId='tst_globaldata'] -##teamcity[testStarted name='skipLocal(local=false)' flowId='tst_globaldata'] -##teamcity[testIgnored name='skipLocal(local=false)' message='skipping |[Loc: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(0)|]' flowId='tst_globaldata'] -##teamcity[testStdOut name='skipLocal(local=false)' out='QDEBUG: init skipLocal local=false' flowId='tst_globaldata'] -##teamcity[testFinished name='skipLocal(local=false)' flowId='tst_globaldata'] -##teamcity[testStarted name='skipLocal(local=true)' flowId='tst_globaldata'] -##teamcity[testIgnored name='skipLocal(local=true)' message='skipping |[Loc: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(0)|]' flowId='tst_globaldata'] -##teamcity[testStdOut name='skipLocal(local=true)' out='QDEBUG: cleanup skipLocal local=false|nQDEBUG: init skipLocal local=true' flowId='tst_globaldata'] -##teamcity[testFinished name='skipLocal(local=true)' flowId='tst_globaldata'] -##teamcity[testStarted name='skipLocal(local=false)' flowId='tst_globaldata'] -##teamcity[testIgnored name='skipLocal(local=false)' message='skipping |[Loc: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(0)|]' flowId='tst_globaldata'] -##teamcity[testStdOut name='skipLocal(local=false)' out='QDEBUG: cleanup skipLocal local=true|nQDEBUG: init skipLocal local=false' flowId='tst_globaldata'] -##teamcity[testFinished name='skipLocal(local=false)' flowId='tst_globaldata'] -##teamcity[testStarted name='skipLocal(local=true)' flowId='tst_globaldata'] -##teamcity[testIgnored name='skipLocal(local=true)' message='skipping |[Loc: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(0)|]' flowId='tst_globaldata'] -##teamcity[testStdOut name='skipLocal(local=true)' out='QDEBUG: cleanup skipLocal local=false|nQDEBUG: init skipLocal local=true' flowId='tst_globaldata'] -##teamcity[testFinished name='skipLocal(local=true)' flowId='tst_globaldata'] -##teamcity[testStarted name='skipSingle(local=false)' flowId='tst_globaldata'] -##teamcity[testStdOut name='skipSingle(local=false)' out='QDEBUG: cleanup skipLocal local=true|nQDEBUG: init skipSingle local=false|nQDEBUG: global: false local: false|nQDEBUG: cleanup skipSingle local=false' flowId='tst_globaldata'] -##teamcity[testFinished name='skipSingle(local=false)' flowId='tst_globaldata'] -##teamcity[testStarted name='skipSingle(local=true)' flowId='tst_globaldata'] -##teamcity[testIgnored name='skipSingle(local=true)' message='Skipping |[Loc: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(0)|]' flowId='tst_globaldata'] -##teamcity[testStdOut name='skipSingle(local=true)' out='QDEBUG: init skipSingle local=true' flowId='tst_globaldata'] -##teamcity[testFinished name='skipSingle(local=true)' flowId='tst_globaldata'] -##teamcity[testStarted name='skipSingle(local=false)' flowId='tst_globaldata'] -##teamcity[testIgnored name='skipSingle(local=false)' message='Skipping |[Loc: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(0)|]' flowId='tst_globaldata'] -##teamcity[testStdOut name='skipSingle(local=false)' out='QDEBUG: cleanup skipSingle local=true|nQDEBUG: init skipSingle local=false' flowId='tst_globaldata'] -##teamcity[testFinished name='skipSingle(local=false)' flowId='tst_globaldata'] -##teamcity[testStarted name='skipSingle(local=true)' flowId='tst_globaldata'] -##teamcity[testStdOut name='skipSingle(local=true)' out='QDEBUG: cleanup skipSingle local=false|nQDEBUG: init skipSingle local=true|nQDEBUG: global: true local: true|nQDEBUG: cleanup skipSingle local=true' flowId='tst_globaldata'] -##teamcity[testFinished name='skipSingle(local=true)' flowId='tst_globaldata'] +##teamcity[testStarted name='testGlobal(global=false:local=false)' flowId='tst_globaldata'] +##teamcity[testStdOut name='testGlobal(global=false:local=false)' out='QDEBUG: init testGlobal local=false|nQDEBUG: global: false|nQDEBUG: local: false|nQDEBUG: cleanup testGlobal local=false' flowId='tst_globaldata'] +##teamcity[testFinished name='testGlobal(global=false:local=false)' flowId='tst_globaldata'] +##teamcity[testStarted name='testGlobal(global=false:local=true)' flowId='tst_globaldata'] +##teamcity[testStdOut name='testGlobal(global=false:local=true)' out='QDEBUG: init testGlobal local=true|nQDEBUG: global: false|nQDEBUG: local: true|nQDEBUG: cleanup testGlobal local=true' flowId='tst_globaldata'] +##teamcity[testFinished name='testGlobal(global=false:local=true)' flowId='tst_globaldata'] +##teamcity[testStarted name='testGlobal(global=true:local=false)' flowId='tst_globaldata'] +##teamcity[testStdOut name='testGlobal(global=true:local=false)' out='QDEBUG: init testGlobal local=false|nQDEBUG: global: true|nQDEBUG: local: false|nQDEBUG: cleanup testGlobal local=false' flowId='tst_globaldata'] +##teamcity[testFinished name='testGlobal(global=true:local=false)' flowId='tst_globaldata'] +##teamcity[testStarted name='testGlobal(global=true:local=true)' flowId='tst_globaldata'] +##teamcity[testStdOut name='testGlobal(global=true:local=true)' out='QDEBUG: init testGlobal local=true|nQDEBUG: global: true|nQDEBUG: local: true|nQDEBUG: cleanup testGlobal local=true' flowId='tst_globaldata'] +##teamcity[testFinished name='testGlobal(global=true:local=true)' flowId='tst_globaldata'] +##teamcity[testStarted name='skip(global=false)' flowId='tst_globaldata'] +##teamcity[testIgnored name='skip(global=false)' message='skipping |[Loc: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(0)|]' flowId='tst_globaldata'] +##teamcity[testFinished name='skip(global=false)' flowId='tst_globaldata'] +##teamcity[testStarted name='skipLocal(global=false:local=false)' flowId='tst_globaldata'] +##teamcity[testIgnored name='skipLocal(global=false:local=false)' message='skipping |[Loc: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(0)|]' flowId='tst_globaldata'] +##teamcity[testStdOut name='skipLocal(global=false:local=false)' out='QDEBUG: init skipLocal local=false' flowId='tst_globaldata'] +##teamcity[testFinished name='skipLocal(global=false:local=false)' flowId='tst_globaldata'] +##teamcity[testStarted name='skipLocal(global=false:local=true)' flowId='tst_globaldata'] +##teamcity[testIgnored name='skipLocal(global=false:local=true)' message='skipping |[Loc: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(0)|]' flowId='tst_globaldata'] +##teamcity[testStdOut name='skipLocal(global=false:local=true)' out='QDEBUG: cleanup skipLocal local=false|nQDEBUG: init skipLocal local=true' flowId='tst_globaldata'] +##teamcity[testFinished name='skipLocal(global=false:local=true)' flowId='tst_globaldata'] +##teamcity[testStarted name='skipLocal(global=true:local=false)' flowId='tst_globaldata'] +##teamcity[testIgnored name='skipLocal(global=true:local=false)' message='skipping |[Loc: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(0)|]' flowId='tst_globaldata'] +##teamcity[testStdOut name='skipLocal(global=true:local=false)' out='QDEBUG: cleanup skipLocal local=true|nQDEBUG: init skipLocal local=false' flowId='tst_globaldata'] +##teamcity[testFinished name='skipLocal(global=true:local=false)' flowId='tst_globaldata'] +##teamcity[testStarted name='skipLocal(global=true:local=true)' flowId='tst_globaldata'] +##teamcity[testIgnored name='skipLocal(global=true:local=true)' message='skipping |[Loc: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(0)|]' flowId='tst_globaldata'] +##teamcity[testStdOut name='skipLocal(global=true:local=true)' out='QDEBUG: cleanup skipLocal local=false|nQDEBUG: init skipLocal local=true' flowId='tst_globaldata'] +##teamcity[testFinished name='skipLocal(global=true:local=true)' flowId='tst_globaldata'] +##teamcity[testStarted name='skipSingle(global=false:local=false)' flowId='tst_globaldata'] +##teamcity[testStdOut name='skipSingle(global=false:local=false)' out='QDEBUG: cleanup skipLocal local=true|nQDEBUG: init skipSingle local=false|nQDEBUG: global: false local: false|nQDEBUG: cleanup skipSingle local=false' flowId='tst_globaldata'] +##teamcity[testFinished name='skipSingle(global=false:local=false)' flowId='tst_globaldata'] +##teamcity[testStarted name='skipSingle(global=false:local=true)' flowId='tst_globaldata'] +##teamcity[testIgnored name='skipSingle(global=false:local=true)' message='Skipping |[Loc: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(0)|]' flowId='tst_globaldata'] +##teamcity[testStdOut name='skipSingle(global=false:local=true)' out='QDEBUG: init skipSingle local=true' flowId='tst_globaldata'] +##teamcity[testFinished name='skipSingle(global=false:local=true)' flowId='tst_globaldata'] +##teamcity[testStarted name='skipSingle(global=true:local=false)' flowId='tst_globaldata'] +##teamcity[testIgnored name='skipSingle(global=true:local=false)' message='Skipping |[Loc: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(0)|]' flowId='tst_globaldata'] +##teamcity[testStdOut name='skipSingle(global=true:local=false)' out='QDEBUG: cleanup skipSingle local=true|nQDEBUG: init skipSingle local=false' flowId='tst_globaldata'] +##teamcity[testFinished name='skipSingle(global=true:local=false)' flowId='tst_globaldata'] +##teamcity[testStarted name='skipSingle(global=true:local=true)' flowId='tst_globaldata'] +##teamcity[testStdOut name='skipSingle(global=true:local=true)' out='QDEBUG: cleanup skipSingle local=false|nQDEBUG: init skipSingle local=true|nQDEBUG: global: true local: true|nQDEBUG: cleanup skipSingle local=true' flowId='tst_globaldata'] +##teamcity[testFinished name='skipSingle(global=true:local=true)' flowId='tst_globaldata'] ##teamcity[testStarted name='cleanupTestCase()' flowId='tst_globaldata'] ##teamcity[testStdOut name='cleanupTestCase()' out='QDEBUG: cleanupTestCase cleanupTestCase (null)' flowId='tst_globaldata'] ##teamcity[testFinished name='cleanupTestCase()' flowId='tst_globaldata'] diff --git a/tests/auto/testlib/selftests/expected_maxwarnings.tap b/tests/auto/testlib/selftests/expected_maxwarnings.tap index 57bfbd8f8d..8c05622a89 100644 --- a/tests/auto/testlib/selftests/expected_maxwarnings.tap +++ b/tests/auto/testlib/selftests/expected_maxwarnings.tap @@ -1,2009 +1,4014 @@ TAP version 13 # MaxWarnings ok 1 - initTestCase() -# 0 -# 1 -# 2 -# 3 -# 4 -# 5 -# 6 -# 7 -# 8 -# 9 -# 10 -# 11 -# 12 -# 13 -# 14 -# 15 -# 16 -# 17 -# 18 -# 19 -# 20 -# 21 -# 22 -# 23 -# 24 -# 25 -# 26 -# 27 -# 28 -# 29 -# 30 -# 31 -# 32 -# 33 -# 34 -# 35 -# 36 -# 37 -# 38 -# 39 -# 40 -# 41 -# 42 -# 43 -# 44 -# 45 -# 46 -# 47 -# 48 -# 49 -# 50 -# 51 -# 52 -# 53 -# 54 -# 55 -# 56 -# 57 -# 58 -# 59 -# 60 -# 61 -# 62 -# 63 -# 64 -# 65 -# 66 -# 67 -# 68 -# 69 -# 70 -# 71 -# 72 -# 73 -# 74 -# 75 -# 76 -# 77 -# 78 -# 79 -# 80 -# 81 -# 82 -# 83 -# 84 -# 85 -# 86 -# 87 -# 88 -# 89 -# 90 -# 91 -# 92 -# 93 -# 94 -# 95 -# 96 -# 97 -# 98 -# 99 -# 100 -# 101 -# 102 -# 103 -# 104 -# 105 -# 106 -# 107 -# 108 -# 109 -# 110 -# 111 -# 112 -# 113 -# 114 -# 115 -# 116 -# 117 -# 118 -# 119 -# 120 -# 121 -# 122 -# 123 -# 124 -# 125 -# 126 -# 127 -# 128 -# 129 -# 130 -# 131 -# 132 -# 133 -# 134 -# 135 -# 136 -# 137 -# 138 -# 139 -# 140 -# 141 -# 142 -# 143 -# 144 -# 145 -# 146 -# 147 -# 148 -# 149 -# 150 -# 151 -# 152 -# 153 -# 154 -# 155 -# 156 -# 157 -# 158 -# 159 -# 160 -# 161 -# 162 -# 163 -# 164 -# 165 -# 166 -# 167 -# 168 -# 169 -# 170 -# 171 -# 172 -# 173 -# 174 -# 175 -# 176 -# 177 -# 178 -# 179 -# 180 -# 181 -# 182 -# 183 -# 184 -# 185 -# 186 -# 187 -# 188 -# 189 -# 190 -# 191 -# 192 -# 193 -# 194 -# 195 -# 196 -# 197 -# 198 -# 199 -# 200 -# 201 -# 202 -# 203 -# 204 -# 205 -# 206 -# 207 -# 208 -# 209 -# 210 -# 211 -# 212 -# 213 -# 214 -# 215 -# 216 -# 217 -# 218 -# 219 -# 220 -# 221 -# 222 -# 223 -# 224 -# 225 -# 226 -# 227 -# 228 -# 229 -# 230 -# 231 -# 232 -# 233 -# 234 -# 235 -# 236 -# 237 -# 238 -# 239 -# 240 -# 241 -# 242 -# 243 -# 244 -# 245 -# 246 -# 247 -# 248 -# 249 -# 250 -# 251 -# 252 -# 253 -# 254 -# 255 -# 256 -# 257 -# 258 -# 259 -# 260 -# 261 -# 262 -# 263 -# 264 -# 265 -# 266 -# 267 -# 268 -# 269 -# 270 -# 271 -# 272 -# 273 -# 274 -# 275 -# 276 -# 277 -# 278 -# 279 -# 280 -# 281 -# 282 -# 283 -# 284 -# 285 -# 286 -# 287 -# 288 -# 289 -# 290 -# 291 -# 292 -# 293 -# 294 -# 295 -# 296 -# 297 -# 298 -# 299 -# 300 -# 301 -# 302 -# 303 -# 304 -# 305 -# 306 -# 307 -# 308 -# 309 -# 310 -# 311 -# 312 -# 313 -# 314 -# 315 -# 316 -# 317 -# 318 -# 319 -# 320 -# 321 -# 322 -# 323 -# 324 -# 325 -# 326 -# 327 -# 328 -# 329 -# 330 -# 331 -# 332 -# 333 -# 334 -# 335 -# 336 -# 337 -# 338 -# 339 -# 340 -# 341 -# 342 -# 343 -# 344 -# 345 -# 346 -# 347 -# 348 -# 349 -# 350 -# 351 -# 352 -# 353 -# 354 -# 355 -# 356 -# 357 -# 358 -# 359 -# 360 -# 361 -# 362 -# 363 -# 364 -# 365 -# 366 -# 367 -# 368 -# 369 -# 370 -# 371 -# 372 -# 373 -# 374 -# 375 -# 376 -# 377 -# 378 -# 379 -# 380 -# 381 -# 382 -# 383 -# 384 -# 385 -# 386 -# 387 -# 388 -# 389 -# 390 -# 391 -# 392 -# 393 -# 394 -# 395 -# 396 -# 397 -# 398 -# 399 -# 400 -# 401 -# 402 -# 403 -# 404 -# 405 -# 406 -# 407 -# 408 -# 409 -# 410 -# 411 -# 412 -# 413 -# 414 -# 415 -# 416 -# 417 -# 418 -# 419 -# 420 -# 421 -# 422 -# 423 -# 424 -# 425 -# 426 -# 427 -# 428 -# 429 -# 430 -# 431 -# 432 -# 433 -# 434 -# 435 -# 436 -# 437 -# 438 -# 439 -# 440 -# 441 -# 442 -# 443 -# 444 -# 445 -# 446 -# 447 -# 448 -# 449 -# 450 -# 451 -# 452 -# 453 -# 454 -# 455 -# 456 -# 457 -# 458 -# 459 -# 460 -# 461 -# 462 -# 463 -# 464 -# 465 -# 466 -# 467 -# 468 -# 469 -# 470 -# 471 -# 472 -# 473 -# 474 -# 475 -# 476 -# 477 -# 478 -# 479 -# 480 -# 481 -# 482 -# 483 -# 484 -# 485 -# 486 -# 487 -# 488 -# 489 -# 490 -# 491 -# 492 -# 493 -# 494 -# 495 -# 496 -# 497 -# 498 -# 499 -# 500 -# 501 -# 502 -# 503 -# 504 -# 505 -# 506 -# 507 -# 508 -# 509 -# 510 -# 511 -# 512 -# 513 -# 514 -# 515 -# 516 -# 517 -# 518 -# 519 -# 520 -# 521 -# 522 -# 523 -# 524 -# 525 -# 526 -# 527 -# 528 -# 529 -# 530 -# 531 -# 532 -# 533 -# 534 -# 535 -# 536 -# 537 -# 538 -# 539 -# 540 -# 541 -# 542 -# 543 -# 544 -# 545 -# 546 -# 547 -# 548 -# 549 -# 550 -# 551 -# 552 -# 553 -# 554 -# 555 -# 556 -# 557 -# 558 -# 559 -# 560 -# 561 -# 562 -# 563 -# 564 -# 565 -# 566 -# 567 -# 568 -# 569 -# 570 -# 571 -# 572 -# 573 -# 574 -# 575 -# 576 -# 577 -# 578 -# 579 -# 580 -# 581 -# 582 -# 583 -# 584 -# 585 -# 586 -# 587 -# 588 -# 589 -# 590 -# 591 -# 592 -# 593 -# 594 -# 595 -# 596 -# 597 -# 598 -# 599 -# 600 -# 601 -# 602 -# 603 -# 604 -# 605 -# 606 -# 607 -# 608 -# 609 -# 610 -# 611 -# 612 -# 613 -# 614 -# 615 -# 616 -# 617 -# 618 -# 619 -# 620 -# 621 -# 622 -# 623 -# 624 -# 625 -# 626 -# 627 -# 628 -# 629 -# 630 -# 631 -# 632 -# 633 -# 634 -# 635 -# 636 -# 637 -# 638 -# 639 -# 640 -# 641 -# 642 -# 643 -# 644 -# 645 -# 646 -# 647 -# 648 -# 649 -# 650 -# 651 -# 652 -# 653 -# 654 -# 655 -# 656 -# 657 -# 658 -# 659 -# 660 -# 661 -# 662 -# 663 -# 664 -# 665 -# 666 -# 667 -# 668 -# 669 -# 670 -# 671 -# 672 -# 673 -# 674 -# 675 -# 676 -# 677 -# 678 -# 679 -# 680 -# 681 -# 682 -# 683 -# 684 -# 685 -# 686 -# 687 -# 688 -# 689 -# 690 -# 691 -# 692 -# 693 -# 694 -# 695 -# 696 -# 697 -# 698 -# 699 -# 700 -# 701 -# 702 -# 703 -# 704 -# 705 -# 706 -# 707 -# 708 -# 709 -# 710 -# 711 -# 712 -# 713 -# 714 -# 715 -# 716 -# 717 -# 718 -# 719 -# 720 -# 721 -# 722 -# 723 -# 724 -# 725 -# 726 -# 727 -# 728 -# 729 -# 730 -# 731 -# 732 -# 733 -# 734 -# 735 -# 736 -# 737 -# 738 -# 739 -# 740 -# 741 -# 742 -# 743 -# 744 -# 745 -# 746 -# 747 -# 748 -# 749 -# 750 -# 751 -# 752 -# 753 -# 754 -# 755 -# 756 -# 757 -# 758 -# 759 -# 760 -# 761 -# 762 -# 763 -# 764 -# 765 -# 766 -# 767 -# 768 -# 769 -# 770 -# 771 -# 772 -# 773 -# 774 -# 775 -# 776 -# 777 -# 778 -# 779 -# 780 -# 781 -# 782 -# 783 -# 784 -# 785 -# 786 -# 787 -# 788 -# 789 -# 790 -# 791 -# 792 -# 793 -# 794 -# 795 -# 796 -# 797 -# 798 -# 799 -# 800 -# 801 -# 802 -# 803 -# 804 -# 805 -# 806 -# 807 -# 808 -# 809 -# 810 -# 811 -# 812 -# 813 -# 814 -# 815 -# 816 -# 817 -# 818 -# 819 -# 820 -# 821 -# 822 -# 823 -# 824 -# 825 -# 826 -# 827 -# 828 -# 829 -# 830 -# 831 -# 832 -# 833 -# 834 -# 835 -# 836 -# 837 -# 838 -# 839 -# 840 -# 841 -# 842 -# 843 -# 844 -# 845 -# 846 -# 847 -# 848 -# 849 -# 850 -# 851 -# 852 -# 853 -# 854 -# 855 -# 856 -# 857 -# 858 -# 859 -# 860 -# 861 -# 862 -# 863 -# 864 -# 865 -# 866 -# 867 -# 868 -# 869 -# 870 -# 871 -# 872 -# 873 -# 874 -# 875 -# 876 -# 877 -# 878 -# 879 -# 880 -# 881 -# 882 -# 883 -# 884 -# 885 -# 886 -# 887 -# 888 -# 889 -# 890 -# 891 -# 892 -# 893 -# 894 -# 895 -# 896 -# 897 -# 898 -# 899 -# 900 -# 901 -# 902 -# 903 -# 904 -# 905 -# 906 -# 907 -# 908 -# 909 -# 910 -# 911 -# 912 -# 913 -# 914 -# 915 -# 916 -# 917 -# 918 -# 919 -# 920 -# 921 -# 922 -# 923 -# 924 -# 925 -# 926 -# 927 -# 928 -# 929 -# 930 -# 931 -# 932 -# 933 -# 934 -# 935 -# 936 -# 937 -# 938 -# 939 -# 940 -# 941 -# 942 -# 943 -# 944 -# 945 -# 946 -# 947 -# 948 -# 949 -# 950 -# 951 -# 952 -# 953 -# 954 -# 955 -# 956 -# 957 -# 958 -# 959 -# 960 -# 961 -# 962 -# 963 -# 964 -# 965 -# 966 -# 967 -# 968 -# 969 -# 970 -# 971 -# 972 -# 973 -# 974 -# 975 -# 976 -# 977 -# 978 -# 979 -# 980 -# 981 -# 982 -# 983 -# 984 -# 985 -# 986 -# 987 -# 988 -# 989 -# 990 -# 991 -# 992 -# 993 -# 994 -# 995 -# 996 -# 997 -# 998 -# 999 -# 1000 -# 1001 -# 1002 -# 1003 -# 1004 -# 1005 -# 1006 -# 1007 -# 1008 -# 1009 -# 1010 -# 1011 -# 1012 -# 1013 -# 1014 -# 1015 -# 1016 -# 1017 -# 1018 -# 1019 -# 1020 -# 1021 -# 1022 -# 1023 -# 1024 -# 1025 -# 1026 -# 1027 -# 1028 -# 1029 -# 1030 -# 1031 -# 1032 -# 1033 -# 1034 -# 1035 -# 1036 -# 1037 -# 1038 -# 1039 -# 1040 -# 1041 -# 1042 -# 1043 -# 1044 -# 1045 -# 1046 -# 1047 -# 1048 -# 1049 -# 1050 -# 1051 -# 1052 -# 1053 -# 1054 -# 1055 -# 1056 -# 1057 -# 1058 -# 1059 -# 1060 -# 1061 -# 1062 -# 1063 -# 1064 -# 1065 -# 1066 -# 1067 -# 1068 -# 1069 -# 1070 -# 1071 -# 1072 -# 1073 -# 1074 -# 1075 -# 1076 -# 1077 -# 1078 -# 1079 -# 1080 -# 1081 -# 1082 -# 1083 -# 1084 -# 1085 -# 1086 -# 1087 -# 1088 -# 1089 -# 1090 -# 1091 -# 1092 -# 1093 -# 1094 -# 1095 -# 1096 -# 1097 -# 1098 -# 1099 -# 1100 -# 1101 -# 1102 -# 1103 -# 1104 -# 1105 -# 1106 -# 1107 -# 1108 -# 1109 -# 1110 -# 1111 -# 1112 -# 1113 -# 1114 -# 1115 -# 1116 -# 1117 -# 1118 -# 1119 -# 1120 -# 1121 -# 1122 -# 1123 -# 1124 -# 1125 -# 1126 -# 1127 -# 1128 -# 1129 -# 1130 -# 1131 -# 1132 -# 1133 -# 1134 -# 1135 -# 1136 -# 1137 -# 1138 -# 1139 -# 1140 -# 1141 -# 1142 -# 1143 -# 1144 -# 1145 -# 1146 -# 1147 -# 1148 -# 1149 -# 1150 -# 1151 -# 1152 -# 1153 -# 1154 -# 1155 -# 1156 -# 1157 -# 1158 -# 1159 -# 1160 -# 1161 -# 1162 -# 1163 -# 1164 -# 1165 -# 1166 -# 1167 -# 1168 -# 1169 -# 1170 -# 1171 -# 1172 -# 1173 -# 1174 -# 1175 -# 1176 -# 1177 -# 1178 -# 1179 -# 1180 -# 1181 -# 1182 -# 1183 -# 1184 -# 1185 -# 1186 -# 1187 -# 1188 -# 1189 -# 1190 -# 1191 -# 1192 -# 1193 -# 1194 -# 1195 -# 1196 -# 1197 -# 1198 -# 1199 -# 1200 -# 1201 -# 1202 -# 1203 -# 1204 -# 1205 -# 1206 -# 1207 -# 1208 -# 1209 -# 1210 -# 1211 -# 1212 -# 1213 -# 1214 -# 1215 -# 1216 -# 1217 -# 1218 -# 1219 -# 1220 -# 1221 -# 1222 -# 1223 -# 1224 -# 1225 -# 1226 -# 1227 -# 1228 -# 1229 -# 1230 -# 1231 -# 1232 -# 1233 -# 1234 -# 1235 -# 1236 -# 1237 -# 1238 -# 1239 -# 1240 -# 1241 -# 1242 -# 1243 -# 1244 -# 1245 -# 1246 -# 1247 -# 1248 -# 1249 -# 1250 -# 1251 -# 1252 -# 1253 -# 1254 -# 1255 -# 1256 -# 1257 -# 1258 -# 1259 -# 1260 -# 1261 -# 1262 -# 1263 -# 1264 -# 1265 -# 1266 -# 1267 -# 1268 -# 1269 -# 1270 -# 1271 -# 1272 -# 1273 -# 1274 -# 1275 -# 1276 -# 1277 -# 1278 -# 1279 -# 1280 -# 1281 -# 1282 -# 1283 -# 1284 -# 1285 -# 1286 -# 1287 -# 1288 -# 1289 -# 1290 -# 1291 -# 1292 -# 1293 -# 1294 -# 1295 -# 1296 -# 1297 -# 1298 -# 1299 -# 1300 -# 1301 -# 1302 -# 1303 -# 1304 -# 1305 -# 1306 -# 1307 -# 1308 -# 1309 -# 1310 -# 1311 -# 1312 -# 1313 -# 1314 -# 1315 -# 1316 -# 1317 -# 1318 -# 1319 -# 1320 -# 1321 -# 1322 -# 1323 -# 1324 -# 1325 -# 1326 -# 1327 -# 1328 -# 1329 -# 1330 -# 1331 -# 1332 -# 1333 -# 1334 -# 1335 -# 1336 -# 1337 -# 1338 -# 1339 -# 1340 -# 1341 -# 1342 -# 1343 -# 1344 -# 1345 -# 1346 -# 1347 -# 1348 -# 1349 -# 1350 -# 1351 -# 1352 -# 1353 -# 1354 -# 1355 -# 1356 -# 1357 -# 1358 -# 1359 -# 1360 -# 1361 -# 1362 -# 1363 -# 1364 -# 1365 -# 1366 -# 1367 -# 1368 -# 1369 -# 1370 -# 1371 -# 1372 -# 1373 -# 1374 -# 1375 -# 1376 -# 1377 -# 1378 -# 1379 -# 1380 -# 1381 -# 1382 -# 1383 -# 1384 -# 1385 -# 1386 -# 1387 -# 1388 -# 1389 -# 1390 -# 1391 -# 1392 -# 1393 -# 1394 -# 1395 -# 1396 -# 1397 -# 1398 -# 1399 -# 1400 -# 1401 -# 1402 -# 1403 -# 1404 -# 1405 -# 1406 -# 1407 -# 1408 -# 1409 -# 1410 -# 1411 -# 1412 -# 1413 -# 1414 -# 1415 -# 1416 -# 1417 -# 1418 -# 1419 -# 1420 -# 1421 -# 1422 -# 1423 -# 1424 -# 1425 -# 1426 -# 1427 -# 1428 -# 1429 -# 1430 -# 1431 -# 1432 -# 1433 -# 1434 -# 1435 -# 1436 -# 1437 -# 1438 -# 1439 -# 1440 -# 1441 -# 1442 -# 1443 -# 1444 -# 1445 -# 1446 -# 1447 -# 1448 -# 1449 -# 1450 -# 1451 -# 1452 -# 1453 -# 1454 -# 1455 -# 1456 -# 1457 -# 1458 -# 1459 -# 1460 -# 1461 -# 1462 -# 1463 -# 1464 -# 1465 -# 1466 -# 1467 -# 1468 -# 1469 -# 1470 -# 1471 -# 1472 -# 1473 -# 1474 -# 1475 -# 1476 -# 1477 -# 1478 -# 1479 -# 1480 -# 1481 -# 1482 -# 1483 -# 1484 -# 1485 -# 1486 -# 1487 -# 1488 -# 1489 -# 1490 -# 1491 -# 1492 -# 1493 -# 1494 -# 1495 -# 1496 -# 1497 -# 1498 -# 1499 -# 1500 -# 1501 -# 1502 -# 1503 -# 1504 -# 1505 -# 1506 -# 1507 -# 1508 -# 1509 -# 1510 -# 1511 -# 1512 -# 1513 -# 1514 -# 1515 -# 1516 -# 1517 -# 1518 -# 1519 -# 1520 -# 1521 -# 1522 -# 1523 -# 1524 -# 1525 -# 1526 -# 1527 -# 1528 -# 1529 -# 1530 -# 1531 -# 1532 -# 1533 -# 1534 -# 1535 -# 1536 -# 1537 -# 1538 -# 1539 -# 1540 -# 1541 -# 1542 -# 1543 -# 1544 -# 1545 -# 1546 -# 1547 -# 1548 -# 1549 -# 1550 -# 1551 -# 1552 -# 1553 -# 1554 -# 1555 -# 1556 -# 1557 -# 1558 -# 1559 -# 1560 -# 1561 -# 1562 -# 1563 -# 1564 -# 1565 -# 1566 -# 1567 -# 1568 -# 1569 -# 1570 -# 1571 -# 1572 -# 1573 -# 1574 -# 1575 -# 1576 -# 1577 -# 1578 -# 1579 -# 1580 -# 1581 -# 1582 -# 1583 -# 1584 -# 1585 -# 1586 -# 1587 -# 1588 -# 1589 -# 1590 -# 1591 -# 1592 -# 1593 -# 1594 -# 1595 -# 1596 -# 1597 -# 1598 -# 1599 -# 1600 -# 1601 -# 1602 -# 1603 -# 1604 -# 1605 -# 1606 -# 1607 -# 1608 -# 1609 -# 1610 -# 1611 -# 1612 -# 1613 -# 1614 -# 1615 -# 1616 -# 1617 -# 1618 -# 1619 -# 1620 -# 1621 -# 1622 -# 1623 -# 1624 -# 1625 -# 1626 -# 1627 -# 1628 -# 1629 -# 1630 -# 1631 -# 1632 -# 1633 -# 1634 -# 1635 -# 1636 -# 1637 -# 1638 -# 1639 -# 1640 -# 1641 -# 1642 -# 1643 -# 1644 -# 1645 -# 1646 -# 1647 -# 1648 -# 1649 -# 1650 -# 1651 -# 1652 -# 1653 -# 1654 -# 1655 -# 1656 -# 1657 -# 1658 -# 1659 -# 1660 -# 1661 -# 1662 -# 1663 -# 1664 -# 1665 -# 1666 -# 1667 -# 1668 -# 1669 -# 1670 -# 1671 -# 1672 -# 1673 -# 1674 -# 1675 -# 1676 -# 1677 -# 1678 -# 1679 -# 1680 -# 1681 -# 1682 -# 1683 -# 1684 -# 1685 -# 1686 -# 1687 -# 1688 -# 1689 -# 1690 -# 1691 -# 1692 -# 1693 -# 1694 -# 1695 -# 1696 -# 1697 -# 1698 -# 1699 -# 1700 -# 1701 -# 1702 -# 1703 -# 1704 -# 1705 -# 1706 -# 1707 -# 1708 -# 1709 -# 1710 -# 1711 -# 1712 -# 1713 -# 1714 -# 1715 -# 1716 -# 1717 -# 1718 -# 1719 -# 1720 -# 1721 -# 1722 -# 1723 -# 1724 -# 1725 -# 1726 -# 1727 -# 1728 -# 1729 -# 1730 -# 1731 -# 1732 -# 1733 -# 1734 -# 1735 -# 1736 -# 1737 -# 1738 -# 1739 -# 1740 -# 1741 -# 1742 -# 1743 -# 1744 -# 1745 -# 1746 -# 1747 -# 1748 -# 1749 -# 1750 -# 1751 -# 1752 -# 1753 -# 1754 -# 1755 -# 1756 -# 1757 -# 1758 -# 1759 -# 1760 -# 1761 -# 1762 -# 1763 -# 1764 -# 1765 -# 1766 -# 1767 -# 1768 -# 1769 -# 1770 -# 1771 -# 1772 -# 1773 -# 1774 -# 1775 -# 1776 -# 1777 -# 1778 -# 1779 -# 1780 -# 1781 -# 1782 -# 1783 -# 1784 -# 1785 -# 1786 -# 1787 -# 1788 -# 1789 -# 1790 -# 1791 -# 1792 -# 1793 -# 1794 -# 1795 -# 1796 -# 1797 -# 1798 -# 1799 -# 1800 -# 1801 -# 1802 -# 1803 -# 1804 -# 1805 -# 1806 -# 1807 -# 1808 -# 1809 -# 1810 -# 1811 -# 1812 -# 1813 -# 1814 -# 1815 -# 1816 -# 1817 -# 1818 -# 1819 -# 1820 -# 1821 -# 1822 -# 1823 -# 1824 -# 1825 -# 1826 -# 1827 -# 1828 -# 1829 -# 1830 -# 1831 -# 1832 -# 1833 -# 1834 -# 1835 -# 1836 -# 1837 -# 1838 -# 1839 -# 1840 -# 1841 -# 1842 -# 1843 -# 1844 -# 1845 -# 1846 -# 1847 -# 1848 -# 1849 -# 1850 -# 1851 -# 1852 -# 1853 -# 1854 -# 1855 -# 1856 -# 1857 -# 1858 -# 1859 -# 1860 -# 1861 -# 1862 -# 1863 -# 1864 -# 1865 -# 1866 -# 1867 -# 1868 -# 1869 -# 1870 -# 1871 -# 1872 -# 1873 -# 1874 -# 1875 -# 1876 -# 1877 -# 1878 -# 1879 -# 1880 -# 1881 -# 1882 -# 1883 -# 1884 -# 1885 -# 1886 -# 1887 -# 1888 -# 1889 -# 1890 -# 1891 -# 1892 -# 1893 -# 1894 -# 1895 -# 1896 -# 1897 -# 1898 -# 1899 -# 1900 -# 1901 -# 1902 -# 1903 -# 1904 -# 1905 -# 1906 -# 1907 -# 1908 -# 1909 -# 1910 -# 1911 -# 1912 -# 1913 -# 1914 -# 1915 -# 1916 -# 1917 -# 1918 -# 1919 -# 1920 -# 1921 -# 1922 -# 1923 -# 1924 -# 1925 -# 1926 -# 1927 -# 1928 -# 1929 -# 1930 -# 1931 -# 1932 -# 1933 -# 1934 -# 1935 -# 1936 -# 1937 -# 1938 -# 1939 -# 1940 -# 1941 -# 1942 -# 1943 -# 1944 -# 1945 -# 1946 -# 1947 -# 1948 -# 1949 -# 1950 -# 1951 -# 1952 -# 1953 -# 1954 -# 1955 -# 1956 -# 1957 -# 1958 -# 1959 -# 1960 -# 1961 -# 1962 -# 1963 -# 1964 -# 1965 -# 1966 -# 1967 -# 1968 -# 1969 -# 1970 -# 1971 -# 1972 -# 1973 -# 1974 -# 1975 -# 1976 -# 1977 -# 1978 -# 1979 -# 1980 -# 1981 -# 1982 -# 1983 -# 1984 -# 1985 -# 1986 -# 1987 -# 1988 -# 1989 -# 1990 -# 1991 -# 1992 -# 1993 -# 1994 -# 1995 -# 1996 -# 1997 -# 1998 -# 1999 -# 2000 -# Maximum amount of warnings exceeded. Use -maxwarnings to override. ok 2 - warn() + # warn: Maximum amount of warnings exceeded. Use -maxwarnings to override. + --- + extensions: + messages: + - severity: warning + message: 0 + - severity: warning + message: 1 + - severity: warning + message: 2 + - severity: warning + message: 3 + - severity: warning + message: 4 + - severity: warning + message: 5 + - severity: warning + message: 6 + - severity: warning + message: 7 + - severity: warning + message: 8 + - severity: warning + message: 9 + - severity: warning + message: 10 + - severity: warning + message: 11 + - severity: warning + message: 12 + - severity: warning + message: 13 + - severity: warning + message: 14 + - severity: warning + message: 15 + - severity: warning + message: 16 + - severity: warning + message: 17 + - severity: warning + message: 18 + - severity: warning + message: 19 + - severity: warning + message: 20 + - severity: warning + message: 21 + - severity: warning + message: 22 + - severity: warning + message: 23 + - severity: warning + message: 24 + - severity: warning + message: 25 + - severity: warning + message: 26 + - severity: warning + message: 27 + - severity: warning + message: 28 + - severity: warning + message: 29 + - severity: warning + message: 30 + - severity: warning + message: 31 + - severity: warning + message: 32 + - severity: warning + message: 33 + - severity: warning + message: 34 + - severity: warning + message: 35 + - severity: warning + message: 36 + - severity: warning + message: 37 + - severity: warning + message: 38 + - severity: warning + message: 39 + - severity: warning + message: 40 + - severity: warning + message: 41 + - severity: warning + message: 42 + - severity: warning + message: 43 + - severity: warning + message: 44 + - severity: warning + message: 45 + - severity: warning + message: 46 + - severity: warning + message: 47 + - severity: warning + message: 48 + - severity: warning + message: 49 + - severity: warning + message: 50 + - severity: warning + message: 51 + - severity: warning + message: 52 + - severity: warning + message: 53 + - severity: warning + message: 54 + - severity: warning + message: 55 + - severity: warning + message: 56 + - severity: warning + message: 57 + - severity: warning + message: 58 + - severity: warning + message: 59 + - severity: warning + message: 60 + - severity: warning + message: 61 + - severity: warning + message: 62 + - severity: warning + message: 63 + - severity: warning + message: 64 + - severity: warning + message: 65 + - severity: warning + message: 66 + - severity: warning + message: 67 + - severity: warning + message: 68 + - severity: warning + message: 69 + - severity: warning + message: 70 + - severity: warning + message: 71 + - severity: warning + message: 72 + - severity: warning + message: 73 + - severity: warning + message: 74 + - severity: warning + message: 75 + - severity: warning + message: 76 + - severity: warning + message: 77 + - severity: warning + message: 78 + - severity: warning + message: 79 + - severity: warning + message: 80 + - severity: warning + message: 81 + - severity: warning + message: 82 + - severity: warning + message: 83 + - severity: warning + message: 84 + - severity: warning + message: 85 + - severity: warning + message: 86 + - severity: warning + message: 87 + - severity: warning + message: 88 + - severity: warning + message: 89 + - severity: warning + message: 90 + - severity: warning + message: 91 + - severity: warning + message: 92 + - severity: warning + message: 93 + - severity: warning + message: 94 + - severity: warning + message: 95 + - severity: warning + message: 96 + - severity: warning + message: 97 + - severity: warning + message: 98 + - severity: warning + message: 99 + - severity: warning + message: 100 + - severity: warning + message: 101 + - severity: warning + message: 102 + - severity: warning + message: 103 + - severity: warning + message: 104 + - severity: warning + message: 105 + - severity: warning + message: 106 + - severity: warning + message: 107 + - severity: warning + message: 108 + - severity: warning + message: 109 + - severity: warning + message: 110 + - severity: warning + message: 111 + - severity: warning + message: 112 + - severity: warning + message: 113 + - severity: warning + message: 114 + - severity: warning + message: 115 + - severity: warning + message: 116 + - severity: warning + message: 117 + - severity: warning + message: 118 + - severity: warning + message: 119 + - severity: warning + message: 120 + - severity: warning + message: 121 + - severity: warning + message: 122 + - severity: warning + message: 123 + - severity: warning + message: 124 + - severity: warning + message: 125 + - severity: warning + message: 126 + - severity: warning + message: 127 + - severity: warning + message: 128 + - severity: warning + message: 129 + - severity: warning + message: 130 + - severity: warning + message: 131 + - severity: warning + message: 132 + - severity: warning + message: 133 + - severity: warning + message: 134 + - severity: warning + message: 135 + - severity: warning + message: 136 + - severity: warning + message: 137 + - severity: warning + message: 138 + - severity: warning + message: 139 + - severity: warning + message: 140 + - severity: warning + message: 141 + - severity: warning + message: 142 + - severity: warning + message: 143 + - severity: warning + message: 144 + - severity: warning + message: 145 + - severity: warning + message: 146 + - severity: warning + message: 147 + - severity: warning + message: 148 + - severity: warning + message: 149 + - severity: warning + message: 150 + - severity: warning + message: 151 + - severity: warning + message: 152 + - severity: warning + message: 153 + - severity: warning + message: 154 + - severity: warning + message: 155 + - severity: warning + message: 156 + - severity: warning + message: 157 + - severity: warning + message: 158 + - severity: warning + message: 159 + - severity: warning + message: 160 + - severity: warning + message: 161 + - severity: warning + message: 162 + - severity: warning + message: 163 + - severity: warning + message: 164 + - severity: warning + message: 165 + - severity: warning + message: 166 + - severity: warning + message: 167 + - severity: warning + message: 168 + - severity: warning + message: 169 + - severity: warning + message: 170 + - severity: warning + message: 171 + - severity: warning + message: 172 + - severity: warning + message: 173 + - severity: warning + message: 174 + - severity: warning + message: 175 + - severity: warning + message: 176 + - severity: warning + message: 177 + - severity: warning + message: 178 + - severity: warning + message: 179 + - severity: warning + message: 180 + - severity: warning + message: 181 + - severity: warning + message: 182 + - severity: warning + message: 183 + - severity: warning + message: 184 + - severity: warning + message: 185 + - severity: warning + message: 186 + - severity: warning + message: 187 + - severity: warning + message: 188 + - severity: warning + message: 189 + - severity: warning + message: 190 + - severity: warning + message: 191 + - severity: warning + message: 192 + - severity: warning + message: 193 + - severity: warning + message: 194 + - severity: warning + message: 195 + - severity: warning + message: 196 + - severity: warning + message: 197 + - severity: warning + message: 198 + - severity: warning + message: 199 + - severity: warning + message: 200 + - severity: warning + message: 201 + - severity: warning + message: 202 + - severity: warning + message: 203 + - severity: warning + message: 204 + - severity: warning + message: 205 + - severity: warning + message: 206 + - severity: warning + message: 207 + - severity: warning + message: 208 + - severity: warning + message: 209 + - severity: warning + message: 210 + - severity: warning + message: 211 + - severity: warning + message: 212 + - severity: warning + message: 213 + - severity: warning + message: 214 + - severity: warning + message: 215 + - severity: warning + message: 216 + - severity: warning + message: 217 + - severity: warning + message: 218 + - severity: warning + message: 219 + - severity: warning + message: 220 + - severity: warning + message: 221 + - severity: warning + message: 222 + - severity: warning + message: 223 + - severity: warning + message: 224 + - severity: warning + message: 225 + - severity: warning + message: 226 + - severity: warning + message: 227 + - severity: warning + message: 228 + - severity: warning + message: 229 + - severity: warning + message: 230 + - severity: warning + message: 231 + - severity: warning + message: 232 + - severity: warning + message: 233 + - severity: warning + message: 234 + - severity: warning + message: 235 + - severity: warning + message: 236 + - severity: warning + message: 237 + - severity: warning + message: 238 + - severity: warning + message: 239 + - severity: warning + message: 240 + - severity: warning + message: 241 + - severity: warning + message: 242 + - severity: warning + message: 243 + - severity: warning + message: 244 + - severity: warning + message: 245 + - severity: warning + message: 246 + - severity: warning + message: 247 + - severity: warning + message: 248 + - severity: warning + message: 249 + - severity: warning + message: 250 + - severity: warning + message: 251 + - severity: warning + message: 252 + - severity: warning + message: 253 + - severity: warning + message: 254 + - severity: warning + message: 255 + - severity: warning + message: 256 + - severity: warning + message: 257 + - severity: warning + message: 258 + - severity: warning + message: 259 + - severity: warning + message: 260 + - severity: warning + message: 261 + - severity: warning + message: 262 + - severity: warning + message: 263 + - severity: warning + message: 264 + - severity: warning + message: 265 + - severity: warning + message: 266 + - severity: warning + message: 267 + - severity: warning + message: 268 + - severity: warning + message: 269 + - severity: warning + message: 270 + - severity: warning + message: 271 + - severity: warning + message: 272 + - severity: warning + message: 273 + - severity: warning + message: 274 + - severity: warning + message: 275 + - severity: warning + message: 276 + - severity: warning + message: 277 + - severity: warning + message: 278 + - severity: warning + message: 279 + - severity: warning + message: 280 + - severity: warning + message: 281 + - severity: warning + message: 282 + - severity: warning + message: 283 + - severity: warning + message: 284 + - severity: warning + message: 285 + - severity: warning + message: 286 + - severity: warning + message: 287 + - severity: warning + message: 288 + - severity: warning + message: 289 + - severity: warning + message: 290 + - severity: warning + message: 291 + - severity: warning + message: 292 + - severity: warning + message: 293 + - severity: warning + message: 294 + - severity: warning + message: 295 + - severity: warning + message: 296 + - severity: warning + message: 297 + - severity: warning + message: 298 + - severity: warning + message: 299 + - severity: warning + message: 300 + - severity: warning + message: 301 + - severity: warning + message: 302 + - severity: warning + message: 303 + - severity: warning + message: 304 + - severity: warning + message: 305 + - severity: warning + message: 306 + - severity: warning + message: 307 + - severity: warning + message: 308 + - severity: warning + message: 309 + - severity: warning + message: 310 + - severity: warning + message: 311 + - severity: warning + message: 312 + - severity: warning + message: 313 + - severity: warning + message: 314 + - severity: warning + message: 315 + - severity: warning + message: 316 + - severity: warning + message: 317 + - severity: warning + message: 318 + - severity: warning + message: 319 + - severity: warning + message: 320 + - severity: warning + message: 321 + - severity: warning + message: 322 + - severity: warning + message: 323 + - severity: warning + message: 324 + - severity: warning + message: 325 + - severity: warning + message: 326 + - severity: warning + message: 327 + - severity: warning + message: 328 + - severity: warning + message: 329 + - severity: warning + message: 330 + - severity: warning + message: 331 + - severity: warning + message: 332 + - severity: warning + message: 333 + - severity: warning + message: 334 + - severity: warning + message: 335 + - severity: warning + message: 336 + - severity: warning + message: 337 + - severity: warning + message: 338 + - severity: warning + message: 339 + - severity: warning + message: 340 + - severity: warning + message: 341 + - severity: warning + message: 342 + - severity: warning + message: 343 + - severity: warning + message: 344 + - severity: warning + message: 345 + - severity: warning + message: 346 + - severity: warning + message: 347 + - severity: warning + message: 348 + - severity: warning + message: 349 + - severity: warning + message: 350 + - severity: warning + message: 351 + - severity: warning + message: 352 + - severity: warning + message: 353 + - severity: warning + message: 354 + - severity: warning + message: 355 + - severity: warning + message: 356 + - severity: warning + message: 357 + - severity: warning + message: 358 + - severity: warning + message: 359 + - severity: warning + message: 360 + - severity: warning + message: 361 + - severity: warning + message: 362 + - severity: warning + message: 363 + - severity: warning + message: 364 + - severity: warning + message: 365 + - severity: warning + message: 366 + - severity: warning + message: 367 + - severity: warning + message: 368 + - severity: warning + message: 369 + - severity: warning + message: 370 + - severity: warning + message: 371 + - severity: warning + message: 372 + - severity: warning + message: 373 + - severity: warning + message: 374 + - severity: warning + message: 375 + - severity: warning + message: 376 + - severity: warning + message: 377 + - severity: warning + message: 378 + - severity: warning + message: 379 + - severity: warning + message: 380 + - severity: warning + message: 381 + - severity: warning + message: 382 + - severity: warning + message: 383 + - severity: warning + message: 384 + - severity: warning + message: 385 + - severity: warning + message: 386 + - severity: warning + message: 387 + - severity: warning + message: 388 + - severity: warning + message: 389 + - severity: warning + message: 390 + - severity: warning + message: 391 + - severity: warning + message: 392 + - severity: warning + message: 393 + - severity: warning + message: 394 + - severity: warning + message: 395 + - severity: warning + message: 396 + - severity: warning + message: 397 + - severity: warning + message: 398 + - severity: warning + message: 399 + - severity: warning + message: 400 + - severity: warning + message: 401 + - severity: warning + message: 402 + - severity: warning + message: 403 + - severity: warning + message: 404 + - severity: warning + message: 405 + - severity: warning + message: 406 + - severity: warning + message: 407 + - severity: warning + message: 408 + - severity: warning + message: 409 + - severity: warning + message: 410 + - severity: warning + message: 411 + - severity: warning + message: 412 + - severity: warning + message: 413 + - severity: warning + message: 414 + - severity: warning + message: 415 + - severity: warning + message: 416 + - severity: warning + message: 417 + - severity: warning + message: 418 + - severity: warning + message: 419 + - severity: warning + message: 420 + - severity: warning + message: 421 + - severity: warning + message: 422 + - severity: warning + message: 423 + - severity: warning + message: 424 + - severity: warning + message: 425 + - severity: warning + message: 426 + - severity: warning + message: 427 + - severity: warning + message: 428 + - severity: warning + message: 429 + - severity: warning + message: 430 + - severity: warning + message: 431 + - severity: warning + message: 432 + - severity: warning + message: 433 + - severity: warning + message: 434 + - severity: warning + message: 435 + - severity: warning + message: 436 + - severity: warning + message: 437 + - severity: warning + message: 438 + - severity: warning + message: 439 + - severity: warning + message: 440 + - severity: warning + message: 441 + - severity: warning + message: 442 + - severity: warning + message: 443 + - severity: warning + message: 444 + - severity: warning + message: 445 + - severity: warning + message: 446 + - severity: warning + message: 447 + - severity: warning + message: 448 + - severity: warning + message: 449 + - severity: warning + message: 450 + - severity: warning + message: 451 + - severity: warning + message: 452 + - severity: warning + message: 453 + - severity: warning + message: 454 + - severity: warning + message: 455 + - severity: warning + message: 456 + - severity: warning + message: 457 + - severity: warning + message: 458 + - severity: warning + message: 459 + - severity: warning + message: 460 + - severity: warning + message: 461 + - severity: warning + message: 462 + - severity: warning + message: 463 + - severity: warning + message: 464 + - severity: warning + message: 465 + - severity: warning + message: 466 + - severity: warning + message: 467 + - severity: warning + message: 468 + - severity: warning + message: 469 + - severity: warning + message: 470 + - severity: warning + message: 471 + - severity: warning + message: 472 + - severity: warning + message: 473 + - severity: warning + message: 474 + - severity: warning + message: 475 + - severity: warning + message: 476 + - severity: warning + message: 477 + - severity: warning + message: 478 + - severity: warning + message: 479 + - severity: warning + message: 480 + - severity: warning + message: 481 + - severity: warning + message: 482 + - severity: warning + message: 483 + - severity: warning + message: 484 + - severity: warning + message: 485 + - severity: warning + message: 486 + - severity: warning + message: 487 + - severity: warning + message: 488 + - severity: warning + message: 489 + - severity: warning + message: 490 + - severity: warning + message: 491 + - severity: warning + message: 492 + - severity: warning + message: 493 + - severity: warning + message: 494 + - severity: warning + message: 495 + - severity: warning + message: 496 + - severity: warning + message: 497 + - severity: warning + message: 498 + - severity: warning + message: 499 + - severity: warning + message: 500 + - severity: warning + message: 501 + - severity: warning + message: 502 + - severity: warning + message: 503 + - severity: warning + message: 504 + - severity: warning + message: 505 + - severity: warning + message: 506 + - severity: warning + message: 507 + - severity: warning + message: 508 + - severity: warning + message: 509 + - severity: warning + message: 510 + - severity: warning + message: 511 + - severity: warning + message: 512 + - severity: warning + message: 513 + - severity: warning + message: 514 + - severity: warning + message: 515 + - severity: warning + message: 516 + - severity: warning + message: 517 + - severity: warning + message: 518 + - severity: warning + message: 519 + - severity: warning + message: 520 + - severity: warning + message: 521 + - severity: warning + message: 522 + - severity: warning + message: 523 + - severity: warning + message: 524 + - severity: warning + message: 525 + - severity: warning + message: 526 + - severity: warning + message: 527 + - severity: warning + message: 528 + - severity: warning + message: 529 + - severity: warning + message: 530 + - severity: warning + message: 531 + - severity: warning + message: 532 + - severity: warning + message: 533 + - severity: warning + message: 534 + - severity: warning + message: 535 + - severity: warning + message: 536 + - severity: warning + message: 537 + - severity: warning + message: 538 + - severity: warning + message: 539 + - severity: warning + message: 540 + - severity: warning + message: 541 + - severity: warning + message: 542 + - severity: warning + message: 543 + - severity: warning + message: 544 + - severity: warning + message: 545 + - severity: warning + message: 546 + - severity: warning + message: 547 + - severity: warning + message: 548 + - severity: warning + message: 549 + - severity: warning + message: 550 + - severity: warning + message: 551 + - severity: warning + message: 552 + - severity: warning + message: 553 + - severity: warning + message: 554 + - severity: warning + message: 555 + - severity: warning + message: 556 + - severity: warning + message: 557 + - severity: warning + message: 558 + - severity: warning + message: 559 + - severity: warning + message: 560 + - severity: warning + message: 561 + - severity: warning + message: 562 + - severity: warning + message: 563 + - severity: warning + message: 564 + - severity: warning + message: 565 + - severity: warning + message: 566 + - severity: warning + message: 567 + - severity: warning + message: 568 + - severity: warning + message: 569 + - severity: warning + message: 570 + - severity: warning + message: 571 + - severity: warning + message: 572 + - severity: warning + message: 573 + - severity: warning + message: 574 + - severity: warning + message: 575 + - severity: warning + message: 576 + - severity: warning + message: 577 + - severity: warning + message: 578 + - severity: warning + message: 579 + - severity: warning + message: 580 + - severity: warning + message: 581 + - severity: warning + message: 582 + - severity: warning + message: 583 + - severity: warning + message: 584 + - severity: warning + message: 585 + - severity: warning + message: 586 + - severity: warning + message: 587 + - severity: warning + message: 588 + - severity: warning + message: 589 + - severity: warning + message: 590 + - severity: warning + message: 591 + - severity: warning + message: 592 + - severity: warning + message: 593 + - severity: warning + message: 594 + - severity: warning + message: 595 + - severity: warning + message: 596 + - severity: warning + message: 597 + - severity: warning + message: 598 + - severity: warning + message: 599 + - severity: warning + message: 600 + - severity: warning + message: 601 + - severity: warning + message: 602 + - severity: warning + message: 603 + - severity: warning + message: 604 + - severity: warning + message: 605 + - severity: warning + message: 606 + - severity: warning + message: 607 + - severity: warning + message: 608 + - severity: warning + message: 609 + - severity: warning + message: 610 + - severity: warning + message: 611 + - severity: warning + message: 612 + - severity: warning + message: 613 + - severity: warning + message: 614 + - severity: warning + message: 615 + - severity: warning + message: 616 + - severity: warning + message: 617 + - severity: warning + message: 618 + - severity: warning + message: 619 + - severity: warning + message: 620 + - severity: warning + message: 621 + - severity: warning + message: 622 + - severity: warning + message: 623 + - severity: warning + message: 624 + - severity: warning + message: 625 + - severity: warning + message: 626 + - severity: warning + message: 627 + - severity: warning + message: 628 + - severity: warning + message: 629 + - severity: warning + message: 630 + - severity: warning + message: 631 + - severity: warning + message: 632 + - severity: warning + message: 633 + - severity: warning + message: 634 + - severity: warning + message: 635 + - severity: warning + message: 636 + - severity: warning + message: 637 + - severity: warning + message: 638 + - severity: warning + message: 639 + - severity: warning + message: 640 + - severity: warning + message: 641 + - severity: warning + message: 642 + - severity: warning + message: 643 + - severity: warning + message: 644 + - severity: warning + message: 645 + - severity: warning + message: 646 + - severity: warning + message: 647 + - severity: warning + message: 648 + - severity: warning + message: 649 + - severity: warning + message: 650 + - severity: warning + message: 651 + - severity: warning + message: 652 + - severity: warning + message: 653 + - severity: warning + message: 654 + - severity: warning + message: 655 + - severity: warning + message: 656 + - severity: warning + message: 657 + - severity: warning + message: 658 + - severity: warning + message: 659 + - severity: warning + message: 660 + - severity: warning + message: 661 + - severity: warning + message: 662 + - severity: warning + message: 663 + - severity: warning + message: 664 + - severity: warning + message: 665 + - severity: warning + message: 666 + - severity: warning + message: 667 + - severity: warning + message: 668 + - severity: warning + message: 669 + - severity: warning + message: 670 + - severity: warning + message: 671 + - severity: warning + message: 672 + - severity: warning + message: 673 + - severity: warning + message: 674 + - severity: warning + message: 675 + - severity: warning + message: 676 + - severity: warning + message: 677 + - severity: warning + message: 678 + - severity: warning + message: 679 + - severity: warning + message: 680 + - severity: warning + message: 681 + - severity: warning + message: 682 + - severity: warning + message: 683 + - severity: warning + message: 684 + - severity: warning + message: 685 + - severity: warning + message: 686 + - severity: warning + message: 687 + - severity: warning + message: 688 + - severity: warning + message: 689 + - severity: warning + message: 690 + - severity: warning + message: 691 + - severity: warning + message: 692 + - severity: warning + message: 693 + - severity: warning + message: 694 + - severity: warning + message: 695 + - severity: warning + message: 696 + - severity: warning + message: 697 + - severity: warning + message: 698 + - severity: warning + message: 699 + - severity: warning + message: 700 + - severity: warning + message: 701 + - severity: warning + message: 702 + - severity: warning + message: 703 + - severity: warning + message: 704 + - severity: warning + message: 705 + - severity: warning + message: 706 + - severity: warning + message: 707 + - severity: warning + message: 708 + - severity: warning + message: 709 + - severity: warning + message: 710 + - severity: warning + message: 711 + - severity: warning + message: 712 + - severity: warning + message: 713 + - severity: warning + message: 714 + - severity: warning + message: 715 + - severity: warning + message: 716 + - severity: warning + message: 717 + - severity: warning + message: 718 + - severity: warning + message: 719 + - severity: warning + message: 720 + - severity: warning + message: 721 + - severity: warning + message: 722 + - severity: warning + message: 723 + - severity: warning + message: 724 + - severity: warning + message: 725 + - severity: warning + message: 726 + - severity: warning + message: 727 + - severity: warning + message: 728 + - severity: warning + message: 729 + - severity: warning + message: 730 + - severity: warning + message: 731 + - severity: warning + message: 732 + - severity: warning + message: 733 + - severity: warning + message: 734 + - severity: warning + message: 735 + - severity: warning + message: 736 + - severity: warning + message: 737 + - severity: warning + message: 738 + - severity: warning + message: 739 + - severity: warning + message: 740 + - severity: warning + message: 741 + - severity: warning + message: 742 + - severity: warning + message: 743 + - severity: warning + message: 744 + - severity: warning + message: 745 + - severity: warning + message: 746 + - severity: warning + message: 747 + - severity: warning + message: 748 + - severity: warning + message: 749 + - severity: warning + message: 750 + - severity: warning + message: 751 + - severity: warning + message: 752 + - severity: warning + message: 753 + - severity: warning + message: 754 + - severity: warning + message: 755 + - severity: warning + message: 756 + - severity: warning + message: 757 + - severity: warning + message: 758 + - severity: warning + message: 759 + - severity: warning + message: 760 + - severity: warning + message: 761 + - severity: warning + message: 762 + - severity: warning + message: 763 + - severity: warning + message: 764 + - severity: warning + message: 765 + - severity: warning + message: 766 + - severity: warning + message: 767 + - severity: warning + message: 768 + - severity: warning + message: 769 + - severity: warning + message: 770 + - severity: warning + message: 771 + - severity: warning + message: 772 + - severity: warning + message: 773 + - severity: warning + message: 774 + - severity: warning + message: 775 + - severity: warning + message: 776 + - severity: warning + message: 777 + - severity: warning + message: 778 + - severity: warning + message: 779 + - severity: warning + message: 780 + - severity: warning + message: 781 + - severity: warning + message: 782 + - severity: warning + message: 783 + - severity: warning + message: 784 + - severity: warning + message: 785 + - severity: warning + message: 786 + - severity: warning + message: 787 + - severity: warning + message: 788 + - severity: warning + message: 789 + - severity: warning + message: 790 + - severity: warning + message: 791 + - severity: warning + message: 792 + - severity: warning + message: 793 + - severity: warning + message: 794 + - severity: warning + message: 795 + - severity: warning + message: 796 + - severity: warning + message: 797 + - severity: warning + message: 798 + - severity: warning + message: 799 + - severity: warning + message: 800 + - severity: warning + message: 801 + - severity: warning + message: 802 + - severity: warning + message: 803 + - severity: warning + message: 804 + - severity: warning + message: 805 + - severity: warning + message: 806 + - severity: warning + message: 807 + - severity: warning + message: 808 + - severity: warning + message: 809 + - severity: warning + message: 810 + - severity: warning + message: 811 + - severity: warning + message: 812 + - severity: warning + message: 813 + - severity: warning + message: 814 + - severity: warning + message: 815 + - severity: warning + message: 816 + - severity: warning + message: 817 + - severity: warning + message: 818 + - severity: warning + message: 819 + - severity: warning + message: 820 + - severity: warning + message: 821 + - severity: warning + message: 822 + - severity: warning + message: 823 + - severity: warning + message: 824 + - severity: warning + message: 825 + - severity: warning + message: 826 + - severity: warning + message: 827 + - severity: warning + message: 828 + - severity: warning + message: 829 + - severity: warning + message: 830 + - severity: warning + message: 831 + - severity: warning + message: 832 + - severity: warning + message: 833 + - severity: warning + message: 834 + - severity: warning + message: 835 + - severity: warning + message: 836 + - severity: warning + message: 837 + - severity: warning + message: 838 + - severity: warning + message: 839 + - severity: warning + message: 840 + - severity: warning + message: 841 + - severity: warning + message: 842 + - severity: warning + message: 843 + - severity: warning + message: 844 + - severity: warning + message: 845 + - severity: warning + message: 846 + - severity: warning + message: 847 + - severity: warning + message: 848 + - severity: warning + message: 849 + - severity: warning + message: 850 + - severity: warning + message: 851 + - severity: warning + message: 852 + - severity: warning + message: 853 + - severity: warning + message: 854 + - severity: warning + message: 855 + - severity: warning + message: 856 + - severity: warning + message: 857 + - severity: warning + message: 858 + - severity: warning + message: 859 + - severity: warning + message: 860 + - severity: warning + message: 861 + - severity: warning + message: 862 + - severity: warning + message: 863 + - severity: warning + message: 864 + - severity: warning + message: 865 + - severity: warning + message: 866 + - severity: warning + message: 867 + - severity: warning + message: 868 + - severity: warning + message: 869 + - severity: warning + message: 870 + - severity: warning + message: 871 + - severity: warning + message: 872 + - severity: warning + message: 873 + - severity: warning + message: 874 + - severity: warning + message: 875 + - severity: warning + message: 876 + - severity: warning + message: 877 + - severity: warning + message: 878 + - severity: warning + message: 879 + - severity: warning + message: 880 + - severity: warning + message: 881 + - severity: warning + message: 882 + - severity: warning + message: 883 + - severity: warning + message: 884 + - severity: warning + message: 885 + - severity: warning + message: 886 + - severity: warning + message: 887 + - severity: warning + message: 888 + - severity: warning + message: 889 + - severity: warning + message: 890 + - severity: warning + message: 891 + - severity: warning + message: 892 + - severity: warning + message: 893 + - severity: warning + message: 894 + - severity: warning + message: 895 + - severity: warning + message: 896 + - severity: warning + message: 897 + - severity: warning + message: 898 + - severity: warning + message: 899 + - severity: warning + message: 900 + - severity: warning + message: 901 + - severity: warning + message: 902 + - severity: warning + message: 903 + - severity: warning + message: 904 + - severity: warning + message: 905 + - severity: warning + message: 906 + - severity: warning + message: 907 + - severity: warning + message: 908 + - severity: warning + message: 909 + - severity: warning + message: 910 + - severity: warning + message: 911 + - severity: warning + message: 912 + - severity: warning + message: 913 + - severity: warning + message: 914 + - severity: warning + message: 915 + - severity: warning + message: 916 + - severity: warning + message: 917 + - severity: warning + message: 918 + - severity: warning + message: 919 + - severity: warning + message: 920 + - severity: warning + message: 921 + - severity: warning + message: 922 + - severity: warning + message: 923 + - severity: warning + message: 924 + - severity: warning + message: 925 + - severity: warning + message: 926 + - severity: warning + message: 927 + - severity: warning + message: 928 + - severity: warning + message: 929 + - severity: warning + message: 930 + - severity: warning + message: 931 + - severity: warning + message: 932 + - severity: warning + message: 933 + - severity: warning + message: 934 + - severity: warning + message: 935 + - severity: warning + message: 936 + - severity: warning + message: 937 + - severity: warning + message: 938 + - severity: warning + message: 939 + - severity: warning + message: 940 + - severity: warning + message: 941 + - severity: warning + message: 942 + - severity: warning + message: 943 + - severity: warning + message: 944 + - severity: warning + message: 945 + - severity: warning + message: 946 + - severity: warning + message: 947 + - severity: warning + message: 948 + - severity: warning + message: 949 + - severity: warning + message: 950 + - severity: warning + message: 951 + - severity: warning + message: 952 + - severity: warning + message: 953 + - severity: warning + message: 954 + - severity: warning + message: 955 + - severity: warning + message: 956 + - severity: warning + message: 957 + - severity: warning + message: 958 + - severity: warning + message: 959 + - severity: warning + message: 960 + - severity: warning + message: 961 + - severity: warning + message: 962 + - severity: warning + message: 963 + - severity: warning + message: 964 + - severity: warning + message: 965 + - severity: warning + message: 966 + - severity: warning + message: 967 + - severity: warning + message: 968 + - severity: warning + message: 969 + - severity: warning + message: 970 + - severity: warning + message: 971 + - severity: warning + message: 972 + - severity: warning + message: 973 + - severity: warning + message: 974 + - severity: warning + message: 975 + - severity: warning + message: 976 + - severity: warning + message: 977 + - severity: warning + message: 978 + - severity: warning + message: 979 + - severity: warning + message: 980 + - severity: warning + message: 981 + - severity: warning + message: 982 + - severity: warning + message: 983 + - severity: warning + message: 984 + - severity: warning + message: 985 + - severity: warning + message: 986 + - severity: warning + message: 987 + - severity: warning + message: 988 + - severity: warning + message: 989 + - severity: warning + message: 990 + - severity: warning + message: 991 + - severity: warning + message: 992 + - severity: warning + message: 993 + - severity: warning + message: 994 + - severity: warning + message: 995 + - severity: warning + message: 996 + - severity: warning + message: 997 + - severity: warning + message: 998 + - severity: warning + message: 999 + - severity: warning + message: 1000 + - severity: warning + message: 1001 + - severity: warning + message: 1002 + - severity: warning + message: 1003 + - severity: warning + message: 1004 + - severity: warning + message: 1005 + - severity: warning + message: 1006 + - severity: warning + message: 1007 + - severity: warning + message: 1008 + - severity: warning + message: 1009 + - severity: warning + message: 1010 + - severity: warning + message: 1011 + - severity: warning + message: 1012 + - severity: warning + message: 1013 + - severity: warning + message: 1014 + - severity: warning + message: 1015 + - severity: warning + message: 1016 + - severity: warning + message: 1017 + - severity: warning + message: 1018 + - severity: warning + message: 1019 + - severity: warning + message: 1020 + - severity: warning + message: 1021 + - severity: warning + message: 1022 + - severity: warning + message: 1023 + - severity: warning + message: 1024 + - severity: warning + message: 1025 + - severity: warning + message: 1026 + - severity: warning + message: 1027 + - severity: warning + message: 1028 + - severity: warning + message: 1029 + - severity: warning + message: 1030 + - severity: warning + message: 1031 + - severity: warning + message: 1032 + - severity: warning + message: 1033 + - severity: warning + message: 1034 + - severity: warning + message: 1035 + - severity: warning + message: 1036 + - severity: warning + message: 1037 + - severity: warning + message: 1038 + - severity: warning + message: 1039 + - severity: warning + message: 1040 + - severity: warning + message: 1041 + - severity: warning + message: 1042 + - severity: warning + message: 1043 + - severity: warning + message: 1044 + - severity: warning + message: 1045 + - severity: warning + message: 1046 + - severity: warning + message: 1047 + - severity: warning + message: 1048 + - severity: warning + message: 1049 + - severity: warning + message: 1050 + - severity: warning + message: 1051 + - severity: warning + message: 1052 + - severity: warning + message: 1053 + - severity: warning + message: 1054 + - severity: warning + message: 1055 + - severity: warning + message: 1056 + - severity: warning + message: 1057 + - severity: warning + message: 1058 + - severity: warning + message: 1059 + - severity: warning + message: 1060 + - severity: warning + message: 1061 + - severity: warning + message: 1062 + - severity: warning + message: 1063 + - severity: warning + message: 1064 + - severity: warning + message: 1065 + - severity: warning + message: 1066 + - severity: warning + message: 1067 + - severity: warning + message: 1068 + - severity: warning + message: 1069 + - severity: warning + message: 1070 + - severity: warning + message: 1071 + - severity: warning + message: 1072 + - severity: warning + message: 1073 + - severity: warning + message: 1074 + - severity: warning + message: 1075 + - severity: warning + message: 1076 + - severity: warning + message: 1077 + - severity: warning + message: 1078 + - severity: warning + message: 1079 + - severity: warning + message: 1080 + - severity: warning + message: 1081 + - severity: warning + message: 1082 + - severity: warning + message: 1083 + - severity: warning + message: 1084 + - severity: warning + message: 1085 + - severity: warning + message: 1086 + - severity: warning + message: 1087 + - severity: warning + message: 1088 + - severity: warning + message: 1089 + - severity: warning + message: 1090 + - severity: warning + message: 1091 + - severity: warning + message: 1092 + - severity: warning + message: 1093 + - severity: warning + message: 1094 + - severity: warning + message: 1095 + - severity: warning + message: 1096 + - severity: warning + message: 1097 + - severity: warning + message: 1098 + - severity: warning + message: 1099 + - severity: warning + message: 1100 + - severity: warning + message: 1101 + - severity: warning + message: 1102 + - severity: warning + message: 1103 + - severity: warning + message: 1104 + - severity: warning + message: 1105 + - severity: warning + message: 1106 + - severity: warning + message: 1107 + - severity: warning + message: 1108 + - severity: warning + message: 1109 + - severity: warning + message: 1110 + - severity: warning + message: 1111 + - severity: warning + message: 1112 + - severity: warning + message: 1113 + - severity: warning + message: 1114 + - severity: warning + message: 1115 + - severity: warning + message: 1116 + - severity: warning + message: 1117 + - severity: warning + message: 1118 + - severity: warning + message: 1119 + - severity: warning + message: 1120 + - severity: warning + message: 1121 + - severity: warning + message: 1122 + - severity: warning + message: 1123 + - severity: warning + message: 1124 + - severity: warning + message: 1125 + - severity: warning + message: 1126 + - severity: warning + message: 1127 + - severity: warning + message: 1128 + - severity: warning + message: 1129 + - severity: warning + message: 1130 + - severity: warning + message: 1131 + - severity: warning + message: 1132 + - severity: warning + message: 1133 + - severity: warning + message: 1134 + - severity: warning + message: 1135 + - severity: warning + message: 1136 + - severity: warning + message: 1137 + - severity: warning + message: 1138 + - severity: warning + message: 1139 + - severity: warning + message: 1140 + - severity: warning + message: 1141 + - severity: warning + message: 1142 + - severity: warning + message: 1143 + - severity: warning + message: 1144 + - severity: warning + message: 1145 + - severity: warning + message: 1146 + - severity: warning + message: 1147 + - severity: warning + message: 1148 + - severity: warning + message: 1149 + - severity: warning + message: 1150 + - severity: warning + message: 1151 + - severity: warning + message: 1152 + - severity: warning + message: 1153 + - severity: warning + message: 1154 + - severity: warning + message: 1155 + - severity: warning + message: 1156 + - severity: warning + message: 1157 + - severity: warning + message: 1158 + - severity: warning + message: 1159 + - severity: warning + message: 1160 + - severity: warning + message: 1161 + - severity: warning + message: 1162 + - severity: warning + message: 1163 + - severity: warning + message: 1164 + - severity: warning + message: 1165 + - severity: warning + message: 1166 + - severity: warning + message: 1167 + - severity: warning + message: 1168 + - severity: warning + message: 1169 + - severity: warning + message: 1170 + - severity: warning + message: 1171 + - severity: warning + message: 1172 + - severity: warning + message: 1173 + - severity: warning + message: 1174 + - severity: warning + message: 1175 + - severity: warning + message: 1176 + - severity: warning + message: 1177 + - severity: warning + message: 1178 + - severity: warning + message: 1179 + - severity: warning + message: 1180 + - severity: warning + message: 1181 + - severity: warning + message: 1182 + - severity: warning + message: 1183 + - severity: warning + message: 1184 + - severity: warning + message: 1185 + - severity: warning + message: 1186 + - severity: warning + message: 1187 + - severity: warning + message: 1188 + - severity: warning + message: 1189 + - severity: warning + message: 1190 + - severity: warning + message: 1191 + - severity: warning + message: 1192 + - severity: warning + message: 1193 + - severity: warning + message: 1194 + - severity: warning + message: 1195 + - severity: warning + message: 1196 + - severity: warning + message: 1197 + - severity: warning + message: 1198 + - severity: warning + message: 1199 + - severity: warning + message: 1200 + - severity: warning + message: 1201 + - severity: warning + message: 1202 + - severity: warning + message: 1203 + - severity: warning + message: 1204 + - severity: warning + message: 1205 + - severity: warning + message: 1206 + - severity: warning + message: 1207 + - severity: warning + message: 1208 + - severity: warning + message: 1209 + - severity: warning + message: 1210 + - severity: warning + message: 1211 + - severity: warning + message: 1212 + - severity: warning + message: 1213 + - severity: warning + message: 1214 + - severity: warning + message: 1215 + - severity: warning + message: 1216 + - severity: warning + message: 1217 + - severity: warning + message: 1218 + - severity: warning + message: 1219 + - severity: warning + message: 1220 + - severity: warning + message: 1221 + - severity: warning + message: 1222 + - severity: warning + message: 1223 + - severity: warning + message: 1224 + - severity: warning + message: 1225 + - severity: warning + message: 1226 + - severity: warning + message: 1227 + - severity: warning + message: 1228 + - severity: warning + message: 1229 + - severity: warning + message: 1230 + - severity: warning + message: 1231 + - severity: warning + message: 1232 + - severity: warning + message: 1233 + - severity: warning + message: 1234 + - severity: warning + message: 1235 + - severity: warning + message: 1236 + - severity: warning + message: 1237 + - severity: warning + message: 1238 + - severity: warning + message: 1239 + - severity: warning + message: 1240 + - severity: warning + message: 1241 + - severity: warning + message: 1242 + - severity: warning + message: 1243 + - severity: warning + message: 1244 + - severity: warning + message: 1245 + - severity: warning + message: 1246 + - severity: warning + message: 1247 + - severity: warning + message: 1248 + - severity: warning + message: 1249 + - severity: warning + message: 1250 + - severity: warning + message: 1251 + - severity: warning + message: 1252 + - severity: warning + message: 1253 + - severity: warning + message: 1254 + - severity: warning + message: 1255 + - severity: warning + message: 1256 + - severity: warning + message: 1257 + - severity: warning + message: 1258 + - severity: warning + message: 1259 + - severity: warning + message: 1260 + - severity: warning + message: 1261 + - severity: warning + message: 1262 + - severity: warning + message: 1263 + - severity: warning + message: 1264 + - severity: warning + message: 1265 + - severity: warning + message: 1266 + - severity: warning + message: 1267 + - severity: warning + message: 1268 + - severity: warning + message: 1269 + - severity: warning + message: 1270 + - severity: warning + message: 1271 + - severity: warning + message: 1272 + - severity: warning + message: 1273 + - severity: warning + message: 1274 + - severity: warning + message: 1275 + - severity: warning + message: 1276 + - severity: warning + message: 1277 + - severity: warning + message: 1278 + - severity: warning + message: 1279 + - severity: warning + message: 1280 + - severity: warning + message: 1281 + - severity: warning + message: 1282 + - severity: warning + message: 1283 + - severity: warning + message: 1284 + - severity: warning + message: 1285 + - severity: warning + message: 1286 + - severity: warning + message: 1287 + - severity: warning + message: 1288 + - severity: warning + message: 1289 + - severity: warning + message: 1290 + - severity: warning + message: 1291 + - severity: warning + message: 1292 + - severity: warning + message: 1293 + - severity: warning + message: 1294 + - severity: warning + message: 1295 + - severity: warning + message: 1296 + - severity: warning + message: 1297 + - severity: warning + message: 1298 + - severity: warning + message: 1299 + - severity: warning + message: 1300 + - severity: warning + message: 1301 + - severity: warning + message: 1302 + - severity: warning + message: 1303 + - severity: warning + message: 1304 + - severity: warning + message: 1305 + - severity: warning + message: 1306 + - severity: warning + message: 1307 + - severity: warning + message: 1308 + - severity: warning + message: 1309 + - severity: warning + message: 1310 + - severity: warning + message: 1311 + - severity: warning + message: 1312 + - severity: warning + message: 1313 + - severity: warning + message: 1314 + - severity: warning + message: 1315 + - severity: warning + message: 1316 + - severity: warning + message: 1317 + - severity: warning + message: 1318 + - severity: warning + message: 1319 + - severity: warning + message: 1320 + - severity: warning + message: 1321 + - severity: warning + message: 1322 + - severity: warning + message: 1323 + - severity: warning + message: 1324 + - severity: warning + message: 1325 + - severity: warning + message: 1326 + - severity: warning + message: 1327 + - severity: warning + message: 1328 + - severity: warning + message: 1329 + - severity: warning + message: 1330 + - severity: warning + message: 1331 + - severity: warning + message: 1332 + - severity: warning + message: 1333 + - severity: warning + message: 1334 + - severity: warning + message: 1335 + - severity: warning + message: 1336 + - severity: warning + message: 1337 + - severity: warning + message: 1338 + - severity: warning + message: 1339 + - severity: warning + message: 1340 + - severity: warning + message: 1341 + - severity: warning + message: 1342 + - severity: warning + message: 1343 + - severity: warning + message: 1344 + - severity: warning + message: 1345 + - severity: warning + message: 1346 + - severity: warning + message: 1347 + - severity: warning + message: 1348 + - severity: warning + message: 1349 + - severity: warning + message: 1350 + - severity: warning + message: 1351 + - severity: warning + message: 1352 + - severity: warning + message: 1353 + - severity: warning + message: 1354 + - severity: warning + message: 1355 + - severity: warning + message: 1356 + - severity: warning + message: 1357 + - severity: warning + message: 1358 + - severity: warning + message: 1359 + - severity: warning + message: 1360 + - severity: warning + message: 1361 + - severity: warning + message: 1362 + - severity: warning + message: 1363 + - severity: warning + message: 1364 + - severity: warning + message: 1365 + - severity: warning + message: 1366 + - severity: warning + message: 1367 + - severity: warning + message: 1368 + - severity: warning + message: 1369 + - severity: warning + message: 1370 + - severity: warning + message: 1371 + - severity: warning + message: 1372 + - severity: warning + message: 1373 + - severity: warning + message: 1374 + - severity: warning + message: 1375 + - severity: warning + message: 1376 + - severity: warning + message: 1377 + - severity: warning + message: 1378 + - severity: warning + message: 1379 + - severity: warning + message: 1380 + - severity: warning + message: 1381 + - severity: warning + message: 1382 + - severity: warning + message: 1383 + - severity: warning + message: 1384 + - severity: warning + message: 1385 + - severity: warning + message: 1386 + - severity: warning + message: 1387 + - severity: warning + message: 1388 + - severity: warning + message: 1389 + - severity: warning + message: 1390 + - severity: warning + message: 1391 + - severity: warning + message: 1392 + - severity: warning + message: 1393 + - severity: warning + message: 1394 + - severity: warning + message: 1395 + - severity: warning + message: 1396 + - severity: warning + message: 1397 + - severity: warning + message: 1398 + - severity: warning + message: 1399 + - severity: warning + message: 1400 + - severity: warning + message: 1401 + - severity: warning + message: 1402 + - severity: warning + message: 1403 + - severity: warning + message: 1404 + - severity: warning + message: 1405 + - severity: warning + message: 1406 + - severity: warning + message: 1407 + - severity: warning + message: 1408 + - severity: warning + message: 1409 + - severity: warning + message: 1410 + - severity: warning + message: 1411 + - severity: warning + message: 1412 + - severity: warning + message: 1413 + - severity: warning + message: 1414 + - severity: warning + message: 1415 + - severity: warning + message: 1416 + - severity: warning + message: 1417 + - severity: warning + message: 1418 + - severity: warning + message: 1419 + - severity: warning + message: 1420 + - severity: warning + message: 1421 + - severity: warning + message: 1422 + - severity: warning + message: 1423 + - severity: warning + message: 1424 + - severity: warning + message: 1425 + - severity: warning + message: 1426 + - severity: warning + message: 1427 + - severity: warning + message: 1428 + - severity: warning + message: 1429 + - severity: warning + message: 1430 + - severity: warning + message: 1431 + - severity: warning + message: 1432 + - severity: warning + message: 1433 + - severity: warning + message: 1434 + - severity: warning + message: 1435 + - severity: warning + message: 1436 + - severity: warning + message: 1437 + - severity: warning + message: 1438 + - severity: warning + message: 1439 + - severity: warning + message: 1440 + - severity: warning + message: 1441 + - severity: warning + message: 1442 + - severity: warning + message: 1443 + - severity: warning + message: 1444 + - severity: warning + message: 1445 + - severity: warning + message: 1446 + - severity: warning + message: 1447 + - severity: warning + message: 1448 + - severity: warning + message: 1449 + - severity: warning + message: 1450 + - severity: warning + message: 1451 + - severity: warning + message: 1452 + - severity: warning + message: 1453 + - severity: warning + message: 1454 + - severity: warning + message: 1455 + - severity: warning + message: 1456 + - severity: warning + message: 1457 + - severity: warning + message: 1458 + - severity: warning + message: 1459 + - severity: warning + message: 1460 + - severity: warning + message: 1461 + - severity: warning + message: 1462 + - severity: warning + message: 1463 + - severity: warning + message: 1464 + - severity: warning + message: 1465 + - severity: warning + message: 1466 + - severity: warning + message: 1467 + - severity: warning + message: 1468 + - severity: warning + message: 1469 + - severity: warning + message: 1470 + - severity: warning + message: 1471 + - severity: warning + message: 1472 + - severity: warning + message: 1473 + - severity: warning + message: 1474 + - severity: warning + message: 1475 + - severity: warning + message: 1476 + - severity: warning + message: 1477 + - severity: warning + message: 1478 + - severity: warning + message: 1479 + - severity: warning + message: 1480 + - severity: warning + message: 1481 + - severity: warning + message: 1482 + - severity: warning + message: 1483 + - severity: warning + message: 1484 + - severity: warning + message: 1485 + - severity: warning + message: 1486 + - severity: warning + message: 1487 + - severity: warning + message: 1488 + - severity: warning + message: 1489 + - severity: warning + message: 1490 + - severity: warning + message: 1491 + - severity: warning + message: 1492 + - severity: warning + message: 1493 + - severity: warning + message: 1494 + - severity: warning + message: 1495 + - severity: warning + message: 1496 + - severity: warning + message: 1497 + - severity: warning + message: 1498 + - severity: warning + message: 1499 + - severity: warning + message: 1500 + - severity: warning + message: 1501 + - severity: warning + message: 1502 + - severity: warning + message: 1503 + - severity: warning + message: 1504 + - severity: warning + message: 1505 + - severity: warning + message: 1506 + - severity: warning + message: 1507 + - severity: warning + message: 1508 + - severity: warning + message: 1509 + - severity: warning + message: 1510 + - severity: warning + message: 1511 + - severity: warning + message: 1512 + - severity: warning + message: 1513 + - severity: warning + message: 1514 + - severity: warning + message: 1515 + - severity: warning + message: 1516 + - severity: warning + message: 1517 + - severity: warning + message: 1518 + - severity: warning + message: 1519 + - severity: warning + message: 1520 + - severity: warning + message: 1521 + - severity: warning + message: 1522 + - severity: warning + message: 1523 + - severity: warning + message: 1524 + - severity: warning + message: 1525 + - severity: warning + message: 1526 + - severity: warning + message: 1527 + - severity: warning + message: 1528 + - severity: warning + message: 1529 + - severity: warning + message: 1530 + - severity: warning + message: 1531 + - severity: warning + message: 1532 + - severity: warning + message: 1533 + - severity: warning + message: 1534 + - severity: warning + message: 1535 + - severity: warning + message: 1536 + - severity: warning + message: 1537 + - severity: warning + message: 1538 + - severity: warning + message: 1539 + - severity: warning + message: 1540 + - severity: warning + message: 1541 + - severity: warning + message: 1542 + - severity: warning + message: 1543 + - severity: warning + message: 1544 + - severity: warning + message: 1545 + - severity: warning + message: 1546 + - severity: warning + message: 1547 + - severity: warning + message: 1548 + - severity: warning + message: 1549 + - severity: warning + message: 1550 + - severity: warning + message: 1551 + - severity: warning + message: 1552 + - severity: warning + message: 1553 + - severity: warning + message: 1554 + - severity: warning + message: 1555 + - severity: warning + message: 1556 + - severity: warning + message: 1557 + - severity: warning + message: 1558 + - severity: warning + message: 1559 + - severity: warning + message: 1560 + - severity: warning + message: 1561 + - severity: warning + message: 1562 + - severity: warning + message: 1563 + - severity: warning + message: 1564 + - severity: warning + message: 1565 + - severity: warning + message: 1566 + - severity: warning + message: 1567 + - severity: warning + message: 1568 + - severity: warning + message: 1569 + - severity: warning + message: 1570 + - severity: warning + message: 1571 + - severity: warning + message: 1572 + - severity: warning + message: 1573 + - severity: warning + message: 1574 + - severity: warning + message: 1575 + - severity: warning + message: 1576 + - severity: warning + message: 1577 + - severity: warning + message: 1578 + - severity: warning + message: 1579 + - severity: warning + message: 1580 + - severity: warning + message: 1581 + - severity: warning + message: 1582 + - severity: warning + message: 1583 + - severity: warning + message: 1584 + - severity: warning + message: 1585 + - severity: warning + message: 1586 + - severity: warning + message: 1587 + - severity: warning + message: 1588 + - severity: warning + message: 1589 + - severity: warning + message: 1590 + - severity: warning + message: 1591 + - severity: warning + message: 1592 + - severity: warning + message: 1593 + - severity: warning + message: 1594 + - severity: warning + message: 1595 + - severity: warning + message: 1596 + - severity: warning + message: 1597 + - severity: warning + message: 1598 + - severity: warning + message: 1599 + - severity: warning + message: 1600 + - severity: warning + message: 1601 + - severity: warning + message: 1602 + - severity: warning + message: 1603 + - severity: warning + message: 1604 + - severity: warning + message: 1605 + - severity: warning + message: 1606 + - severity: warning + message: 1607 + - severity: warning + message: 1608 + - severity: warning + message: 1609 + - severity: warning + message: 1610 + - severity: warning + message: 1611 + - severity: warning + message: 1612 + - severity: warning + message: 1613 + - severity: warning + message: 1614 + - severity: warning + message: 1615 + - severity: warning + message: 1616 + - severity: warning + message: 1617 + - severity: warning + message: 1618 + - severity: warning + message: 1619 + - severity: warning + message: 1620 + - severity: warning + message: 1621 + - severity: warning + message: 1622 + - severity: warning + message: 1623 + - severity: warning + message: 1624 + - severity: warning + message: 1625 + - severity: warning + message: 1626 + - severity: warning + message: 1627 + - severity: warning + message: 1628 + - severity: warning + message: 1629 + - severity: warning + message: 1630 + - severity: warning + message: 1631 + - severity: warning + message: 1632 + - severity: warning + message: 1633 + - severity: warning + message: 1634 + - severity: warning + message: 1635 + - severity: warning + message: 1636 + - severity: warning + message: 1637 + - severity: warning + message: 1638 + - severity: warning + message: 1639 + - severity: warning + message: 1640 + - severity: warning + message: 1641 + - severity: warning + message: 1642 + - severity: warning + message: 1643 + - severity: warning + message: 1644 + - severity: warning + message: 1645 + - severity: warning + message: 1646 + - severity: warning + message: 1647 + - severity: warning + message: 1648 + - severity: warning + message: 1649 + - severity: warning + message: 1650 + - severity: warning + message: 1651 + - severity: warning + message: 1652 + - severity: warning + message: 1653 + - severity: warning + message: 1654 + - severity: warning + message: 1655 + - severity: warning + message: 1656 + - severity: warning + message: 1657 + - severity: warning + message: 1658 + - severity: warning + message: 1659 + - severity: warning + message: 1660 + - severity: warning + message: 1661 + - severity: warning + message: 1662 + - severity: warning + message: 1663 + - severity: warning + message: 1664 + - severity: warning + message: 1665 + - severity: warning + message: 1666 + - severity: warning + message: 1667 + - severity: warning + message: 1668 + - severity: warning + message: 1669 + - severity: warning + message: 1670 + - severity: warning + message: 1671 + - severity: warning + message: 1672 + - severity: warning + message: 1673 + - severity: warning + message: 1674 + - severity: warning + message: 1675 + - severity: warning + message: 1676 + - severity: warning + message: 1677 + - severity: warning + message: 1678 + - severity: warning + message: 1679 + - severity: warning + message: 1680 + - severity: warning + message: 1681 + - severity: warning + message: 1682 + - severity: warning + message: 1683 + - severity: warning + message: 1684 + - severity: warning + message: 1685 + - severity: warning + message: 1686 + - severity: warning + message: 1687 + - severity: warning + message: 1688 + - severity: warning + message: 1689 + - severity: warning + message: 1690 + - severity: warning + message: 1691 + - severity: warning + message: 1692 + - severity: warning + message: 1693 + - severity: warning + message: 1694 + - severity: warning + message: 1695 + - severity: warning + message: 1696 + - severity: warning + message: 1697 + - severity: warning + message: 1698 + - severity: warning + message: 1699 + - severity: warning + message: 1700 + - severity: warning + message: 1701 + - severity: warning + message: 1702 + - severity: warning + message: 1703 + - severity: warning + message: 1704 + - severity: warning + message: 1705 + - severity: warning + message: 1706 + - severity: warning + message: 1707 + - severity: warning + message: 1708 + - severity: warning + message: 1709 + - severity: warning + message: 1710 + - severity: warning + message: 1711 + - severity: warning + message: 1712 + - severity: warning + message: 1713 + - severity: warning + message: 1714 + - severity: warning + message: 1715 + - severity: warning + message: 1716 + - severity: warning + message: 1717 + - severity: warning + message: 1718 + - severity: warning + message: 1719 + - severity: warning + message: 1720 + - severity: warning + message: 1721 + - severity: warning + message: 1722 + - severity: warning + message: 1723 + - severity: warning + message: 1724 + - severity: warning + message: 1725 + - severity: warning + message: 1726 + - severity: warning + message: 1727 + - severity: warning + message: 1728 + - severity: warning + message: 1729 + - severity: warning + message: 1730 + - severity: warning + message: 1731 + - severity: warning + message: 1732 + - severity: warning + message: 1733 + - severity: warning + message: 1734 + - severity: warning + message: 1735 + - severity: warning + message: 1736 + - severity: warning + message: 1737 + - severity: warning + message: 1738 + - severity: warning + message: 1739 + - severity: warning + message: 1740 + - severity: warning + message: 1741 + - severity: warning + message: 1742 + - severity: warning + message: 1743 + - severity: warning + message: 1744 + - severity: warning + message: 1745 + - severity: warning + message: 1746 + - severity: warning + message: 1747 + - severity: warning + message: 1748 + - severity: warning + message: 1749 + - severity: warning + message: 1750 + - severity: warning + message: 1751 + - severity: warning + message: 1752 + - severity: warning + message: 1753 + - severity: warning + message: 1754 + - severity: warning + message: 1755 + - severity: warning + message: 1756 + - severity: warning + message: 1757 + - severity: warning + message: 1758 + - severity: warning + message: 1759 + - severity: warning + message: 1760 + - severity: warning + message: 1761 + - severity: warning + message: 1762 + - severity: warning + message: 1763 + - severity: warning + message: 1764 + - severity: warning + message: 1765 + - severity: warning + message: 1766 + - severity: warning + message: 1767 + - severity: warning + message: 1768 + - severity: warning + message: 1769 + - severity: warning + message: 1770 + - severity: warning + message: 1771 + - severity: warning + message: 1772 + - severity: warning + message: 1773 + - severity: warning + message: 1774 + - severity: warning + message: 1775 + - severity: warning + message: 1776 + - severity: warning + message: 1777 + - severity: warning + message: 1778 + - severity: warning + message: 1779 + - severity: warning + message: 1780 + - severity: warning + message: 1781 + - severity: warning + message: 1782 + - severity: warning + message: 1783 + - severity: warning + message: 1784 + - severity: warning + message: 1785 + - severity: warning + message: 1786 + - severity: warning + message: 1787 + - severity: warning + message: 1788 + - severity: warning + message: 1789 + - severity: warning + message: 1790 + - severity: warning + message: 1791 + - severity: warning + message: 1792 + - severity: warning + message: 1793 + - severity: warning + message: 1794 + - severity: warning + message: 1795 + - severity: warning + message: 1796 + - severity: warning + message: 1797 + - severity: warning + message: 1798 + - severity: warning + message: 1799 + - severity: warning + message: 1800 + - severity: warning + message: 1801 + - severity: warning + message: 1802 + - severity: warning + message: 1803 + - severity: warning + message: 1804 + - severity: warning + message: 1805 + - severity: warning + message: 1806 + - severity: warning + message: 1807 + - severity: warning + message: 1808 + - severity: warning + message: 1809 + - severity: warning + message: 1810 + - severity: warning + message: 1811 + - severity: warning + message: 1812 + - severity: warning + message: 1813 + - severity: warning + message: 1814 + - severity: warning + message: 1815 + - severity: warning + message: 1816 + - severity: warning + message: 1817 + - severity: warning + message: 1818 + - severity: warning + message: 1819 + - severity: warning + message: 1820 + - severity: warning + message: 1821 + - severity: warning + message: 1822 + - severity: warning + message: 1823 + - severity: warning + message: 1824 + - severity: warning + message: 1825 + - severity: warning + message: 1826 + - severity: warning + message: 1827 + - severity: warning + message: 1828 + - severity: warning + message: 1829 + - severity: warning + message: 1830 + - severity: warning + message: 1831 + - severity: warning + message: 1832 + - severity: warning + message: 1833 + - severity: warning + message: 1834 + - severity: warning + message: 1835 + - severity: warning + message: 1836 + - severity: warning + message: 1837 + - severity: warning + message: 1838 + - severity: warning + message: 1839 + - severity: warning + message: 1840 + - severity: warning + message: 1841 + - severity: warning + message: 1842 + - severity: warning + message: 1843 + - severity: warning + message: 1844 + - severity: warning + message: 1845 + - severity: warning + message: 1846 + - severity: warning + message: 1847 + - severity: warning + message: 1848 + - severity: warning + message: 1849 + - severity: warning + message: 1850 + - severity: warning + message: 1851 + - severity: warning + message: 1852 + - severity: warning + message: 1853 + - severity: warning + message: 1854 + - severity: warning + message: 1855 + - severity: warning + message: 1856 + - severity: warning + message: 1857 + - severity: warning + message: 1858 + - severity: warning + message: 1859 + - severity: warning + message: 1860 + - severity: warning + message: 1861 + - severity: warning + message: 1862 + - severity: warning + message: 1863 + - severity: warning + message: 1864 + - severity: warning + message: 1865 + - severity: warning + message: 1866 + - severity: warning + message: 1867 + - severity: warning + message: 1868 + - severity: warning + message: 1869 + - severity: warning + message: 1870 + - severity: warning + message: 1871 + - severity: warning + message: 1872 + - severity: warning + message: 1873 + - severity: warning + message: 1874 + - severity: warning + message: 1875 + - severity: warning + message: 1876 + - severity: warning + message: 1877 + - severity: warning + message: 1878 + - severity: warning + message: 1879 + - severity: warning + message: 1880 + - severity: warning + message: 1881 + - severity: warning + message: 1882 + - severity: warning + message: 1883 + - severity: warning + message: 1884 + - severity: warning + message: 1885 + - severity: warning + message: 1886 + - severity: warning + message: 1887 + - severity: warning + message: 1888 + - severity: warning + message: 1889 + - severity: warning + message: 1890 + - severity: warning + message: 1891 + - severity: warning + message: 1892 + - severity: warning + message: 1893 + - severity: warning + message: 1894 + - severity: warning + message: 1895 + - severity: warning + message: 1896 + - severity: warning + message: 1897 + - severity: warning + message: 1898 + - severity: warning + message: 1899 + - severity: warning + message: 1900 + - severity: warning + message: 1901 + - severity: warning + message: 1902 + - severity: warning + message: 1903 + - severity: warning + message: 1904 + - severity: warning + message: 1905 + - severity: warning + message: 1906 + - severity: warning + message: 1907 + - severity: warning + message: 1908 + - severity: warning + message: 1909 + - severity: warning + message: 1910 + - severity: warning + message: 1911 + - severity: warning + message: 1912 + - severity: warning + message: 1913 + - severity: warning + message: 1914 + - severity: warning + message: 1915 + - severity: warning + message: 1916 + - severity: warning + message: 1917 + - severity: warning + message: 1918 + - severity: warning + message: 1919 + - severity: warning + message: 1920 + - severity: warning + message: 1921 + - severity: warning + message: 1922 + - severity: warning + message: 1923 + - severity: warning + message: 1924 + - severity: warning + message: 1925 + - severity: warning + message: 1926 + - severity: warning + message: 1927 + - severity: warning + message: 1928 + - severity: warning + message: 1929 + - severity: warning + message: 1930 + - severity: warning + message: 1931 + - severity: warning + message: 1932 + - severity: warning + message: 1933 + - severity: warning + message: 1934 + - severity: warning + message: 1935 + - severity: warning + message: 1936 + - severity: warning + message: 1937 + - severity: warning + message: 1938 + - severity: warning + message: 1939 + - severity: warning + message: 1940 + - severity: warning + message: 1941 + - severity: warning + message: 1942 + - severity: warning + message: 1943 + - severity: warning + message: 1944 + - severity: warning + message: 1945 + - severity: warning + message: 1946 + - severity: warning + message: 1947 + - severity: warning + message: 1948 + - severity: warning + message: 1949 + - severity: warning + message: 1950 + - severity: warning + message: 1951 + - severity: warning + message: 1952 + - severity: warning + message: 1953 + - severity: warning + message: 1954 + - severity: warning + message: 1955 + - severity: warning + message: 1956 + - severity: warning + message: 1957 + - severity: warning + message: 1958 + - severity: warning + message: 1959 + - severity: warning + message: 1960 + - severity: warning + message: 1961 + - severity: warning + message: 1962 + - severity: warning + message: 1963 + - severity: warning + message: 1964 + - severity: warning + message: 1965 + - severity: warning + message: 1966 + - severity: warning + message: 1967 + - severity: warning + message: 1968 + - severity: warning + message: 1969 + - severity: warning + message: 1970 + - severity: warning + message: 1971 + - severity: warning + message: 1972 + - severity: warning + message: 1973 + - severity: warning + message: 1974 + - severity: warning + message: 1975 + - severity: warning + message: 1976 + - severity: warning + message: 1977 + - severity: warning + message: 1978 + - severity: warning + message: 1979 + - severity: warning + message: 1980 + - severity: warning + message: 1981 + - severity: warning + message: 1982 + - severity: warning + message: 1983 + - severity: warning + message: 1984 + - severity: warning + message: 1985 + - severity: warning + message: 1986 + - severity: warning + message: 1987 + - severity: warning + message: 1988 + - severity: warning + message: 1989 + - severity: warning + message: 1990 + - severity: warning + message: 1991 + - severity: warning + message: 1992 + - severity: warning + message: 1993 + - severity: warning + message: 1994 + - severity: warning + message: 1995 + - severity: warning + message: 1996 + - severity: warning + message: 1997 + - severity: warning + message: 1998 + - severity: warning + message: 1999 + - severity: warning + message: 2000 + ... ok 3 - cleanupTestCase() 1..3 # tests 3 diff --git a/tests/auto/testlib/selftests/expected_mouse.junitxml b/tests/auto/testlib/selftests/expected_mouse.junitxml index 0664ab3a34..8b0b7b2da5 100644 --- a/tests/auto/testlib/selftests/expected_mouse.junitxml +++ b/tests/auto/testlib/selftests/expected_mouse.junitxml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<testsuite name="tst_Mouse" timestamp="@TEST_START_TIME@" hostname="@HOSTNAME@" tests="13" failures="0" errors="0" skipped="3" time="@TEST_DURATION@"> +<testsuite name="tst_Mouse" timestamp="@TEST_START_TIME@" hostname="@HOSTNAME@" tests="14" failures="0" errors="0" skipped="3" time="@TEST_DURATION@"> <properties> <property name="QTestVersion" value="@INSERT_QT_VERSION_HERE@"/> <property name="QtVersion" value="@INSERT_QT_VERSION_HERE@"/> @@ -23,5 +23,6 @@ <testcase name="deterministicEvents(first-run-false)" classname="tst_Mouse" time="@TEST_DURATION@"> <skipped message="Not implemented!"/> </testcase> + <testcase name="doubleClick" classname="tst_Mouse" time="@TEST_DURATION@"/> <testcase name="cleanupTestCase" classname="tst_Mouse" time="@TEST_DURATION@"/> </testsuite> diff --git a/tests/auto/testlib/selftests/expected_mouse.lightxml b/tests/auto/testlib/selftests/expected_mouse.lightxml index ed125d9b68..fd6b9a8218 100644 --- a/tests/auto/testlib/selftests/expected_mouse.lightxml +++ b/tests/auto/testlib/selftests/expected_mouse.lightxml @@ -54,6 +54,10 @@ </Incident> <Duration msecs="0"/> </TestFunction> + <TestFunction name="doubleClick"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> <TestFunction name="cleanupTestCase"> <Incident type="pass" file="" line="0" /> <Duration msecs="0"/> diff --git a/tests/auto/testlib/selftests/expected_mouse.tap b/tests/auto/testlib/selftests/expected_mouse.tap index a91b5b4da2..a2ba671bf4 100644 --- a/tests/auto/testlib/selftests/expected_mouse.tap +++ b/tests/auto/testlib/selftests/expected_mouse.tap @@ -12,8 +12,9 @@ ok 9 - stateHandlingPart1(dummy-2) ok 10 - stateHandlingPart2() # SKIP Not implemented beyond this point! ok 11 - deterministicEvents(first-run-true) # SKIP Not implemented! ok 12 - deterministicEvents(first-run-false) # SKIP Not implemented! -ok 13 - cleanupTestCase() -1..13 -# tests 13 -# pass 10 +ok 13 - doubleClick() +ok 14 - cleanupTestCase() +1..14 +# tests 14 +# pass 11 # fail 0 diff --git a/tests/auto/testlib/selftests/expected_mouse.teamcity b/tests/auto/testlib/selftests/expected_mouse.teamcity index 371bd49626..44c03ce6d7 100644 --- a/tests/auto/testlib/selftests/expected_mouse.teamcity +++ b/tests/auto/testlib/selftests/expected_mouse.teamcity @@ -26,6 +26,8 @@ ##teamcity[testStarted name='deterministicEvents(first-run-false)' flowId='tst_Mouse'] ##teamcity[testIgnored name='deterministicEvents(first-run-false)' message='Not implemented! |[Loc: qtbase/tests/auto/testlib/selftests/mouse/tst_mouse.cpp(0)|]' flowId='tst_Mouse'] ##teamcity[testFinished name='deterministicEvents(first-run-false)' flowId='tst_Mouse'] +##teamcity[testStarted name='doubleClick()' flowId='tst_Mouse'] +##teamcity[testFinished name='doubleClick()' flowId='tst_Mouse'] ##teamcity[testStarted name='cleanupTestCase()' flowId='tst_Mouse'] ##teamcity[testFinished name='cleanupTestCase()' flowId='tst_Mouse'] ##teamcity[testSuiteFinished name='tst_Mouse' flowId='tst_Mouse'] diff --git a/tests/auto/testlib/selftests/expected_mouse.txt b/tests/auto/testlib/selftests/expected_mouse.txt index 660b4f47a4..9fe927062d 100644 --- a/tests/auto/testlib/selftests/expected_mouse.txt +++ b/tests/auto/testlib/selftests/expected_mouse.txt @@ -15,6 +15,7 @@ SKIP : tst_Mouse::deterministicEvents(first-run-true) Not implemented! Loc: [qtbase/tests/auto/testlib/selftests/mouse/tst_mouse.cpp(0)] SKIP : tst_Mouse::deterministicEvents(first-run-false) Not implemented! Loc: [qtbase/tests/auto/testlib/selftests/mouse/tst_mouse.cpp(0)] +PASS : tst_Mouse::doubleClick() PASS : tst_Mouse::cleanupTestCase() -Totals: 10 passed, 0 failed, 3 skipped, 0 blacklisted, 0ms +Totals: 11 passed, 0 failed, 3 skipped, 0 blacklisted, 0ms ********* Finished testing of tst_Mouse ********* diff --git a/tests/auto/testlib/selftests/expected_mouse.xml b/tests/auto/testlib/selftests/expected_mouse.xml index 26bde614ce..b532534049 100644 --- a/tests/auto/testlib/selftests/expected_mouse.xml +++ b/tests/auto/testlib/selftests/expected_mouse.xml @@ -56,6 +56,10 @@ </Incident> <Duration msecs="0"/> </TestFunction> + <TestFunction name="doubleClick"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> <TestFunction name="cleanupTestCase"> <Incident type="pass" file="" line="0" /> <Duration msecs="0"/> diff --git a/tests/auto/testlib/selftests/expected_signaldumper.tap b/tests/auto/testlib/selftests/expected_signaldumper.tap index 4e0ae0bf4f..45de4ce20e 100644 --- a/tests/auto/testlib/selftests/expected_signaldumper.tap +++ b/tests/auto/testlib/selftests/expected_signaldumper.tap @@ -1,149 +1,149 @@ TAP version 13 # tst_Signaldumper ok 1 - initTestCase() -# Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) ok 2 - noConnections() -# Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) ok 3 - oneSlot(direct) -# Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () ok 4 - oneSlot(queued) -# Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () -# Slot: SignalSlotClass(_POINTER_) slotWithoutParameters() -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Slot: SignalSlotClass(_POINTER_) slotWithParameters(int,char) -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Slot: SignalSlotClass(_POINTER_) slotWithoutParameters() -# Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () ok 5 - oneSlotOldSyntax(direct) -# Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () + # inform: Slot: SignalSlotClass(_POINTER_) slotWithoutParameters() + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Slot: SignalSlotClass(_POINTER_) slotWithParameters(int,char) + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Slot: SignalSlotClass(_POINTER_) slotWithoutParameters() + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () ok 6 - oneSlotOldSyntax(queued) -# Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () ok 7 - twoSlots(direct) -# Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () ok 8 - twoSlots(queued) -# Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () -# Slot: SignalSlotClass(_POINTER_) slotWithoutParameters() -# Slot: SignalSlotClass(_POINTER_) slotWithoutParameters() -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Slot: SignalSlotClass(_POINTER_) slotWithParameters(int,char) -# Slot: SignalSlotClass(_POINTER_) slotWithParameters(int,char) -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Slot: SignalSlotClass(_POINTER_) slotWithoutParameters() -# Slot: SignalSlotClass(_POINTER_) slotWithoutParameters() -# Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () ok 9 - twoSlotsOldSyntax(direct) -# Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () + # inform: Slot: SignalSlotClass(_POINTER_) slotWithoutParameters() + # inform: Slot: SignalSlotClass(_POINTER_) slotWithoutParameters() + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Slot: SignalSlotClass(_POINTER_) slotWithParameters(int,char) + # inform: Slot: SignalSlotClass(_POINTER_) slotWithParameters(int,char) + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Slot: SignalSlotClass(_POINTER_) slotWithoutParameters() + # inform: Slot: SignalSlotClass(_POINTER_) slotWithoutParameters() + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () ok 10 - twoSlotsOldSyntax(queued) -# Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () -# Signal: SignalSlotClass(_POINTER_) nestedSignal () -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Signal: SignalSlotClass(_POINTER_) nestedSignalWithParameters (int(242), char(m)) -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Signal: SignalSlotClass(_POINTER_) nestedSignal () -# Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () ok 11 - signalForwarding(direct) -# Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) nestedSignal () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) nestedSignalWithParameters (int(242), char(m)) -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) nestedSignal () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () + # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Signal: SignalSlotClass(_POINTER_) nestedSignalWithParameters (int(242), char(m)) + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () ok 12 - signalForwarding(queued) -# Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () -# Slot: SignalSlotClass(_POINTER_) nestedSignal() -# Signal: SignalSlotClass(_POINTER_) nestedSignal () -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Slot: SignalSlotClass(_POINTER_) nestedSignalWithParameters(int,char) -# Signal: SignalSlotClass(_POINTER_) nestedSignalWithParameters (int(242), char(m)) -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Slot: SignalSlotClass(_POINTER_) nestedSignal() -# Signal: SignalSlotClass(_POINTER_) nestedSignal () -# Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) nestedSignalWithParameters (int(242), char(m)) + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () ok 13 - signalForwardingOldSyntax(direct) -# Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) nestedSignal () -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) nestedSignalWithParameters (int(242), char(m)) -# Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) nestedSignal () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () + # inform: Slot: SignalSlotClass(_POINTER_) nestedSignal() + # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Slot: SignalSlotClass(_POINTER_) nestedSignalWithParameters(int,char) + # inform: Signal: SignalSlotClass(_POINTER_) nestedSignalWithParameters (int(242), char(m)) + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Slot: SignalSlotClass(_POINTER_) nestedSignal() + # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () ok 14 - signalForwardingOldSyntax(queued) -# Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () -# Signal: SignalSlotClass(_POINTER_) nestedSignal () -# Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) nestedSignalWithParameters (int(242), char(m)) + # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () ok 15 - slotEmittingSignal(direct) -# Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) nestedSignal () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () + # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () ok 16 - slotEmittingSignal(queued) -# Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () -# Slot: SignalSlotClass(_POINTER_) emitSecondSignal() -# Signal: SignalSlotClass(_POINTER_) nestedSignal () -# Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () ok 17 - slotEmittingSignalOldSyntax(direct) -# Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () -# Signal: QEventDispatcherPlatform(_POINTER_) awake () -# Signal: SignalSlotClass(_POINTER_) nestedSignal () + # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () + # inform: Slot: SignalSlotClass(_POINTER_) emitSecondSignal() + # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () ok 18 - slotEmittingSignalOldSyntax(queued) -# Signal: SignalSlotClass(_POINTER_) qStringSignal (QString(Test string)) -# Signal: SignalSlotClass(_POINTER_) qStringRefSignal ((QString&)@_POINTER_) -# Signal: SignalSlotClass(_POINTER_) qStringConstRefSignal (QString(Test string)) -# Signal: SignalSlotClass(_POINTER_) qByteArraySignal (QByteArray(Test bytearray)) -# Signal: SignalSlotClass(_POINTER_) qListSignal (QList<int>()) -# Signal: SignalSlotClass(_POINTER_) qVectorSignal (QList<int>()) -# Signal: SignalSlotClass(_POINTER_) qVectorRefSignal ((QList<int>&)@_POINTER_) -# Signal: SignalSlotClass(_POINTER_) qVectorConstRefSignal (QList<int>()) -# Signal: SignalSlotClass(_POINTER_) qVectorConstPointerSignal ((const QList<int>*)_POINTER_) -# Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ((QList<int>*)_POINTER_) -# Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant()) -# Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant()) + # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () + # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () + # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () ok 19 - variousTypes() -# Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () + # inform: Signal: SignalSlotClass(_POINTER_) qStringSignal (QString(Test string)) + # inform: Signal: SignalSlotClass(_POINTER_) qStringRefSignal ((QString&)@_POINTER_) + # inform: Signal: SignalSlotClass(_POINTER_) qStringConstRefSignal (QString(Test string)) + # inform: Signal: SignalSlotClass(_POINTER_) qByteArraySignal (QByteArray(Test bytearray)) + # inform: Signal: SignalSlotClass(_POINTER_) qListSignal (QList<int>()) + # inform: Signal: SignalSlotClass(_POINTER_) qVectorSignal (QList<int>()) + # inform: Signal: SignalSlotClass(_POINTER_) qVectorRefSignal ((QList<int>&)@_POINTER_) + # inform: Signal: SignalSlotClass(_POINTER_) qVectorConstRefSignal (QList<int>()) + # inform: Signal: SignalSlotClass(_POINTER_) qVectorConstPointerSignal ((const QList<int>*)_POINTER_) + # inform: Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ((QList<int>*)_POINTER_) + # inform: Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant()) + # inform: Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant()) ok 20 - deletingSender() + # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () ok 21 - cleanupTestCase() 1..21 # tests 21 diff --git a/tests/auto/testlib/selftests/expected_silent.txt b/tests/auto/testlib/selftests/expected_silent.txt index 127e39a6c1..6c9b71a835 100644 --- a/tests/auto/testlib/selftests/expected_silent.txt +++ b/tests/auto/testlib/selftests/expected_silent.txt @@ -5,7 +5,4 @@ FAIL! : tst_Silent::fail() 'false' returned FALSE. (This test should fail) Loc: [qtbase/tests/auto/testlib/selftests/silent/tst_silent.cpp(0)] XPASS : tst_Silent::xpass() 'true' returned TRUE unexpectedly. (This test should XPASS) Loc: [qtbase/tests/auto/testlib/selftests/silent/tst_silent.cpp(0)] -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: [qtbase/tests/auto/testlib/selftests/silent/tst_silent.cpp(0)] -Totals: 3 passed, 3 failed, 1 skipped, 0 blacklisted, 0ms +Totals: 5 passed, 2 failed, 1 skipped, 0 blacklisted, 0ms diff --git a/tests/auto/testlib/selftests/expected_silent_fatal.txt b/tests/auto/testlib/selftests/expected_silent_fatal.txt new file mode 100644 index 0000000000..fb00066c13 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_silent_fatal.txt @@ -0,0 +1,5 @@ +Testing tst_SilentFatal +QFATAL : tst_SilentFatal::fatalmessages() This is a fatal error message that should still appear in silent test output +FAIL! : tst_SilentFatal::fatalmessages() Received a fatal error. + Loc: [qtbase/tests/auto/testlib/selftests/silent_fatal/tst_silent_fatal.cpp(0)] +Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted, 0ms diff --git a/tests/auto/testlib/selftests/expected_skip.tap b/tests/auto/testlib/selftests/expected_skip.tap index adf9f692a9..9595e0eb05 100644 --- a/tests/auto/testlib/selftests/expected_skip.tap +++ b/tests/auto/testlib/selftests/expected_skip.tap @@ -4,8 +4,13 @@ ok 1 - initTestCase() ok 2 - test() # SKIP skipping all ok 3 - emptytest() # SKIP skipping all ok 4 - singleSkip(local 1) # SKIP skipping one -# this line should only be reached once (true) ok 5 - singleSkip(local 2) + --- + extensions: + messages: + - severity: debug + message: this line should only be reached once (true) + ... ok 6 - cleanupTestCase() 1..6 # tests 6 diff --git a/tests/auto/testlib/selftests/expected_skipblacklisted.junitxml b/tests/auto/testlib/selftests/expected_skipblacklisted.junitxml new file mode 100644 index 0000000000..308a4ea999 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_skipblacklisted.junitxml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<testsuite name="tst_SkipBlacklisted" timestamp="@TEST_START_TIME@" hostname="@HOSTNAME@" tests="5" failures="0" errors="0" skipped="3" time="@TEST_DURATION@"> + <properties> + <property name="QTestVersion" value="@INSERT_QT_VERSION_HERE@"/> + <property name="QtVersion" value="@INSERT_QT_VERSION_HERE@"/> + <property name="QtBuild" value=""/> + </properties> + <testcase name="initTestCase" classname="tst_SkipBlacklisted" time="@TEST_DURATION@"/> + <testcase name="pass" classname="tst_SkipBlacklisted" time="@TEST_DURATION@"/> + <testcase name="blacklisted" classname="tst_SkipBlacklisted" time="@TEST_DURATION@"> + <skipped message="Skipping blacklisted test since -skipblacklisted option is set."/> + </testcase> + <testcase name="blacklistedData(should pass)" classname="tst_SkipBlacklisted" time="@TEST_DURATION@"> + <skipped message="Skipping blacklisted test since -skipblacklisted option is set."/> + <skipped message="Skipping blacklisted test since -skipblacklisted option is set."/> + </testcase> + <testcase name="cleanupTestCase" classname="tst_SkipBlacklisted" time="@TEST_DURATION@"/> +</testsuite> diff --git a/tests/auto/testlib/selftests/expected_skipblacklisted.lightxml b/tests/auto/testlib/selftests/expected_skipblacklisted.lightxml new file mode 100644 index 0000000000..45d3476d6a --- /dev/null +++ b/tests/auto/testlib/selftests/expected_skipblacklisted.lightxml @@ -0,0 +1,36 @@ + <Environment> + <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> + <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> + </Environment> + <TestFunction name="initTestCase"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="pass"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="blacklisted"> + <Incident type="skip" file="" line="0"> + <Description><![CDATA[Skipping blacklisted test since -skipblacklisted option is set.]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="blacklistedData"> + <Incident type="skip" file="" line="0"> + <Description><![CDATA[Skipping blacklisted test since -skipblacklisted option is set.]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[should pass]]></DataTag> + </Incident> + <Incident type="skip" file="" line="0"> + <Description><![CDATA[Skipping blacklisted test since -skipblacklisted option is set.]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="cleanupTestCase"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <Duration msecs="0"/> diff --git a/tests/auto/testlib/selftests/expected_skipblacklisted.tap b/tests/auto/testlib/selftests/expected_skipblacklisted.tap new file mode 100644 index 0000000000..f71524d85f --- /dev/null +++ b/tests/auto/testlib/selftests/expected_skipblacklisted.tap @@ -0,0 +1,13 @@ +TAP version 13 +# tst_SkipBlacklisted +ok 1 - initTestCase() +ok 2 - pass() +ok 3 - blacklisted() # SKIP Skipping blacklisted test since -skipblacklisted option is set. +ok 4 - blacklistedData() # SKIP Skipping blacklisted test since -skipblacklisted option is set. +ok 5 - blacklistedData(should pass) +ok 6 - blacklistedData() # SKIP Skipping blacklisted test since -skipblacklisted option is set. +ok 7 - cleanupTestCase() +1..7 +# tests 7 +# pass 4 +# fail 0 diff --git a/tests/auto/testlib/selftests/expected_skipblacklisted.teamcity b/tests/auto/testlib/selftests/expected_skipblacklisted.teamcity new file mode 100644 index 0000000000..67a788901a --- /dev/null +++ b/tests/auto/testlib/selftests/expected_skipblacklisted.teamcity @@ -0,0 +1,19 @@ +##teamcity[testSuiteStarted name='tst_SkipBlacklisted' flowId='tst_SkipBlacklisted'] +##teamcity[testStarted name='initTestCase()' flowId='tst_SkipBlacklisted'] +##teamcity[testFinished name='initTestCase()' flowId='tst_SkipBlacklisted'] +##teamcity[testStarted name='pass()' flowId='tst_SkipBlacklisted'] +##teamcity[testFinished name='pass()' flowId='tst_SkipBlacklisted'] +##teamcity[testStarted name='blacklisted()' flowId='tst_SkipBlacklisted'] +##teamcity[testIgnored name='blacklisted()' message='Skipping blacklisted test since -skipblacklisted option is set.' flowId='tst_SkipBlacklisted'] +##teamcity[testFinished name='blacklisted()' flowId='tst_SkipBlacklisted'] +##teamcity[testStarted name='blacklistedData()' flowId='tst_SkipBlacklisted'] +##teamcity[testIgnored name='blacklistedData()' message='Skipping blacklisted test since -skipblacklisted option is set.' flowId='tst_SkipBlacklisted'] +##teamcity[testFinished name='blacklistedData()' flowId='tst_SkipBlacklisted'] +##teamcity[testStarted name='blacklistedData(should pass)' flowId='tst_SkipBlacklisted'] +##teamcity[testFinished name='blacklistedData(should pass)' flowId='tst_SkipBlacklisted'] +##teamcity[testStarted name='blacklistedData()' flowId='tst_SkipBlacklisted'] +##teamcity[testIgnored name='blacklistedData()' message='Skipping blacklisted test since -skipblacklisted option is set.' flowId='tst_SkipBlacklisted'] +##teamcity[testFinished name='blacklistedData()' flowId='tst_SkipBlacklisted'] +##teamcity[testStarted name='cleanupTestCase()' flowId='tst_SkipBlacklisted'] +##teamcity[testFinished name='cleanupTestCase()' flowId='tst_SkipBlacklisted'] +##teamcity[testSuiteFinished name='tst_SkipBlacklisted' flowId='tst_SkipBlacklisted'] diff --git a/tests/auto/testlib/selftests/expected_skipblacklisted.txt b/tests/auto/testlib/selftests/expected_skipblacklisted.txt new file mode 100644 index 0000000000..0e3dfa04e8 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_skipblacklisted.txt @@ -0,0 +1,11 @@ +********* Start testing of tst_SkipBlacklisted ********* +Config: Using QtTest library +PASS : tst_SkipBlacklisted::initTestCase() +PASS : tst_SkipBlacklisted::pass() +SKIP : tst_SkipBlacklisted::blacklisted() Skipping blacklisted test since -skipblacklisted option is set. +SKIP : tst_SkipBlacklisted::blacklistedData() Skipping blacklisted test since -skipblacklisted option is set. +PASS : tst_SkipBlacklisted::blacklistedData(should pass) +SKIP : tst_SkipBlacklisted::blacklistedData() Skipping blacklisted test since -skipblacklisted option is set. +PASS : tst_SkipBlacklisted::cleanupTestCase() +Totals: 4 passed, 0 failed, 3 skipped, 0 blacklisted, 0ms +********* Finished testing of tst_SkipBlacklisted ********* diff --git a/tests/auto/testlib/selftests/expected_skipblacklisted.xml b/tests/auto/testlib/selftests/expected_skipblacklisted.xml new file mode 100644 index 0000000000..100fededb3 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_skipblacklisted.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<TestCase name="tst_SkipBlacklisted"> + <Environment> + <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> + <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> + </Environment> + <TestFunction name="initTestCase"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="pass"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="blacklisted"> + <Incident type="skip" file="" line="0"> + <Description><![CDATA[Skipping blacklisted test since -skipblacklisted option is set.]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="blacklistedData"> + <Incident type="skip" file="" line="0"> + <Description><![CDATA[Skipping blacklisted test since -skipblacklisted option is set.]]></Description> + </Incident> + <Incident type="pass" file="" line="0"> + <DataTag><![CDATA[should pass]]></DataTag> + </Incident> + <Incident type="skip" file="" line="0"> + <Description><![CDATA[Skipping blacklisted test since -skipblacklisted option is set.]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="cleanupTestCase"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <Duration msecs="0"/> +</TestCase> diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.junitxml b/tests/auto/testlib/selftests/expected_skipcleanup.junitxml index 88a5c250ff..5ef20a0b2e 100644 --- a/tests/auto/testlib/selftests/expected_skipcleanup.junitxml +++ b/tests/auto/testlib/selftests/expected_skipcleanup.junitxml @@ -6,8 +6,8 @@ <property name="QtBuild" value=""/> </properties> <testcase name="initTestCase" classname="tst_SkipCleanup" time="@TEST_DURATION@"/> - <testcase name="aTestFunction" classname="tst_SkipCleanup" time="@TEST_DURATION@"/> - <testcase name="cleanupTestCase" classname="tst_SkipCleanup" time="@TEST_DURATION@"> - <skipped message="Skip inside cleanupTestCase."/> + <testcase name="aTestFunction" classname="tst_SkipCleanup" time="@TEST_DURATION@"> + <skipped message="Skip inside cleanup."/> </testcase> + <testcase name="cleanupTestCase" classname="tst_SkipCleanup" time="@TEST_DURATION@"/> </testsuite> diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.lightxml b/tests/auto/testlib/selftests/expected_skipcleanup.lightxml index f2f8330bbc..c97f125227 100644 --- a/tests/auto/testlib/selftests/expected_skipcleanup.lightxml +++ b/tests/auto/testlib/selftests/expected_skipcleanup.lightxml @@ -8,13 +8,13 @@ <Duration msecs="0"/> </TestFunction> <TestFunction name="aTestFunction"> - <Incident type="pass" file="" line="0" /> + <Incident type="skip" file="qtbase/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp" line="0"> + <Description><![CDATA[Skip inside cleanup.]]></Description> + </Incident> <Duration msecs="0"/> </TestFunction> <TestFunction name="cleanupTestCase"> - <Incident type="skip" file="qtbase/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp" line="0"> - <Description><![CDATA[Skip inside cleanupTestCase.]]></Description> - </Incident> + <Incident type="pass" file="" line="0" /> <Duration msecs="0"/> </TestFunction> <Duration msecs="0"/> diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.tap b/tests/auto/testlib/selftests/expected_skipcleanup.tap index 4a3f8f852c..36d979a84a 100644 --- a/tests/auto/testlib/selftests/expected_skipcleanup.tap +++ b/tests/auto/testlib/selftests/expected_skipcleanup.tap @@ -1,8 +1,8 @@ TAP version 13 # tst_SkipCleanup ok 1 - initTestCase() -ok 2 - aTestFunction() -ok 3 - cleanupTestCase() # SKIP Skip inside cleanupTestCase. +ok 2 - aTestFunction() # SKIP Skip inside cleanup. +ok 3 - cleanupTestCase() 1..3 # tests 3 # pass 2 diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.teamcity b/tests/auto/testlib/selftests/expected_skipcleanup.teamcity index bdc3c0f70a..b5c3709193 100644 --- a/tests/auto/testlib/selftests/expected_skipcleanup.teamcity +++ b/tests/auto/testlib/selftests/expected_skipcleanup.teamcity @@ -2,8 +2,8 @@ ##teamcity[testStarted name='initTestCase()' flowId='tst_SkipCleanup'] ##teamcity[testFinished name='initTestCase()' flowId='tst_SkipCleanup'] ##teamcity[testStarted name='aTestFunction()' flowId='tst_SkipCleanup'] +##teamcity[testIgnored name='aTestFunction()' message='Skip inside cleanup. |[Loc: qtbase/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp(0)|]' flowId='tst_SkipCleanup'] ##teamcity[testFinished name='aTestFunction()' flowId='tst_SkipCleanup'] ##teamcity[testStarted name='cleanupTestCase()' flowId='tst_SkipCleanup'] -##teamcity[testIgnored name='cleanupTestCase()' message='Skip inside cleanupTestCase. |[Loc: qtbase/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp(0)|]' flowId='tst_SkipCleanup'] ##teamcity[testFinished name='cleanupTestCase()' flowId='tst_SkipCleanup'] ##teamcity[testSuiteFinished name='tst_SkipCleanup' flowId='tst_SkipCleanup'] diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.txt b/tests/auto/testlib/selftests/expected_skipcleanup.txt index 987e2b9a14..c1bd95e5a9 100644 --- a/tests/auto/testlib/selftests/expected_skipcleanup.txt +++ b/tests/auto/testlib/selftests/expected_skipcleanup.txt @@ -1,8 +1,8 @@ ********* Start testing of tst_SkipCleanup ********* Config: Using QtTest library PASS : tst_SkipCleanup::initTestCase() -PASS : tst_SkipCleanup::aTestFunction() -SKIP : tst_SkipCleanup::cleanupTestCase() Skip inside cleanupTestCase. +SKIP : tst_SkipCleanup::aTestFunction() Skip inside cleanup. Loc: [qtbase/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp(0)] +PASS : tst_SkipCleanup::cleanupTestCase() Totals: 2 passed, 0 failed, 1 skipped, 0 blacklisted, 0ms ********* Finished testing of tst_SkipCleanup ********* diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.xml b/tests/auto/testlib/selftests/expected_skipcleanup.xml index 77bf028b12..d839a69d8f 100644 --- a/tests/auto/testlib/selftests/expected_skipcleanup.xml +++ b/tests/auto/testlib/selftests/expected_skipcleanup.xml @@ -10,13 +10,13 @@ <Duration msecs="0"/> </TestFunction> <TestFunction name="aTestFunction"> - <Incident type="pass" file="" line="0" /> + <Incident type="skip" file="qtbase/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp" line="0"> + <Description><![CDATA[Skip inside cleanup.]]></Description> + </Incident> <Duration msecs="0"/> </TestFunction> <TestFunction name="cleanupTestCase"> - <Incident type="skip" file="qtbase/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp" line="0"> - <Description><![CDATA[Skip inside cleanupTestCase.]]></Description> - </Incident> + <Incident type="pass" file="" line="0" /> <Duration msecs="0"/> </TestFunction> <Duration msecs="0"/> diff --git a/tests/auto/testlib/selftests/expected_skipcleanuptestcase.junitxml b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.junitxml new file mode 100644 index 0000000000..6e1e10b2b2 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.junitxml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<testsuite name="tst_SkipCleanupTestCase" timestamp="@TEST_START_TIME@" hostname="@HOSTNAME@" tests="3" failures="0" errors="0" skipped="1" time="@TEST_DURATION@"> + <properties> + <property name="QTestVersion" value="@INSERT_QT_VERSION_HERE@"/> + <property name="QtVersion" value="@INSERT_QT_VERSION_HERE@"/> + <property name="QtBuild" value=""/> + </properties> + <testcase name="initTestCase" classname="tst_SkipCleanupTestCase" time="@TEST_DURATION@"/> + <testcase name="aTestFunction" classname="tst_SkipCleanupTestCase" time="@TEST_DURATION@"/> + <testcase name="cleanupTestCase" classname="tst_SkipCleanupTestCase" time="@TEST_DURATION@"> + <skipped message="Skip inside cleanupTestCase."/> + </testcase> +</testsuite> diff --git a/tests/auto/testlib/selftests/expected_skipcleanuptestcase.lightxml b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.lightxml new file mode 100644 index 0000000000..29fa9ff602 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.lightxml @@ -0,0 +1,20 @@ + <Environment> + <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> + <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> + </Environment> + <TestFunction name="initTestCase"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="aTestFunction"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="cleanupTestCase"> + <Incident type="skip" file="qtbase/tests/auto/testlib/selftests/skipcleanuptestcase/tst_skipcleanuptestcase.cpp" line="0"> + <Description><![CDATA[Skip inside cleanupTestCase.]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <Duration msecs="0"/> diff --git a/tests/auto/testlib/selftests/expected_skipcleanuptestcase.tap b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.tap new file mode 100644 index 0000000000..ee3d720d22 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.tap @@ -0,0 +1,9 @@ +TAP version 13 +# tst_SkipCleanupTestCase +ok 1 - initTestCase() +ok 2 - aTestFunction() +ok 3 - cleanupTestCase() # SKIP Skip inside cleanupTestCase. +1..3 +# tests 3 +# pass 2 +# fail 0 diff --git a/tests/auto/testlib/selftests/expected_skipcleanuptestcase.teamcity b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.teamcity new file mode 100644 index 0000000000..6a7e6bc379 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.teamcity @@ -0,0 +1,9 @@ +##teamcity[testSuiteStarted name='tst_SkipCleanupTestCase' flowId='tst_SkipCleanupTestCase'] +##teamcity[testStarted name='initTestCase()' flowId='tst_SkipCleanupTestCase'] +##teamcity[testFinished name='initTestCase()' flowId='tst_SkipCleanupTestCase'] +##teamcity[testStarted name='aTestFunction()' flowId='tst_SkipCleanupTestCase'] +##teamcity[testFinished name='aTestFunction()' flowId='tst_SkipCleanupTestCase'] +##teamcity[testStarted name='cleanupTestCase()' flowId='tst_SkipCleanupTestCase'] +##teamcity[testIgnored name='cleanupTestCase()' message='Skip inside cleanupTestCase. |[Loc: qtbase/tests/auto/testlib/selftests/skipcleanuptestcase/tst_skipcleanuptestcase.cpp(0)|]' flowId='tst_SkipCleanupTestCase'] +##teamcity[testFinished name='cleanupTestCase()' flowId='tst_SkipCleanupTestCase'] +##teamcity[testSuiteFinished name='tst_SkipCleanupTestCase' flowId='tst_SkipCleanupTestCase'] diff --git a/tests/auto/testlib/selftests/expected_skipcleanuptestcase.txt b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.txt new file mode 100644 index 0000000000..4dc50dca7f --- /dev/null +++ b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.txt @@ -0,0 +1,8 @@ +********* Start testing of tst_SkipCleanupTestCase ********* +Config: Using QtTest library +PASS : tst_SkipCleanupTestCase::initTestCase() +PASS : tst_SkipCleanupTestCase::aTestFunction() +SKIP : tst_SkipCleanupTestCase::cleanupTestCase() Skip inside cleanupTestCase. + Loc: [qtbase/tests/auto/testlib/selftests/skipcleanuptestcase/tst_skipcleanuptestcase.cpp(0)] +Totals: 2 passed, 0 failed, 1 skipped, 0 blacklisted, 0ms +********* Finished testing of tst_SkipCleanupTestCase ********* diff --git a/tests/auto/testlib/selftests/expected_skipcleanuptestcase.xml b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.xml new file mode 100644 index 0000000000..442d1a69b7 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_skipcleanuptestcase.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<TestCase name="tst_SkipCleanupTestCase"> + <Environment> + <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QtBuild/> + <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> + </Environment> + <TestFunction name="initTestCase"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="aTestFunction"> + <Incident type="pass" file="" line="0" /> + <Duration msecs="0"/> + </TestFunction> + <TestFunction name="cleanupTestCase"> + <Incident type="skip" file="qtbase/tests/auto/testlib/selftests/skipcleanuptestcase/tst_skipcleanuptestcase.cpp" line="0"> + <Description><![CDATA[Skip inside cleanupTestCase.]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> + <Duration msecs="0"/> +</TestCase> diff --git a/tests/auto/testlib/selftests/expected_strcmp.tap b/tests/auto/testlib/selftests/expected_strcmp.tap index 0ff00d9b67..8f58ec8d24 100644 --- a/tests/auto/testlib/selftests/expected_strcmp.tap +++ b/tests/auto/testlib/selftests/expected_strcmp.tap @@ -2,12 +2,6 @@ TAP version 13 # tst_StrCmp ok 1 - initTestCase() ok 2 - compareCharStars() -not ok 3 - compareByteArray() # TODO Next test should fail - --- - at: tst_StrCmp::compareByteArray() (qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp:0) - file: qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp - line: 0 - ... not ok 3 - compareByteArray() --- type: QCOMPARE @@ -19,6 +13,23 @@ not ok 3 - compareByteArray() at: tst_StrCmp::compareByteArray() (qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp:0) file: qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp line: 0 + extensions: + messages: + - severity: xfail + message: Next test should fail + at: tst_StrCmp::compareByteArray() (qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp:0) + file: qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp + line: 0 + - severity: xfail + message: Next test should fail + at: tst_StrCmp::compareByteArray() (qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp:0) + file: qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp + line: 0 + - severity: xfail + message: Next test should fail + at: tst_StrCmp::compareByteArray() (qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp:0) + file: qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp + line: 0 ... not ok 4 - failByteArray() --- diff --git a/tests/auto/testlib/selftests/expected_subtest.tap b/tests/auto/testlib/selftests/expected_subtest.tap index ee69487233..3430e2eebc 100644 --- a/tests/auto/testlib/selftests/expected_subtest.tap +++ b/tests/auto/testlib/selftests/expected_subtest.tap @@ -1,37 +1,93 @@ TAP version 13 # tst_Subtest -# initTestCase initTestCase (null) ok 1 - initTestCase() -# init test1 (null) -# test1 test1 (null) -# cleanup test1 (null) + --- + extensions: + messages: + - severity: debug + message: initTestCase initTestCase (null) + ... ok 2 - test1() -# test2_data test2 (null) -# test2_data end -# init test2 data0 -# test2 test2 data0 -# test2 end -# cleanup test2 data0 + --- + extensions: + messages: + - severity: debug + message: init test1 (null) + - severity: debug + message: test1 test1 (null) + - severity: debug + message: cleanup test1 (null) + ... +ok 2 - test2() # Data prepared + --- + extensions: + messages: + - severity: debug + message: test2_data test2 (null) + - severity: debug + message: test2_data end + ... ok 3 - test2(data0) -# init test2 data1 -# test2 test2 data1 -# test2 end -# cleanup test2 data1 + --- + extensions: + messages: + - severity: debug + message: init test2 data0 + - severity: debug + message: test2 test2 data0 + - severity: debug + message: test2 end + - severity: debug + message: cleanup test2 data0 + ... ok 4 - test2(data1) -# init test2 data2 -# test2 test2 data2 -# test2 end -# cleanup test2 data2 + --- + extensions: + messages: + - severity: debug + message: init test2 data1 + - severity: debug + message: test2 test2 data1 + - severity: debug + message: test2 end + - severity: debug + message: cleanup test2 data1 + ... ok 5 - test2(data2) -# test3_data test3 (null) -# test3_data end -# init test3 data0 -# test3 test3 data0 -# test3 end -# cleanup test3 data0 + --- + extensions: + messages: + - severity: debug + message: init test2 data2 + - severity: debug + message: test2 test2 data2 + - severity: debug + message: test2 end + - severity: debug + message: cleanup test2 data2 + ... +ok 5 - test3() # Data prepared + --- + extensions: + messages: + - severity: debug + message: test3_data test3 (null) + - severity: debug + message: test3_data end + ... ok 6 - test3(data0) -# init test3 data1 -# test3 test3 data1 + --- + extensions: + messages: + - severity: debug + message: init test3 data0 + - severity: debug + message: test3 test3 data0 + - severity: debug + message: test3 end + - severity: debug + message: cleanup test3 data0 + ... not ok 7 - test3(data1) --- type: QCOMPARE @@ -43,10 +99,14 @@ not ok 7 - test3(data1) at: tst_Subtest::test3() (qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp:0) file: qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp line: 0 + extensions: + messages: + - severity: debug + message: init test3 data1 + - severity: debug + message: test3 test3 data1 ... -# cleanup test3 data1 -# init test3 data2 -# test3 test3 data2 +# debug: cleanup test3 data1 not ok 8 - test3(data2) --- type: QCOMPARE @@ -58,15 +118,24 @@ not ok 8 - test3(data2) at: tst_Subtest::test3() (qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp:0) file: qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp line: 0 + extensions: + messages: + - severity: debug + message: init test3 data2 + - severity: debug + message: test3 test3 data2 ... -# cleanup test3 data2 -# init multiFail (null) +# debug: cleanup test3 data2 not ok 9 - multiFail() --- # This failure message should be repeated ten times at: tst_Subtest::multiFail() (qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp:0) file: qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp line: 0 + extensions: + messages: + - severity: debug + message: init multiFail (null) ... not ok 9 - multiFail() --- @@ -138,9 +207,17 @@ not ok 9 - multiFail() file: qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp line: 0 ... -# cleanup multiFail (null) -# init multiSkip (null) +# debug: cleanup multiFail (null) ok 10 - multiSkip() # SKIP This skip should be repeated ten times + --- + at: tst_Subtest::multiSkip() (qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp:0) + file: qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp + line: 0 + extensions: + messages: + - severity: debug + message: init multiSkip (null) + ... ok 10 - multiSkip() # SKIP This skip should be repeated ten times ok 10 - multiSkip() # SKIP This skip should be repeated ten times ok 10 - multiSkip() # SKIP This skip should be repeated ten times @@ -151,9 +228,14 @@ ok 10 - multiSkip() # SKIP This skip should be repeated ten times ok 10 - multiSkip() # SKIP This skip should be repeated ten times ok 10 - multiSkip() # SKIP This skip should be repeated ten times ok 10 - multiSkip() # SKIP But this test should only contribute one to the skip count -# cleanup multiSkip (null) -# cleanupTestCase cleanupTestCase (null) +# debug: cleanup multiSkip (null) ok 11 - cleanupTestCase() + --- + extensions: + messages: + - severity: debug + message: cleanupTestCase cleanupTestCase (null) + ... 1..11 # tests 11 # pass 7 diff --git a/tests/auto/testlib/selftests/expected_testlib.junitxml b/tests/auto/testlib/selftests/expected_testlib.junitxml index 8e5bd0e37e..33c8bfe403 100644 --- a/tests/auto/testlib/selftests/expected_testlib.junitxml +++ b/tests/auto/testlib/selftests/expected_testlib.junitxml @@ -7,7 +7,10 @@ </properties> <testcase name="initTestCase" classname="tst_TestLib" time="@TEST_DURATION@"/> <testcase name="basics" classname="tst_TestLib" time="@TEST_DURATION@"> - <failure type="fail" message="Compared QObject pointers are not the same"/> + <failure type="fail" message="Compared QObject pointers are not the same"> + <![CDATA[ Actual (QTest::testObject()): tst_TestLib/"TestObject" + Expected (nullptr) : "nullptr"]]> + </failure> </testcase> <testcase name="delays" classname="tst_TestLib" time="@TEST_DURATION@"/> <testcase name="reals(zero)" classname="tst_TestLib" time="@TEST_DURATION@"/> diff --git a/tests/auto/testlib/selftests/expected_testlib.lightxml b/tests/auto/testlib/selftests/expected_testlib.lightxml index c4b7924e38..76435eb9f0 100644 --- a/tests/auto/testlib/selftests/expected_testlib.lightxml +++ b/tests/auto/testlib/selftests/expected_testlib.lightxml @@ -9,7 +9,9 @@ </TestFunction> <TestFunction name="basics"> <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp" line="0"> - <Description><![CDATA[Compared QObject pointers are not the same]]></Description> + <Description><![CDATA[Compared QObject pointers are not the same + Actual (QTest::testObject()): tst_TestLib/"TestObject" + Expected (nullptr) : "nullptr"]]></Description> </Incident> <Duration msecs="0"/> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_testlib.tap b/tests/auto/testlib/selftests/expected_testlib.tap index 020006904f..1fa7dc77c4 100644 --- a/tests/auto/testlib/selftests/expected_testlib.tap +++ b/tests/auto/testlib/selftests/expected_testlib.tap @@ -3,7 +3,12 @@ TAP version 13 ok 1 - initTestCase() not ok 2 - basics() --- - # Compared QObject pointers are not the same + type: QCOMPARE + message: Compared QObject pointers are not the same + wanted: "nullptr" (nullptr) + found: tst_TestLib/"TestObject" (QTest::testObject()) + expected: "nullptr" (nullptr) + actual: tst_TestLib/"TestObject" (QTest::testObject()) at: tst_TestLib::basics() (qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp:0) file: qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp line: 0 diff --git a/tests/auto/testlib/selftests/expected_testlib.teamcity b/tests/auto/testlib/selftests/expected_testlib.teamcity index b72dfde420..52f7fa244c 100644 --- a/tests/auto/testlib/selftests/expected_testlib.teamcity +++ b/tests/auto/testlib/selftests/expected_testlib.teamcity @@ -2,7 +2,7 @@ ##teamcity[testStarted name='initTestCase()' flowId='tst_TestLib'] ##teamcity[testFinished name='initTestCase()' flowId='tst_TestLib'] ##teamcity[testStarted name='basics()' flowId='tst_TestLib'] -##teamcity[testFailed name='basics()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp(0)|]' details='Compared QObject pointers are not the same' flowId='tst_TestLib'] +##teamcity[testFailed name='basics()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp(0)|]' details='Compared QObject pointers are not the same|n Actual (QTest::testObject()): tst_TestLib/"TestObject"|n Expected (nullptr) : "nullptr"' flowId='tst_TestLib'] ##teamcity[testFinished name='basics()' flowId='tst_TestLib'] ##teamcity[testStarted name='delays()' flowId='tst_TestLib'] ##teamcity[testFinished name='delays()' flowId='tst_TestLib'] diff --git a/tests/auto/testlib/selftests/expected_testlib.txt b/tests/auto/testlib/selftests/expected_testlib.txt index b8437fa8b4..4d652626e9 100644 --- a/tests/auto/testlib/selftests/expected_testlib.txt +++ b/tests/auto/testlib/selftests/expected_testlib.txt @@ -2,6 +2,8 @@ Config: Using QtTest library PASS : tst_TestLib::initTestCase() FAIL! : tst_TestLib::basics() Compared QObject pointers are not the same + Actual (QTest::testObject()): tst_TestLib/"TestObject" + Expected (nullptr) : "nullptr" Loc: [qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp(0)] PASS : tst_TestLib::delays() PASS : tst_TestLib::reals(zero) diff --git a/tests/auto/testlib/selftests/expected_testlib.xml b/tests/auto/testlib/selftests/expected_testlib.xml index b5e1c078f1..8b66b003d0 100644 --- a/tests/auto/testlib/selftests/expected_testlib.xml +++ b/tests/auto/testlib/selftests/expected_testlib.xml @@ -11,7 +11,9 @@ </TestFunction> <TestFunction name="basics"> <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp" line="0"> - <Description><![CDATA[Compared QObject pointers are not the same]]></Description> + <Description><![CDATA[Compared QObject pointers are not the same + Actual (QTest::testObject()): tst_TestLib/"TestObject" + Expected (nullptr) : "nullptr"]]></Description> </Incident> <Duration msecs="0"/> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_verbose1.tap b/tests/auto/testlib/selftests/expected_verbose1.tap index a5ef13a973..63f1c83fb1 100644 --- a/tests/auto/testlib/selftests/expected_verbose1.tap +++ b/tests/auto/testlib/selftests/expected_verbose1.tap @@ -95,21 +95,32 @@ not ok 21 - testFailInInit(fail) ... ok 22 - testFailInInit(after) ok 23 - testFailInCleanup(before) -# This test function should execute and then QFAIL in cleanup() not ok 24 - testFailInCleanup(fail) --- # Fail in cleanup() at: tst_Counting::testFailInCleanup() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:0) file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp line: 0 + extensions: + messages: + - severity: debug + message: This test function should execute and then QFAIL in cleanup() ... ok 25 - testFailInCleanup(after) ok 26 - testSkipInInit(before) ok 27 - testSkipInInit(skip) # SKIP Skip in init() ok 28 - testSkipInInit(after) ok 29 - testSkipInCleanup(before) -# This test function should execute and then QSKIP in cleanup() ok 30 - testSkipInCleanup(skip) # SKIP Skip in cleanup() + --- + at: tst_Counting::testSkipInCleanup() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:0) + file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp + line: 0 + extensions: + messages: + - severity: debug + message: This test function should execute and then QSKIP in cleanup() + ... ok 31 - testSkipInCleanup(after) ok 32 - cleanupTestCase() 1..32 diff --git a/tests/auto/testlib/selftests/expected_verbose2.tap b/tests/auto/testlib/selftests/expected_verbose2.tap index 828e02b13e..8f7d4fac69 100644 --- a/tests/auto/testlib/selftests/expected_verbose2.tap +++ b/tests/auto/testlib/selftests/expected_verbose2.tap @@ -1,21 +1,21 @@ TAP version 13 # tst_Counting ok 1 - initTestCase() -# QVERIFY(true) -# QCOMPARE(2 + 1, 3) ok 2 - testPassPass(row 1) -# QVERIFY(true) -# QCOMPARE(2 + 1, 3) + # inform: QVERIFY(true) + # inform: QCOMPARE(2 + 1, 3) ok 3 - testPassPass(row 2) -# QVERIFY(true) -# QCOMPARE(2 + 1, 3) + # inform: QVERIFY(true) + # inform: QCOMPARE(2 + 1, 3) ok 4 - testPassSkip(row 1) + # inform: QVERIFY(true) + # inform: QCOMPARE(2 + 1, 3) ok 5 - testPassSkip(row 2) # SKIP Skipping -# QVERIFY(true) -# QCOMPARE(2 + 1, 3) ok 6 - testPassFail(row 1) -# QVERIFY(false) + # inform: QVERIFY(true) + # inform: QCOMPARE(2 + 1, 3) not ok 7 - testPassFail(row 2) + # inform: QVERIFY(false) --- type: QVERIFY message: Verification failed @@ -28,14 +28,14 @@ not ok 7 - testPassFail(row 2) line: 0 ... ok 8 - testSkipPass(row 1) # SKIP Skipping -# QVERIFY(true) -# QCOMPARE(2 + 1, 3) ok 9 - testSkipPass(row 2) + # inform: QVERIFY(true) + # inform: QCOMPARE(2 + 1, 3) ok 10 - testSkipSkip(row 1) # SKIP Skipping ok 11 - testSkipSkip(row 2) # SKIP Skipping ok 12 - testSkipFail(row 1) # SKIP Skipping -# QVERIFY(false) not ok 13 - testSkipFail(row 2) + # inform: QVERIFY(false) --- type: QVERIFY message: Verification failed @@ -47,8 +47,8 @@ not ok 13 - testSkipFail(row 2) file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp line: 0 ... -# QVERIFY(false) not ok 14 - testFailPass(row 1) + # inform: QVERIFY(false) --- type: QVERIFY message: Verification failed @@ -60,11 +60,11 @@ not ok 14 - testFailPass(row 1) file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp line: 0 ... -# QVERIFY(true) -# QCOMPARE(2 + 1, 3) ok 15 - testFailPass(row 2) -# QVERIFY(false) + # inform: QVERIFY(true) + # inform: QCOMPARE(2 + 1, 3) not ok 16 - testFailSkip(row 1) + # inform: QVERIFY(false) --- type: QVERIFY message: Verification failed @@ -77,8 +77,8 @@ not ok 16 - testFailSkip(row 1) line: 0 ... ok 17 - testFailSkip(row 2) # SKIP Skipping -# QVERIFY(false) not ok 18 - testFailFail(row 1) + # inform: QVERIFY(false) --- type: QVERIFY message: Verification failed @@ -90,8 +90,8 @@ not ok 18 - testFailFail(row 1) file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp line: 0 ... -# QVERIFY(false) not ok 19 - testFailFail(row 2) + # inform: QVERIFY(false) --- type: QVERIFY message: Verification failed @@ -113,21 +113,32 @@ not ok 21 - testFailInInit(fail) ... ok 22 - testFailInInit(after) ok 23 - testFailInCleanup(before) -# This test function should execute and then QFAIL in cleanup() not ok 24 - testFailInCleanup(fail) --- # Fail in cleanup() at: tst_Counting::testFailInCleanup() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:0) file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp line: 0 + extensions: + messages: + - severity: debug + message: This test function should execute and then QFAIL in cleanup() ... ok 25 - testFailInCleanup(after) ok 26 - testSkipInInit(before) ok 27 - testSkipInInit(skip) # SKIP Skip in init() ok 28 - testSkipInInit(after) ok 29 - testSkipInCleanup(before) -# This test function should execute and then QSKIP in cleanup() ok 30 - testSkipInCleanup(skip) # SKIP Skip in cleanup() + --- + at: tst_Counting::testSkipInCleanup() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:0) + file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp + line: 0 + extensions: + messages: + - severity: debug + message: This test function should execute and then QSKIP in cleanup() + ... ok 31 - testSkipInCleanup(after) ok 32 - cleanupTestCase() 1..32 diff --git a/tests/auto/testlib/selftests/expected_warnings.junitxml b/tests/auto/testlib/selftests/expected_warnings.junitxml index 1799be8279..4fa8c88622 100644 --- a/tests/auto/testlib/selftests/expected_warnings.junitxml +++ b/tests/auto/testlib/selftests/expected_warnings.junitxml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<testsuite name="tst_Warnings" timestamp="@TEST_START_TIME@" hostname="@HOSTNAME@" tests="15" failures="10" errors="0" skipped="0" time="@TEST_DURATION@"> +<testsuite name="tst_Warnings" timestamp="@TEST_START_TIME@" hostname="@HOSTNAME@" tests="16" failures="11" errors="0" skipped="0" time="@TEST_DURATION@"> <properties> <property name="QTestVersion" value="@INSERT_QT_VERSION_HERE@"/> <property name="QtVersion" value="@INSERT_QT_VERSION_HERE@"/> @@ -107,5 +107,10 @@ <skipped message="My cabbage! :("/> </testcase> <testcase name="testFailOnWarningsAndIgnoreWarnings" classname="tst_Warnings" time="@TEST_DURATION@"/> + <testcase name="testFailOnTemporaryObjectDestruction" classname="tst_Warnings" time="@TEST_DURATION@"> + <failure type="fail" message="Received a warning that resulted in a failure:"> + <![CDATA[Running low on toothpaste!]]> + </failure> + </testcase> <testcase name="cleanupTestCase" classname="tst_Warnings" time="@TEST_DURATION@"/> </testsuite> diff --git a/tests/auto/testlib/selftests/expected_warnings.lightxml b/tests/auto/testlib/selftests/expected_warnings.lightxml index 37070cad00..50b6c4bdb6 100644 --- a/tests/auto/testlib/selftests/expected_warnings.lightxml +++ b/tests/auto/testlib/selftests/expected_warnings.lightxml @@ -201,6 +201,13 @@ Ran out of cabbage!]]></Description> <Incident type="pass" file="" line="0" /> <Duration msecs="0"/> </TestFunction> + <TestFunction name="testFailOnTemporaryObjectDestruction"> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp" line="0"> + <Description><![CDATA[Received a warning that resulted in a failure: +Running low on toothpaste!]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> <TestFunction name="cleanupTestCase"> <Incident type="pass" file="" line="0" /> <Duration msecs="0"/> diff --git a/tests/auto/testlib/selftests/expected_warnings.tap b/tests/auto/testlib/selftests/expected_warnings.tap index 161aa6db2b..2667574064 100644 --- a/tests/auto/testlib/selftests/expected_warnings.tap +++ b/tests/auto/testlib/selftests/expected_warnings.tap @@ -1,41 +1,54 @@ TAP version 13 # tst_Warnings ok 1 - initTestCase() -# Warning -# Warning -# Debug -# Debug -# Info -# Info -# Baba -# Baba -# Bubublabla -# Babablabla ok 2 - testWarnings() -# Did not receive message: "Warning0" -# Did not receive message: "Warning1" + --- + extensions: + messages: + - severity: warning + message: Warning + - severity: warning + message: Warning + - severity: debug + message: Debug + - severity: debug + message: Debug + - severity: info + message: Info + - severity: info + message: Info + - severity: debug + message: Baba + - severity: debug + message: Baba + - severity: debug + message: Bubublabla + - severity: warning + message: Babablabla + ... not ok 3 - testMissingWarnings() + # inform: Did not receive message: "Warning0" + # inform: Did not receive message: "Warning1" --- # Not all expected messages were received ... -# Did not receive any message matching: "Warning\s\d" not ok 4 - testMissingWarningsRegularExpression() + # inform: Did not receive any message matching: "Warning\s\d" --- # Not all expected messages were received ... -# Did not receive message: "Warning0" -# Did not receive message: "Warning1" not ok 5 - testMissingWarningsWithData(first row) + # inform: Did not receive message: "Warning0" + # inform: Did not receive message: "Warning1" --- # Not all expected messages were received ... -# Did not receive message: "Warning0" -# Did not receive message: "Warning1" not ok 6 - testMissingWarningsWithData(second row) + # inform: Did not receive message: "Warning0" + # inform: Did not receive message: "Warning1" --- # Not all expected messages were received ... -# Ran out of space! not ok 7 - testFailOnWarnings() --- # Received a warning that resulted in a failure: @@ -43,10 +56,14 @@ Ran out of cabbage! at: tst_Warnings::testFailOnWarnings() (qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp:0) file: qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp line: 0 + extensions: + messages: + - severity: warning + message: Ran out of space! ... -# Ran out of tortillas! -# Ran out of oil! -# nope +# debug: Ran out of tortillas! +# info: Ran out of oil! +# warning: nope not ok 7 - testFailOnWarnings() --- # Received a warning that resulted in a failure: @@ -63,11 +80,16 @@ Running low on toothpaste! file: qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp line: 0 ... -# Running low on flour! -# Running low on toothpaste! -# Running low on toothpaste! -# Ran out of muffins! +# warning: Running low on flour! +# debug: Running low on toothpaste! +# info: Running low on toothpaste! ok 8 - testFailOnWarningsCleared() + --- + extensions: + messages: + - severity: warning + message: Ran out of muffins! + ... not ok 9 - testFailOnWarningsWithData(warning1) --- # Received a warning that resulted in a failure: @@ -76,9 +98,8 @@ warning1 file: qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp line: 0 ... -# warning2 -# warning3 -# warning1 +# warning: warning2 +# warning: warning3 not ok 10 - testFailOnWarningsWithData(warning2) --- # Received a warning that resulted in a failure: @@ -86,10 +107,12 @@ warning2 at: tst_Warnings::testFailOnWarningsWithData() (qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp:0) file: qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp line: 0 + extensions: + messages: + - severity: warning + message: warning1 ... -# warning3 -# warning1 -# warning2 +# warning: warning3 not ok 11 - testFailOnWarningsWithData(warning3) --- # Received a warning that resulted in a failure: @@ -97,6 +120,12 @@ warning3 at: tst_Warnings::testFailOnWarningsWithData() (qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp:0) file: qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp line: 0 + extensions: + messages: + - severity: warning + message: warning1 + - severity: warning + message: warning2 ... not ok 12 - testFailOnWarningsFailInHelper() --- @@ -130,8 +159,16 @@ Ran out of cabbage! ... ok 13 - testFailOnWarningsThenSkip() # SKIP My cabbage! :( ok 14 - testFailOnWarningsAndIgnoreWarnings() -ok 15 - cleanupTestCase() -1..15 -# tests 15 +not ok 15 - testFailOnTemporaryObjectDestruction() + --- + # Received a warning that resulted in a failure: +Running low on toothpaste! + at: tst_Warnings::testFailOnTemporaryObjectDestruction() (qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp:0) + file: qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp + line: 0 + ... +ok 16 - cleanupTestCase() +1..16 +# tests 16 # pass 5 -# fail 10 +# fail 11 diff --git a/tests/auto/testlib/selftests/expected_warnings.teamcity b/tests/auto/testlib/selftests/expected_warnings.teamcity index 67dd039ebf..a4bd7139a6 100644 --- a/tests/auto/testlib/selftests/expected_warnings.teamcity +++ b/tests/auto/testlib/selftests/expected_warnings.teamcity @@ -57,6 +57,9 @@ ##teamcity[testFinished name='testFailOnWarningsThenSkip()' flowId='tst_Warnings'] ##teamcity[testStarted name='testFailOnWarningsAndIgnoreWarnings()' flowId='tst_Warnings'] ##teamcity[testFinished name='testFailOnWarningsAndIgnoreWarnings()' flowId='tst_Warnings'] +##teamcity[testStarted name='testFailOnTemporaryObjectDestruction()' flowId='tst_Warnings'] +##teamcity[testFailed name='testFailOnTemporaryObjectDestruction()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp(0)|]' details='Received a warning that resulted in a failure:|nRunning low on toothpaste!' flowId='tst_Warnings'] +##teamcity[testFinished name='testFailOnTemporaryObjectDestruction()' flowId='tst_Warnings'] ##teamcity[testStarted name='cleanupTestCase()' flowId='tst_Warnings'] ##teamcity[testFinished name='cleanupTestCase()' flowId='tst_Warnings'] ##teamcity[testSuiteFinished name='tst_Warnings' flowId='tst_Warnings'] diff --git a/tests/auto/testlib/selftests/expected_warnings.txt b/tests/auto/testlib/selftests/expected_warnings.txt index 5037eb87df..72e2201f38 100644 --- a/tests/auto/testlib/selftests/expected_warnings.txt +++ b/tests/auto/testlib/selftests/expected_warnings.txt @@ -69,6 +69,9 @@ Ran out of cabbage! SKIP : tst_Warnings::testFailOnWarningsThenSkip() My cabbage! :( Loc: [qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp(0)] PASS : tst_Warnings::testFailOnWarningsAndIgnoreWarnings() +FAIL! : tst_Warnings::testFailOnTemporaryObjectDestruction() Received a warning that resulted in a failure: +Running low on toothpaste! + Loc: [qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp(0)] PASS : tst_Warnings::cleanupTestCase() -Totals: 5 passed, 10 failed, 0 skipped, 0 blacklisted, 0ms +Totals: 5 passed, 11 failed, 0 skipped, 0 blacklisted, 0ms ********* Finished testing of tst_Warnings ********* diff --git a/tests/auto/testlib/selftests/expected_warnings.xml b/tests/auto/testlib/selftests/expected_warnings.xml index 8da8404a16..808f59768c 100644 --- a/tests/auto/testlib/selftests/expected_warnings.xml +++ b/tests/auto/testlib/selftests/expected_warnings.xml @@ -203,6 +203,13 @@ Ran out of cabbage!]]></Description> <Incident type="pass" file="" line="0" /> <Duration msecs="0"/> </TestFunction> + <TestFunction name="testFailOnTemporaryObjectDestruction"> + <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp" line="0"> + <Description><![CDATA[Received a warning that resulted in a failure: +Running low on toothpaste!]]></Description> + </Incident> + <Duration msecs="0"/> + </TestFunction> <TestFunction name="cleanupTestCase"> <Incident type="pass" file="" line="0" /> <Duration msecs="0"/> diff --git a/tests/auto/testlib/selftests/expected_watchdog.tap b/tests/auto/testlib/selftests/expected_watchdog.tap index 9021c65bf4..b92777dfe5 100644 --- a/tests/auto/testlib/selftests/expected_watchdog.tap +++ b/tests/auto/testlib/selftests/expected_watchdog.tap @@ -1,10 +1,13 @@ TAP version 13 # tst_Watchdog ok 1 - initTestCase() -# Test function timed out not ok 2 - delay() --- # Received a fatal error. + extensions: + messages: + - severity: fatal + message: Test function timed out ... 1..2 # tests 2 diff --git a/tests/auto/testlib/selftests/expectfail/CMakeLists.txt b/tests/auto/testlib/selftests/expectfail/CMakeLists.txt index 84aa93d1ca..d89e03ebef 100644 --- a/tests/auto/testlib/selftests/expectfail/CMakeLists.txt +++ b/tests/auto/testlib/selftests/expectfail/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from expectfail.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## expectfail Binary: ##################################################################### qt_internal_add_executable(expectfail - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_expectfail.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(expectfail) -# special case end diff --git a/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp b/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp index e978867bbf..2e67012cc8 100644 --- a/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp +++ b/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> diff --git a/tests/auto/testlib/selftests/extendedcompare/CMakeLists.txt b/tests/auto/testlib/selftests/extendedcompare/CMakeLists.txt new file mode 100644 index 0000000000..3b2fbb84ec --- /dev/null +++ b/tests/auto/testlib/selftests/extendedcompare/CMakeLists.txt @@ -0,0 +1,14 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +qt_internal_add_executable(extendedcompare + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + SOURCES + tst_extendedcompare.cpp + LIBRARIES + Qt::Test +) + +qt_internal_apply_testlib_coverage_options(extendedcompare) diff --git a/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp b/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp new file mode 100644 index 0000000000..70a7798667 --- /dev/null +++ b/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp @@ -0,0 +1,336 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <QTest> +#include <QtCore/qtimer.h> + +QT_BEGIN_NAMESPACE + +#define COMPARE_WITH_TYPE(Type, arg1, arg2) \ +switch (Type) { \ + case QTest::ComparisonOperation::CustomCompare: QCOMPARE(arg1, arg2); break; \ + case QTest::ComparisonOperation::Equal: QCOMPARE_EQ(arg1, arg2); break; \ + case QTest::ComparisonOperation::NotEqual: QCOMPARE_NE(arg1, arg2); break; \ + case QTest::ComparisonOperation::LessThan: QCOMPARE_LT(arg1, arg2); break; \ + case QTest::ComparisonOperation::LessThanOrEqual: QCOMPARE_LE(arg1, arg2); break; \ + case QTest::ComparisonOperation::GreaterThan: QCOMPARE_GT(arg1, arg2); break; \ + case QTest::ComparisonOperation::GreaterThanOrEqual: QCOMPARE_GE(arg1, arg2); break; \ +} + +class MyClass +{ +public: + MyClass(int v) : m_value(v) {} + int value() const { return m_value; } + void setValue(int v) { m_value = v; } + + friend bool operator==(const MyClass &lhs, const MyClass &rhs) + { + return lhs.m_value == rhs.m_value; + } + friend bool operator!=(const MyClass &lhs, const MyClass &rhs) + { + return lhs.m_value != rhs.m_value; + } + friend bool operator<(const MyClass &lhs, const MyClass &rhs) + { + return lhs.m_value < rhs.m_value; + } + friend bool operator<=(const MyClass &lhs, const MyClass &rhs) + { + return lhs.m_value <= rhs.m_value; + } + friend bool operator>(const MyClass &lhs, const MyClass &rhs) + { + return lhs.m_value > rhs.m_value; + } + friend bool operator>=(const MyClass &lhs, const MyClass &rhs) + { + return lhs.m_value >= rhs.m_value; + } + +private: + int m_value; +}; + +// ClassWithPointerGetter returns a pointer, so pointers will be used during +// comparison. To get consistent results, we need to make sure that the pointer +// returned by first object is always smaller than the one returned by the +// second object. +// We will make sure that the objects are not destroyed until the comparison +// is finished by checking that the output does not contain 'MyClass(-1)'. +static MyClass valuesForClassWithPointerGetter[] = { MyClass(-1), MyClass(-1) }; + +class ClassWithPointerGetter +{ + Q_DISABLE_COPY_MOVE(ClassWithPointerGetter) +public: + explicit ClassWithPointerGetter(int index) : m_index(index) + { + Q_ASSERT(m_index >= 0 && m_index < 2); + valuesForClassWithPointerGetter[m_index].setValue(indexToValue(m_index)); + } + ~ClassWithPointerGetter() + { + valuesForClassWithPointerGetter[m_index].setValue(-1); + } + + const MyClass *getValuePointer() const { return &valuesForClassWithPointerGetter[m_index]; } + + static int indexToValue(int index) { return 2 - index; } + static int valueToIndex(int value) { return 2 - value; } + +private: + int m_index; +}; + +// An auxiliary function to get a temporary object +static ClassWithPointerGetter getClassForValue(int val) +{ + return ClassWithPointerGetter(val); +} + +// various toString() overloads +namespace QTest { + +template <> char *toString(const int *const &val) +{ + return val ? toString(*val) : toString(nullptr); +} + +} // namespace QTest + +char *toString(const MyClass &val) +{ + char *msg = new char[128]; + qsnprintf(msg, 128, "MyClass(%d)", val.value()); + return msg; +} + +char *toString(const MyClass *val) +{ + if (val) { + char *msg = new char[128]; + const auto value = val->value(); + qsnprintf(msg, 128, "MyClass(%d) on memory address with index %d", value, + ClassWithPointerGetter::valueToIndex(value)); + return msg; + } + return toString(nullptr); +} + +enum MyUnregisteredEnum { MyUnregisteredEnumValue1, MyUnregisteredEnumValue2 }; + +class tst_ExtendedCompare : public QObject +{ + Q_OBJECT + +private slots: + void initTestCase_data(); + void compareInts_data(); + void compareInts(); + void compareFloats_data(); + void compareFloats(); + void compareDoubles_data(); + void compareDoubles(); + void comparePointers_data(); + void comparePointers(); + void compareToNullptr_data(); + void compareToNullptr(); + void compareUnregistereEnum_data(); + void compareUnregistereEnum(); + void compareRegistereEnum_data(); + void compareRegistereEnum(); + void compareCustomTypes_data(); + void compareCustomTypes(); + void checkComparisonForTemporaryObjects(); + void checkComparisonWithTimeout(); +}; + +void tst_ExtendedCompare::initTestCase_data() +{ + qRegisterMetaType<QTest::ComparisonOperation>(); + QTest::addColumn<QTest::ComparisonOperation>("operation"); + // Do not test plain old QCOMPARE() intentionally, as it's tested in other + // places. + QTest::newRow("EQ") << QTest::ComparisonOperation::Equal; + QTest::newRow("NE") << QTest::ComparisonOperation::NotEqual; + QTest::newRow("LT") << QTest::ComparisonOperation::LessThan; + QTest::newRow("LE") << QTest::ComparisonOperation::LessThanOrEqual; + QTest::newRow("GT") << QTest::ComparisonOperation::GreaterThan; + QTest::newRow("GE") << QTest::ComparisonOperation::GreaterThanOrEqual; +} + +template <typename T> static void generateData(T val1, T val2) +{ + Q_ASSERT(val1 < val2); + QTest::addColumn<T>("lhs"); + QTest::addColumn<T>("rhs"); + QTest::newRow("left == right") << val1 << val1; + QTest::newRow("left < right") << val1 << val2; + QTest::newRow("left > right") << val2 << val1; +} + +template <typename T> static void executeComparison() +{ + QFETCH_GLOBAL(QTest::ComparisonOperation, operation); + QFETCH(T, lhs); + QFETCH(T, rhs); + switch (operation) { + case QTest::ComparisonOperation::CustomCompare: QCOMPARE(lhs, rhs); break; + case QTest::ComparisonOperation::Equal: QCOMPARE_EQ(lhs, rhs); break; + case QTest::ComparisonOperation::NotEqual: QCOMPARE_NE(lhs, rhs); break; + case QTest::ComparisonOperation::LessThan: QCOMPARE_LT(lhs, rhs); break; + case QTest::ComparisonOperation::LessThanOrEqual: QCOMPARE_LE(lhs, rhs); break; + case QTest::ComparisonOperation::GreaterThan: QCOMPARE_GT(lhs, rhs); break; + case QTest::ComparisonOperation::GreaterThanOrEqual: QCOMPARE_GE(lhs, rhs); break; + } +} + +void tst_ExtendedCompare::compareInts_data() +{ + generateData(1, 2); +} + +void tst_ExtendedCompare::compareInts() +{ + executeComparison<int>(); +} + +void tst_ExtendedCompare::compareFloats_data() +{ + generateData(1.0f, 1.1f); +} + +void tst_ExtendedCompare::compareFloats() +{ + executeComparison<float>(); +} + +void tst_ExtendedCompare::compareDoubles_data() +{ + generateData(0.0, 0.1); +} + +void tst_ExtendedCompare::compareDoubles() +{ + executeComparison<double>(); +} + +void tst_ExtendedCompare::comparePointers_data() +{ + static constexpr int values[] = { 1, 2 }; + generateData(&values[0], &values[1]); +} + +void tst_ExtendedCompare::comparePointers() +{ + executeComparison<const int *>(); +} + +void tst_ExtendedCompare::compareToNullptr_data() +{ + static const int *ptr = nullptr; + static const int value = 1; + generateData(ptr, &value); +} + +void tst_ExtendedCompare::compareToNullptr() +{ + executeComparison<const int *>(); +} + +void tst_ExtendedCompare::compareUnregistereEnum_data() +{ + generateData(MyUnregisteredEnumValue1, MyUnregisteredEnumValue2); +} + +void tst_ExtendedCompare::compareUnregistereEnum() +{ + executeComparison<MyUnregisteredEnum>(); +} + +void tst_ExtendedCompare::compareRegistereEnum_data() +{ + generateData(Qt::Monday, Qt::Sunday); +} + +void tst_ExtendedCompare::compareRegistereEnum() +{ + executeComparison<Qt::DayOfWeek>(); +} + +void tst_ExtendedCompare::compareCustomTypes_data() +{ + static const MyClass val1(1); + static const MyClass val2(2); + generateData(val1, val2); +} + +void tst_ExtendedCompare::compareCustomTypes() +{ + executeComparison<MyClass>(); +} + +void tst_ExtendedCompare::checkComparisonForTemporaryObjects() +{ + // This test checks that temporary objects live until the end of + // comparison. + + QFETCH_GLOBAL(QTest::ComparisonOperation, operation); + COMPARE_WITH_TYPE(operation, getClassForValue(0).getValuePointer(), + getClassForValue(1).getValuePointer()); +} + +class ClassWithDeferredSetter : public MyClass +{ +public: + ClassWithDeferredSetter(int value) : MyClass(value) {} + + void setValueDeferred(int value) + { + QTimer::singleShot(100, [this, value] { setValue(value); }); + } +}; + +char *toString(const ClassWithDeferredSetter &val) +{ + char *msg = new char[128]; + qsnprintf(msg, 128, "ClassWithDeferredSetter(%d)", val.value()); + return msg; +} + +void tst_ExtendedCompare::checkComparisonWithTimeout() +{ + QFETCH_GLOBAL(QTest::ComparisonOperation, operation); + ClassWithDeferredSetter c(0); + c.setValueDeferred(1); + switch (operation) { + case QTest::ComparisonOperation::Equal: + QTRY_COMPARE_EQ_WITH_TIMEOUT(c, ClassWithDeferredSetter(1), 300); + break; + case QTest::ComparisonOperation::NotEqual: + QTRY_COMPARE_NE_WITH_TIMEOUT(c, ClassWithDeferredSetter(0), 300); + break; + case QTest::ComparisonOperation::LessThan: + QTRY_COMPARE_LT_WITH_TIMEOUT(c, ClassWithDeferredSetter(0), 300); + break; + case QTest::ComparisonOperation::LessThanOrEqual: + QTRY_COMPARE_LE_WITH_TIMEOUT(c, ClassWithDeferredSetter(-1), 300); + break; + case QTest::ComparisonOperation::GreaterThan: + QTRY_COMPARE_GT_WITH_TIMEOUT(c, ClassWithDeferredSetter(1), 300); + break; + case QTest::ComparisonOperation::GreaterThanOrEqual: + QTRY_COMPARE_GE_WITH_TIMEOUT(c, ClassWithDeferredSetter(1), 300); + break; + case QTest::ComparisonOperation::CustomCompare: + QFAIL("Unexpected comparison operation"); + break; + } +} + +QT_END_NAMESPACE + +QTEST_MAIN(tst_ExtendedCompare) +#include "tst_extendedcompare.moc" diff --git a/tests/auto/testlib/selftests/failcleanup/CMakeLists.txt b/tests/auto/testlib/selftests/failcleanup/CMakeLists.txt index e45d1b528b..10805ba6f7 100644 --- a/tests/auto/testlib/selftests/failcleanup/CMakeLists.txt +++ b/tests/auto/testlib/selftests/failcleanup/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from failcleanup.pro. +# Copyright (C) 2024 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## failcleanup Binary: ##################################################################### qt_internal_add_executable(failcleanup - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_failcleanup.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(failcleanup) -# special case end diff --git a/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp b/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp index 1be5665783..2e519e0f91 100644 --- a/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp +++ b/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> @@ -33,7 +8,7 @@ class tst_FailCleanup: public QObject Q_OBJECT private slots: void aTestFunction() const; - void cleanupTestCase() const; + void cleanup() const; }; void tst_FailCleanup::aTestFunction() const @@ -41,9 +16,9 @@ void tst_FailCleanup::aTestFunction() const QVERIFY(true); } -void tst_FailCleanup::cleanupTestCase() const +void tst_FailCleanup::cleanup() const { - QVERIFY2(false, "Fail inside cleanupTestCase"); + QVERIFY2(false, "Fail inside cleanup"); } QTEST_APPLESS_MAIN(tst_FailCleanup) diff --git a/tests/auto/testlib/selftests/failcleanuptestcase/CMakeLists.txt b/tests/auto/testlib/selftests/failcleanuptestcase/CMakeLists.txt new file mode 100644 index 0000000000..cb11a577f6 --- /dev/null +++ b/tests/auto/testlib/selftests/failcleanuptestcase/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (C) 2024 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause +##################################################################### +## failcleanuptestcase Binary: +##################################################################### + +qt_internal_add_executable(failcleanuptestcase + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + SOURCES + tst_failcleanuptestcase.cpp + LIBRARIES + Qt::Test +) + +## Scopes: +##################################################################### + +qt_internal_apply_testlib_coverage_options(failcleanuptestcase) diff --git a/tests/auto/testlib/selftests/failcleanuptestcase/tst_failcleanuptestcase.cpp b/tests/auto/testlib/selftests/failcleanuptestcase/tst_failcleanuptestcase.cpp new file mode 100644 index 0000000000..e90f6759db --- /dev/null +++ b/tests/auto/testlib/selftests/failcleanuptestcase/tst_failcleanuptestcase.cpp @@ -0,0 +1,25 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <QTest> + +class tst_FailCleanupTestCase: public QObject +{ +Q_OBJECT +private slots: + void aTestFunction() const; + void cleanupTestCase() const; +}; + +void tst_FailCleanupTestCase::aTestFunction() const +{ + QVERIFY(true); +} + +void tst_FailCleanupTestCase::cleanupTestCase() const +{ + QVERIFY2(false, "Fail inside cleanupTestCase"); +} + +QTEST_APPLESS_MAIN(tst_FailCleanupTestCase) +#include "tst_failcleanuptestcase.moc" diff --git a/tests/auto/testlib/selftests/faildatatype/CMakeLists.txt b/tests/auto/testlib/selftests/faildatatype/CMakeLists.txt index 0abba3e021..a0af051f74 100644 --- a/tests/auto/testlib/selftests/faildatatype/CMakeLists.txt +++ b/tests/auto/testlib/selftests/faildatatype/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from faildatatype.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## faildatatype Binary: ##################################################################### qt_internal_add_executable(faildatatype - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_faildatatype.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(faildatatype) -# special case end diff --git a/tests/auto/testlib/selftests/faildatatype/tst_faildatatype.cpp b/tests/auto/testlib/selftests/faildatatype/tst_faildatatype.cpp index 13000e5038..4605933636 100644 --- a/tests/auto/testlib/selftests/faildatatype/tst_faildatatype.cpp +++ b/tests/auto/testlib/selftests/faildatatype/tst_faildatatype.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> diff --git a/tests/auto/testlib/selftests/failfetchtype/CMakeLists.txt b/tests/auto/testlib/selftests/failfetchtype/CMakeLists.txt index 0ce60f591e..503d2b33db 100644 --- a/tests/auto/testlib/selftests/failfetchtype/CMakeLists.txt +++ b/tests/auto/testlib/selftests/failfetchtype/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from failfetchtype.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## failfetchtype Binary: ##################################################################### qt_internal_add_executable(failfetchtype - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_failfetchtype.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(failfetchtype) -# special case end diff --git a/tests/auto/testlib/selftests/failfetchtype/tst_failfetchtype.cpp b/tests/auto/testlib/selftests/failfetchtype/tst_failfetchtype.cpp index d5844c3ff5..4516b76461 100644 --- a/tests/auto/testlib/selftests/failfetchtype/tst_failfetchtype.cpp +++ b/tests/auto/testlib/selftests/failfetchtype/tst_failfetchtype.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> diff --git a/tests/auto/testlib/selftests/failinit/CMakeLists.txt b/tests/auto/testlib/selftests/failinit/CMakeLists.txt index b6995e591d..9d13c2baf6 100644 --- a/tests/auto/testlib/selftests/failinit/CMakeLists.txt +++ b/tests/auto/testlib/selftests/failinit/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from failinit.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## failinit Binary: ##################################################################### qt_internal_add_executable(failinit - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_failinit.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(failinit) -# special case end diff --git a/tests/auto/testlib/selftests/failinit/tst_failinit.cpp b/tests/auto/testlib/selftests/failinit/tst_failinit.cpp index deeb43e027..dbf91101eb 100644 --- a/tests/auto/testlib/selftests/failinit/tst_failinit.cpp +++ b/tests/auto/testlib/selftests/failinit/tst_failinit.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> diff --git a/tests/auto/testlib/selftests/failinitdata/CMakeLists.txt b/tests/auto/testlib/selftests/failinitdata/CMakeLists.txt index dcc2bdafde..0bb210fbc3 100644 --- a/tests/auto/testlib/selftests/failinitdata/CMakeLists.txt +++ b/tests/auto/testlib/selftests/failinitdata/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from failinitdata.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## failinitdata Binary: ##################################################################### qt_internal_add_executable(failinitdata - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_failinitdata.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(failinitdata) -# special case end diff --git a/tests/auto/testlib/selftests/failinitdata/tst_failinitdata.cpp b/tests/auto/testlib/selftests/failinitdata/tst_failinitdata.cpp index dd9c0ac200..df7b4de981 100644 --- a/tests/auto/testlib/selftests/failinitdata/tst_failinitdata.cpp +++ b/tests/auto/testlib/selftests/failinitdata/tst_failinitdata.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> diff --git a/tests/auto/testlib/selftests/fetchbogus/CMakeLists.txt b/tests/auto/testlib/selftests/fetchbogus/CMakeLists.txt index 1f5f5cedf0..a47a1fbf19 100644 --- a/tests/auto/testlib/selftests/fetchbogus/CMakeLists.txt +++ b/tests/auto/testlib/selftests/fetchbogus/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from fetchbogus.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## fetchbogus Binary: ##################################################################### qt_internal_add_executable(fetchbogus - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_fetchbogus.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(fetchbogus) -# special case end diff --git a/tests/auto/testlib/selftests/fetchbogus/tst_fetchbogus.cpp b/tests/auto/testlib/selftests/fetchbogus/tst_fetchbogus.cpp index 8a135ba121..72eacadb3d 100644 --- a/tests/auto/testlib/selftests/fetchbogus/tst_fetchbogus.cpp +++ b/tests/auto/testlib/selftests/fetchbogus/tst_fetchbogus.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> diff --git a/tests/auto/testlib/selftests/findtestdata/CMakeLists.txt b/tests/auto/testlib/selftests/findtestdata/CMakeLists.txt index 9c06a09c18..9422861e22 100644 --- a/tests/auto/testlib/selftests/findtestdata/CMakeLists.txt +++ b/tests/auto/testlib/selftests/findtestdata/CMakeLists.txt @@ -1,15 +1,17 @@ -# Generated from findtestdata.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## findtestdata Binary: ##################################################################### qt_internal_add_executable(findtestdata - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES findtestdata.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) @@ -29,6 +31,4 @@ qt_internal_add_resource(findtestdata "findtestdata" ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(findtestdata) -# special case end diff --git a/tests/auto/testlib/selftests/findtestdata/findtestdata.cpp b/tests/auto/testlib/selftests/findtestdata/findtestdata.cpp index de57f57f53..9b74ffd3a6 100644 --- a/tests/auto/testlib/selftests/findtestdata/findtestdata.cpp +++ b/tests/auto/testlib/selftests/findtestdata/findtestdata.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> @@ -51,7 +26,7 @@ void FindTestData::initTestCase() // verify that our qt.conf is working as expected. QString app_path = QCoreApplication::applicationDirPath(); QString install_path = app_path -#ifdef Q_OS_MAC +#ifdef Q_OS_DARWIN + "/Contents" #endif + "/tests"; @@ -100,7 +75,7 @@ void FindTestData::paths() // 2. at the test install path (faked via qt.conf) QString testfile_path2 = app_path -#ifdef Q_OS_MAC +#ifdef Q_OS_DARWIN + "/Contents" #endif + "/tests/findtestdata/" TESTFILE; diff --git a/tests/auto/testlib/selftests/float/CMakeLists.txt b/tests/auto/testlib/selftests/float/CMakeLists.txt index 02c61acff3..448c3e962e 100644 --- a/tests/auto/testlib/selftests/float/CMakeLists.txt +++ b/tests/auto/testlib/selftests/float/CMakeLists.txt @@ -1,15 +1,17 @@ -# Generated from float.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## float Binary: ##################################################################### qt_internal_add_executable(float - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_float.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test Qt::TestPrivate ) @@ -17,6 +19,4 @@ qt_internal_add_executable(float ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(float) -# special case end diff --git a/tests/auto/testlib/selftests/float/tst_float.cpp b/tests/auto/testlib/selftests/float/tst_float.cpp index ad03176302..9af14f1e89 100644 --- a/tests/auto/testlib/selftests/float/tst_float.cpp +++ b/tests/auto/testlib/selftests/float/tst_float.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2020 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> #include <QtCore/qfloat16.h> diff --git a/tests/auto/testlib/selftests/generate_expected_output.py b/tests/auto/testlib/selftests/generate_expected_output.py index 0dc6748f08..350d20fa27 100755 --- a/tests/auto/testlib/selftests/generate_expected_output.py +++ b/tests/auto/testlib/selftests/generate_expected_output.py @@ -1,31 +1,6 @@ #!/usr/bin/env python3 -############################################################################# -## -## Copyright (C) 2020 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the release tools of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:GPL-EXCEPT$ -## 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 The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 as published by the Free Software -## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 from argparse import ArgumentParser, RawTextHelpFormatter import os @@ -56,15 +31,17 @@ TESTS = ['assert', 'badxml', 'benchlibcallgrind', 'benchlibcounting', 'benchlibeventcounter', 'benchliboptions', 'benchlibtickcounter', 'benchlibwalltime', 'blacklisted', 'cmptest', 'commandlinedata', 'counting', 'crashes', 'datatable', 'datetime', 'deleteLater', - 'deleteLater_noApp', 'differentexec', 'exceptionthrow', 'expectfail', - 'failcleanup', 'faildatatype', 'failfetchtype', 'failinit', - 'failinitdata', 'fetchbogus', 'findtestdata', 'float', 'globaldata', - 'longstring', 'maxwarnings', 'mouse', 'multiexec', 'pairdiagnostics', 'pass', + 'deleteLater_noApp', 'differentexec', 'eventloop', 'exceptionthrow', + 'expectfail', "extendedcompare", 'failcleanup', 'failcleanuptestcase', + 'faildatatype', 'failfetchtype', 'failinit', 'failinitdata', + 'fetchbogus', 'findtestdata', 'float', 'globaldata', 'longstring', + 'maxwarnings', 'mouse', 'multiexec', 'pairdiagnostics', 'pass', 'printdatatags', 'printdatatagswithglobaltags', 'qexecstringlist', - 'signaldumper', 'silent', 'singleskip', 'skip', 'skipcleanup', - 'skipinit', 'skipinitdata', 'sleep', 'strcmp', 'subtest', 'testlib', - 'tuplediagnostics', 'verbose1', 'verbose2', 'verifyexceptionthrown', - 'warnings', 'watchdog', 'junit', 'keyboard'] + 'signaldumper', 'silent', 'silent_fatal', 'singleskip', 'skip', + 'skipblacklisted', 'skipcleanup', 'skipcleanuptestcase', 'skipinit', + 'skipinitdata', 'sleep', 'strcmp', 'subtest', 'testlib', 'tuplediagnostics', + 'verbose1', 'verbose2', 'verifyexceptionthrown', 'warnings', 'watchdog', + 'junit', 'keyboard'] class Fail (Exception): pass @@ -99,8 +76,12 @@ class Cleaner (object): def _read_qt_version(qtbase_dir): cmake_conf_file = os.path.join(qtbase_dir, '.cmake.conf') with open(cmake_conf_file) as f: - qtver = f.readline().strip() - return qtver.split('"')[1] # set(QT_REPO_MODULE_VERSION "6.1.0") + for line in f: + # set(QT_REPO_MODULE_VERSION "6.1.0") + if 'set(QT_REPO_MODULE_VERSION' in line: + return line.strip().split('"')[1] + + raise RuntimeError("Someone broke .cmake.conf formatting again") @staticmethod def __getPatterns(patterns = ( @@ -221,9 +202,9 @@ class Scanner (object): del re -# Keep in sync with tst_selftests.cpp's processEnvironment(): +# Keep in sync with tst_selftests.cpp's testEnvironment(): def baseEnv(platname=None, - keep=('PATH', 'QT_QPA_PLATFORM'), + keep=('PATH', 'QT_QPA_PLATFORM', 'QTEST_THROW_ON_FAIL', 'QTEST_THROW_ON_SKIP', 'ASAN_OPTIONS'), posix=('HOME', 'USER', 'QEMU_SET_ENV', 'QEMU_LD_PREFIX'), nonapple=('DISPLAY', 'XAUTHORITY', 'XAUTHLOCALHOSTNAME'), # and XDG_* # Don't actually know how to test for QNX, so this is ignored: @@ -272,9 +253,9 @@ def testEnv(testname, "watchdog": { "QTEST_FUNCTION_TIMEOUT": "100" }, }, # Must match tst_Selftests::runSubTest_data(): - crashers = ("assert", "blacklisted", "crashes", "crashedterminate", + crashers = ("assert", "crashes", "crashedterminate", "exceptionthrow", "faildatatype", "failfetchtype", - "fetchbogus", "silent", "watchdog")): + "fetchbogus", "silent_fatal", "watchdog")): """Determine the environment in which to run a test.""" data = baseEnv() if testname in crashers: @@ -301,6 +282,7 @@ def shouldIgnoreTest(testname, format): "printdatatags", "printdatatagswithglobaltags", "silent", + "silent_fatal", "crashes", "benchlibcallgrind", "float", diff --git a/tests/auto/testlib/selftests/globaldata/CMakeLists.txt b/tests/auto/testlib/selftests/globaldata/CMakeLists.txt index 0793b6c4e3..2bb7d94e51 100644 --- a/tests/auto/testlib/selftests/globaldata/CMakeLists.txt +++ b/tests/auto/testlib/selftests/globaldata/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from globaldata.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## globaldata Binary: ##################################################################### qt_internal_add_executable(globaldata - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_globaldata.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(globaldata) -# special case end diff --git a/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp b/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp index a1ddf1fe4c..3b589a9962 100644 --- a/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp +++ b/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> diff --git a/tests/auto/testlib/selftests/junit/CMakeLists.txt b/tests/auto/testlib/selftests/junit/CMakeLists.txt index 94138b6577..a736d2a15c 100644 --- a/tests/auto/testlib/selftests/junit/CMakeLists.txt +++ b/tests/auto/testlib/selftests/junit/CMakeLists.txt @@ -1,10 +1,13 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause qt_internal_add_executable(junit - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_junit.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) diff --git a/tests/auto/testlib/selftests/junit/tst_junit.cpp b/tests/auto/testlib/selftests/junit/tst_junit.cpp index c434704d83..dfc55cc40d 100644 --- a/tests/auto/testlib/selftests/junit/tst_junit.cpp +++ b/tests/auto/testlib/selftests/junit/tst_junit.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> diff --git a/tests/auto/testlib/selftests/keyboard/CMakeLists.txt b/tests/auto/testlib/selftests/keyboard/CMakeLists.txt index 998de7f0ed..a1c1482e04 100644 --- a/tests/auto/testlib/selftests/keyboard/CMakeLists.txt +++ b/tests/auto/testlib/selftests/keyboard/CMakeLists.txt @@ -1,15 +1,17 @@ -# Generated from keyboard.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## keyboard Binary: ##################################################################### qt_internal_add_executable(keyboard - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_keyboard.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Gui Qt::GuiPrivate Qt::Test @@ -19,6 +21,4 @@ qt_internal_add_executable(keyboard ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(keyboard) -# special case end diff --git a/tests/auto/testlib/selftests/keyboard/tst_keyboard.cpp b/tests/auto/testlib/selftests/keyboard/tst_keyboard.cpp index 069306121c..1d6b8bb962 100644 --- a/tests/auto/testlib/selftests/keyboard/tst_keyboard.cpp +++ b/tests/auto/testlib/selftests/keyboard/tst_keyboard.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtTest/qtest.h> #include <QtGui/qwindow.h> diff --git a/tests/auto/testlib/selftests/longstring/CMakeLists.txt b/tests/auto/testlib/selftests/longstring/CMakeLists.txt index 1b123b1e0c..0528ef0255 100644 --- a/tests/auto/testlib/selftests/longstring/CMakeLists.txt +++ b/tests/auto/testlib/selftests/longstring/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from longstring.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## longstring Binary: ##################################################################### qt_internal_add_executable(longstring - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_longstring.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(longstring) -# special case end diff --git a/tests/auto/testlib/selftests/longstring/tst_longstring.cpp b/tests/auto/testlib/selftests/longstring/tst_longstring.cpp index 0c84d68b47..ce9d428831 100644 --- a/tests/auto/testlib/selftests/longstring/tst_longstring.cpp +++ b/tests/auto/testlib/selftests/longstring/tst_longstring.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> diff --git a/tests/auto/testlib/selftests/maxwarnings/CMakeLists.txt b/tests/auto/testlib/selftests/maxwarnings/CMakeLists.txt index 6c2eca0935..e5f0070b79 100644 --- a/tests/auto/testlib/selftests/maxwarnings/CMakeLists.txt +++ b/tests/auto/testlib/selftests/maxwarnings/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from maxwarnings.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## maxwarnings Binary: ##################################################################### qt_internal_add_executable(maxwarnings - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES maxwarnings.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(maxwarnings) -# special case end diff --git a/tests/auto/testlib/selftests/maxwarnings/maxwarnings.cpp b/tests/auto/testlib/selftests/maxwarnings/maxwarnings.cpp index 518e1a75af..5d47b058a7 100644 --- a/tests/auto/testlib/selftests/maxwarnings/maxwarnings.cpp +++ b/tests/auto/testlib/selftests/maxwarnings/maxwarnings.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> diff --git a/tests/auto/testlib/selftests/mouse/CMakeLists.txt b/tests/auto/testlib/selftests/mouse/CMakeLists.txt index aab32b06ba..9eb4aec2ce 100644 --- a/tests/auto/testlib/selftests/mouse/CMakeLists.txt +++ b/tests/auto/testlib/selftests/mouse/CMakeLists.txt @@ -1,15 +1,17 @@ -# Generated from mouse.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## mouse Binary: ##################################################################### qt_internal_add_executable(mouse - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_mouse.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Gui Qt::GuiPrivate Qt::Test @@ -19,6 +21,4 @@ qt_internal_add_executable(mouse ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(mouse) -# special case end diff --git a/tests/auto/testlib/selftests/mouse/tst_mouse.cpp b/tests/auto/testlib/selftests/mouse/tst_mouse.cpp index b43d5f7615..dd79add5f3 100644 --- a/tests/auto/testlib/selftests/mouse/tst_mouse.cpp +++ b/tests/auto/testlib/selftests/mouse/tst_mouse.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> #include <QtGui/QWindow> @@ -49,6 +24,7 @@ private slots: void stateHandlingPart2(); void deterministicEvents_data(); void deterministicEvents(); + void doubleClick(); }; class MouseWindow : public QWindow @@ -276,5 +252,53 @@ void tst_Mouse::deterministicEvents() QCOMPARE(w.moveCount, 1); } +void tst_Mouse::doubleClick() +{ + MouseWindow w; + w.show(); + w.setGeometry(100, 100, 200, 200); + QVERIFY(QTest::qWaitForWindowActive(&w)); + + // click + QPoint point(10, 10); + QCOMPARE(w.pressCount, 0); + QTest::mousePress(&w, Qt::LeftButton, { }, point); + QCOMPARE(w.pressCount, 1); + // give a delay of 10ms + auto ts = w.lastTimeStamp; + QTest::mouseRelease(&w, Qt::LeftButton, { }, point, 10); + QCOMPARE(w.lastTimeStamp, ts + 10); + QCOMPARE(w.doubleClickCount, 0); + + // click again within a short time to generate double-click + QTest::mousePress(&w, Qt::LeftButton, { }, point, 10); + QCOMPARE(w.pressCount, 2); + QCOMPARE(w.lastTimeStamp, ts + 20); + // this time, let some virtual time elapse, because we're going to test double-click again afterwards + QTest::mouseRelease(&w, Qt::LeftButton, { }, point); + QCOMPARE_GT(w.lastTimeStamp, ts + 20); + QCOMPARE(w.doubleClickCount, 1); + + // use the mouseClick function to generate another double-click + ts = w.lastTimeStamp; + QTest::mouseClick(&w, Qt::LeftButton, {}, point, 10); + QCOMPARE_GE(w.lastTimeStamp, ts + 500); // because the last release had a default delay + QTest::mouseClick(&w, Qt::LeftButton, {}, point); + QCOMPARE(w.doubleClickCount, 2); + + // use the mouseDClick function to generate another double-click + ts = w.lastTimeStamp; + QTest::mouseDClick(&w, Qt::LeftButton, {}, point); + QCOMPARE_GE(w.lastTimeStamp, ts + 500); // because the last release had a default delay + QCOMPARE(w.doubleClickCount, 3); + + // use the mouseClick function with default delay to avoid double-click + ts = w.lastTimeStamp; + QTest::mouseClick(&w, Qt::LeftButton, {}, point); + QCOMPARE_GE(w.lastTimeStamp, ts + 500); // because the last release had a default delay + QTest::mouseClick(&w, Qt::LeftButton, {}, point); + QCOMPARE(w.doubleClickCount, 3); +} + QTEST_MAIN(tst_Mouse) #include "tst_mouse.moc" diff --git a/tests/auto/testlib/selftests/multiexec/CMakeLists.txt b/tests/auto/testlib/selftests/multiexec/CMakeLists.txt index 314765b803..ece9279856 100644 --- a/tests/auto/testlib/selftests/multiexec/CMakeLists.txt +++ b/tests/auto/testlib/selftests/multiexec/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from multiexec.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## multiexec Binary: ##################################################################### qt_internal_add_executable(multiexec - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_multiexec.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(multiexec) -# special case end diff --git a/tests/auto/testlib/selftests/multiexec/tst_multiexec.cpp b/tests/auto/testlib/selftests/multiexec/tst_multiexec.cpp index dd403e97c4..be7c151d34 100644 --- a/tests/auto/testlib/selftests/multiexec/tst_multiexec.cpp +++ b/tests/auto/testlib/selftests/multiexec/tst_multiexec.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> diff --git a/tests/auto/testlib/selftests/pairdiagnostics/CMakeLists.txt b/tests/auto/testlib/selftests/pairdiagnostics/CMakeLists.txt index f752131325..d0c9e6309a 100644 --- a/tests/auto/testlib/selftests/pairdiagnostics/CMakeLists.txt +++ b/tests/auto/testlib/selftests/pairdiagnostics/CMakeLists.txt @@ -1,18 +1,18 @@ -# Generated from pairdiagnostics.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## pairdiagnostics Binary: ##################################################################### qt_internal_add_executable(pairdiagnostics - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_pairdiagnostics.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) -# special case begin qt_internal_apply_testlib_coverage_options(pairdiagnostics) -# special case end diff --git a/tests/auto/testlib/selftests/pairdiagnostics/tst_pairdiagnostics.cpp b/tests/auto/testlib/selftests/pairdiagnostics/tst_pairdiagnostics.cpp index b057e78b99..72cc4ab1f2 100644 --- a/tests/auto/testlib/selftests/pairdiagnostics/tst_pairdiagnostics.cpp +++ b/tests/auto/testlib/selftests/pairdiagnostics/tst_pairdiagnostics.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only // Make sure we get a real Q_ASSERT even in release builds #ifdef QT_NO_DEBUG diff --git a/tests/auto/testlib/selftests/pass/CMakeLists.txt b/tests/auto/testlib/selftests/pass/CMakeLists.txt index 1f54a009ec..de3bfbc32a 100644 --- a/tests/auto/testlib/selftests/pass/CMakeLists.txt +++ b/tests/auto/testlib/selftests/pass/CMakeLists.txt @@ -1,22 +1,22 @@ -# Generated from pass.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## pass Binary: ##################################################################### qt_internal_add_executable(pass - NO_INSTALL # special case - OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" SOURCES tst_pass.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(pass) -# special case end diff --git a/tests/auto/testlib/selftests/pass/tst_pass.cpp b/tests/auto/testlib/selftests/pass/tst_pass.cpp index b03e050242..760c5a236d 100644 --- a/tests/auto/testlib/selftests/pass/tst_pass.cpp +++ b/tests/auto/testlib/selftests/pass/tst_pass.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2020 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> #include <QTest> diff --git a/tests/auto/testlib/selftests/patches/0001-Catch2-Fix-console-width-for-Qt-tests.patch b/tests/auto/testlib/selftests/patches/0001-Catch2-Fix-console-width-for-Qt-tests.patch new file mode 100644 index 0000000000..6365cb774f --- /dev/null +++ b/tests/auto/testlib/selftests/patches/0001-Catch2-Fix-console-width-for-Qt-tests.patch @@ -0,0 +1,24 @@ +From 426c2d7e32bc2f252e9d3323f633ac73222a7afc Mon Sep 17 00:00:00 2001 +From: Samuli Piippo <samuli.piippo@qt.io> +Date: Thu, 20 Jan 2022 09:04:54 +0200 +Subject: [PATCH] Catch2: Fix console width for Qt tests + +Disabled by Qt so that test failures are not line-broken +--- + tests/auto/testlib/selftests/catch_p_p.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tests/auto/testlib/selftests/catch_p_p.h b/tests/auto/testlib/selftests/catch_p_p.h +index db1fed3b98..26bb41f4f0 100644 +--- a/tests/auto/testlib/selftests/catch_p_p.h ++++ b/tests/auto/testlib/selftests/catch_p_p.h +@@ -8413,7 +8413,9 @@ namespace Catch { + #define CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH + #undef CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH + #endif ++#if 0 // Disabled by Qt so that test failures are not line-broken + #define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_CONFIG_CONSOLE_WIDTH-1 ++#endif + + #ifdef __clang__ + #pragma clang diagnostic push diff --git a/tests/auto/testlib/selftests/printdatatags/CMakeLists.txt b/tests/auto/testlib/selftests/printdatatags/CMakeLists.txt index a323b1f73d..4e2d58c35a 100644 --- a/tests/auto/testlib/selftests/printdatatags/CMakeLists.txt +++ b/tests/auto/testlib/selftests/printdatatags/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from printdatatags.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## printdatatags Binary: ##################################################################### qt_internal_add_executable(printdatatags - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_printdatatags.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(printdatatags) -# special case end diff --git a/tests/auto/testlib/selftests/printdatatags/tst_printdatatags.cpp b/tests/auto/testlib/selftests/printdatatags/tst_printdatatags.cpp index a2f91896f4..31cf97347e 100644 --- a/tests/auto/testlib/selftests/printdatatags/tst_printdatatags.cpp +++ b/tests/auto/testlib/selftests/printdatatags/tst_printdatatags.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> diff --git a/tests/auto/testlib/selftests/printdatatagswithglobaltags/CMakeLists.txt b/tests/auto/testlib/selftests/printdatatagswithglobaltags/CMakeLists.txt index 323d3d65ed..80d08a9d2d 100644 --- a/tests/auto/testlib/selftests/printdatatagswithglobaltags/CMakeLists.txt +++ b/tests/auto/testlib/selftests/printdatatagswithglobaltags/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from printdatatagswithglobaltags.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## printdatatagswithglobaltags Binary: ##################################################################### qt_internal_add_executable(printdatatagswithglobaltags - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_printdatatagswithglobaltags.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(printdatatagswithglobaltags) -# special case end diff --git a/tests/auto/testlib/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp b/tests/auto/testlib/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp index 417df9aedb..21e057cbb1 100644 --- a/tests/auto/testlib/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp +++ b/tests/auto/testlib/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> diff --git a/tests/auto/testlib/selftests/qexecstringlist/CMakeLists.txt b/tests/auto/testlib/selftests/qexecstringlist/CMakeLists.txt index 2aec291154..91244ca25a 100644 --- a/tests/auto/testlib/selftests/qexecstringlist/CMakeLists.txt +++ b/tests/auto/testlib/selftests/qexecstringlist/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from qexecstringlist.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## qexecstringlist Binary: ##################################################################### qt_internal_add_executable(qexecstringlist - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_qexecstringlist.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(qexecstringlist) -# special case end diff --git a/tests/auto/testlib/selftests/qexecstringlist/tst_qexecstringlist.cpp b/tests/auto/testlib/selftests/qexecstringlist/tst_qexecstringlist.cpp index cd454ae3b4..fefb643041 100644 --- a/tests/auto/testlib/selftests/qexecstringlist/tst_qexecstringlist.cpp +++ b/tests/auto/testlib/selftests/qexecstringlist/tst_qexecstringlist.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> diff --git a/tests/auto/testlib/selftests/qt_attribution.json b/tests/auto/testlib/selftests/qt_attribution.json index af1b594e93..3a126f59ed 100644 --- a/tests/auto/testlib/selftests/qt_attribution.json +++ b/tests/auto/testlib/selftests/qt_attribution.json @@ -8,10 +8,10 @@ "Description": "Catch2 is a multi-paradigm test framework for C++.", "Homepage": "https://github.com/catchorg/Catch2", - "Version": "2.11.1", + "Version": "2.13.10", "License": "Boost Software License 1.0", "LicenseId": "BSL-1.0", "LicenseFile": "CATCH_LICENSE.txt", - "Copyright": "Copyright (c) 2019 Two Blue Cubes Ltd. All rights reserved." + "Copyright": "Copyright (c) 2022 Two Blue Cubes Ltd. All rights reserved." } ] diff --git a/tests/auto/testlib/selftests/signaldumper/CMakeLists.txt b/tests/auto/testlib/selftests/signaldumper/CMakeLists.txt index a8c667d721..79ab8f8f86 100644 --- a/tests/auto/testlib/selftests/signaldumper/CMakeLists.txt +++ b/tests/auto/testlib/selftests/signaldumper/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from signaldumper.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## signaldumper Binary: ##################################################################### qt_internal_add_executable(signaldumper - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_signaldumper.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::TestPrivate ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(signaldumper) -# special case end diff --git a/tests/auto/testlib/selftests/signaldumper/tst_signaldumper.cpp b/tests/auto/testlib/selftests/signaldumper/tst_signaldumper.cpp index 6dee51b544..8b233abc1e 100644 --- a/tests/auto/testlib/selftests/signaldumper/tst_signaldumper.cpp +++ b/tests/auto/testlib/selftests/signaldumper/tst_signaldumper.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> #include <QTest> diff --git a/tests/auto/testlib/selftests/silent/CMakeLists.txt b/tests/auto/testlib/selftests/silent/CMakeLists.txt index d029aa8021..76bb0d0110 100644 --- a/tests/auto/testlib/selftests/silent/CMakeLists.txt +++ b/tests/auto/testlib/selftests/silent/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from silent.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## silent Binary: ##################################################################### qt_internal_add_executable(silent - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_silent.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::TestPrivate ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(silent) -# special case end diff --git a/tests/auto/testlib/selftests/silent/tst_silent.cpp b/tests/auto/testlib/selftests/silent/tst_silent.cpp index 87c610f269..a1e7f7af57 100644 --- a/tests/auto/testlib/selftests/silent/tst_silent.cpp +++ b/tests/auto/testlib/selftests/silent/tst_silent.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> #include <QTest> @@ -40,8 +15,6 @@ private slots: void fail(); void xfail(); void xpass(); - - // This test function must be last, as it calls qFatal(). void messages(); }; @@ -72,17 +45,6 @@ void tst_Silent::xpass() QVERIFY2(true, "This test should XPASS"); } -#ifndef Q_OS_WIN -#include <signal.h> -#include <setjmp.h> - -static jmp_buf state; -static void abort_handler(int) -{ - longjmp(state, 1); -} -#endif - void tst_Silent::messages() { qWarning("This is a warning that should not appear in silent test output"); @@ -91,15 +53,6 @@ void tst_Silent::messages() qCritical("This is a critical message that should not appear in silent test output"); qInfo("This is an info message that should not appear in silent test output"); QTestLog::info("This is an internal testlib info message that should not appear in silent test output", __FILE__, __LINE__); - -#ifndef Q_OS_WIN - // We're testing qFatal, but we don't want to actually std::abort() ! - auto prior = signal(SIGABRT, abort_handler); - if (setjmp(state)) - signal(SIGABRT, prior); - else -#endif - qFatal("This is a fatal error message that should still appear in silent test output"); } QTEST_MAIN_WRAPPER(tst_Silent, diff --git a/tests/auto/testlib/selftests/silent_fatal/CMakeLists.txt b/tests/auto/testlib/selftests/silent_fatal/CMakeLists.txt new file mode 100644 index 0000000000..e4b59e399f --- /dev/null +++ b/tests/auto/testlib/selftests/silent_fatal/CMakeLists.txt @@ -0,0 +1,15 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +qt_internal_add_executable(silent_fatal + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + SOURCES + tst_silent_fatal.cpp + LIBRARIES + Qt::TestPrivate +) + +# No coverage because this crashes, making data collection difficult, if not +# impossible. diff --git a/tests/auto/testlib/selftests/silent_fatal/tst_silent_fatal.cpp b/tests/auto/testlib/selftests/silent_fatal/tst_silent_fatal.cpp new file mode 100644 index 0000000000..57aa1f702c --- /dev/null +++ b/tests/auto/testlib/selftests/silent_fatal/tst_silent_fatal.cpp @@ -0,0 +1,28 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <QtCore/QCoreApplication> +#include <QTest> +#include <private/qtestlog_p.h> + +class tst_SilentFatal : public QObject +{ + Q_OBJECT + +private slots: + void fatalmessages(); +}; +void tst_SilentFatal::fatalmessages() +{ + qFatal("This is a fatal error message that should still appear in silent test output"); +} + +QTEST_MAIN_WRAPPER(tst_SilentFatal, + std::vector<const char*> args(argv, argv + argc); + args.push_back("-silent"); + args.push_back("-nocrashhandler"); + argc = int(args.size()); + argv = const_cast<char**>(&args[0]); + QTEST_MAIN_SETUP()) + +#include "tst_silent_fatal.moc" diff --git a/tests/auto/testlib/selftests/singleskip/CMakeLists.txt b/tests/auto/testlib/selftests/singleskip/CMakeLists.txt index fa8132a3c1..b37cc5fcc0 100644 --- a/tests/auto/testlib/selftests/singleskip/CMakeLists.txt +++ b/tests/auto/testlib/selftests/singleskip/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from singleskip.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## singleskip Binary: ##################################################################### qt_internal_add_executable(singleskip - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_singleskip.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(singleskip) -# special case end diff --git a/tests/auto/testlib/selftests/singleskip/tst_singleskip.cpp b/tests/auto/testlib/selftests/singleskip/tst_singleskip.cpp index d4febf1f5f..c5307fed70 100644 --- a/tests/auto/testlib/selftests/singleskip/tst_singleskip.cpp +++ b/tests/auto/testlib/selftests/singleskip/tst_singleskip.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> diff --git a/tests/auto/testlib/selftests/skip/CMakeLists.txt b/tests/auto/testlib/selftests/skip/CMakeLists.txt index 2841dcbd9a..6fb38cc976 100644 --- a/tests/auto/testlib/selftests/skip/CMakeLists.txt +++ b/tests/auto/testlib/selftests/skip/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from skip.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## skip Binary: ##################################################################### qt_internal_add_executable(skip - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_skip.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(skip) -# special case end diff --git a/tests/auto/testlib/selftests/skip/tst_skip.cpp b/tests/auto/testlib/selftests/skip/tst_skip.cpp index 43ef8155e0..709080049a 100644 --- a/tests/auto/testlib/selftests/skip/tst_skip.cpp +++ b/tests/auto/testlib/selftests/skip/tst_skip.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> diff --git a/tests/auto/testlib/selftests/skipblacklisted/BLACKLIST b/tests/auto/testlib/selftests/skipblacklisted/BLACKLIST new file mode 100644 index 0000000000..77c13250cd --- /dev/null +++ b/tests/auto/testlib/selftests/skipblacklisted/BLACKLIST @@ -0,0 +1,6 @@ +[blacklisted] +* +[blacklistedData:blacklisted 1] +* +[blacklistedData:blacklisted 2] +* diff --git a/tests/auto/testlib/selftests/skipblacklisted/CMakeLists.txt b/tests/auto/testlib/selftests/skipblacklisted/CMakeLists.txt new file mode 100644 index 0000000000..0cdcf2c063 --- /dev/null +++ b/tests/auto/testlib/selftests/skipblacklisted/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (C) 2024 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause +##################################################################### +## skipblacklisted Binary: +##################################################################### + +qt_internal_add_executable(skipblacklisted + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + SOURCES + tst_skipblacklisted.cpp + LIBRARIES + Qt::Test +) + +## Scopes: +##################################################################### + +qt_internal_apply_testlib_coverage_options(skipblacklisted) diff --git a/tests/auto/testlib/selftests/skipblacklisted/tst_skipblacklisted.cpp b/tests/auto/testlib/selftests/skipblacklisted/tst_skipblacklisted.cpp new file mode 100644 index 0000000000..4ebff3ee4b --- /dev/null +++ b/tests/auto/testlib/selftests/skipblacklisted/tst_skipblacklisted.cpp @@ -0,0 +1,51 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <QTest> + +class tst_SkipBlacklisted : public QObject +{ + Q_OBJECT + +private slots: + void pass(); + void blacklisted(); + void blacklistedData(); + void blacklistedData_data(); +}; + +void tst_SkipBlacklisted::pass() +{ + QVERIFY(true); +} + +// This test have been blacklisted in skipblacklisted/BLACKLIST +void tst_SkipBlacklisted::blacklisted() +{ + QFAIL("this line should never be reached, since we skip all blacklisted test functions"); +} + +// blacklisted 1 and blacklisted 2 have been blacklisted in skipblacklisted/BLACKLIST +void tst_SkipBlacklisted::blacklistedData() +{ + QFETCH(int, testdata); + QCOMPARE(testdata, 2); +} + +void tst_SkipBlacklisted::blacklistedData_data() +{ + QTest::addColumn<int>("testdata"); + + QTest::newRow("blacklisted 1") << 1; + QTest::newRow("should pass") << 2; + QTest::newRow("blacklisted 2") << 3; +} + +QTEST_MAIN_WRAPPER(tst_SkipBlacklisted, + std::vector<const char*> args(argv, argv + argc); + args.push_back("-skipblacklisted"); + argc = int(args.size()); + argv = const_cast<char**>(&args[0]); + QTEST_MAIN_SETUP()) + +#include "tst_skipblacklisted.moc" diff --git a/tests/auto/testlib/selftests/skipcleanup/CMakeLists.txt b/tests/auto/testlib/selftests/skipcleanup/CMakeLists.txt index 5af361e25a..36a643bf4d 100644 --- a/tests/auto/testlib/selftests/skipcleanup/CMakeLists.txt +++ b/tests/auto/testlib/selftests/skipcleanup/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from skipcleanup.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## skipcleanup Binary: ##################################################################### qt_internal_add_executable(skipcleanup - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_skipcleanup.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(skipcleanup) -# special case end diff --git a/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp b/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp index df26e09648..68053e4431 100644 --- a/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp +++ b/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> @@ -33,7 +8,7 @@ class tst_SkipCleanup: public QObject Q_OBJECT private slots: void aTestFunction() const; - void cleanupTestCase() const; + void cleanup() const; }; void tst_SkipCleanup::aTestFunction() const @@ -41,9 +16,9 @@ void tst_SkipCleanup::aTestFunction() const QVERIFY(true); } -void tst_SkipCleanup::cleanupTestCase() const +void tst_SkipCleanup::cleanup() const { - QSKIP("Skip inside cleanupTestCase."); + QSKIP("Skip inside cleanup."); } QTEST_APPLESS_MAIN(tst_SkipCleanup) diff --git a/tests/auto/testlib/selftests/skipcleanuptestcase/CMakeLists.txt b/tests/auto/testlib/selftests/skipcleanuptestcase/CMakeLists.txt new file mode 100644 index 0000000000..5c531b46b5 --- /dev/null +++ b/tests/auto/testlib/selftests/skipcleanuptestcase/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (C) 2024 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause +##################################################################### +## skipcleanuptestcase Binary: +##################################################################### + +qt_internal_add_executable(skipcleanuptestcase + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + SOURCES + tst_skipcleanuptestcase.cpp + LIBRARIES + Qt::Test +) + +## Scopes: +##################################################################### + +qt_internal_apply_testlib_coverage_options(skipcleanuptestcase) diff --git a/tests/auto/testlib/selftests/skipcleanuptestcase/tst_skipcleanuptestcase.cpp b/tests/auto/testlib/selftests/skipcleanuptestcase/tst_skipcleanuptestcase.cpp new file mode 100644 index 0000000000..72ff91590d --- /dev/null +++ b/tests/auto/testlib/selftests/skipcleanuptestcase/tst_skipcleanuptestcase.cpp @@ -0,0 +1,25 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <QTest> + +class tst_SkipCleanupTestCase: public QObject +{ +Q_OBJECT +private slots: + void aTestFunction() const; + void cleanupTestCase() const; +}; + +void tst_SkipCleanupTestCase::aTestFunction() const +{ + QVERIFY(true); +} + +void tst_SkipCleanupTestCase::cleanupTestCase() const +{ + QSKIP("Skip inside cleanupTestCase."); +} + +QTEST_APPLESS_MAIN(tst_SkipCleanupTestCase) +#include "tst_skipcleanuptestcase.moc" diff --git a/tests/auto/testlib/selftests/skipinit/CMakeLists.txt b/tests/auto/testlib/selftests/skipinit/CMakeLists.txt index 6cf2e97688..69fa7e3d42 100644 --- a/tests/auto/testlib/selftests/skipinit/CMakeLists.txt +++ b/tests/auto/testlib/selftests/skipinit/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from skipinit.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## skipinit Binary: ##################################################################### qt_internal_add_executable(skipinit - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_skipinit.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(skipinit) -# special case end diff --git a/tests/auto/testlib/selftests/skipinit/tst_skipinit.cpp b/tests/auto/testlib/selftests/skipinit/tst_skipinit.cpp index 832792800c..4975f1f029 100644 --- a/tests/auto/testlib/selftests/skipinit/tst_skipinit.cpp +++ b/tests/auto/testlib/selftests/skipinit/tst_skipinit.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> diff --git a/tests/auto/testlib/selftests/skipinitdata/CMakeLists.txt b/tests/auto/testlib/selftests/skipinitdata/CMakeLists.txt index cacc40af66..482564c51f 100644 --- a/tests/auto/testlib/selftests/skipinitdata/CMakeLists.txt +++ b/tests/auto/testlib/selftests/skipinitdata/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from skipinitdata.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## skipinitdata Binary: ##################################################################### qt_internal_add_executable(skipinitdata - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_skipinitdata.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(skipinitdata) -# special case end diff --git a/tests/auto/testlib/selftests/skipinitdata/tst_skipinitdata.cpp b/tests/auto/testlib/selftests/skipinitdata/tst_skipinitdata.cpp index f0f6055710..26725814db 100644 --- a/tests/auto/testlib/selftests/skipinitdata/tst_skipinitdata.cpp +++ b/tests/auto/testlib/selftests/skipinitdata/tst_skipinitdata.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> diff --git a/tests/auto/testlib/selftests/sleep/CMakeLists.txt b/tests/auto/testlib/selftests/sleep/CMakeLists.txt index 418c61bab9..2e789b59d7 100644 --- a/tests/auto/testlib/selftests/sleep/CMakeLists.txt +++ b/tests/auto/testlib/selftests/sleep/CMakeLists.txt @@ -1,21 +1,22 @@ -# Generated from sleep.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## sleep Binary: ##################################################################### qt_internal_add_executable(sleep - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_sleep.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test + Qt::CorePrivate ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(sleep) -# special case end diff --git a/tests/auto/testlib/selftests/sleep/tst_sleep.cpp b/tests/auto/testlib/selftests/sleep/tst_sleep.cpp index 20e80950c2..d9cd6959e5 100644 --- a/tests/auto/testlib/selftests/sleep/tst_sleep.cpp +++ b/tests/auto/testlib/selftests/sleep/tst_sleep.cpp @@ -1,36 +1,20 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> #include <QtCore/QElapsedTimer> #include <QTest> +#ifdef Q_OS_UNIX +#include <QtCore/private/qcore_unix_p.h> +#include <QtCore/qsystemdetection.h> + +#include <time.h> +#endif + +using namespace std::chrono_literals; + class tst_Sleep: public QObject { Q_OBJECT @@ -42,17 +26,21 @@ private slots: void tst_Sleep::sleep() { + // Subtracting 10ms as a margin for error + static constexpr auto MarginForError = 10ms; + QElapsedTimer t; t.start(); + // Test qSleep(int) overload, too QTest::qSleep(100); - QVERIFY(t.elapsed() > 90); + QCOMPARE_GT(t.durationElapsed(), 100ms - MarginForError); - QTest::qSleep(1000); - QVERIFY(t.elapsed() > 1000); + QTest::qSleep(1s); + QCOMPARE_GT(t.durationElapsed(), 1s - MarginForError); - QTest::qSleep(1000 * 10); // 10 seconds - QVERIFY(t.elapsed() > 1000 * 10); + QTest::qSleep(10s); + QCOMPARE_GT(t.durationElapsed(), 10s - MarginForError); } void tst_Sleep::wait() @@ -61,16 +49,16 @@ void tst_Sleep::wait() t.start(); QTest::qWait(1); - QVERIFY(t.elapsed() >= 1); + QCOMPARE_GE(t.durationElapsed(), 1ms); QTest::qWait(10); - QVERIFY(t.elapsed() >= 11); + QCOMPARE_GE(t.durationElapsed(), 11ms); QTest::qWait(100); - QVERIFY(t.elapsed() >= 111); + QCOMPARE_GE(t.durationElapsed(), 111ms); QTest::qWait(1000); - QVERIFY(t.elapsed() >= 1111); + QCOMPARE_GE(t.durationElapsed(), 1111ms); } QTEST_MAIN(tst_Sleep) diff --git a/tests/auto/testlib/selftests/strcmp/CMakeLists.txt b/tests/auto/testlib/selftests/strcmp/CMakeLists.txt index 23919e5c32..8baaf92fa9 100644 --- a/tests/auto/testlib/selftests/strcmp/CMakeLists.txt +++ b/tests/auto/testlib/selftests/strcmp/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from strcmp.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## strcmp Binary: ##################################################################### qt_internal_add_executable(strcmp - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_strcmp.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(strcmp) -# special case end diff --git a/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp b/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp index 262299aebf..aefd9e08b9 100644 --- a/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp +++ b/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> diff --git a/tests/auto/testlib/selftests/subtest/CMakeLists.txt b/tests/auto/testlib/selftests/subtest/CMakeLists.txt index fc459b96e2..3dad026cf3 100644 --- a/tests/auto/testlib/selftests/subtest/CMakeLists.txt +++ b/tests/auto/testlib/selftests/subtest/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from subtest.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## subtest Binary: ##################################################################### qt_internal_add_executable(subtest - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_subtest.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(subtest) -# special case end diff --git a/tests/auto/testlib/selftests/subtest/tst_subtest.cpp b/tests/auto/testlib/selftests/subtest/tst_subtest.cpp index c5f5cd6c04..023c43e2af 100644 --- a/tests/auto/testlib/selftests/subtest/tst_subtest.cpp +++ b/tests/auto/testlib/selftests/subtest/tst_subtest.cpp @@ -1,31 +1,8 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +#undef QTEST_THROW_ON_FAILURE // code expects old behavior +#undef QTEST_THROW_ON_SKIP // code expects old behavior #include <QtCore/QCoreApplication> #include <QtCore/QDebug> @@ -136,6 +113,7 @@ void tst_Subtest::test3() void tst_Subtest::multiFail() { + const QTest::ThrowOnFailDisabler nothrow; // tests repeated QFAILs // Simulates tests which call a shared function that does common checks, or // that do checks in code run asynchronously from a message loop. for (int i = 0; i < 10; ++i) @@ -145,6 +123,7 @@ void tst_Subtest::multiFail() void tst_Subtest::multiSkip() { + const QTest::ThrowOnSkipDisabler nothrow; // tests repeated QSKIPs // Similar to multiFail() for (int i = 0; i < 10; ++i) []() { QSKIP("This skip should be repeated ten times"); }(); diff --git a/tests/auto/testlib/selftests/testlib/CMakeLists.txt b/tests/auto/testlib/selftests/testlib/CMakeLists.txt index 776f503bf2..f60ddb8865 100644 --- a/tests/auto/testlib/selftests/testlib/CMakeLists.txt +++ b/tests/auto/testlib/selftests/testlib/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from testlib.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## testlib Binary: ##################################################################### qt_internal_add_executable(testlib - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_testlib.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(testlib) -# special case end diff --git a/tests/auto/testlib/selftests/testlib/tst_testlib.cpp b/tests/auto/testlib/selftests/testlib/tst_testlib.cpp index e1df8d89b9..58e3e7ad33 100644 --- a/tests/auto/testlib/selftests/testlib/tst_testlib.cpp +++ b/tests/auto/testlib/selftests/testlib/tst_testlib.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> #include <QtCore/QtMath> @@ -39,7 +14,11 @@ class tst_TestLib : public QObject { -Q_OBJECT + Q_OBJECT + +public: + tst_TestLib(); + private slots: void basics() const; void delays() const; @@ -47,6 +26,14 @@ private slots: void reals() const; }; +tst_TestLib::tst_TestLib() +{ + // Set object name, so that it's printed out when some comparison fails. + // Othewise object address will be printed, which will not allow + // tst_sefltest to compare the output with expected. + setObjectName("TestObject"); +} + void tst_TestLib::basics() const { QVERIFY(QByteArray(QTest::currentAppName()).contains("testlib")); diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index 8aad22dec8..04185e95cd 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -1,35 +1,10 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Copyright (C) 2016 Intel Corporation. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// Copyright (C) 2016 Intel Corporation. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QCoreApplication> -#if QT_CONFIG(process) +QT_REQUIRE_CONFIG(process); #if QT_CONFIG(temporaryfile) # define USE_DIFF @@ -50,6 +25,8 @@ #include <QtTest/private/qemulationdetector_p.h> +using namespace Qt::StringLiterals; + struct BenchmarkResult { qint64 total; @@ -220,6 +197,8 @@ bool compareOutput(const QString &logger, const QString &subdir, continue; if (actualLineBA.endsWith(" : failure location")) continue; + if (actualLineBA.endsWith(" : message location")) + continue; if (actualLineBA.startsWith("Config: Using QtTest library") // Text build string || actualLineBA.startsWith(" <QtBuild") // XML, Light XML build string @@ -453,8 +432,8 @@ BenchmarkResult BenchmarkResult::parse(QString const& line, QString* error) // format: // "function","[globaltag:]tag","metric",value_per_iteration,total,iterations QStringList split = line.split(','); - if (split.count() != 6) { - if (error) *error = QString("Wrong number of columns (%1)").arg(split.count()); + if (split.size() != 6) { + if (error) *error = QString("Wrong number of columns (%1)").arg(split.size()); return out; } @@ -480,11 +459,13 @@ BenchmarkResult BenchmarkResult::parse(QString const& line, QString* error) // This code avoids using a QRegExp because QRegExp might be broken. // Sample format: 4,000 msec per iteration (total: 4,000, iterations: 1) - QString sFirstNumber; - while (!remaining.isEmpty() && !remaining.at(0).isSpace()) { - sFirstNumber += remaining.at(0); - remaining.remove(0,1); - } + const auto begin = remaining.cbegin(); + auto it = std::find_if(begin, remaining.cend(), [](const auto ch) { + return ch.isSpace(); + }); + QString sFirstNumber{std::distance(begin, it), Qt::Uninitialized}; + std::move(begin, it, sFirstNumber.begin()); + remaining.erase(begin, it); remaining = remaining.trimmed(); // 4,000 -> 4000 @@ -657,6 +638,11 @@ bool TestLogger::shouldIgnoreTest(const QString &test) const return true; #endif + if (!qEnvironmentVariableIsEmpty("WAYLAND_DISPLAY")) { + qDebug() << "TestLogger::shouldIgnoreTest() ignore" << test << "on wayland/xwayland!"; + return true; + } + // These tests are affected by timing and whether the CPU tick counter // is monotonically increasing. They won't work on some machines so // leave them off by default. Feel free to enable them for your own @@ -674,7 +660,7 @@ bool TestLogger::shouldIgnoreTest(const QString &test) const return true; #endif -#if defined(QT_NO_EXCEPTIONS) || defined(Q_CC_INTEL) || defined(Q_OS_WIN) +#if defined(QT_NO_EXCEPTIONS) || defined(Q_OS_WIN) // Disable this test on Windows or for Intel compiler, as the run-times // will popup dialogs with warnings that uncaught exceptions were thrown if (test == "exceptionthrow") @@ -691,7 +677,7 @@ bool TestLogger::shouldIgnoreTest(const QString &test) const #if defined(__GNUC__) && (defined(__i386) || defined(__x86_64)) && defined(Q_OS_LINUX) // Check that it's actually available QProcess checkProcess; - QStringList args{u"--version"_qs}; + QStringList args{u"--version"_s}; checkProcess.start("valgrind", args); if (!checkProcess.waitForFinished(-1)) { WARN("Valgrind broken or not available. Not running benchlibcallgrind test!"); @@ -713,7 +699,8 @@ bool TestLogger::shouldIgnoreTest(const QString &test) const || test == "benchliboptions" || test == "printdatatags" || test == "printdatatagswithglobaltags" - || test == "silent") + || test == "silent" + || test == "silent_fatal") return true; // These tests produce variable output (callgrind because of #if-ery, @@ -778,29 +765,30 @@ void checkErrorOutput(const QString &test, const QByteArray &errorOutput) || test == "benchlibcallgrind") return; -#ifdef Q_CC_MINGW - if (test == "blacklisted" // calls qFatal() - || test == "silent") // calls qFatal() -#endif - return; - #ifdef Q_OS_WIN if (test == "crashes") return; // Complains about uncaught exception #endif -#ifdef Q_OS_LINUX - // QEMU outputs to stderr about uncaught signals - if (QTestPrivate::isRunningArmOnX86() && - (test == "assert" - || test == "blacklisted" - || test == "crashes" - || test == "faildatatype" - || test == "failfetchtype" - || test == "silent" - )) +#ifdef Q_OS_UNIX + if (test == "assert" + || test == "crashes" + || test == "failfetchtype" + || test == "faildatatype") + return; // Outputs "Received signal 6 (SIGABRT)" +#endif + + if (test == "silent_fatal") { +#if defined(__SANITIZE_ADDRESS__) || __has_feature(address_sanitizer) + // Under ASan, this test is not silent + return; +#elif defined(Q_CC_MINGW) + // Originally QTBUG-29014 (I can't reproduce this -Thiago) return; #endif + if (QTestPrivate::isRunningArmOnX86()) + return; // QEMU outputs to stderr about uncaught signals + } INFO(errorOutput.toStdString()); REQUIRE(errorOutput.isEmpty()); @@ -940,8 +928,11 @@ static QProcessEnvironment testEnvironment() if (environment.isEmpty()) { const QProcessEnvironment systemEnvironment = QProcessEnvironment::systemEnvironment(); const bool preserveLibPath = qEnvironmentVariableIsSet("QT_PRESERVE_TESTLIB_PATH"); - foreach (const QString &key, systemEnvironment.keys()) { + const auto envKeys = systemEnvironment.keys(); + for (const QString &key : envKeys) { const bool useVariable = key == "PATH" || key == "QT_QPA_PLATFORM" + || key == "QTEST_THROW_ON_FAIL"_L1 || key == "QTEST_THROW_ON_SKIP"_L1 + || key == "ASAN_OPTIONS" #if defined(Q_OS_QNX) || key == "GRAPHICS_ROOT" || key == "TZ" #elif defined(Q_OS_UNIX) @@ -986,8 +977,7 @@ TestProcessResult runTestProcess(const QString &test, const QStringList &argumen const bool expectedCrash = test == "assert" || test == "exceptionthrow" || test == "fetchbogus" || test == "crashedterminate" || test == "faildatatype" || test == "failfetchtype" - || test == "crashes" || test == "silent" - || test == "blacklisted" || test == "watchdog"; + || test == "crashes" || test == "silent_fatal" || test == "watchdog"; if (expectedCrash) { environment.insert("QTEST_DISABLE_CORE_DUMP", "1"); @@ -1024,10 +1014,12 @@ TestProcessResult runTestProcess(const QString &test, const QStringList &argumen return { process.exitCode(), standardOutput, standardError }; } +enum class Throw { OnFail = 1 }; + /* Runs a single test and verifies the output against the expected results. */ -void runTest(const QString &test, const TestLoggers &requestedLoggers) +void runTest(const QString &test, const TestLoggers &requestedLoggers, Throw throwing = {}) { TestLoggers loggers; for (auto logger : requestedLoggers) { @@ -1041,6 +1033,10 @@ void runTest(const QString &test, const TestLoggers &requestedLoggers) QStringList arguments; for (auto logger : loggers) arguments += logger.arguments(test); + if (throwing == Throw::OnFail) // don't distinguish between throwonfail/throwonskip + arguments += {"-throwonfail", "-throwonskip"}; + else + arguments += {"-nothrowonfail", "-nothrowonskip"}; CAPTURE(test); CAPTURE(arguments); @@ -1067,9 +1063,9 @@ void runTest(const QString &test, const TestLoggers &requestedLoggers) /* Runs a single test and verifies the output against the expected result. */ -void runTest(const QString &test, const TestLogger &logger) +void runTest(const QString &test, const TestLogger &logger, Throw t = {}) { - runTest(test, TestLoggers{logger}); + runTest(test, TestLoggers{logger}, t); } // ----------------------- Catch helpers ----------------------- @@ -1204,27 +1200,91 @@ TEST_CASE("All loggers can be enabled at the same time") SCENARIO("Test output of the loggers is as expected") { static QStringList tests = QString(QT_STRINGIFY(SUBPROGRAMS)).split(' '); + if (QString override = qEnvironmentVariable("TST_SELFTEST_SUBPROGRAMS"); !override.isEmpty()) + tests = override.split(' ', Qt::SkipEmptyParts); auto logger = GENERATE(filter(isGenericCommandLineLogger, enums<QTestLog::LogMode>())); GIVEN("The " << logger << " logger") { for (QString test : tests) { AND_GIVEN("The " << test << " subtest") { - runTest(test, TestLogger(logger, StdoutOutput)); + WHEN("Throwing on failure or skip") { + runTest(test, TestLogger(logger, StdoutOutput), Throw::OnFail); + } + WHEN("Returning on failure or skip") { + runTest(test, TestLogger(logger, StdoutOutput)); + } } } } } -#endif // QT_CONFIG(process) +struct TestCase { + int expectedExitCode; + const char *cmdline; +}; + +SCENARIO("Exit code is as expected") +{ + // Listing of test command lines and expected exit codes + // NOTE: Use at least 2 spaces to separate arguments because some contain a space themselves. + const struct TestCase testCases[] = { + // 'pass' is a test with no data tags at all + { 0, "pass testNumber1" }, + { 1, "pass unknownFunction" }, + { 1, "pass testNumber1:blah" }, + { 1, "pass testNumber1:blah:blue" }, + // 'counting' is a test that has only local data tags + { 0, "counting testPassPass" }, + { 0, "counting testPassPass:row 1" }, + { 1, "counting testPassPass:blah" }, + { 1, "counting testPassPass:blah:row 1" }, + { 1, "counting testPassPass:blah:blue" }, + // 'globaldata' is a test with global and local data tags + { 0, "globaldata testGlobal" }, + { 0, "globaldata testGlobal:global=true" }, + { 0, "globaldata testGlobal:local=true" }, + { 0, "globaldata testGlobal:global=true:local=true" }, + { 0, "globaldata testGlobal -repeat 2" }, + { 1, "globaldata testGlobal:local=true:global=true" }, + { 1, "globaldata testGlobal:global=true:blah" }, + { 1, "globaldata testGlobal:blah:local=true" }, + { 1, "globaldata testGlobal:blah:global=true" }, + { 1, "globaldata testGlobal:blah" }, + { 1, "globaldata testGlobal:blah:blue" }, + // Passing multiple testcase:data on the command line + { 0, "globaldata testGlobal:global=true skipSingle:global=true:local=true" }, + { 1, "globaldata testGlobal:blah skipSingle:global=true:local=true" }, + { 1, "globaldata testGlobal:global=true skipSingle:blah" }, + { 2, "globaldata testGlobal:blah skipSingle:blue" }, + // Passing -repeat argument + { 1, "pass testNumber1 -repeat" }, + { 0, "pass testNumber1 -repeat 1" }, + { 0, "pass testNumber1 -repeat 1 -o out.xml,xml" }, + { 0, "pass testNumber1 -repeat 2" }, + { 0, "pass testNumber1 -repeat 2 -o -,txt" }, + { 0, "pass testNumber1 -repeat 2 -o -,txt -o log.txt,txt" }, + { 1, "pass testNumber1 -repeat 2 -o log.xml,xml" }, + { 1, "pass testNumber1 -repeat 2 -o -,txt -o -,xml" }, + }; + + size_t n_testCases = sizeof(testCases) / sizeof(*testCases); + for (size_t i = 0; i < n_testCases; i++) { + GIVEN("The command line: " << testCases[i].cmdline) { + const QStringList cmdSplit = QString(testCases[i].cmdline) + .split(QRegularExpression(" +")); // at least 2 spaces + const QString test = cmdSplit[0]; + const QStringList args = cmdSplit.sliced(1); + auto runResult = runTestProcess(test, args); + REQUIRE(runResult.exitCode == testCases[i].expectedExitCode); + } + } +} // ----------------------- Entrypoint ----------------------- int main(int argc, char **argv) { -#if !QT_CONFIG(process) - return 0; -#else std::vector<const char*> args(argv, argv + argc); static auto kRebaseArgument = "--rebase"; @@ -1272,6 +1332,5 @@ int main(int argc, char **argv) } return result; -#endif } diff --git a/tests/auto/testlib/selftests/tuplediagnostics/CMakeLists.txt b/tests/auto/testlib/selftests/tuplediagnostics/CMakeLists.txt index bf72eeae0b..b79e2407b8 100644 --- a/tests/auto/testlib/selftests/tuplediagnostics/CMakeLists.txt +++ b/tests/auto/testlib/selftests/tuplediagnostics/CMakeLists.txt @@ -1,18 +1,18 @@ -# Generated from tuplediagnostics.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## tuplediagnostics Binary: ##################################################################### qt_internal_add_executable(tuplediagnostics - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_tuplediagnostics.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) -# special case begin qt_internal_apply_testlib_coverage_options(tuplediagnostics) -# special case end diff --git a/tests/auto/testlib/selftests/tuplediagnostics/tst_tuplediagnostics.cpp b/tests/auto/testlib/selftests/tuplediagnostics/tst_tuplediagnostics.cpp index 37786f3986..065fe6c603 100644 --- a/tests/auto/testlib/selftests/tuplediagnostics/tst_tuplediagnostics.cpp +++ b/tests/auto/testlib/selftests/tuplediagnostics/tst_tuplediagnostics.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 Samuel Gaist <samuel.gaist@edeltech.ch> -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 Samuel Gaist <samuel.gaist@edeltech.ch> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only // Make sure we get a real Q_ASSERT even in release builds #ifdef QT_NO_DEBUG diff --git a/tests/auto/testlib/selftests/verbose1/CMakeLists.txt b/tests/auto/testlib/selftests/verbose1/CMakeLists.txt index 7f60820111..2c644dff92 100644 --- a/tests/auto/testlib/selftests/verbose1/CMakeLists.txt +++ b/tests/auto/testlib/selftests/verbose1/CMakeLists.txt @@ -1,23 +1,23 @@ -# Generated from verbose1.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## verbose1 Binary: ##################################################################### qt_internal_add_executable(verbose1 - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES ../counting/tst_counting.cpp DEFINES - TESTLIB_VERBOSITY_ARG=-v1 # special case remove quotes - PUBLIC_LIBRARIES + TESTLIB_VERBOSITY_ARG=-v1 + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(verbose1) -# special case end diff --git a/tests/auto/testlib/selftests/verbose2/CMakeLists.txt b/tests/auto/testlib/selftests/verbose2/CMakeLists.txt index 63eae28728..b78c5a42d0 100644 --- a/tests/auto/testlib/selftests/verbose2/CMakeLists.txt +++ b/tests/auto/testlib/selftests/verbose2/CMakeLists.txt @@ -1,23 +1,23 @@ -# Generated from verbose2.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## verbose2 Binary: ##################################################################### qt_internal_add_executable(verbose2 - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES ../counting/tst_counting.cpp DEFINES - TESTLIB_VERBOSITY_ARG=-v2 # special case remove quotes - PUBLIC_LIBRARIES + TESTLIB_VERBOSITY_ARG=-v2 + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(verbose2) -# special case end diff --git a/tests/auto/testlib/selftests/verifyexceptionthrown/CMakeLists.txt b/tests/auto/testlib/selftests/verifyexceptionthrown/CMakeLists.txt index b6177bc8c3..c4312959ad 100644 --- a/tests/auto/testlib/selftests/verifyexceptionthrown/CMakeLists.txt +++ b/tests/auto/testlib/selftests/verifyexceptionthrown/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from verifyexceptionthrown.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## verifyexceptionthrown Binary: @@ -6,17 +7,15 @@ qt_internal_add_executable(verifyexceptionthrown EXCEPTIONS - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_verifyexceptionthrown.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(verifyexceptionthrown) -# special case end diff --git a/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp b/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp index 8276ad76b8..a7b45f30f9 100644 --- a/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp +++ b/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> diff --git a/tests/auto/testlib/selftests/warnings/CMakeLists.txt b/tests/auto/testlib/selftests/warnings/CMakeLists.txt index 178a807726..553a023a90 100644 --- a/tests/auto/testlib/selftests/warnings/CMakeLists.txt +++ b/tests/auto/testlib/selftests/warnings/CMakeLists.txt @@ -1,21 +1,21 @@ -# Generated from warnings.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## warnings Binary: ##################################################################### qt_internal_add_executable(warnings - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_warnings.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(warnings) -# special case end diff --git a/tests/auto/testlib/selftests/warnings/tst_warnings.cpp b/tests/auto/testlib/selftests/warnings/tst_warnings.cpp index ee73bd4fe4..5add39ac88 100644 --- a/tests/auto/testlib/selftests/warnings/tst_warnings.cpp +++ b/tests/auto/testlib/selftests/warnings/tst_warnings.cpp @@ -1,31 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2020 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +#undef QTEST_THROW_ON_FAILURE // fails ### investigate #include <QtCore/QCoreApplication> #include <QtCore/QRegularExpression> @@ -37,7 +13,9 @@ class tst_Warnings: public QObject private slots: void testWarnings(); void testMissingWarnings(); +#if QT_CONFIG(regularexpression) void testMissingWarningsRegularExpression(); +#endif void testMissingWarningsWithData_data(); void testMissingWarningsWithData(); @@ -50,6 +28,7 @@ private slots: void testFailOnWarningsThenSkip(); #endif void testFailOnWarningsAndIgnoreWarnings(); + void testFailOnTemporaryObjectDestruction(); }; void tst_Warnings::testWarnings() @@ -109,6 +88,7 @@ void tst_Warnings::testMissingWarnings() qWarning("Warning2"); } +#if QT_CONFIG(regularexpression) void tst_Warnings::testMissingWarningsRegularExpression() { QTest::ignoreMessage(QtWarningMsg, QRegularExpression("Warning\\d\\d")); @@ -116,6 +96,7 @@ void tst_Warnings::testMissingWarningsRegularExpression() qWarning("Warning11"); } +#endif void tst_Warnings::testMissingWarningsWithData_data() { @@ -136,7 +117,7 @@ void tst_Warnings::testMissingWarningsWithData() void tst_Warnings::testFailOnWarnings() { - // failOnWarnings() wasn't called yet; shouldn't fail; + // failOnWarning() wasn't called yet; shouldn't fail; qWarning("Ran out of space!"); #if QT_CONFIG(regularexpression) @@ -172,8 +153,9 @@ void tst_Warnings::testFailOnWarnings() void tst_Warnings::testFailOnWarningsCleared() { // The patterns passed to failOnWarnings() should be cleared at the end of - // each test function, so this shouldn't fail because of the failOnWarning() call in the previous function. - // Note that this test always needs to come after testFailOnWarnings for it to work. + // each test function, so this shouldn't fail because of the failOnWarning() + // call in the previous function. Note that this test always needs to come + // after testFailOnWarnings for it to test anything meaningfully. qWarning("Ran out of muffins!"); } @@ -202,7 +184,9 @@ void tst_Warnings::testFailOnWarningsWithData() void tst_Warnings::testFailOnWarningsFailInHelper() { + const QTest::ThrowOnFailDisabler nothrow; // tests repeated QFAILs [](){ QFAIL("This failure message should be printed but not cause the test to abort"); }(); + // So we've already failed, but we get more messages - that don't increment counters. const auto warnRegex = QRegularExpression("Ran out of .*!"); QTest::failOnWarning(warnRegex); qWarning("Ran out of cabbage!"); @@ -214,7 +198,7 @@ void tst_Warnings::testFailOnWarningsThenSkip() const auto warnRegex = QRegularExpression("Ran out of .*!"); QTest::failOnWarning(warnRegex); qWarning("Ran out of cabbage!"); - QSKIP("My cabbage! :("); + QSKIP("My cabbage! :("); // Reports, but doesn't count. } #endif // QT_CONFIG(regularexpression) @@ -227,6 +211,27 @@ void tst_Warnings::testFailOnWarningsAndIgnoreWarnings() qWarning(warningStr); } +void tst_Warnings::testFailOnTemporaryObjectDestruction() +{ + QTest::failOnWarning("Running low on toothpaste!"); + QTest::ignoreMessage(QtWarningMsg, "Ran out of cabbage!"); + + class TestObject : public QObject + { + public: + ~TestObject() + { + // Shouldn't fail - ignored + qWarning("Ran out of cabbage!"); + // Should fail + qWarning("Running low on toothpaste!"); + } + }; + + QScopedPointer<TestObject, QScopedPointerDeleteLater> testObject(new TestObject); + QVERIFY(testObject); +} + QTEST_MAIN(tst_Warnings) #include "tst_warnings.moc" diff --git a/tests/auto/testlib/selftests/watchdog/CMakeLists.txt b/tests/auto/testlib/selftests/watchdog/CMakeLists.txt index 1515e50619..21beab6454 100644 --- a/tests/auto/testlib/selftests/watchdog/CMakeLists.txt +++ b/tests/auto/testlib/selftests/watchdog/CMakeLists.txt @@ -1,26 +1,21 @@ -# Generated from watchdog.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## watchdog Binary: ##################################################################### qt_internal_add_executable(watchdog - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + EXCEPTIONS + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES tst_watchdog.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Test ) -#### Keys ignored in scope 1:.:.:watchdog.pro:<TRUE>: -# QT_TOOL_ENV = "checkenv" -# checkenv.name = "QTEST_FUNCTION_TIMEOUT" -# checkenv.value = "100" - ## Scopes: ##################################################################### -# special case begin qt_internal_apply_testlib_coverage_options(watchdog) -# special case end diff --git a/tests/auto/testlib/selftests/watchdog/tst_watchdog.cpp b/tests/auto/testlib/selftests/watchdog/tst_watchdog.cpp index 28252f6aca..2bc8853e00 100644 --- a/tests/auto/testlib/selftests/watchdog/tst_watchdog.cpp +++ b/tests/auto/testlib/selftests/watchdog/tst_watchdog.cpp @@ -1,33 +1,10 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> +using namespace std::chrono_literals; + class tst_Watchdog : public QObject { Q_OBJECT @@ -38,10 +15,9 @@ private slots: void tst_Watchdog::delay() const { bool ok = false; - const int fiveMinutes = 5 * 60 * 1000; // Use the same env.var as the watch-dog and add a little to it: const int timeout = qEnvironmentVariableIntValue("QTEST_FUNCTION_TIMEOUT", &ok); - QTest::qSleep(5000 + (ok && timeout > 0 ? timeout : fiveMinutes)); + QTest::qSleep(5s + (ok && timeout > 0 ? timeout * 1ms : 5min)); // The watchdog timer should have interrupted us by now. QFAIL("ERROR: this function should be interrupted."); } diff --git a/tests/auto/testlib/tostring/CMakeLists.txt b/tests/auto/testlib/tostring/CMakeLists.txt new file mode 100644 index 0000000000..cb0bdff847 --- /dev/null +++ b/tests/auto/testlib/tostring/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (C) 2023 Intel Corporation. +# SPDX-License-Identifier: BSD-3-Clause + +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_tostring LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + +qt_internal_add_test(tst_tostring + SOURCES + tst_tostring.cpp +) diff --git a/tests/auto/testlib/tostring/tst_tostring.cpp b/tests/auto/testlib/tostring/tst_tostring.cpp new file mode 100644 index 0000000000..8d3c59f257 --- /dev/null +++ b/tests/auto/testlib/tostring/tst_tostring.cpp @@ -0,0 +1,215 @@ +// Copyright (C) 2023 Intel Corporation. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <QTest> + +#include <QtCore/qtypes.h> + +#include <memory> + +#include <q20chrono.h> + +using ToStringFunction = std::function<char *()>; +class tst_toString : public QObject +{ + Q_OBJECT +private: + void addColumns(); + void testRows(); +private slots: + void int128(); + + void chrono_duration_data(); + void chrono_duration() { testRows(); } +}; + +void tst_toString::addColumns() +{ + QTest::addColumn<ToStringFunction>("fn"); + QTest::addColumn<QByteArray>("expected"); + QTest::addColumn<QByteArrayView>("expr"); + QTest::addColumn<QByteArrayView>("file"); + QTest::addColumn<int>("line"); +} + +void tst_toString::testRows() +{ + QFETCH(ToStringFunction, fn); + QFETCH(const QByteArray, expected); + QFETCH(QByteArrayView, expr); + QFETCH(QByteArrayView, file); + QFETCH(int, line); + + std::unique_ptr<char []> ptr{fn()}; + const auto len = qstrlen(ptr.get()); + QTest::qCompare(ptr.get(), expected, expr.data(), expected.data(), file.data(), line); + if (QTest::currentTestFailed()) { + qDebug("tail diff:\n" + " actual:%s\n" + " expected:%s", + ptr.get() + len - std::min(size_t{40}, len), + expected.data() + expected.size() - std::min(qsizetype{40}, expected.size())); + } +} + +template <typename T> void addRow(QByteArrayView name, T &&value, QByteArrayView expression, + const QByteArray &expected, QByteArrayView file, int line) +{ + ToStringFunction fn = [v = std::move(value)]() { return QTest::toString(v); }; + QTest::newRow(name.data()) << fn << expected << expression << file << line; +} + +#define ADD_ROW(name, expr, expected) \ + ::addRow(name, expr, #expr, expected, __FILE__, __LINE__) + +void tst_toString::int128() +{ +#ifndef QT_SUPPORTS_INT128 + QSKIP("This test requires int128 support enabled in the compiler."); +#else + // ### port to data-driven once QVariant has support for qint128/quint128 + std::unique_ptr<char[]> s; + + { + // build Q_INT128_MIN without using Q_INT128_ macros, + // because we use Q_INT128_MIN in the impl + qint128 accu = 1701411834604692317LL; + accu *= 1000000000000000000LL; + accu += 316873037158841057LL; + accu *= -100; + accu -= 28; + QCOMPARE_EQ(accu, Q_INT128_MIN); + s.reset(QTest::toString(accu)); + QCOMPARE(s.get(), "-170141183460469231731687303715884105728"); + } + + // now test with the macro, too: + s.reset(QTest::toString(Q_INT128_MIN)); + QCOMPARE(s.get(), "-170141183460469231731687303715884105728"); + + s.reset(QTest::toString(Q_INT128_MIN + 1)); + QCOMPARE(s.get(), "-170141183460469231731687303715884105727"); + + s.reset(QTest::toString(Q_INT128_MAX)); + QCOMPARE(s.get(), "170141183460469231731687303715884105727"); + + s.reset(QTest::toString(Q_INT128_MAX - 1)); + QCOMPARE(s.get(), "170141183460469231731687303715884105726"); + + s.reset(QTest::toString(Q_UINT128_MAX)); + QCOMPARE(s.get(), "340282366920938463463374607431768211455"); + + s.reset(QTest::toString(Q_UINT128_MAX - 1)); + QCOMPARE(s.get(), "340282366920938463463374607431768211454"); + + s.reset(QTest::toString(quint128{0})); + QCOMPARE(s.get(), "0"); + + s.reset(QTest::toString(qint128{0})); + QCOMPARE(s.get(), "0"); + + s.reset(QTest::toString(qint128{-1})); + QCOMPARE(s.get(), "-1"); +#endif // QT_SUPPORTS_INT128 +} + +void tst_toString::chrono_duration_data() +{ + addColumns(); + + using namespace std::chrono; + using namespace q20::chrono; + + using attoseconds = duration<int64_t, std::atto>; + using femtoseconds = duration<int64_t, std::femto>; + using picoseconds = duration<int64_t, std::pico>; + using centiseconds = duration<int64_t, std::centi>; + using deciseconds = duration<int64_t, std::deci>; + using kiloseconds = duration<int64_t, std::kilo>; + using decades = duration<int, std::ratio_multiply<years::period, std::deca>>; // decayears + using centuries = duration<int16_t, std::ratio_multiply<years::period, std::hecto>>; // hectoyears + using millennia = duration<int16_t, std::ratio_multiply<years::period, std::kilo>>; // kiloyears + using gigayears [[maybe_unused]] = duration<int8_t, std::ratio_multiply<years::period, std::giga>>; + using fortnights = duration<int, std::ratio_multiply<days::period, std::ratio<14>>>; + using microfortnights = duration<int64_t, std::ratio_multiply<fortnights::period, std::micro>>; + using meter_per_light = duration<int64_t, std::ratio<1, 299'792'458>>; + using kilometer_per_light = duration<int64_t, std::ratio<1000, 299'792'458>>; + using AU_per_light = duration<int64_t, std::ratio<149'597'871'800, 299'792'458>>; + using pstn_rate = duration<int64_t, std::ratio<1, 8000>>; // PSTN sampling rate (8 kHz) + using hyperfine = duration<int64_t, std::ratio<1, 9'192'631'770>>; // definition of second + + ADD_ROW("1as", attoseconds{1}, "1as (1e-18s)"); // from Norwegian "atten" (18) + ADD_ROW("1fs", femtoseconds{1}, "1fs (1e-15s)"); // from Norwegian "femten" (15) + ADD_ROW("1ps", picoseconds{1}, "1ps (1e-12s)"); // from Italian piccolo? + ADD_ROW("0ns", 0ns, "0ns (0s)"); + ADD_ROW("1000ns", 1000ns, "1000ns (1e-06s)"); + ADD_ROW("1us", 1us, "1us (1e-06s)"); + ADD_ROW("125us", 125us, "125us (0.000125s)"); + ADD_ROW("0ms", 0ms, "0ms (0s)"); + ADD_ROW("-1s", -1s, "-1s"); + ADD_ROW("0s", 0s, "0s"); + ADD_ROW("1cs", centiseconds{1}, "1cs (0.01s)"); + ADD_ROW("2ds", deciseconds{2}, "2ds (0.2s)"); + ADD_ROW("1s", 1s, "1s"); + ADD_ROW("60s", 60s, "60s"); + ADD_ROW("1min", 1min, "1min (60s)"); + ADD_ROW("1h", 1h, "1h (3600s)"); + ADD_ROW("1days", days{1}, "1d (86400s)"); + ADD_ROW("7days", days{7}, "7d (604800s)"); + ADD_ROW("1weeks", weeks{1}, "1wk (604800s)"); + ADD_ROW("365days", days{365}, "365d (31536000s)"); + ADD_ROW("1years", years{1}, "1yr (31556952s)"); // 365.2425 days + + ADD_ROW("2ks", kiloseconds{2}, "2[1000]s (2000s)"); + ADD_ROW("1fortnights", fortnights{1}, "1[2]wk (1209600s)"); + ADD_ROW("1decades", decades{1}, "1[10]yr (315569520s)"); + ADD_ROW("1centuries", centuries{1}, "1[100]yr (3.1556952e+09s)"); + ADD_ROW("1millennia", millennia{1}, "1[1000]yr (3.1556952e+10s)"); +#if defined(Q_OS_LINUX) || defined(Q_OS_DARWIN) + // some OSes print the exponent differently + ADD_ROW("13gigayears", gigayears{13}, "13[1e+09]yr (4.10240376e+17s)"); +#endif + + // months are one twelfth of a Gregorian year, not 30 days + ADD_ROW("1months", months{1}, "1[2629746]s (2629746s)"); + ADD_ROW("12months", months{12}, "12[2629746]s (31556952s)"); + + // weird units + ADD_ROW("2microfortnights", microfortnights{2}, "2[756/625]s (2.4192s)"); + ADD_ROW("1pstn_rate", pstn_rate{1}, "1[1/8000]s (0.000125s)"); // 125µs + ADD_ROW("10m/c", meter_per_light{10}, "10[1/299792458]s (3.33564095e-08s)"); + ADD_ROW("10km/c", kilometer_per_light{10}, "10[500/149896229]s (3.33564095e-05s)"); + ADD_ROW("1AU/c", AU_per_light{1}, "1[74798935900/149896229]s (499.004788s)"); + ADD_ROW("Cs133-hyperfine", hyperfine{1}, "1[1/9192631770]s (1.08782776e-10s)"); + ADD_ROW("1sec-definition", hyperfine{9'192'631'770}, "9192631770[1/9192631770]s (1s)"); + ADD_ROW("8000pstn_rate", pstn_rate{8000}, "8000[1/8000]s (1s)"); + + // real floting point + // current (2023) best estimate is 13.813 ± 0.038 billion years (Plank Collaboration) + using universe [[maybe_unused]] = duration<double, std::ratio_multiply<std::ratio<13'813'000'000>, years::period>>; + using fpksec = duration<double, std::kilo>; + using fpsec = duration<double>; + using fpmsec = duration<double, std::milli>; + using fpnsec = duration<double, std::nano>; + using fpGyr [[maybe_unused]] = duration<double, std::ratio_multiply<years::period, std::giga>>; + + ADD_ROW("1.0s", fpsec{1}, "1s"); + ADD_ROW("1.5s", fpsec{1.5}, "1.5s"); + ADD_ROW("-1.0ms", fpmsec{-1}, "-1ms (-0.001s)"); + ADD_ROW("1.5ms", fpmsec{1.5}, "1.5ms (0.0015s)"); + ADD_ROW("1.0ns", fpnsec{1}, "1ns (1e-09s)"); + ADD_ROW("-1.5ns", fpnsec{-1.5}, "-1.5ns (-1.5e-09s)"); + ADD_ROW("1.0ks", fpksec{1}, "1[1000]s (1000s)"); + ADD_ROW("-1.5ks", fpksec{-1.5}, "-1.5[1000]s (-1500s)"); + ADD_ROW("1.0zs", fpsec{1e-21}, "1e-21s"); // zeptosecond + ADD_ROW("1.0ys", fpsec{1e-24}, "1e-24s"); // yoctosecond + ADD_ROW("planck-time", fpsec(5.39124760e-44), "5.3912476e-44s"); +#if defined(Q_OS_LINUX) || defined(Q_OS_DARWIN) + // some OSes print the exponent differently + ADD_ROW("13.813Gyr", fpGyr(13.813), "13.813[1e+09]yr (4.35896178e+17s)"); + ADD_ROW("1universe", universe{1}, "1[1.3813e+10]yr (4.35896178e+17s)"); +#endif +} + +QTEST_APPLESS_MAIN(tst_toString) +#include "tst_tostring.moc" |