Skip to content

Commit

Permalink
Enable globalObjectProperties_enumerate test.
Browse files Browse the repository at this point in the history
The test can be enabled because QJSValueIterator is back.

Change-Id: I81220ea17470663dab799eb818168480d2df1a54
Reviewed-on: http://codereview.qt.nokia.com/2439
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
  • Loading branch information
nierob authored and Qt by Nokia committed Aug 2, 2011
1 parent 8131350 commit dfdf7d0
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions tests/auto/declarative/qjsengine/tst_qjsengine.cpp
Expand Up @@ -43,6 +43,7 @@
#include <QtTest/QtTest>

#include <qjsengine.h>
#include <qjsvalueiterator.h>
#include <qgraphicsitem.h>
#include <qstandarditemmodel.h>
#include <QtCore/qnumeric.h>
Expand Down Expand Up @@ -138,9 +139,7 @@ private slots:
#endif
void globalObjectProperties();
void globalObjectEquals();
#if 0 // ###FIXME: No QScriptValueIterator API
void globalObjectProperties_enumerate();
#endif
void createGlobalObjectProperty();
void globalObjectGetterSetterProperty();
#if 0 // ###FIXME: No support for setting the global object
Expand Down Expand Up @@ -1560,11 +1559,10 @@ void tst_QJSEngine::globalObjectEquals()
QVERIFY(o.equals(eng.globalObject()));
}

#if 0 // ###FIXME: No QScriptValueIterator API
void tst_QJSEngine::globalObjectProperties_enumerate()
{
QScriptEngine eng;
QScriptValue global = eng.globalObject();
QJSEngine eng;
QJSValue global = eng.globalObject();

QSet<QString> expectedNames;
expectedNames
Expand Down Expand Up @@ -1598,18 +1596,14 @@ void tst_QJSEngine::globalObjectProperties_enumerate()
<< "unescape"
<< "SyntaxError"
<< "undefined"
// non-standard
<< "gc"
<< "version"
<< "print"
// JavaScriptCore
<< "JSON"
// V8
<< "execScript" //execScript for IE compatibility.
;
QSet<QString> actualNames;
{
QScriptValueIterator it(global);
QJSValueIterator it(global);
while (it.hasNext()) {
it.next();
actualNames.insert(it.name());
Expand All @@ -1627,7 +1621,6 @@ void tst_QJSEngine::globalObjectProperties_enumerate()
}
QVERIFY(remainingNames.isEmpty());
}
#endif

void tst_QJSEngine::createGlobalObjectProperty()
{
Expand Down

0 comments on commit dfdf7d0

Please sign in to comment.