diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-10-22 13:29:41 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-11-28 11:46:15 (GMT) |
commit | 7dafb5ca875a714ed9a1ced1a44ca536b31a44de (patch) | |
tree | 7a0257acfdd27631925bb758dbe4a3b8bc222ff0 | |
parent | a22ecab92bacc57d0a788eb9713f442e95468fd3 (diff) | |
download | Qt-7dafb5ca875a714ed9a1ced1a44ca536b31a44de.zip Qt-7dafb5ca875a714ed9a1ced1a44ca536b31a44de.tar.gz Qt-7dafb5ca875a714ed9a1ced1a44ca536b31a44de.tar.bz2 |
Autotest: fix mistake in verifying pointers
Don't assume that pointers on the heap appear always on the
positive half of the addressing space.
-rw-r--r-- | tests/auto/qsharedpointer/tst_qsharedpointer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp index 6b4904f..a05aa97 100644 --- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp +++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp @@ -283,8 +283,8 @@ void tst_QSharedPointer::operators() QSharedPointer<char> p1; QSharedPointer<char> p2(new char); qptrdiff diff = p2.data() - p1.data(); - Q_ASSERT(p1.data() < p2.data()); - Q_ASSERT(diff > 0); + Q_ASSERT(p1.data() != p2.data()); + Q_ASSERT(diff != 0); // operator- QCOMPARE(p2 - p1.data(), diff); |