summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-05-09 07:34:45 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2011-05-10 02:43:07 (GMT)
commit74a4aad171b39018d596b99684286b9426a091a5 (patch)
tree26acb6b1bd2f2ccda49d164e86a08dc2cc7a5aea /tests/auto
parente12b912de89088a307c3519a01198a5314b8dd1a (diff)
downloadQt-74a4aad171b39018d596b99684286b9426a091a5.zip
Qt-74a4aad171b39018d596b99684286b9426a091a5.tar.gz
Qt-74a4aad171b39018d596b99684286b9426a091a5.tar.bz2
Remove Q_ASSERT from QVariant autotest
I missed one Q_ASSERT in the previous commit. Also changing to use Q_FUNC_INFO instead of hard-coded function names in the warning messages. Change-Id: I0ff5b2b2cda02597836beb5d2811fa8dd2a344ab Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qvariant/tst_qvariant.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/auto/qvariant/tst_qvariant.cpp b/tests/auto/qvariant/tst_qvariant.cpp
index fef7ec2..8d4b056 100644
--- a/tests/auto/qvariant/tst_qvariant.cpp
+++ b/tests/auto/qvariant/tst_qvariant.cpp
@@ -3234,19 +3234,22 @@ struct MyData
MyData() : ptr(this) {}
~MyData()
{
- if (ptr != this) qWarning("MyData::~MyData(): object has moved");
+ if (ptr != this) qWarning("%s: object has moved", Q_FUNC_INFO);
+ }
+ MyData(const MyData& o) : ptr(this)
+ {
+ if (o.ptr != &o) qWarning("%s: other object has moved", Q_FUNC_INFO);
}
- MyData(const MyData& o) : ptr(this) { Q_ASSERT(o.ptr == &o); }
MyData &operator=(const MyData &o)
{
- if (ptr != this) qWarning("MyData::operator=(): object has moved");
- if (o.ptr != &o) qWarning("MyData::operator=(): other object has moved");
+ if (ptr != this) qWarning("%s: object has moved", Q_FUNC_INFO);
+ if (o.ptr != &o) qWarning("%s: other object has moved", Q_FUNC_INFO);
return *this;
}
bool operator==(const MyData &o) const
{
- if (ptr != this) qWarning("MyData::operator==(): object has moved");
- if (o.ptr != &o) qWarning("MyData::operator==(): other object has moved");
+ if (ptr != this) qWarning("%s: object has moved", Q_FUNC_INFO);
+ if (o.ptr != &o) qWarning("%s: other object has moved", Q_FUNC_INFO);
return true;
}
};