mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-03 07:45:30 +08:00
6.5.3 clean
This commit is contained in:
@ -54,6 +54,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);
|
||||
|
@ -12,6 +12,8 @@
|
||||
#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) */
|
||||
@ -127,6 +129,7 @@ private slots:
|
||||
void compareQListIntToInitializerList_data();
|
||||
void compareQListIntToInitializerList();
|
||||
void compareQListDouble();
|
||||
void compareContainerToInitializerList();
|
||||
#ifdef QT_GUI_LIB
|
||||
void compareQColor_data();
|
||||
void compareQColor();
|
||||
@ -506,6 +509,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()
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<testsuite name="tst_Cmptest" timestamp="@TEST_START_TIME@" hostname="@HOSTNAME@" tests="70" failures="49" errors="0" skipped="0" time="@TEST_DURATION@">
|
||||
<testsuite name="tst_Cmptest" timestamp="@TEST_START_TIME@" hostname="@HOSTNAME@" tests="71" failures="49" errors="0" skipped="0" time="@TEST_DURATION@">
|
||||
<properties>
|
||||
<property name="QTestVersion" value="@INSERT_QT_VERSION_HERE@"/>
|
||||
<property name="QtVersion" value="@INSERT_QT_VERSION_HERE@"/>
|
||||
@ -173,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">
|
||||
|
@ -234,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>
|
||||
|
@ -303,8 +303,9 @@ not ok 38 - compareQListDouble()
|
||||
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
|
||||
line: 0
|
||||
...
|
||||
ok 39 - compareQColor(Qt::yellow vs "yellow")
|
||||
not ok 40 - 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
|
||||
@ -316,7 +317,7 @@ not ok 40 - compareQColor(Qt::yellow vs Qt::green)
|
||||
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
|
||||
line: 0
|
||||
...
|
||||
not ok 41 - compareQColor(0x88ff0000 vs 0xffff0000)
|
||||
not ok 42 - compareQColor(0x88ff0000 vs 0xffff0000)
|
||||
---
|
||||
type: QCOMPARE
|
||||
message: Compared values are not the same
|
||||
@ -328,8 +329,8 @@ not ok 41 - compareQColor(0x88ff0000 vs 0xffff0000)
|
||||
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
|
||||
line: 0
|
||||
...
|
||||
ok 42 - compareQPixmaps(both null)
|
||||
not ok 43 - compareQPixmaps(one null)
|
||||
ok 43 - compareQPixmaps(both null)
|
||||
not ok 44 - compareQPixmaps(one null)
|
||||
---
|
||||
type: QCOMPARE
|
||||
message: Compared QPixmaps differ.
|
||||
@ -341,7 +342,7 @@ not ok 43 - compareQPixmaps(one null)
|
||||
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
|
||||
line: 0
|
||||
...
|
||||
not ok 44 - compareQPixmaps(other null)
|
||||
not ok 45 - compareQPixmaps(other null)
|
||||
---
|
||||
type: QCOMPARE
|
||||
message: Compared QPixmaps differ.
|
||||
@ -353,8 +354,8 @@ not ok 44 - compareQPixmaps(other null)
|
||||
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
|
||||
line: 0
|
||||
...
|
||||
ok 45 - compareQPixmaps(equal)
|
||||
not ok 46 - compareQPixmaps(different size)
|
||||
ok 46 - compareQPixmaps(equal)
|
||||
not ok 47 - compareQPixmaps(different size)
|
||||
---
|
||||
type: QCOMPARE
|
||||
message: Compared QPixmaps differ in size.
|
||||
@ -366,14 +367,14 @@ not ok 46 - compareQPixmaps(different size)
|
||||
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
|
||||
line: 0
|
||||
...
|
||||
not ok 47 - 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 48 - compareQPixmaps(different dpr)
|
||||
not ok 49 - compareQPixmaps(different dpr)
|
||||
---
|
||||
type: QCOMPARE
|
||||
message: Compared QPixmaps differ in device pixel ratio.
|
||||
@ -385,8 +386,8 @@ not ok 48 - compareQPixmaps(different dpr)
|
||||
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
|
||||
line: 0
|
||||
...
|
||||
ok 49 - compareQImages(both null)
|
||||
not ok 50 - compareQImages(one null)
|
||||
ok 50 - compareQImages(both null)
|
||||
not ok 51 - compareQImages(one null)
|
||||
---
|
||||
type: QCOMPARE
|
||||
message: Compared QImages differ.
|
||||
@ -398,7 +399,7 @@ not ok 50 - compareQImages(one null)
|
||||
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
|
||||
line: 0
|
||||
...
|
||||
not ok 51 - compareQImages(other null)
|
||||
not ok 52 - compareQImages(other null)
|
||||
---
|
||||
type: QCOMPARE
|
||||
message: Compared QImages differ.
|
||||
@ -410,8 +411,8 @@ not ok 51 - compareQImages(other null)
|
||||
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
|
||||
line: 0
|
||||
...
|
||||
ok 52 - compareQImages(equal)
|
||||
not ok 53 - compareQImages(different size)
|
||||
ok 53 - compareQImages(equal)
|
||||
not ok 54 - compareQImages(different size)
|
||||
---
|
||||
type: QCOMPARE
|
||||
message: Compared QImages differ in size.
|
||||
@ -423,7 +424,7 @@ not ok 53 - compareQImages(different size)
|
||||
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
|
||||
line: 0
|
||||
...
|
||||
not ok 54 - compareQImages(different format)
|
||||
not ok 55 - compareQImages(different format)
|
||||
---
|
||||
type: QCOMPARE
|
||||
message: Compared QImages differ in format.
|
||||
@ -435,14 +436,14 @@ not ok 54 - compareQImages(different format)
|
||||
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
|
||||
line: 0
|
||||
...
|
||||
not ok 55 - 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 56 - compareQImages(different dpr)
|
||||
not ok 57 - compareQImages(different dpr)
|
||||
---
|
||||
type: QCOMPARE
|
||||
message: Compared QImages differ in device pixel ratio.
|
||||
@ -454,8 +455,8 @@ not ok 56 - compareQImages(different dpr)
|
||||
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
|
||||
line: 0
|
||||
...
|
||||
ok 57 - compareQRegion(equal-empty)
|
||||
not ok 58 - compareQRegion(1-empty)
|
||||
ok 58 - compareQRegion(equal-empty)
|
||||
not ok 59 - compareQRegion(1-empty)
|
||||
---
|
||||
type: QCOMPARE
|
||||
message: Compared values are not the same
|
||||
@ -467,8 +468,8 @@ not ok 58 - compareQRegion(1-empty)
|
||||
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
|
||||
line: 0
|
||||
...
|
||||
ok 59 - compareQRegion(equal)
|
||||
not ok 60 - compareQRegion(different lists)
|
||||
ok 60 - compareQRegion(equal)
|
||||
not ok 61 - compareQRegion(different lists)
|
||||
---
|
||||
type: QCOMPARE
|
||||
message: Compared values are not the same
|
||||
@ -480,7 +481,7 @@ not ok 60 - compareQRegion(different lists)
|
||||
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
|
||||
line: 0
|
||||
...
|
||||
not ok 61 - compareQVector2D()
|
||||
not ok 62 - compareQVector2D()
|
||||
---
|
||||
type: QCOMPARE
|
||||
message: Compared values are not the same
|
||||
@ -492,7 +493,7 @@ not ok 61 - compareQVector2D()
|
||||
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
|
||||
line: 0
|
||||
...
|
||||
not ok 62 - compareQVector3D()
|
||||
not ok 63 - compareQVector3D()
|
||||
---
|
||||
type: QCOMPARE
|
||||
message: Compared values are not the same
|
||||
@ -504,7 +505,7 @@ not ok 62 - compareQVector3D()
|
||||
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
|
||||
line: 0
|
||||
...
|
||||
not ok 63 - compareQVector4D()
|
||||
not ok 64 - compareQVector4D()
|
||||
---
|
||||
type: QCOMPARE
|
||||
message: Compared values are not the same
|
||||
@ -516,7 +517,7 @@ not ok 63 - compareQVector4D()
|
||||
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
|
||||
line: 0
|
||||
...
|
||||
not ok 64 - tryCompare()
|
||||
not ok 65 - tryCompare()
|
||||
---
|
||||
type: QCOMPARE
|
||||
message: Compared values are not the same
|
||||
@ -532,7 +533,7 @@ not ok 64 - tryCompare()
|
||||
- severity: info
|
||||
message: Should now time out and fail
|
||||
...
|
||||
not ok 65 - verify()
|
||||
not ok 66 - verify()
|
||||
---
|
||||
type: QVERIFY
|
||||
message: Verification failed
|
||||
@ -544,7 +545,7 @@ not ok 65 - verify()
|
||||
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
|
||||
line: 0
|
||||
...
|
||||
not ok 66 - verify2()
|
||||
not ok 67 - verify2()
|
||||
---
|
||||
type: QVERIFY
|
||||
message: 42 >= 2 (as expected, in fact)
|
||||
@ -556,7 +557,7 @@ not ok 66 - verify2()
|
||||
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
|
||||
line: 0
|
||||
...
|
||||
not ok 67 - tryVerify()
|
||||
not ok 68 - tryVerify()
|
||||
---
|
||||
type: QVERIFY
|
||||
message: Verification failed
|
||||
@ -572,7 +573,7 @@ not ok 67 - tryVerify()
|
||||
- severity: info
|
||||
message: Should now time out and fail
|
||||
...
|
||||
not ok 68 - tryVerify2()
|
||||
not ok 69 - tryVerify2()
|
||||
---
|
||||
type: QVERIFY
|
||||
message: Should time out and fail
|
||||
@ -584,9 +585,9 @@ not ok 68 - tryVerify2()
|
||||
file: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
|
||||
line: 0
|
||||
...
|
||||
ok 69 - verifyExplicitOperatorBool()
|
||||
ok 70 - cleanupTestCase()
|
||||
1..70
|
||||
# tests 70
|
||||
# pass 21
|
||||
ok 70 - verifyExplicitOperatorBool()
|
||||
ok 71 - cleanupTestCase()
|
||||
1..71
|
||||
# tests 71
|
||||
# pass 22
|
||||
# fail 49
|
||||
|
@ -101,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']
|
||||
|
@ -116,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
|
||||
@ -207,5 +208,5 @@ FAIL! : tst_Cmptest::tryVerify2() '!c' returned FALSE. (Should time out and fai
|
||||
Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)]
|
||||
PASS : tst_Cmptest::verifyExplicitOperatorBool()
|
||||
PASS : tst_Cmptest::cleanupTestCase()
|
||||
Totals: 21 passed, 49 failed, 0 skipped, 0 blacklisted, 0ms
|
||||
Totals: 22 passed, 49 failed, 0 skipped, 0 blacklisted, 0ms
|
||||
********* Finished testing of tst_Cmptest *********
|
||||
|
@ -236,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>
|
||||
|
@ -252,7 +252,7 @@ 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")):
|
||||
"""Determine the environment in which to run a test."""
|
||||
|
@ -765,21 +765,27 @@ void checkErrorOutput(const QString &test, const QByteArray &errorOutput)
|
||||
return;
|
||||
|
||||
#ifdef Q_CC_MINGW
|
||||
if (test == "blacklisted" // calls qFatal()
|
||||
|| test == "silent") // calls qFatal()
|
||||
#endif
|
||||
if (test == "silent") // calls qFatal()
|
||||
return;
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
if (test == "crashes")
|
||||
return; // Complains about uncaught exception
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
if (test == "assert"
|
||||
|| test == "crashes"
|
||||
|| test == "failfetchtype"
|
||||
|| test == "faildatatype")
|
||||
return; // Outputs "Received signal 6 (SIGABRT)"
|
||||
#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"
|
||||
@ -972,8 +978,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" || test == "watchdog";
|
||||
|
||||
if (expectedCrash) {
|
||||
environment.insert("QTEST_DISABLE_CORE_DUMP", "1");
|
||||
|
Reference in New Issue
Block a user