diff options
author | Benjamin Poulain <benjamin.poulain@nokia.com> | 2009-07-31 08:46:15 (GMT) |
---|---|---|
committer | Benjamin Poulain <benjamin.poulain@nokia.com> | 2009-07-31 08:46:15 (GMT) |
commit | b2fc6a9406f3b59f9e800e9d2d567d0dabde6cef (patch) | |
tree | 7370cd06f0cccec5bc636b7984218527e4613ded /tests/auto/qscriptvalueiterator | |
parent | 06f033bc8446d6b82bf68a2a0766b75836e005db (diff) | |
download | Qt-b2fc6a9406f3b59f9e800e9d2d567d0dabde6cef.zip Qt-b2fc6a9406f3b59f9e800e9d2d567d0dabde6cef.tar.gz Qt-b2fc6a9406f3b59f9e800e9d2d567d0dabde6cef.tar.bz2 |
Basic implementation of QScriptValueIterator with JSC
Implement the methods to move forward and backward in the list of
property.
Diffstat (limited to 'tests/auto/qscriptvalueiterator')
-rw-r--r-- | tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp b/tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp index 4807756..673ac70 100644 --- a/tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp +++ b/tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp @@ -159,8 +159,6 @@ void tst_QScriptValueIterator::iterateBackward_data() void tst_QScriptValueIterator::iterateBackward() { - QSKIP("Not implemented", SkipAll); - QFETCH(QStringList, propertyNames); QFETCH(QStringList, propertyValues); QMap<QString, QString> pmap; @@ -263,23 +261,31 @@ void tst_QScriptValueIterator::iterateBackAndForth() object.setProperty("rab", QScriptValue(&engine, "oof"), QScriptValue::SkipInEnumeration); // should not affect iterator QScriptValueIterator it(object); + QVERIFY(it.hasNext()); it.next(); QCOMPARE(it.name(), QLatin1String("foo")); QVERIFY(it.hasPrevious()); it.previous(); QCOMPARE(it.name(), QLatin1String("foo")); + QVERIFY(it.hasNext()); it.next(); QCOMPARE(it.name(), QLatin1String("foo")); + QVERIFY(it.hasPrevious()); it.previous(); QCOMPARE(it.name(), QLatin1String("foo")); + QVERIFY(it.hasNext()); it.next(); QCOMPARE(it.name(), QLatin1String("foo")); + QVERIFY(it.hasNext()); it.next(); QCOMPARE(it.name(), QLatin1String("rab")); + QVERIFY(it.hasPrevious()); it.previous(); QCOMPARE(it.name(), QLatin1String("rab")); + QVERIFY(it.hasNext()); it.next(); QCOMPARE(it.name(), QLatin1String("rab")); + QVERIFY(it.hasPrevious()); it.previous(); QCOMPARE(it.name(), QLatin1String("rab")); } |