c608ffc56a
Currently when doing comparison with pair-like classes the fallback toString method is called which returns a Q_NULLPTR thus not allowing proper diagnostic of the values that triggered an error. This patch adds support for QPair and std::pair to improve the tests output readability. [ChangeLog][QtTest][QCOMPARE] Now outputs contents of QPair and std::pair on failure. Change-Id: Ib0b4aad7640590d56275b6f1306fb9fb39fa81bc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
22 lines
893 B
XML
22 lines
893 B
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<testsuite errors="0" failures="2" tests="4" name="tst_PairDiagnostics">
|
|
<properties>
|
|
<property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
|
|
<property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
|
|
<property value="" name="QtBuild"/>
|
|
</properties>
|
|
<testcase result="pass" name="initTestCase"/>
|
|
<testcase result="fail" name="testQPair">
|
|
<failure message="Compared values are not the same
|
|
Actual (pair1): "QPair(1,1)"
|
|
Expected (pair2): "QPair(1,2)"" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="testStdPair">
|
|
<failure message="Compared values are not the same
|
|
Actual (pair1): "std::pair(1,1)"
|
|
Expected (pair2): "std::pair(1,2)"" result="fail"/>
|
|
</testcase>
|
|
<testcase result="pass" name="cleanupTestCase"/>
|
|
<system-err/>
|
|
</testsuite>
|