diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-24 15:39:39 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-08-19 19:06:33 +0000 |
commit | 752c0d7de0fb92124e2251a19841e308c6874159 (patch) | |
tree | db5562776e8de271508a4825ad71492b9de67bd9 /tests/auto/corelib/itemmodels/qitemmodel | |
parent | 933745f36b0b21e0107553f2d056af32e643b7d7 (diff) |
tests/corelib: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0) by
Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and
add casts where necessary. The values will then be logged
should a test fail.
Tests from corelib/tools were omitted in this change.
Change-Id: I4c8786d33fcf429d11b2b624c7cd89c28cadb518
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/itemmodels/qitemmodel')
-rw-r--r-- | tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp b/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp index 709b35b6e0..1531e0ac40 100644 --- a/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp +++ b/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp @@ -351,7 +351,7 @@ void tst_QItemModel::index() // Make sure that the same index is always returned QModelIndex a = currentModel->index(0,0); QModelIndex b = currentModel->index(0,0); - QVERIFY(a == b); + QCOMPARE(a, b); // index is tested more extensivly more later in checkChildren(), // but this catches the big mistakes @@ -415,7 +415,7 @@ void checkChildren(QAbstractItemModel *currentModel, const QModelIndex &parent, // Make sure we get the same index if we request it twice in a row QModelIndex a = currentModel->index(r, c, parent); QModelIndex b = currentModel->index(r, c, parent); - QVERIFY(a == b); + QCOMPARE(a, b); { const QModelIndex sibling = currentModel->sibling( r, c, topLeftChild ); @@ -427,7 +427,7 @@ void checkChildren(QAbstractItemModel *currentModel, const QModelIndex &parent, } // Some basic checking on the index that is returned - QVERIFY(index.model() == currentModel); + QCOMPARE(index.model(), currentModel); QCOMPARE(index.row(), r); QCOMPARE(index.column(), c); QCOMPARE(currentModel->data(index, Qt::DisplayRole).isValid(), true); |