diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-08-20 12:13:33 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-08-20 12:15:30 (GMT) |
commit | c808a972f8b4beb0527af0c0e669a2aa522ccf3d (patch) | |
tree | 76c019dda65dc91a84f92a5840233e1087a98f39 /tests/auto/qscriptvalue | |
parent | 4c97aff92561c7d2ab0bd0da920f1c3b708158a1 (diff) | |
download | Qt-c808a972f8b4beb0527af0c0e669a2aa522ccf3d.zip Qt-c808a972f8b4beb0527af0c0e669a2aa522ccf3d.tar.gz Qt-c808a972f8b4beb0527af0c0e669a2aa522ccf3d.tar.bz2 |
make QScriptEngine::objectById() work
It needs to work even when there is no public QScriptValue that
holds a reference to the object.
Diffstat (limited to 'tests/auto/qscriptvalue')
-rw-r--r-- | tests/auto/qscriptvalue/tst_qscriptvalue.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp index 3fafce9..718632b 100644 --- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp +++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp @@ -3312,7 +3312,9 @@ void tst_QScriptValue::objectId() QVERIFY(globalObjectId != -1); QVERIFY(eng.objectById(globalObjectId).strictlyEquals(global)); } - QVERIFY(eng.objectById(globalObjectId).strictlyEquals(eng.globalObject())); + QScriptValue obj = eng.objectById(globalObjectId); + QVERIFY(obj.isObject()); + QVERIFY(obj.strictlyEquals(eng.globalObject())); } QTEST_MAIN(tst_QScriptValue) |