04b180f7f2
Currently when doing comparison with std::tuple 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 std::tuple to improve the tests output readability. [ChangeLog][QtTest][QCOMPARE] Now outputs contents of std::tuple on failure. Change-Id: I046a55e2ce44c3f7728d51e4745120d38aa5e007 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
23 lines
1016 B
XML
23 lines
1016 B
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<testsuite errors="0" failures="2" tests="5" name="tst_TupleDiagnostics">
|
|
<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="pass" name="testEmptyTuple"/>
|
|
<testcase result="fail" name="testSimpleTuple">
|
|
<failure message="Compared values are not the same
|
|
Actual (std::tuple<int>{1}): std::tuple(1)
|
|
Expected (std::tuple<int>{2}): std::tuple(2)" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="testTuple">
|
|
<failure message="Compared values are not the same
|
|
Actual (tuple1): std::tuple(42, 'Y', "tuple1")
|
|
Expected (tuple2): std::tuple(42, 'Y', "tuple2")" result="fail"/>
|
|
</testcase>
|
|
<testcase result="pass" name="cleanupTestCase"/>
|
|
<system-err/>
|
|
</testsuite>
|