summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptvalueiterator
diff options
context:
space:
mode:
authorBenjamin Poulain <benjamin.poulain@nokia.com>2009-07-31 08:46:15 (GMT)
committerBenjamin Poulain <benjamin.poulain@nokia.com>2009-07-31 08:46:15 (GMT)
commitb2fc6a9406f3b59f9e800e9d2d567d0dabde6cef (patch)
tree7370cd06f0cccec5bc636b7984218527e4613ded /tests/auto/qscriptvalueiterator
parent06f033bc8446d6b82bf68a2a0766b75836e005db (diff)
downloadQt-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.cpp10
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"));
}