qt6-bb10/tests/auto/corelib/itemmodels
Ivan Solovev 1353c6f857 Introduce macros to simplify testing comparison
The problem with the QTestPrivate::testAllComparisonOperators() and
QTestPrivate::testEqualityOperators() functions is that if they fail,
they point into the helper function, but not into the actual test that
called the helper function. This is specially annoying when some test
calls the helper function multiple times.

This patch introduces the helper macros QT_TEST_ALL_COMPARISON_OPS and
QT_TEST_EQUALITY_OPS that wrap the respective function calls together
with the QTest::currentTestFailed() check. If the test has failed,
the macro generates a meaningful debug message with the original file
name and line number.

This patch also applies the new macros to qtbase.

Task-number: QTBUG-119433
Pick-to: 6.7
Change-Id: Iad709de45e5bf53c82e7afa8e9f51e9275c1e619
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-01-19 12:58:57 +00:00
..
qabstractitemmodel Introduce macros to simplify testing comparison 2024-01-19 12:58:57 +00:00
qabstractproxymodel QAbstractProxyModel: fix binding loops 2023-09-03 18:20:33 +02:00
qconcatenatetablesproxymodel CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qidentityproxymodel QIdentityProxyModel: add setHandleSourceLayoutChanges(bool) 2023-12-15 16:52:10 +03:00
qitemmodel CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qitemselectionmodel QItemSelectionModel: don't warn when destroying the model 2023-09-22 01:42:45 +02:00
qsortfilterproxymodel tst_QSortFilterProxyModel: fix mem-leaks II: sortStable() 2023-07-19 04:51:26 +00:00
qsortfilterproxymodel_recursive CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qsortfilterproxymodel_regularexpression CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qstringlistmodel CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qtransposeproxymodel CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00