summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptclass/tst_qscriptclass.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-05-18 13:13:10 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-05-18 13:13:10 (GMT)
commit3b7b05ce8db881acfdcf193b3c8fb3d4919eb1c2 (patch)
treeb35fb5f723752378dd4fede93a6c35c0aeb85ad2 /tests/auto/qscriptclass/tst_qscriptclass.cpp
parent1aeccd6bd14d7d9e098e333715f63e0225cd4a54 (diff)
parent2c07b5d2cba8d8e499bd0861eefef12d4e00d99a (diff)
downloadQt-3b7b05ce8db881acfdcf193b3c8fb3d4919eb1c2.zip
Qt-3b7b05ce8db881acfdcf193b3c8fb3d4919eb1c2.tar.gz
Qt-3b7b05ce8db881acfdcf193b3c8fb3d4919eb1c2.tar.bz2
Merge remote-tracking branch 'origin/4.8'
Diffstat (limited to 'tests/auto/qscriptclass/tst_qscriptclass.cpp')
-rw-r--r--tests/auto/qscriptclass/tst_qscriptclass.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/auto/qscriptclass/tst_qscriptclass.cpp b/tests/auto/qscriptclass/tst_qscriptclass.cpp
index 9ab8318..4d27672 100644
--- a/tests/auto/qscriptclass/tst_qscriptclass.cpp
+++ b/tests/auto/qscriptclass/tst_qscriptclass.cpp
@@ -369,8 +369,7 @@ QVariant TestClass::extension(Extension extension,
{
m_lastExtensionType = extension;
m_lastExtensionArgument = argument;
- if (extension == Callable) {
- Q_ASSERT(m_callableMode != NotCallable);
+ if (extension == Callable && m_callableMode != NotCallable) {
QScriptContext *ctx = qvariant_cast<QScriptContext*>(argument);
if (m_callableMode == CallableReturnsSum) {
qsreal sum = 0;
@@ -398,8 +397,7 @@ QVariant TestClass::extension(Extension extension,
engine()->newQObject(ctx->thisObject(), engine());
return QVariant();
}
- } else if (extension == HasInstance) {
- Q_ASSERT(m_hasInstance);
+ } else if (extension == HasInstance && m_hasInstance) {
QScriptValueList args = qvariant_cast<QScriptValueList>(argument);
QScriptValue obj = args.at(0);
QScriptValue value = args.at(1);