diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2021-10-13 01:49:49 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2021-10-14 02:26:41 +0200 |
commit | a45bc2d12319588d27904f8eb8022d4308b43b63 (patch) | |
tree | 42f1922091d42caf2ea4a7d25f00c68f7373c7c3 /tests/auto | |
parent | 54171866921587100739c8ed106223d93a777b8b (diff) |
QList: avoid a iterator->pointer conversion in the test
Being a test, I'm going to abuse operator-> on end() to check
that we get what we want (a pointer past the end).
Change-Id: I7ab8d017b0fe320018820eff336d496328ade481
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/corelib/tools/qlist/tst_qlist.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/qlist/tst_qlist.cpp b/tests/auto/corelib/tools/qlist/tst_qlist.cpp index 78a6ca317a..f40370bfb8 100644 --- a/tests/auto/corelib/tools/qlist/tst_qlist.cpp +++ b/tests/auto/corelib/tools/qlist/tst_qlist.cpp @@ -3439,7 +3439,7 @@ void tst_QList::fromReadOnlyData() const QCOMPARE(v.size(), qsizetype(11)); // v.capacity() is unspecified, for now - QCOMPARE((void*)(const char*)(v.constBegin() + v.size()), (void*)(const char*)v.constEnd()); + QCOMPARE((void*)(v.constBegin() + v.size()).operator->(), (void*)v.constEnd().operator->()); for (int i = 0; i < 10; ++i) QCOMPARE(v[i], char('A' + i)); |