diff options
author | Martin Smith <martin.smith@nokia.com> | 2010-07-07 08:51:03 (GMT) |
---|---|---|
committer | Martin Smith <martin.smith@nokia.com> | 2010-07-07 08:51:03 (GMT) |
commit | 047dd2d73fab867187d17f684be464233f64165b (patch) | |
tree | ae9a53cb8748eacac5b7f858f4e8341ed4ea4bd1 /tests | |
parent | 0ad74254d0810459bc08fdf9c0898a0d73f596b0 (diff) | |
parent | 1350f26569a4ab802ba93dc23e5dcb964a0cd3a5 (diff) | |
download | Qt-047dd2d73fab867187d17f684be464233f64165b.zip Qt-047dd2d73fab867187d17f684be464233f64165b.tar.gz Qt-047dd2d73fab867187d17f684be464233f64165b.tar.bz2 |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qscriptengine/tst_qscriptengine.cpp | 29 | ||||
-rw-r--r-- | tests/auto/qscriptvalue/tst_qscriptvalue.cpp | 4 |
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp index 6885adf..7a732cc 100644 --- a/tests/auto/qscriptengine/tst_qscriptengine.cpp +++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp @@ -4265,6 +4265,35 @@ void tst_QScriptEngine::reentrancy() QScriptEngine eng; QCOMPARE(eng.evaluate("Array()").toString(), QString()); } + + { + QScriptEngine eng1; + QScriptEngine eng2; + { + QScriptValue d1 = eng1.newDate(0); + QScriptValue d2 = eng2.newDate(0); + QCOMPARE(d1.toDateTime(), d2.toDateTime()); + QCOMPARE(d2.toDateTime(), d1.toDateTime()); + } + { + QScriptValue r1 = eng1.newRegExp("foo", "gim"); + QScriptValue r2 = eng2.newRegExp("foo", "gim"); + QCOMPARE(r1.toRegExp(), r2.toRegExp()); + QCOMPARE(r2.toRegExp(), r1.toRegExp()); + } + { + QScriptValue o1 = eng1.newQObject(this); + QScriptValue o2 = eng2.newQObject(this); + QCOMPARE(o1.toQObject(), o2.toQObject()); + QCOMPARE(o2.toQObject(), o1.toQObject()); + } + { + QScriptValue mo1 = eng1.newQMetaObject(&staticMetaObject); + QScriptValue mo2 = eng2.newQMetaObject(&staticMetaObject); + QCOMPARE(mo1.toQMetaObject(), mo2.toQMetaObject()); + QCOMPARE(mo2.toQMetaObject(), mo1.toQMetaObject()); + } + } } void tst_QScriptEngine:: incDecNonObjectProperty() diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp index 8aa4e711..83a3388 100644 --- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp +++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp @@ -2123,6 +2123,10 @@ void tst_QScriptValue::getSetProperty() QVERIFY(object.property(foo).strictlyEquals(num)); QVERIFY(object.property("foo").strictlyEquals(num)); QVERIFY(object.propertyFlags(foo) == 0); + + // Setting index property on non-Array + object.setProperty(13, num); + QVERIFY(object.property(13).equals(num)); } void tst_QScriptValue::arrayElementGetterSetter() |