summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp')
-rw-r--r--tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp b/tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp
index 55773f0..df11537 100644
--- a/tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp
+++ b/tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp
@@ -71,6 +71,7 @@ private slots:
void iterateString();
void iterateGetterSetter();
void assignObjectToIterator();
+ void iterateNonObject();
};
tst_QScriptValueIterator::tst_QScriptValueIterator()
@@ -583,5 +584,25 @@ void tst_QScriptValueIterator::assignObjectToIterator()
QCOMPARE(it.name(), QString::fromLatin1("bar"));
}
+void tst_QScriptValueIterator::iterateNonObject()
+{
+ QScriptValueIterator it(123);
+ QVERIFY(!it.hasNext());
+ it.next();
+ QVERIFY(!it.hasPrevious());
+ it.previous();
+ it.toFront();
+ it.toBack();
+ it.name();
+ it.scriptName();
+ it.flags();
+ it.value();
+ it.setValue(1);
+ it.remove();
+ QScriptValue num(5);
+ it = num;
+ QVERIFY(!it.hasNext());
+}
+
QTEST_MAIN(tst_QScriptValueIterator)
#include "tst_qscriptvalueiterator.moc"