diff options
author | Liang Qi <liang.qi@qt.io> | 2017-11-21 14:34:31 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-11-23 09:36:03 +0100 |
commit | 153e8b49adfe210cb00490284a14c94c08e03c3f (patch) | |
tree | 59d9522d6dc96215cc2cb1d19b3e8a0e580bcb41 /tests/auto/testlib | |
parent | ef7c0594bf9e41813c9c841e00c3a52269d363f5 (diff) | |
parent | a4113d0c644edba1c39d9d268a259e95ae51c61e (diff) |
Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
src/network/access/qhttp2protocolhandler_p.h
src/network/kernel/kernel.pri
src/network/ssl/qsslkey_qt.cpp
src/plugins/platforms/cocoa/qcocoascreen.mm
src/plugins/platforms/windows/accessible/iaccessible2.cpp
src/plugins/platforms/windows/accessible/iaccessible2.h
src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp
src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h
src/widgets/widgets/qmenu_p.h
tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
tests/auto/other/qaccessibility/tst_qaccessibility.cpp
tests/auto/testlib/selftests/expected_cmptest.lightxml
tests/auto/testlib/selftests/expected_cmptest.teamcity
tests/auto/testlib/selftests/expected_cmptest.txt
tests/auto/testlib/selftests/expected_cmptest.xml
Done-with: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
Diffstat (limited to 'tests/auto/testlib')
6 files changed, 63 insertions, 20 deletions
diff --git a/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp b/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp index 2cfe987f7d..a662fea615 100644 --- a/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp +++ b/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp @@ -140,6 +140,7 @@ private slots: void compareQListInt(); void compareQListDouble(); #ifdef QT_GUI_LIB + void compareQColor_data(); void compareQColor(); void compareQPixmaps(); void compareQPixmaps_data(); @@ -377,13 +378,22 @@ void tst_Cmptest::compareQListDouble() } #ifdef QT_GUI_LIB +void tst_Cmptest::compareQColor_data() +{ + QTest::addColumn<QColor>("colorA"); + QTest::addColumn<QColor>("colorB"); + + QTest::newRow("Qt::yellow vs \"yellow\"") << QColor(Qt::yellow) << QColor(QStringLiteral("yellow")); + QTest::newRow("Qt::yellow vs Qt::green") << QColor(Qt::yellow) << QColor(Qt::green); + QTest::newRow("0x88ff0000 vs 0xffff0000") << QColor::fromRgba(0x88ff0000) << QColor::fromRgba(0xffff0000); +} + void tst_Cmptest::compareQColor() { - const QColor yellow(Qt::yellow); - const QColor yellowFromName(QStringLiteral("yellow")); - const QColor green(Qt::green); - QCOMPARE(yellow, yellowFromName); - QCOMPARE(yellow, green); + QFETCH(QColor, colorA); + QFETCH(QColor, colorB); + + QCOMPARE(colorA, colorB); } void tst_Cmptest::compareQPixmaps_data() diff --git a/tests/auto/testlib/selftests/expected_cmptest.lightxml b/tests/auto/testlib/selftests/expected_cmptest.lightxml index 41cfb03f18..d47967a445 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.lightxml +++ b/tests/auto/testlib/selftests/expected_cmptest.lightxml @@ -127,10 +127,20 @@ <Duration msecs="0"/> </TestFunction> <TestFunction name="compareQColor"> +<Incident type="pass" file="" line="0"> + <DataTag><![CDATA[Qt::yellow vs "yellow"]]></DataTag> +</Incident> +<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> + <DataTag><![CDATA[Qt::yellow vs Qt::green]]></DataTag> + <Description><![CDATA[Compared values are not the same + Actual (colorA): #ffffff00 + Expected (colorB): #ff00ff00]]></Description> +</Incident> <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> + <DataTag><![CDATA[0x88ff0000 vs 0xffff0000]]></DataTag> <Description><![CDATA[Compared values are not the same - Actual (yellow): #ffff00 - Expected (green) : #00ff00]]></Description> + Actual (colorA): #88ff0000 + Expected (colorB): #ffff0000]]></Description> </Incident> <Duration msecs="0"/> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_cmptest.teamcity b/tests/auto/testlib/selftests/expected_cmptest.teamcity index bb94fe3f50..a0dc509279 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.teamcity +++ b/tests/auto/testlib/selftests/expected_cmptest.teamcity @@ -55,9 +55,14 @@ ##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='compareQColor()' flowId='tst_Cmptest'] -##teamcity[testFailed name='compareQColor()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared values are not the same|n Actual (yellow): #ffff00|n Expected (green) : #00ff00' flowId='tst_Cmptest'] -##teamcity[testFinished name='compareQColor()' 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'] +##teamcity[testFailed name='compareQColor(Qt::yellow vs Qt::green)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared values are not the same|n Actual (colorA): #ffffff00|n Expected (colorB): #ff00ff00' flowId='tst_Cmptest'] +##teamcity[testFinished name='compareQColor(Qt::yellow vs Qt::green)' flowId='tst_Cmptest'] +##teamcity[testStarted name='compareQColor(0x88ff0000 vs 0xffff0000)' flowId='tst_Cmptest'] +##teamcity[testFailed name='compareQColor(0x88ff0000 vs 0xffff0000)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)|]' details='Compared values are not the same|n Actual (colorA): #88ff0000|n Expected (colorB): #ffff0000' flowId='tst_Cmptest'] +##teamcity[testFinished name='compareQColor(0x88ff0000 vs 0xffff0000)' flowId='tst_Cmptest'] ##teamcity[testStarted name='compareQPixmaps(both null)' flowId='tst_Cmptest'] ##teamcity[testFinished name='compareQPixmaps(both null)' flowId='tst_Cmptest'] ##teamcity[testStarted name='compareQPixmaps(one null)' flowId='tst_Cmptest'] diff --git a/tests/auto/testlib/selftests/expected_cmptest.txt b/tests/auto/testlib/selftests/expected_cmptest.txt index c833bf6d81..78df990dea 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.txt +++ b/tests/auto/testlib/selftests/expected_cmptest.txt @@ -61,9 +61,14 @@ 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)] -FAIL! : tst_Cmptest::compareQColor() Compared values are not the same - Actual (yellow): #ffff00 - Expected (green) : #00ff00 +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 + Expected (colorB): #ff00ff00 + Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)] +FAIL! : tst_Cmptest::compareQColor(0x88ff0000 vs 0xffff0000) Compared values are not the same + Actual (colorA): #88ff0000 + Expected (colorB): #ffff0000 Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)] PASS : tst_Cmptest::compareQPixmaps(both null) FAIL! : tst_Cmptest::compareQPixmaps(one null) Compared QPixmaps differ. @@ -133,5 +138,5 @@ FAIL! : tst_Cmptest::tryVerify2() 'opaqueFunc() < 2' returned FALSE. (42) Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)] PASS : tst_Cmptest::verifyExplicitOperatorBool() PASS : tst_Cmptest::cleanupTestCase() -Totals: 15 passed, 33 failed, 0 skipped, 0 blacklisted, 0ms +Totals: 16 passed, 34 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 12d8263e55..01b725f247 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.xml +++ b/tests/auto/testlib/selftests/expected_cmptest.xml @@ -129,10 +129,20 @@ <Duration msecs="0"/> </TestFunction> <TestFunction name="compareQColor"> +<Incident type="pass" file="" line="0"> + <DataTag><![CDATA[Qt::yellow vs "yellow"]]></DataTag> +</Incident> +<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> + <DataTag><![CDATA[Qt::yellow vs Qt::green]]></DataTag> + <Description><![CDATA[Compared values are not the same + Actual (colorA): #ffffff00 + Expected (colorB): #ff00ff00]]></Description> +</Incident> <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="0"> + <DataTag><![CDATA[0x88ff0000 vs 0xffff0000]]></DataTag> <Description><![CDATA[Compared values are not the same - Actual (yellow): #ffff00 - Expected (green) : #00ff00]]></Description> + Actual (colorA): #88ff0000 + Expected (colorB): #ffff0000]]></Description> </Incident> <Duration msecs="0"/> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_cmptest.xunitxml b/tests/auto/testlib/selftests/expected_cmptest.xunitxml index c2c0c86058..812696ffcf 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.xunitxml +++ b/tests/auto/testlib/selftests/expected_cmptest.xunitxml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<testsuite errors="0" failures="33" tests="24" name="tst_Cmptest"> +<testsuite errors="0" failures="34" tests="24" name="tst_Cmptest"> <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> @@ -64,9 +64,12 @@ Expected (double2): 1" result="fail"/> </testcase> <testcase result="fail" name="compareQColor"> - <failure message="Compared values are not the same - Actual (yellow): #ffff00 - Expected (green) : #00ff00" result="fail"/> + <failure tag="Qt::yellow vs Qt::green" message="Compared values are not the same + Actual (colorA): #ffffff00 + Expected (colorB): #ff00ff00" result="fail"/> + <failure tag="0x88ff0000 vs 0xffff0000" message="Compared values are not the same + Actual (colorA): #88ff0000 + Expected (colorB): #ffff0000" result="fail"/> </testcase> <testcase result="fail" name="compareQPixmaps"> <failure tag="one null" message="Compared QPixmaps differ. |