summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtipc/qsharedmemory
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-05-11 02:00:40 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2011-05-11 02:49:02 (GMT)
commit637456edef085d1825f15429cd921f2f0d4bd6a2 (patch)
treec66161d861732ce48a121520931018f66bce7c64 /tests/auto/qtipc/qsharedmemory
parentbbfefe1b764cd41b7e677f26621fb6e76a67f9d7 (diff)
downloadQt-637456edef085d1825f15429cd921f2f0d4bd6a2.zip
Qt-637456edef085d1825f15429cd921f2f0d4bd6a2.tar.gz
Qt-637456edef085d1825f15429cd921f2f0d4bd6a2.tar.bz2
Remove Q_ASSERT's from qsharedmemory autotest
Report a fatal error rather than ignoring the error in non-debug builds. Change-Id: Ib6ef993e6e0c65bd9adea994ea7b454cc147f3d4 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern
Diffstat (limited to 'tests/auto/qtipc/qsharedmemory')
-rw-r--r--tests/auto/qtipc/qsharedmemory/src/qsystemlock_unix.cpp3
-rw-r--r--tests/auto/qtipc/qsharedmemory/src/qsystemlock_win.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/qtipc/qsharedmemory/src/qsystemlock_unix.cpp b/tests/auto/qtipc/qsharedmemory/src/qsystemlock_unix.cpp
index 6db84dd..647d857 100644
--- a/tests/auto/qtipc/qsharedmemory/src/qsystemlock_unix.cpp
+++ b/tests/auto/qtipc/qsharedmemory/src/qsystemlock_unix.cpp
@@ -207,7 +207,8 @@ bool QSystemLockPrivate::modifySemaphore(QSystemLockPrivate::Operation op,
if ((lockCount == 0 && op == Lock) || (lockCount > 0 && op == Unlock)) {
if (op == Unlock) {
--lockCount;
- Q_ASSERT(lockCount >= 0);
+ if (lockCount < 0)
+ qFatal("%s: lockCount must not be negative", Q_FUNC_INFO);
if (lockCount > 0)
return true;
}
diff --git a/tests/auto/qtipc/qsharedmemory/src/qsystemlock_win.cpp b/tests/auto/qtipc/qsharedmemory/src/qsystemlock_win.cpp
index f6803f7..f7e4ab2 100644
--- a/tests/auto/qtipc/qsharedmemory/src/qsystemlock_win.cpp
+++ b/tests/auto/qtipc/qsharedmemory/src/qsystemlock_win.cpp
@@ -157,7 +157,8 @@ bool QSystemLockPrivate::modifySemaphore(QSystemLockPrivate::Operation op,
if ((lockCount == 0 && op == Lock) || (lockCount > 0 && op == Unlock)) {
if (op == Unlock) {
--lockCount;
- Q_ASSERT(lockCount >= 0);
+ if (lockCount < 0)
+ qFatal("%s: lockCount must not be negative", Q_FUNC_INFO);
if (lockCount > 0)
return true;
}