summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib/selftests/expected_pairdiagnostics.txt
diff options
context:
space:
mode:
authorSamuel Gaist <samuel.gaist@edeltech.ch>2017-03-28 08:56:24 +0200
committerSamuel Gaist <samuel.gaist@edeltech.ch>2017-04-06 21:46:32 +0000
commitc608ffc56ab37f9a9d5b9c34543126adb89e2b08 (patch)
treee33cb29d43d00a6273bd6899f72ebb4d4b865716 /tests/auto/testlib/selftests/expected_pairdiagnostics.txt
parent6f4160042226be86276fa9264663c2942413fc8d (diff)
Improve pair-like class handling in tests
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>
Diffstat (limited to 'tests/auto/testlib/selftests/expected_pairdiagnostics.txt')
-rw-r--r--tests/auto/testlib/selftests/expected_pairdiagnostics.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/testlib/selftests/expected_pairdiagnostics.txt b/tests/auto/testlib/selftests/expected_pairdiagnostics.txt
new file mode 100644
index 0000000000..e09b9a560f
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_pairdiagnostics.txt
@@ -0,0 +1,14 @@
+********* Start testing of tst_PairDiagnostics *********
+Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@
+PASS : tst_PairDiagnostics::initTestCase()
+FAIL! : tst_PairDiagnostics::testQPair() Compared values are not the same
+ Actual (pair1): "QPair(1,1)"
+ Expected (pair2): "QPair(1,2)"
+ Loc: [../../../qt5/qtbase_fixItemData/tests/auto/testlib/selftests/pairdiagnostics/tst_pairdiagnostics.cpp(51)]
+FAIL! : tst_PairDiagnostics::testStdPair() Compared values are not the same
+ Actual (pair1): "std::pair(1,1)"
+ Expected (pair2): "std::pair(1,2)"
+ Loc: [../../../qt5/qtbase_fixItemData/tests/auto/testlib/selftests/pairdiagnostics/tst_pairdiagnostics.cpp(58)]
+PASS : tst_PairDiagnostics::cleanupTestCase()
+Totals: 2 passed, 2 failed, 0 skipped, 0 blacklisted, 1ms
+********* Finished testing of tst_PairDiagnostics *********