diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-24 16:22:48 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-24 16:22:48 (GMT) |
commit | e0a9d73ccc2fea135316bca8afb2fadbc0466a56 (patch) | |
tree | c27f62be20d87e83dd568d99a77990972eba0ece /tests | |
parent | ef30a6f336d55c813423bf139d8363f50181179f (diff) | |
parent | 2de691f9505cba2fd20b91d7cc7ea7e90bac71a0 (diff) | |
download | Qt-e0a9d73ccc2fea135316bca8afb2fadbc0466a56.zip Qt-e0a9d73ccc2fea135316bca8afb2fadbc0466a56.tar.gz Qt-e0a9d73ccc2fea135316bca8afb2fadbc0466a56.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
Update of the QScriptValue autotest suite.
New autotests cases for QScriptValue autotests generator.
QScriptValue autotest generator templates change.
Fix license template.
QScriptValue::isQMetaObject crash fix.
Implement toLatin1_helper with SSE2
Doc: add \since 4.7 to new QtMultimedia classes
Autotest: add a test to ensure that the Qt headers are clean.
Compile on Linux: close(2) is defined in #include <unistd.h>
Improved gesture event delivery in graphicsview.
Fixed a gesture autotest.
Cache scene coordinates of a hotspot in a QGesture.
Add an extra operator delete() to QSharedPointer's internals.
Fix compilation on x86 with gcc if SSE2 is not enabled
Comments the SSE implementation of fromLatin1_helper()
Build fixes for the SIMD functions
Implement QString::fromLatin1_helper() with SSE2
Cache the result of qDetectCPUFeatures()
Move the SIMD detection from QtGui to QtCore
Prevent stale QWidget pointers in QCocoaView
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/gestures/tst_gestures.cpp | 141 | ||||
-rw-r--r-- | tests/auto/headers/headers.pro | 2 | ||||
-rw-r--r-- | tests/auto/headers/headersclean.cpp | 86 | ||||
-rw-r--r-- | tests/auto/qscriptvalue/testgen/data.txt | 37 | ||||
-rwxr-xr-x | tests/auto/qscriptvalue/testgen/gen.py | 3 | ||||
-rw-r--r-- | tests/auto/qscriptvalue/testgen/testgenerator.cpp | 8 | ||||
-rw-r--r-- | tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp | 3114 |
7 files changed, 3383 insertions, 8 deletions
diff --git a/tests/auto/gestures/tst_gestures.cpp b/tests/auto/gestures/tst_gestures.cpp index 24391c0..a2058cd 100644 --- a/tests/auto/gestures/tst_gestures.cpp +++ b/tests/auto/gestures/tst_gestures.cpp @@ -261,15 +261,19 @@ protected: eventsPtr->all << g->gestureType(); switch(g->state()) { case Qt::GestureStarted: + emit gestureStarted(e->type(), g); eventsPtr->started << g->gestureType(); break; case Qt::GestureUpdated: + emit gestureUpdated(e->type(), g); eventsPtr->updated << g->gestureType(); break; case Qt::GestureFinished: + emit gestureFinished(e->type(), g); eventsPtr->finished << g->gestureType(); break; case Qt::GestureCanceled: + emit gestureCanceled(e->type(), g); eventsPtr->canceled << g->gestureType(); break; default: @@ -283,13 +287,23 @@ protected: } return true; } + +Q_SIGNALS: + void gestureStarted(QEvent::Type, QGesture *); + void gestureUpdated(QEvent::Type, QGesture *); + void gestureFinished(QEvent::Type, QGesture *); + void gestureCanceled(QEvent::Type, QGesture *); + +public Q_SLOTS: + void deleteThis() { delete this; } }; // TODO rename to sendGestureSequence static void sendCustomGesture(CustomEvent *event, QObject *object, QGraphicsScene *scene = 0) { + QWeakPointer<QObject> receiver(object); for (int i = CustomGesture::SerialMaybeThreshold; - i <= CustomGesture::SerialFinishedThreshold; ++i) { + i <= CustomGesture::SerialFinishedThreshold && receiver; ++i) { event->serial = i; if (scene) scene->sendEvent(qobject_cast<QGraphicsObject *>(object), event); @@ -336,6 +350,9 @@ private slots: void graphicsViewParentPropagation(); void panelPropagation(); void panelStacksBehindParent(); + void deleteGestureTargetWidget(); + void deleteGestureTargetItem_data(); + void deleteGestureTargetItem(); }; tst_Gestures::tst_Gestures() @@ -657,14 +674,16 @@ static const QColor InstanceColors[] = { class GestureItem : public QGraphicsObject { + Q_OBJECT static int InstanceCount; - public: GestureItem(const char *name = 0) { instanceNumber = InstanceCount++; - if (name) + if (name) { setObjectName(QLatin1String(name)); + setToolTip(name); + } size = QRectF(0, 0, 100, 100); customEventsReceived = 0; gestureEventsReceived = 0; @@ -672,6 +691,8 @@ public: events.clear(); overrideEvents.clear(); acceptGestureOverride = false; + + scene = 0; } ~GestureItem() { @@ -773,15 +794,19 @@ protected: switch(g->state()) { case Qt::GestureStarted: eventsPtr->started << g->gestureType(); + emit gestureStarted(e->type(), g); break; case Qt::GestureUpdated: eventsPtr->updated << g->gestureType(); + emit gestureUpdated(e->type(), g); break; case Qt::GestureFinished: eventsPtr->finished << g->gestureType(); + emit gestureFinished(e->type(), g); break; case Qt::GestureCanceled: eventsPtr->canceled << g->gestureType(); + emit gestureCanceled(e->type(), g); break; default: Q_ASSERT(false); @@ -794,6 +819,26 @@ protected: } return true; } + +Q_SIGNALS: + void gestureStarted(QEvent::Type, QGesture *); + void gestureUpdated(QEvent::Type, QGesture *); + void gestureFinished(QEvent::Type, QGesture *); + void gestureCanceled(QEvent::Type, QGesture *); + +public: + // some arguments for the slots below: + QGraphicsScene *scene; + +public Q_SLOTS: + void deleteThis() { delete this; } + void addSelfToScene(QEvent::Type eventType, QGesture *) + { + if (eventType == QEvent::Gesture) { + disconnect(sender(), 0, this, SLOT(addSelfToScene(QEvent::Type,QGesture*))); + scene->addItem(this); + } + } }; int GestureItem::InstanceCount = 0; @@ -1549,7 +1594,7 @@ void tst_Gestures::graphicsViewParentPropagation() QCOMPARE(item1_c1_c1->gestureEventsReceived, TotalGestureEventsCount); QCOMPARE(item1_c1_c1->gestureOverrideEventsReceived, 1); - QCOMPARE(item1_c1->gestureEventsReceived, 0); + QCOMPARE(item1_c1->gestureEventsReceived, TotalGestureEventsCount-1); QCOMPARE(item1_c1->gestureOverrideEventsReceived, 1); QCOMPARE(item1->gestureEventsReceived, TotalGestureEventsCount-1); QCOMPARE(item1->gestureOverrideEventsReceived, 1); @@ -1724,5 +1769,93 @@ void tst_Gestures::panelStacksBehindParent() QCOMPARE(panel->gestureOverrideEventsReceived, 0); } +void tst_Gestures::deleteGestureTargetWidget() +{ + +} + +void tst_Gestures::deleteGestureTargetItem_data() +{ + QTest::addColumn<bool>("propagateUpdateGesture"); + QTest::addColumn<QString>("emitter"); + QTest::addColumn<QString>("receiver"); + QTest::addColumn<QByteArray>("signalName"); + QTest::addColumn<QByteArray>("slotName"); + + QByteArray gestureUpdated = SIGNAL(gestureUpdated(QEvent::Type,QGesture*)); + QByteArray gestureFinished = SIGNAL(gestureFinished(QEvent::Type,QGesture*)); + QByteArray deleteThis = SLOT(deleteThis()); + QByteArray deleteLater = SLOT(deleteLater()); + + QTest::newRow("delete1") + << false << "item1" << "item1" << gestureUpdated << deleteThis; + QTest::newRow("delete2") + << false << "item2" << "item2" << gestureUpdated << deleteThis; + QTest::newRow("delete3") + << false << "item1" << "item2" << gestureUpdated << deleteThis; + + QTest::newRow("deleteLater1") + << false << "item1" << "item1" << gestureUpdated << deleteLater; + QTest::newRow("deleteLater2") + << false << "item2" << "item2" << gestureUpdated << deleteLater; + QTest::newRow("deleteLater3") + << false << "item1" << "item2" << gestureUpdated << deleteLater; + QTest::newRow("deleteLater4") + << false << "item2" << "item1" << gestureUpdated << deleteLater; + + QTest::newRow("delete-self-and-propagate") + << true << "item2" << "item2" << gestureUpdated << deleteThis; + QTest::newRow("deleteLater-self-and-propagate") + << true << "item2" << "item2" << gestureUpdated << deleteLater; + QTest::newRow("propagate-to-deletedLater") + << true << "item2" << "item1" << gestureUpdated << deleteLater; +} + +void tst_Gestures::deleteGestureTargetItem() +{ + QFETCH(bool, propagateUpdateGesture); + QFETCH(QString, emitter); + QFETCH(QString, receiver); + QFETCH(QByteArray, signalName); + QFETCH(QByteArray, slotName); + + QGraphicsScene scene; + QGraphicsView view(&scene); + view.setWindowFlags(Qt::X11BypassWindowManagerHint); + + GestureItem *item1 = new GestureItem("item1"); + item1->grabGesture(CustomGesture::GestureType); + item1->setZValue(2); + scene.addItem(item1); + + GestureItem *item2 = new GestureItem("item2"); + item2->grabGesture(CustomGesture::GestureType); + item2->setZValue(5); + scene.addItem(item2); + + QMap<QString, GestureItem *> items; + items.insert(item1->objectName(), item1); + items.insert(item2->objectName(), item2); + + view.show(); + QTest::qWaitForWindowShown(&view); + view.ensureVisible(scene.sceneRect()); + + view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren); + + if (propagateUpdateGesture) + item2->ignoredUpdatedGestures << CustomGesture::GestureType; + connect(items.value(emitter, 0), signalName, items.value(receiver, 0), slotName); + + // some debug output to see the current test data tag, so if we crash + // we know which one caused the crash. + qDebug() << "<-- testing"; + + CustomEvent event; + event.hotSpot = mapToGlobal(QPointF(5, 5), item2, &view); + event.hasHotSpot = true; + sendCustomGesture(&event, item1, &scene); +} + QTEST_MAIN(tst_Gestures) #include "tst_gestures.moc" diff --git a/tests/auto/headers/headers.pro b/tests/auto/headers/headers.pro index 703da7c..74e1a02 100644 --- a/tests/auto/headers/headers.pro +++ b/tests/auto/headers/headers.pro @@ -1,3 +1,3 @@ load(qttest_p4) -SOURCES += tst_headers.cpp +SOURCES += tst_headers.cpp headersclean.cpp QT = core diff --git a/tests/auto/headers/headersclean.cpp b/tests/auto/headers/headersclean.cpp new file mode 100644 index 0000000..b932b9f --- /dev/null +++ b/tests/auto/headers/headersclean.cpp @@ -0,0 +1,86 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#define QT_NO_KEYWORDS +#define signals int +#define slots int +#define emit public:; +#define foreach public:; +#define forever public:; + +// include all of Qt here + +// core Qt +#include <QtCore/QtCore> +#include <QtGui/QtGui> +#include <QtNetwork/QtNetwork> + +// extra +#include <QtDBus/QtDBus> +//#include <QtDeclarative/QtDeclarative> +#include <QtHelp/QtHelp> +#include <QtMultimedia/QtMultimedia> +#include <QtOpenGL/QtOpenGL> +#include <QtScript/QtScript> +#include <QtScriptTools/QtScriptTools> +#include <QtSql/QtSql> +#include <QtSvg/QtSvg> +#include <QtTest/QtTest> +#include <QtXml/QtXml> +#include <QtXmlPatterns/QtXmlPatterns> + +// webkit: +#include <QtWebKit/QtWebKit> + +// designer: +#include <QtDesigner/QtDesigner> +#include <QtUiTools/QtUiTools> + +// feature dependent: +#ifndef QT_NO_OPENVG +#include <QtOpenVG/QtOpenVG> +#endif + +// removed in 4.7: +//#include <QtAssistant/QtAssistant> + +// can't include this since it causes a linker error +//#include <Qt3Support/Qt3Support> diff --git a/tests/auto/qscriptvalue/testgen/data.txt b/tests/auto/qscriptvalue/testgen/data.txt index a041c9b..2ab2fc9 100644 --- a/tests/auto/qscriptvalue/testgen/data.txt +++ b/tests/auto/qscriptvalue/testgen/data.txt @@ -34,6 +34,7 @@ QScriptValue(QString()) QScriptValue(QString("0")) QScriptValue(QString("123")) QScriptValue(QString("12.4")) +#QScriptValue(QString::fromUtf8("ąśćżźółńę")) #Unbound values (bound to a null engine) QScriptValue(0, QScriptValue::UndefinedValue) @@ -64,6 +65,7 @@ QScriptValue(0, QString()) QScriptValue(0, QString("0")) QScriptValue(0, QString("123")) QScriptValue(0, QString("12.3")) +#QScriptValue(0, QString::fromUtf8("ąśćżźółńę")) #Bound values QScriptValue(engine, QScriptValue::UndefinedValue) @@ -114,7 +116,40 @@ engine->evaluate("/foo/") engine->evaluate("new Object()") engine->evaluate("new Array()") engine->evaluate("new Error()") +engine->evaluate("a = new Object(); a.foo = 22; a.foo") +engine->evaluate("Undefined") +engine->evaluate("Null") +engine->evaluate("True") +engine->evaluate("False") + +engine->evaluate("undefined") +engine->evaluate("null") +engine->evaluate("true") +engine->evaluate("false") +engine->evaluate("122") +engine->evaluate("124") +engine->evaluate("0") +engine->evaluate("0.0") +engine->evaluate("123.0") +engine->evaluate("6.37e-8") +engine->evaluate("-6.37e-8") +engine->evaluate("0x43211234") +engine->evaluate("0x10000") +engine->evaluate("0x10001") +engine->evaluate("NaN") +engine->evaluate("Infinity") +engine->evaluate("-Infinity") +engine->evaluate("'ciao'") +engine->evaluate("''") +engine->evaluate("'0'") +engine->evaluate("'123'") +engine->evaluate("'12.4'") +#engine->evaluate(QString::fromUtf8("'ąśćżźółńę'")) #other engine->nullValue() -engine->undefinedValue()
\ No newline at end of file +engine->undefinedValue() +engine->newObject() +engine->newArray() +engine->newArray(10) +engine->newDate(QDateTime()) diff --git a/tests/auto/qscriptvalue/testgen/gen.py b/tests/auto/qscriptvalue/testgen/gen.py index b3c81b9..6e48f46 100755 --- a/tests/auto/qscriptvalue/testgen/gen.py +++ b/tests/auto/qscriptvalue/testgen/gen.py @@ -70,8 +70,7 @@ class Options(): return getattr(self._o, attr) -mainTempl = Template("""/* -/**************************************************************************** +mainTempl = Template("""/**************************************************************************** ** ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. diff --git a/tests/auto/qscriptvalue/testgen/testgenerator.cpp b/tests/auto/qscriptvalue/testgen/testgenerator.cpp index d852ea5..4376c42 100644 --- a/tests/auto/qscriptvalue/testgen/testgenerator.cpp +++ b/tests/auto/qscriptvalue/testgen/testgenerator.cpp @@ -119,6 +119,7 @@ static QString generateIsXXXDef(const QString& name, const QList<QString>& list) "{\n"\ " QFETCH(bool, expected);\n"\ " QCOMPARE(value.%1(), expected);\n"\ + " QCOMPARE(value.%1(), expected);\n"\ "}\n"\ "\n"\ "DEFINE_TEST_FUNCTION(%1)\n"\ @@ -166,6 +167,7 @@ static QString generateToXXXDef(const QString& name, const QList<QPair<QString, "{\n"\ " QFETCH(%2, expected);\n"\ " QCOMPARE(value.%1(), expected);\n"\ + " QCOMPARE(value.%1(), expected);\n"\ "}\n"\ "\n"\ "DEFINE_TEST_FUNCTION(%1)\n"; @@ -213,9 +215,11 @@ QString generateToXXXDef<qsreal>(const QString& name, const QList<QPair<QString, "%666" " if (qIsInf(expected)) {\n"\ " QVERIFY(qIsInf(value.%1()));\n"\ + " QVERIFY(qIsInf(value.%1()));\n"\ " return;\n"\ " }\n"\ " QCOMPARE(value.%1(), expected);\n"\ + " QCOMPARE(value.%1(), expected);\n"\ "}\n"\ "\n"\ "DEFINE_TEST_FUNCTION(%1)\n"; @@ -269,6 +273,7 @@ static QString generateCastDef(const QList<QPair<QString, T> >& list) "{\n"\ " QFETCH(%2, expected);\n"\ " QCOMPARE(qscriptvalue_cast<%2>(value), expected);\n"\ + " QCOMPARE(qscriptvalue_cast<%2>(value), expected);\n"\ "}\n"\ "\n"\ "DEFINE_TEST_FUNCTION(qscriptvalue_cast%2)\n"; @@ -313,13 +318,16 @@ QString generateCastDef<qsreal>(const QList<QPair<QString, qsreal> >& list) " QFETCH(%2, expected);\n"\ " if (qIsNaN(expected)) {\n" " QVERIFY(qIsNaN(qscriptvalue_cast<%2>(value)));\n" + " QVERIFY(qIsNaN(qscriptvalue_cast<%2>(value)));\n" " return;\n" " }\n"\ " if (qIsInf(expected)) {\n" " QVERIFY(qIsInf(qscriptvalue_cast<%2>(value)));\n" + " QVERIFY(qIsInf(qscriptvalue_cast<%2>(value)));\n" " return;\n" " }\n" " QCOMPARE(qscriptvalue_cast<%2>(value), expected);\n"\ + " QCOMPARE(qscriptvalue_cast<%2>(value), expected);\n"\ "}\n"\ "\n"\ "DEFINE_TEST_FUNCTION(qscriptvalue_cast%2)\n"; diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp index 4e621b3..1f68cb5 100644 --- a/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp +++ b/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp @@ -152,8 +152,39 @@ void tst_QScriptValue::initScriptValues() DEFINE_TEST_VALUE(engine->evaluate("new Object()")); DEFINE_TEST_VALUE(engine->evaluate("new Array()")); DEFINE_TEST_VALUE(engine->evaluate("new Error()")); + DEFINE_TEST_VALUE(engine->evaluate("a = new Object(); a.foo = 22; a.foo")); + DEFINE_TEST_VALUE(engine->evaluate("Undefined")); + DEFINE_TEST_VALUE(engine->evaluate("Null")); + DEFINE_TEST_VALUE(engine->evaluate("True")); + DEFINE_TEST_VALUE(engine->evaluate("False")); + DEFINE_TEST_VALUE(engine->evaluate("undefined")); + DEFINE_TEST_VALUE(engine->evaluate("null")); + DEFINE_TEST_VALUE(engine->evaluate("true")); + DEFINE_TEST_VALUE(engine->evaluate("false")); + DEFINE_TEST_VALUE(engine->evaluate("122")); + DEFINE_TEST_VALUE(engine->evaluate("124")); + DEFINE_TEST_VALUE(engine->evaluate("0")); + DEFINE_TEST_VALUE(engine->evaluate("0.0")); + DEFINE_TEST_VALUE(engine->evaluate("123.0")); + DEFINE_TEST_VALUE(engine->evaluate("6.37e-8")); + DEFINE_TEST_VALUE(engine->evaluate("-6.37e-8")); + DEFINE_TEST_VALUE(engine->evaluate("0x43211234")); + DEFINE_TEST_VALUE(engine->evaluate("0x10000")); + DEFINE_TEST_VALUE(engine->evaluate("0x10001")); + DEFINE_TEST_VALUE(engine->evaluate("NaN")); + DEFINE_TEST_VALUE(engine->evaluate("Infinity")); + DEFINE_TEST_VALUE(engine->evaluate("-Infinity")); + DEFINE_TEST_VALUE(engine->evaluate("'ciao'")); + DEFINE_TEST_VALUE(engine->evaluate("''")); + DEFINE_TEST_VALUE(engine->evaluate("'0'")); + DEFINE_TEST_VALUE(engine->evaluate("'123'")); + DEFINE_TEST_VALUE(engine->evaluate("'12.4'")); DEFINE_TEST_VALUE(engine->nullValue()); DEFINE_TEST_VALUE(engine->undefinedValue()); + DEFINE_TEST_VALUE(engine->newObject()); + DEFINE_TEST_VALUE(engine->newArray()); + DEFINE_TEST_VALUE(engine->newArray(10)); + DEFINE_TEST_VALUE(engine->newDate(QDateTime())); } @@ -269,8 +300,39 @@ void tst_QScriptValue::isValid_makeData(const char* expr) << "engine->evaluate(\"new Object()\")" << "engine->evaluate(\"new Array()\")" << "engine->evaluate(\"new Error()\")" + << "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")" + << "engine->evaluate(\"Undefined\")" + << "engine->evaluate(\"Null\")" + << "engine->evaluate(\"True\")" + << "engine->evaluate(\"False\")" + << "engine->evaluate(\"undefined\")" + << "engine->evaluate(\"null\")" + << "engine->evaluate(\"true\")" + << "engine->evaluate(\"false\")" + << "engine->evaluate(\"122\")" + << "engine->evaluate(\"124\")" + << "engine->evaluate(\"0\")" + << "engine->evaluate(\"0.0\")" + << "engine->evaluate(\"123.0\")" + << "engine->evaluate(\"6.37e-8\")" + << "engine->evaluate(\"-6.37e-8\")" + << "engine->evaluate(\"0x43211234\")" + << "engine->evaluate(\"0x10000\")" + << "engine->evaluate(\"0x10001\")" + << "engine->evaluate(\"NaN\")" + << "engine->evaluate(\"Infinity\")" + << "engine->evaluate(\"-Infinity\")" + << "engine->evaluate(\"'ciao'\")" + << "engine->evaluate(\"''\")" + << "engine->evaluate(\"'0'\")" + << "engine->evaluate(\"'123'\")" + << "engine->evaluate(\"'12.4'\")" << "engine->nullValue()" << "engine->undefinedValue()" + << "engine->newObject()" + << "engine->newArray()" + << "engine->newArray(10)" + << "engine->newDate(QDateTime())" ; } newRow(expr) << isValid.contains(expr); @@ -280,6 +342,7 @@ void tst_QScriptValue::isValid_test(const char*, const QScriptValue& value) { QFETCH(bool, expected); QCOMPARE(value.isValid(), expected); + QCOMPARE(value.isValid(), expected); } DEFINE_TEST_FUNCTION(isValid) @@ -301,6 +364,8 @@ void tst_QScriptValue::isBool_makeData(const char* expr) << "QScriptValue(0, false)" << "QScriptValue(engine, true)" << "QScriptValue(engine, false)" + << "engine->evaluate(\"true\")" + << "engine->evaluate(\"false\")" ; } newRow(expr) << isBool.contains(expr); @@ -310,6 +375,7 @@ void tst_QScriptValue::isBool_test(const char*, const QScriptValue& value) { QFETCH(bool, expected); QCOMPARE(value.isBool(), expected); + QCOMPARE(value.isBool(), expected); } DEFINE_TEST_FUNCTION(isBool) @@ -331,6 +397,8 @@ void tst_QScriptValue::isBoolean_makeData(const char* expr) << "QScriptValue(0, false)" << "QScriptValue(engine, true)" << "QScriptValue(engine, false)" + << "engine->evaluate(\"true\")" + << "engine->evaluate(\"false\")" ; } newRow(expr) << isBoolean.contains(expr); @@ -340,6 +408,7 @@ void tst_QScriptValue::isBoolean_test(const char*, const QScriptValue& value) { QFETCH(bool, expected); QCOMPARE(value.isBoolean(), expected); + QCOMPARE(value.isBoolean(), expected); } DEFINE_TEST_FUNCTION(isBoolean) @@ -397,6 +466,20 @@ void tst_QScriptValue::isNumber_makeData(const char* expr) << "QScriptValue(engine, qQNaN())" << "QScriptValue(engine, qInf())" << "QScriptValue(engine, -qInf())" + << "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")" + << "engine->evaluate(\"122\")" + << "engine->evaluate(\"124\")" + << "engine->evaluate(\"0\")" + << "engine->evaluate(\"0.0\")" + << "engine->evaluate(\"123.0\")" + << "engine->evaluate(\"6.37e-8\")" + << "engine->evaluate(\"-6.37e-8\")" + << "engine->evaluate(\"0x43211234\")" + << "engine->evaluate(\"0x10000\")" + << "engine->evaluate(\"0x10001\")" + << "engine->evaluate(\"NaN\")" + << "engine->evaluate(\"Infinity\")" + << "engine->evaluate(\"-Infinity\")" ; } newRow(expr) << isNumber.contains(expr); @@ -406,6 +489,7 @@ void tst_QScriptValue::isNumber_test(const char*, const QScriptValue& value) { QFETCH(bool, expected); QCOMPARE(value.isNumber(), expected); + QCOMPARE(value.isNumber(), expected); } DEFINE_TEST_FUNCTION(isNumber) @@ -439,6 +523,7 @@ void tst_QScriptValue::isFunction_test(const char*, const QScriptValue& value) { QFETCH(bool, expected); QCOMPARE(value.isFunction(), expected); + QCOMPARE(value.isFunction(), expected); } DEFINE_TEST_FUNCTION(isFunction) @@ -457,6 +542,7 @@ void tst_QScriptValue::isNull_makeData(const char* expr) isNull << "QScriptValue(QScriptValue::NullValue)" << "QScriptValue(0, QScriptValue::NullValue)" << "QScriptValue(engine, QScriptValue::NullValue)" + << "engine->evaluate(\"null\")" << "engine->nullValue()" ; } @@ -467,6 +553,7 @@ void tst_QScriptValue::isNull_test(const char*, const QScriptValue& value) { QFETCH(bool, expected); QCOMPARE(value.isNull(), expected); + QCOMPARE(value.isNull(), expected); } DEFINE_TEST_FUNCTION(isNull) @@ -512,6 +599,11 @@ void tst_QScriptValue::isString_makeData(const char* expr) << "QScriptValue(engine, QString(\"0\"))" << "QScriptValue(engine, QString(\"123\"))" << "QScriptValue(engine, QString(\"1.23\"))" + << "engine->evaluate(\"'ciao'\")" + << "engine->evaluate(\"''\")" + << "engine->evaluate(\"'0'\")" + << "engine->evaluate(\"'123'\")" + << "engine->evaluate(\"'12.4'\")" ; } newRow(expr) << isString.contains(expr); @@ -521,6 +613,7 @@ void tst_QScriptValue::isString_test(const char*, const QScriptValue& value) { QFETCH(bool, expected); QCOMPARE(value.isString(), expected); + QCOMPARE(value.isString(), expected); } DEFINE_TEST_FUNCTION(isString) @@ -540,6 +633,7 @@ void tst_QScriptValue::isUndefined_makeData(const char* expr) << "QScriptValue(0, QScriptValue::UndefinedValue)" << "QScriptValue(engine, QScriptValue::UndefinedValue)" << "engine->evaluate(\"{}\")" + << "engine->evaluate(\"undefined\")" << "engine->undefinedValue()" ; } @@ -550,6 +644,7 @@ void tst_QScriptValue::isUndefined_test(const char*, const QScriptValue& value) { QFETCH(bool, expected); QCOMPARE(value.isUndefined(), expected); + QCOMPARE(value.isUndefined(), expected); } DEFINE_TEST_FUNCTION(isUndefined) @@ -585,6 +680,14 @@ void tst_QScriptValue::isObject_makeData(const char* expr) << "engine->evaluate(\"new Object()\")" << "engine->evaluate(\"new Array()\")" << "engine->evaluate(\"new Error()\")" + << "engine->evaluate(\"Undefined\")" + << "engine->evaluate(\"Null\")" + << "engine->evaluate(\"True\")" + << "engine->evaluate(\"False\")" + << "engine->newObject()" + << "engine->newArray()" + << "engine->newArray(10)" + << "engine->newDate(QDateTime())" ; } newRow(expr) << isObject.contains(expr); @@ -594,6 +697,7 @@ void tst_QScriptValue::isObject_test(const char*, const QScriptValue& value) { QFETCH(bool, expected); QCOMPARE(value.isObject(), expected); + QCOMPARE(value.isObject(), expected); } DEFINE_TEST_FUNCTION(isObject) @@ -610,6 +714,7 @@ void tst_QScriptValue::isDate_makeData(const char* expr) static QSet<QString> isDate; if (isDate.isEmpty()) { isDate << "engine->evaluate(\"Date.prototype\")" + << "engine->newDate(QDateTime())" ; } newRow(expr) << isDate.contains(expr); @@ -619,6 +724,7 @@ void tst_QScriptValue::isDate_test(const char*, const QScriptValue& value) { QFETCH(bool, expected); QCOMPARE(value.isDate(), expected); + QCOMPARE(value.isDate(), expected); } DEFINE_TEST_FUNCTION(isDate) @@ -644,6 +750,7 @@ void tst_QScriptValue::isRegExp_test(const char*, const QScriptValue& value) { QFETCH(bool, expected); QCOMPARE(value.isRegExp(), expected); + QCOMPARE(value.isRegExp(), expected); } DEFINE_TEST_FUNCTION(isRegExp) @@ -662,6 +769,8 @@ void tst_QScriptValue::isArray_makeData(const char* expr) isArray << "engine->evaluate(\"[]\")" << "engine->evaluate(\"Array.prototype\")" << "engine->evaluate(\"new Array()\")" + << "engine->newArray()" + << "engine->newArray(10)" ; } newRow(expr) << isArray.contains(expr); @@ -671,6 +780,7 @@ void tst_QScriptValue::isArray_test(const char*, const QScriptValue& value) { QFETCH(bool, expected); QCOMPARE(value.isArray(), expected); + QCOMPARE(value.isArray(), expected); } DEFINE_TEST_FUNCTION(isArray) @@ -688,6 +798,10 @@ void tst_QScriptValue::isError_makeData(const char* expr) if (isError.isEmpty()) { isError << "engine->evaluate(\"Error.prototype\")" << "engine->evaluate(\"new Error()\")" + << "engine->evaluate(\"Undefined\")" + << "engine->evaluate(\"Null\")" + << "engine->evaluate(\"True\")" + << "engine->evaluate(\"False\")" ; } newRow(expr) << isError.contains(expr); @@ -697,6 +811,7 @@ void tst_QScriptValue::isError_test(const char*, const QScriptValue& value) { QFETCH(bool, expected); QCOMPARE(value.isError(), expected); + QCOMPARE(value.isError(), expected); } DEFINE_TEST_FUNCTION(isError) @@ -816,8 +931,39 @@ void tst_QScriptValue::toString_makeData(const char* expr) toString.insert("engine->evaluate(\"new Object()\")", "[object Object]"); toString.insert("engine->evaluate(\"new Array()\")", ""); toString.insert("engine->evaluate(\"new Error()\")", "Error: Unknown error"); + toString.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", "22"); + toString.insert("engine->evaluate(\"Undefined\")", "ReferenceError: Can't find variable: Undefined"); + toString.insert("engine->evaluate(\"Null\")", "ReferenceError: Can't find variable: Null"); + toString.insert("engine->evaluate(\"True\")", "ReferenceError: Can't find variable: True"); + toString.insert("engine->evaluate(\"False\")", "ReferenceError: Can't find variable: False"); + toString.insert("engine->evaluate(\"undefined\")", "undefined"); + toString.insert("engine->evaluate(\"null\")", "null"); + toString.insert("engine->evaluate(\"true\")", "true"); + toString.insert("engine->evaluate(\"false\")", "false"); + toString.insert("engine->evaluate(\"122\")", "122"); + toString.insert("engine->evaluate(\"124\")", "124"); + toString.insert("engine->evaluate(\"0\")", "0"); + toString.insert("engine->evaluate(\"0.0\")", "0"); + toString.insert("engine->evaluate(\"123.0\")", "123"); + toString.insert("engine->evaluate(\"6.37e-8\")", "6.37e-8"); + toString.insert("engine->evaluate(\"-6.37e-8\")", "-6.37e-8"); + toString.insert("engine->evaluate(\"0x43211234\")", "1126240820"); + toString.insert("engine->evaluate(\"0x10000\")", "65536"); + toString.insert("engine->evaluate(\"0x10001\")", "65537"); + toString.insert("engine->evaluate(\"NaN\")", "NaN"); + toString.insert("engine->evaluate(\"Infinity\")", "Infinity"); + toString.insert("engine->evaluate(\"-Infinity\")", "-Infinity"); + toString.insert("engine->evaluate(\"'ciao'\")", "ciao"); + toString.insert("engine->evaluate(\"''\")", ""); + toString.insert("engine->evaluate(\"'0'\")", "0"); + toString.insert("engine->evaluate(\"'123'\")", "123"); + toString.insert("engine->evaluate(\"'12.4'\")", "12.4"); toString.insert("engine->nullValue()", "null"); toString.insert("engine->undefinedValue()", "undefined"); + toString.insert("engine->newObject()", "[object Object]"); + toString.insert("engine->newArray()", ""); + toString.insert("engine->newArray(10)", ",,,,,,,,,"); + toString.insert("engine->newDate(QDateTime())", "Invalid Date"); } newRow(expr) << toString.value(expr); } @@ -826,6 +972,7 @@ void tst_QScriptValue::toString_test(const char*, const QScriptValue& value) { QFETCH(QString, expected); QCOMPARE(value.toString(), expected); + QCOMPARE(value.toString(), expected); } DEFINE_TEST_FUNCTION(toString) @@ -944,8 +1091,39 @@ void tst_QScriptValue::toNumber_makeData(const char* expr) toNumber.insert("engine->evaluate(\"new Object()\")", qQNaN()); toNumber.insert("engine->evaluate(\"new Array()\")", 0); toNumber.insert("engine->evaluate(\"new Error()\")", qQNaN()); + toNumber.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", 22); + toNumber.insert("engine->evaluate(\"Undefined\")", qQNaN()); + toNumber.insert("engine->evaluate(\"Null\")", qQNaN()); + toNumber.insert("engine->evaluate(\"True\")", qQNaN()); + toNumber.insert("engine->evaluate(\"False\")", qQNaN()); + toNumber.insert("engine->evaluate(\"undefined\")", qQNaN()); + toNumber.insert("engine->evaluate(\"null\")", 0); + toNumber.insert("engine->evaluate(\"true\")", 1); + toNumber.insert("engine->evaluate(\"false\")", 0); + toNumber.insert("engine->evaluate(\"122\")", 122); + toNumber.insert("engine->evaluate(\"124\")", 124); + toNumber.insert("engine->evaluate(\"0\")", 0); + toNumber.insert("engine->evaluate(\"0.0\")", 0); + toNumber.insert("engine->evaluate(\"123.0\")", 123); + toNumber.insert("engine->evaluate(\"6.37e-8\")", 6.369999999999999e-08); + toNumber.insert("engine->evaluate(\"-6.37e-8\")", -6.369999999999999e-08); + toNumber.insert("engine->evaluate(\"0x43211234\")", 1126240820); + toNumber.insert("engine->evaluate(\"0x10000\")", 65536); + toNumber.insert("engine->evaluate(\"0x10001\")", 65537); + toNumber.insert("engine->evaluate(\"NaN\")", qQNaN()); + toNumber.insert("engine->evaluate(\"Infinity\")", qInf()); + toNumber.insert("engine->evaluate(\"-Infinity\")", qInf()); + toNumber.insert("engine->evaluate(\"'ciao'\")", qQNaN()); + toNumber.insert("engine->evaluate(\"''\")", 0); + toNumber.insert("engine->evaluate(\"'0'\")", 0); + toNumber.insert("engine->evaluate(\"'123'\")", 123); + toNumber.insert("engine->evaluate(\"'12.4'\")", 12.4); toNumber.insert("engine->nullValue()", 0); toNumber.insert("engine->undefinedValue()", qQNaN()); + toNumber.insert("engine->newObject()", qQNaN()); + toNumber.insert("engine->newArray()", 0); + toNumber.insert("engine->newArray(10)", qQNaN()); + toNumber.insert("engine->newDate(QDateTime())", qQNaN()); } newRow(expr) << toNumber.value(expr); } @@ -959,9 +1137,11 @@ void tst_QScriptValue::toNumber_test(const char*, const QScriptValue& value) } if (qIsInf(expected)) { QVERIFY(qIsInf(value.toNumber())); + QVERIFY(qIsInf(value.toNumber())); return; } QCOMPARE(value.toNumber(), expected); + QCOMPARE(value.toNumber(), expected); } DEFINE_TEST_FUNCTION(toNumber) @@ -1080,8 +1260,39 @@ void tst_QScriptValue::toBool_makeData(const char* expr) toBool.insert("engine->evaluate(\"new Object()\")", true); toBool.insert("engine->evaluate(\"new Array()\")", true); toBool.insert("engine->evaluate(\"new Error()\")", true); + toBool.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", true); + toBool.insert("engine->evaluate(\"Undefined\")", true); + toBool.insert("engine->evaluate(\"Null\")", true); + toBool.insert("engine->evaluate(\"True\")", true); + toBool.insert("engine->evaluate(\"False\")", true); + toBool.insert("engine->evaluate(\"undefined\")", false); + toBool.insert("engine->evaluate(\"null\")", false); + toBool.insert("engine->evaluate(\"true\")", true); + toBool.insert("engine->evaluate(\"false\")", false); + toBool.insert("engine->evaluate(\"122\")", true); + toBool.insert("engine->evaluate(\"124\")", true); + toBool.insert("engine->evaluate(\"0\")", false); + toBool.insert("engine->evaluate(\"0.0\")", false); + toBool.insert("engine->evaluate(\"123.0\")", true); + toBool.insert("engine->evaluate(\"6.37e-8\")", true); + toBool.insert("engine->evaluate(\"-6.37e-8\")", true); + toBool.insert("engine->evaluate(\"0x43211234\")", true); + toBool.insert("engine->evaluate(\"0x10000\")", true); + toBool.insert("engine->evaluate(\"0x10001\")", true); + toBool.insert("engine->evaluate(\"NaN\")", false); + toBool.insert("engine->evaluate(\"Infinity\")", true); + toBool.insert("engine->evaluate(\"-Infinity\")", true); + toBool.insert("engine->evaluate(\"'ciao'\")", true); + toBool.insert("engine->evaluate(\"''\")", false); + toBool.insert("engine->evaluate(\"'0'\")", true); + toBool.insert("engine->evaluate(\"'123'\")", true); + toBool.insert("engine->evaluate(\"'12.4'\")", true); toBool.insert("engine->nullValue()", false); toBool.insert("engine->undefinedValue()", false); + toBool.insert("engine->newObject()", true); + toBool.insert("engine->newArray()", true); + toBool.insert("engine->newArray(10)", true); + toBool.insert("engine->newDate(QDateTime())", true); } newRow(expr) << toBool.value(expr); } @@ -1090,6 +1301,7 @@ void tst_QScriptValue::toBool_test(const char*, const QScriptValue& value) { QFETCH(bool, expected); QCOMPARE(value.toBool(), expected); + QCOMPARE(value.toBool(), expected); } DEFINE_TEST_FUNCTION(toBool) @@ -1208,8 +1420,39 @@ void tst_QScriptValue::toBoolean_makeData(const char* expr) toBoolean.insert("engine->evaluate(\"new Object()\")", true); toBoolean.insert("engine->evaluate(\"new Array()\")", true); toBoolean.insert("engine->evaluate(\"new Error()\")", true); + toBoolean.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", true); + toBoolean.insert("engine->evaluate(\"Undefined\")", true); + toBoolean.insert("engine->evaluate(\"Null\")", true); + toBoolean.insert("engine->evaluate(\"True\")", true); + toBoolean.insert("engine->evaluate(\"False\")", true); + toBoolean.insert("engine->evaluate(\"undefined\")", false); + toBoolean.insert("engine->evaluate(\"null\")", false); + toBoolean.insert("engine->evaluate(\"true\")", true); + toBoolean.insert("engine->evaluate(\"false\")", false); + toBoolean.insert("engine->evaluate(\"122\")", true); + toBoolean.insert("engine->evaluate(\"124\")", true); + toBoolean.insert("engine->evaluate(\"0\")", false); + toBoolean.insert("engine->evaluate(\"0.0\")", false); + toBoolean.insert("engine->evaluate(\"123.0\")", true); + toBoolean.insert("engine->evaluate(\"6.37e-8\")", true); + toBoolean.insert("engine->evaluate(\"-6.37e-8\")", true); + toBoolean.insert("engine->evaluate(\"0x43211234\")", true); + toBoolean.insert("engine->evaluate(\"0x10000\")", true); + toBoolean.insert("engine->evaluate(\"0x10001\")", true); + toBoolean.insert("engine->evaluate(\"NaN\")", false); + toBoolean.insert("engine->evaluate(\"Infinity\")", true); + toBoolean.insert("engine->evaluate(\"-Infinity\")", true); + toBoolean.insert("engine->evaluate(\"'ciao'\")", true); + toBoolean.insert("engine->evaluate(\"''\")", false); + toBoolean.insert("engine->evaluate(\"'0'\")", true); + toBoolean.insert("engine->evaluate(\"'123'\")", true); + toBoolean.insert("engine->evaluate(\"'12.4'\")", true); toBoolean.insert("engine->nullValue()", false); toBoolean.insert("engine->undefinedValue()", false); + toBoolean.insert("engine->newObject()", true); + toBoolean.insert("engine->newArray()", true); + toBoolean.insert("engine->newArray(10)", true); + toBoolean.insert("engine->newDate(QDateTime())", true); } newRow(expr) << toBoolean.value(expr); } @@ -1218,6 +1461,7 @@ void tst_QScriptValue::toBoolean_test(const char*, const QScriptValue& value) { QFETCH(bool, expected); QCOMPARE(value.toBoolean(), expected); + QCOMPARE(value.toBoolean(), expected); } DEFINE_TEST_FUNCTION(toBoolean) @@ -1336,8 +1580,39 @@ void tst_QScriptValue::toInteger_makeData(const char* expr) toInteger.insert("engine->evaluate(\"new Object()\")", 0); toInteger.insert("engine->evaluate(\"new Array()\")", 0); toInteger.insert("engine->evaluate(\"new Error()\")", 0); + toInteger.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", 22); + toInteger.insert("engine->evaluate(\"Undefined\")", 0); + toInteger.insert("engine->evaluate(\"Null\")", 0); + toInteger.insert("engine->evaluate(\"True\")", 0); + toInteger.insert("engine->evaluate(\"False\")", 0); + toInteger.insert("engine->evaluate(\"undefined\")", 0); + toInteger.insert("engine->evaluate(\"null\")", 0); + toInteger.insert("engine->evaluate(\"true\")", 1); + toInteger.insert("engine->evaluate(\"false\")", 0); + toInteger.insert("engine->evaluate(\"122\")", 122); + toInteger.insert("engine->evaluate(\"124\")", 124); + toInteger.insert("engine->evaluate(\"0\")", 0); + toInteger.insert("engine->evaluate(\"0.0\")", 0); + toInteger.insert("engine->evaluate(\"123.0\")", 123); + toInteger.insert("engine->evaluate(\"6.37e-8\")", 0); + toInteger.insert("engine->evaluate(\"-6.37e-8\")", 0); + toInteger.insert("engine->evaluate(\"0x43211234\")", 1126240820); + toInteger.insert("engine->evaluate(\"0x10000\")", 65536); + toInteger.insert("engine->evaluate(\"0x10001\")", 65537); + toInteger.insert("engine->evaluate(\"NaN\")", 0); + toInteger.insert("engine->evaluate(\"Infinity\")", qInf()); + toInteger.insert("engine->evaluate(\"-Infinity\")", qInf()); + toInteger.insert("engine->evaluate(\"'ciao'\")", 0); + toInteger.insert("engine->evaluate(\"''\")", 0); + toInteger.insert("engine->evaluate(\"'0'\")", 0); + toInteger.insert("engine->evaluate(\"'123'\")", 123); + toInteger.insert("engine->evaluate(\"'12.4'\")", 12); toInteger.insert("engine->nullValue()", 0); toInteger.insert("engine->undefinedValue()", 0); + toInteger.insert("engine->newObject()", 0); + toInteger.insert("engine->newArray()", 0); + toInteger.insert("engine->newArray(10)", 0); + toInteger.insert("engine->newDate(QDateTime())", 0); } newRow(expr) << toInteger.value(expr); } @@ -1347,9 +1622,11 @@ void tst_QScriptValue::toInteger_test(const char*, const QScriptValue& value) QFETCH(qsreal, expected); if (qIsInf(expected)) { QVERIFY(qIsInf(value.toInteger())); + QVERIFY(qIsInf(value.toInteger())); return; } QCOMPARE(value.toInteger(), expected); + QCOMPARE(value.toInteger(), expected); } DEFINE_TEST_FUNCTION(toInteger) @@ -1468,8 +1745,39 @@ void tst_QScriptValue::toInt32_makeData(const char* expr) toInt32.insert("engine->evaluate(\"new Object()\")", 0); toInt32.insert("engine->evaluate(\"new Array()\")", 0); toInt32.insert("engine->evaluate(\"new Error()\")", 0); + toInt32.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", 22); + toInt32.insert("engine->evaluate(\"Undefined\")", 0); + toInt32.insert("engine->evaluate(\"Null\")", 0); + toInt32.insert("engine->evaluate(\"True\")", 0); + toInt32.insert("engine->evaluate(\"False\")", 0); + toInt32.insert("engine->evaluate(\"undefined\")", 0); + toInt32.insert("engine->evaluate(\"null\")", 0); + toInt32.insert("engine->evaluate(\"true\")", 1); + toInt32.insert("engine->evaluate(\"false\")", 0); + toInt32.insert("engine->evaluate(\"122\")", 122); + toInt32.insert("engine->evaluate(\"124\")", 124); + toInt32.insert("engine->evaluate(\"0\")", 0); + toInt32.insert("engine->evaluate(\"0.0\")", 0); + toInt32.insert("engine->evaluate(\"123.0\")", 123); + toInt32.insert("engine->evaluate(\"6.37e-8\")", 0); + toInt32.insert("engine->evaluate(\"-6.37e-8\")", 0); + toInt32.insert("engine->evaluate(\"0x43211234\")", 1126240820); + toInt32.insert("engine->evaluate(\"0x10000\")", 65536); + toInt32.insert("engine->evaluate(\"0x10001\")", 65537); + toInt32.insert("engine->evaluate(\"NaN\")", 0); + toInt32.insert("engine->evaluate(\"Infinity\")", 0); + toInt32.insert("engine->evaluate(\"-Infinity\")", 0); + toInt32.insert("engine->evaluate(\"'ciao'\")", 0); + toInt32.insert("engine->evaluate(\"''\")", 0); + toInt32.insert("engine->evaluate(\"'0'\")", 0); + toInt32.insert("engine->evaluate(\"'123'\")", 123); + toInt32.insert("engine->evaluate(\"'12.4'\")", 12); toInt32.insert("engine->nullValue()", 0); toInt32.insert("engine->undefinedValue()", 0); + toInt32.insert("engine->newObject()", 0); + toInt32.insert("engine->newArray()", 0); + toInt32.insert("engine->newArray(10)", 0); + toInt32.insert("engine->newDate(QDateTime())", 0); } newRow(expr) << toInt32.value(expr); } @@ -1478,6 +1786,7 @@ void tst_QScriptValue::toInt32_test(const char*, const QScriptValue& value) { QFETCH(qint32, expected); QCOMPARE(value.toInt32(), expected); + QCOMPARE(value.toInt32(), expected); } DEFINE_TEST_FUNCTION(toInt32) @@ -1596,8 +1905,39 @@ void tst_QScriptValue::toUInt32_makeData(const char* expr) toUInt32.insert("engine->evaluate(\"new Object()\")", 0); toUInt32.insert("engine->evaluate(\"new Array()\")", 0); toUInt32.insert("engine->evaluate(\"new Error()\")", 0); + toUInt32.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", 22); + toUInt32.insert("engine->evaluate(\"Undefined\")", 0); + toUInt32.insert("engine->evaluate(\"Null\")", 0); + toUInt32.insert("engine->evaluate(\"True\")", 0); + toUInt32.insert("engine->evaluate(\"False\")", 0); + toUInt32.insert("engine->evaluate(\"undefined\")", 0); + toUInt32.insert("engine->evaluate(\"null\")", 0); + toUInt32.insert("engine->evaluate(\"true\")", 1); + toUInt32.insert("engine->evaluate(\"false\")", 0); + toUInt32.insert("engine->evaluate(\"122\")", 122); + toUInt32.insert("engine->evaluate(\"124\")", 124); + toUInt32.insert("engine->evaluate(\"0\")", 0); + toUInt32.insert("engine->evaluate(\"0.0\")", 0); + toUInt32.insert("engine->evaluate(\"123.0\")", 123); + toUInt32.insert("engine->evaluate(\"6.37e-8\")", 0); + toUInt32.insert("engine->evaluate(\"-6.37e-8\")", 0); + toUInt32.insert("engine->evaluate(\"0x43211234\")", 1126240820); + toUInt32.insert("engine->evaluate(\"0x10000\")", 65536); + toUInt32.insert("engine->evaluate(\"0x10001\")", 65537); + toUInt32.insert("engine->evaluate(\"NaN\")", 0); + toUInt32.insert("engine->evaluate(\"Infinity\")", 0); + toUInt32.insert("engine->evaluate(\"-Infinity\")", 0); + toUInt32.insert("engine->evaluate(\"'ciao'\")", 0); + toUInt32.insert("engine->evaluate(\"''\")", 0); + toUInt32.insert("engine->evaluate(\"'0'\")", 0); + toUInt32.insert("engine->evaluate(\"'123'\")", 123); + toUInt32.insert("engine->evaluate(\"'12.4'\")", 12); toUInt32.insert("engine->nullValue()", 0); toUInt32.insert("engine->undefinedValue()", 0); + toUInt32.insert("engine->newObject()", 0); + toUInt32.insert("engine->newArray()", 0); + toUInt32.insert("engine->newArray(10)", 0); + toUInt32.insert("engine->newDate(QDateTime())", 0); } newRow(expr) << toUInt32.value(expr); } @@ -1606,6 +1946,7 @@ void tst_QScriptValue::toUInt32_test(const char*, const QScriptValue& value) { QFETCH(quint32, expected); QCOMPARE(value.toUInt32(), expected); + QCOMPARE(value.toUInt32(), expected); } DEFINE_TEST_FUNCTION(toUInt32) @@ -1724,8 +2065,39 @@ void tst_QScriptValue::toUInt16_makeData(const char* expr) toUInt16.insert("engine->evaluate(\"new Object()\")", 0); toUInt16.insert("engine->evaluate(\"new Array()\")", 0); toUInt16.insert("engine->evaluate(\"new Error()\")", 0); + toUInt16.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", 22); + toUInt16.insert("engine->evaluate(\"Undefined\")", 0); + toUInt16.insert("engine->evaluate(\"Null\")", 0); + toUInt16.insert("engine->evaluate(\"True\")", 0); + toUInt16.insert("engine->evaluate(\"False\")", 0); + toUInt16.insert("engine->evaluate(\"undefined\")", 0); + toUInt16.insert("engine->evaluate(\"null\")", 0); + toUInt16.insert("engine->evaluate(\"true\")", 1); + toUInt16.insert("engine->evaluate(\"false\")", 0); + toUInt16.insert("engine->evaluate(\"122\")", 122); + toUInt16.insert("engine->evaluate(\"124\")", 124); + toUInt16.insert("engine->evaluate(\"0\")", 0); + toUInt16.insert("engine->evaluate(\"0.0\")", 0); + toUInt16.insert("engine->evaluate(\"123.0\")", 123); + toUInt16.insert("engine->evaluate(\"6.37e-8\")", 0); + toUInt16.insert("engine->evaluate(\"-6.37e-8\")", 0); + toUInt16.insert("engine->evaluate(\"0x43211234\")", 4660); + toUInt16.insert("engine->evaluate(\"0x10000\")", 0); + toUInt16.insert("engine->evaluate(\"0x10001\")", 1); + toUInt16.insert("engine->evaluate(\"NaN\")", 0); + toUInt16.insert("engine->evaluate(\"Infinity\")", 0); + toUInt16.insert("engine->evaluate(\"-Infinity\")", 0); + toUInt16.insert("engine->evaluate(\"'ciao'\")", 0); + toUInt16.insert("engine->evaluate(\"''\")", 0); + toUInt16.insert("engine->evaluate(\"'0'\")", 0); + toUInt16.insert("engine->evaluate(\"'123'\")", 123); + toUInt16.insert("engine->evaluate(\"'12.4'\")", 12); toUInt16.insert("engine->nullValue()", 0); toUInt16.insert("engine->undefinedValue()", 0); + toUInt16.insert("engine->newObject()", 0); + toUInt16.insert("engine->newArray()", 0); + toUInt16.insert("engine->newArray(10)", 0); + toUInt16.insert("engine->newDate(QDateTime())", 0); } newRow(expr) << toUInt16.value(expr); } @@ -1734,6 +2106,7 @@ void tst_QScriptValue::toUInt16_test(const char*, const QScriptValue& value) { QFETCH(quint16, expected); QCOMPARE(value.toUInt16(), expected); + QCOMPARE(value.toUInt16(), expected); } DEFINE_TEST_FUNCTION(toUInt16) @@ -1758,6 +2131,8 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"null\")"); equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->nullValue()"); equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->undefinedValue()"); equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); @@ -1767,11 +2142,14 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"undefined\")"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"null\")"); equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->nullValue()"); equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->undefinedValue()"); equals.insert("QScriptValue(true) <=> QScriptValue(true)"); equals.insert("QScriptValue(true) <=> QScriptValue(0, true)"); equals.insert("QScriptValue(true) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(true) <=> engine->evaluate(\"true\")"); equals.insert("QScriptValue(false) <=> QScriptValue(false)"); equals.insert("QScriptValue(false) <=> QScriptValue(0)"); equals.insert("QScriptValue(false) <=> QScriptValue(0.0)"); @@ -1793,12 +2171,20 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(false) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(false) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(false) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(false) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(false) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(false) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(false) <=> engine->evaluate(\"''\")"); + equals.insert("QScriptValue(false) <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(false) <=> engine->newArray()"); equals.insert("QScriptValue(int(122)) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, int(122))"); equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(int(122)) <=> engine->evaluate(\"122\")"); equals.insert("QScriptValue(uint(124)) <=> QScriptValue(uint(124))"); equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, uint(124))"); equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(uint(124)) <=> engine->evaluate(\"124\")"); equals.insert("QScriptValue(0) <=> QScriptValue(false)"); equals.insert("QScriptValue(0) <=> QScriptValue(0)"); equals.insert("QScriptValue(0) <=> QScriptValue(0.0)"); @@ -1820,6 +2206,12 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(0) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(0) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(0) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"''\")"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(0) <=> engine->newArray()"); equals.insert("QScriptValue(0.0) <=> QScriptValue(false)"); equals.insert("QScriptValue(0.0) <=> QScriptValue(0)"); equals.insert("QScriptValue(0.0) <=> QScriptValue(0.0)"); @@ -1841,39 +2233,54 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"''\")"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(0.0) <=> engine->newArray()"); equals.insert("QScriptValue(123.0) <=> QScriptValue(123.0)"); equals.insert("QScriptValue(123.0) <=> QScriptValue(QString(\"123\"))"); equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 123.0)"); equals.insert("QScriptValue(123.0) <=> QScriptValue(0, QString(\"123\"))"); equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 123.0)"); equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(123.0) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(123.0) <=> engine->evaluate(\"'123'\")"); equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(6.37e-8)"); equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 6.37e-8)"); equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"6.37e-8\")"); equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(-6.37e-8)"); equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, -6.37e-8)"); equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"-6.37e-8\")"); equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0x43211234)"); equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, 0x43211234)"); equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0x43211234) <=> engine->evaluate(\"0x43211234\")"); equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x10000)"); equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x10000)"); equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0x10000) <=> engine->evaluate(\"0x10000\")"); equals.insert("QScriptValue(0x10001) <=> QScriptValue(0x10001)"); equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, 0x10001)"); equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0x10001) <=> engine->evaluate(\"0x10001\")"); equals.insert("QScriptValue(qInf()) <=> QScriptValue(qInf())"); equals.insert("QScriptValue(qInf()) <=> QScriptValue(\"Infinity\")"); equals.insert("QScriptValue(qInf()) <=> QScriptValue(0, qInf())"); equals.insert("QScriptValue(qInf()) <=> QScriptValue(0, \"Infinity\")"); equals.insert("QScriptValue(qInf()) <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(qInf()) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(qInf()) <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(-qInf()) <=> QScriptValue(-qInf())"); equals.insert("QScriptValue(-qInf()) <=> QScriptValue(\"-Infinity\")"); equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, -qInf())"); equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, \"-Infinity\")"); equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, -qInf())"); equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"-Infinity\")"); equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(\"NaN\")"); equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, \"NaN\")"); equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, \"NaN\")"); @@ -1883,24 +2290,28 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, \"Infinity\")"); equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(-qInf())"); equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"-Infinity\")"); equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, -qInf())"); equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"-Infinity\")"); equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, -qInf())"); equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"-Infinity\")"); equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(\"ciao\")"); equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(0, \"ciao\")"); equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(engine, \"ciao\")"); equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"'ciao'\")"); equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")"); equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")"); equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")"); equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")"); equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(false)"); equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0)"); equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0.0)"); @@ -1919,6 +2330,11 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"''\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->newArray()"); equals.insert("QScriptValue(QString()) <=> QScriptValue(false)"); equals.insert("QScriptValue(QString()) <=> QScriptValue(0)"); equals.insert("QScriptValue(QString()) <=> QScriptValue(0.0)"); @@ -1937,6 +2353,11 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"''\")"); + equals.insert("QScriptValue(QString()) <=> engine->newArray()"); equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(false)"); equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0)"); equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0.0)"); @@ -1949,13 +2370,20 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0)"); equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0.0)"); equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"'0'\")"); equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(123.0)"); equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(QString(\"123\"))"); equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, 123.0)"); equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))"); equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 123.0)"); equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"'123'\")"); equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); @@ -1963,6 +2391,8 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")"); + equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"null\")"); equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->nullValue()"); equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->undefinedValue()"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); @@ -1972,11 +2402,14 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"undefined\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"null\")"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->nullValue()"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->undefinedValue()"); equals.insert("QScriptValue(0, true) <=> QScriptValue(true)"); equals.insert("QScriptValue(0, true) <=> QScriptValue(0, true)"); equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"true\")"); equals.insert("QScriptValue(0, false) <=> QScriptValue(false)"); equals.insert("QScriptValue(0, false) <=> QScriptValue(0)"); equals.insert("QScriptValue(0, false) <=> QScriptValue(0.0)"); @@ -1998,12 +2431,20 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"''\")"); + equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(0, false) <=> engine->newArray()"); equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, int(122))"); equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, int(122)) <=> engine->evaluate(\"122\")"); equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(uint(124))"); equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, uint(124))"); equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, uint(124)) <=> engine->evaluate(\"124\")"); equals.insert("QScriptValue(0, 0) <=> QScriptValue(false)"); equals.insert("QScriptValue(0, 0) <=> QScriptValue(0)"); equals.insert("QScriptValue(0, 0) <=> QScriptValue(0.0)"); @@ -2025,6 +2466,12 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"''\")"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(0, 0) <=> engine->newArray()"); equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(false)"); equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0)"); equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0.0)"); @@ -2046,39 +2493,54 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"''\")"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(0, 0.0) <=> engine->newArray()"); equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(123.0)"); equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(QString(\"123\"))"); equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 123.0)"); equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, QString(\"123\"))"); equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 123.0)"); equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, 123.0) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(0, 123.0) <=> engine->evaluate(\"'123'\")"); equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(6.37e-8)"); equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 6.37e-8)"); equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"6.37e-8\")"); equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(-6.37e-8)"); equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, -6.37e-8)"); equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"-6.37e-8\")"); equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0x43211234)"); equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, 0x43211234)"); equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, 0x43211234) <=> engine->evaluate(\"0x43211234\")"); equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0x10000)"); equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x10000)"); equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, 0x10000) <=> engine->evaluate(\"0x10000\")"); equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0x10001)"); equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x10001)"); equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, 0x10001) <=> engine->evaluate(\"0x10001\")"); equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(qInf())"); equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(\"Infinity\")"); equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(0, qInf())"); equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(0, \"Infinity\")"); equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, qInf()) <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(-qInf())"); equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(\"-Infinity\")"); equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, -qInf())"); equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, \"-Infinity\")"); equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, -qInf())"); equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"-Infinity\")"); equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(\"NaN\")"); equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"NaN\")"); equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"NaN\")"); @@ -2088,24 +2550,28 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"Infinity\")"); equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(-qInf())"); equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"-Infinity\")"); equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, -qInf())"); equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")"); equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, -qInf())"); equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"-Infinity\")"); equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(\"ciao\")"); equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(0, \"ciao\")"); equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(engine, \"ciao\")"); equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"'ciao'\")"); equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")"); equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")"); equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")"); equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")"); equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(false)"); equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0)"); equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0.0)"); @@ -2124,6 +2590,11 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"''\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->newArray()"); equals.insert("QScriptValue(0, QString()) <=> QScriptValue(false)"); equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0)"); equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0.0)"); @@ -2142,6 +2613,11 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"''\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->newArray()"); equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(false)"); equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0)"); equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0.0)"); @@ -2154,12 +2630,18 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0)"); equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0.0)"); equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"'0'\")"); equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(123.0)"); equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(QString(\"123\"))"); equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 123.0)"); equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))"); equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 123.0)"); equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"'123'\")"); equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString(\"12.3\"))"); equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)"); @@ -2168,6 +2650,8 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")"); + equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"null\")"); equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->nullValue()"); equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->undefinedValue()"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); @@ -2177,11 +2661,14 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"undefined\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"null\")"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->nullValue()"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->undefinedValue()"); equals.insert("QScriptValue(engine, true) <=> QScriptValue(true)"); equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, true)"); equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"true\")"); equals.insert("QScriptValue(engine, false) <=> QScriptValue(false)"); equals.insert("QScriptValue(engine, false) <=> QScriptValue(0)"); equals.insert("QScriptValue(engine, false) <=> QScriptValue(0.0)"); @@ -2203,12 +2690,20 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"''\")"); + equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(engine, false) <=> engine->newArray()"); equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, int(122))"); equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, int(122)) <=> engine->evaluate(\"122\")"); equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(uint(124))"); equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, uint(124))"); equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, uint(124)) <=> engine->evaluate(\"124\")"); equals.insert("QScriptValue(engine, 0) <=> QScriptValue(false)"); equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0)"); equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0.0)"); @@ -2230,6 +2725,12 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"''\")"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(engine, 0) <=> engine->newArray()"); equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(false)"); equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0)"); equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0.0)"); @@ -2251,39 +2752,54 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"''\")"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->newArray()"); equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(123.0)"); equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(QString(\"123\"))"); equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 123.0)"); equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, QString(\"123\"))"); equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 123.0)"); equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, 123.0) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(engine, 123.0) <=> engine->evaluate(\"'123'\")"); equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(6.37e-8)"); equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 6.37e-8)"); equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"6.37e-8\")"); equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(-6.37e-8)"); equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, -6.37e-8)"); equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"-6.37e-8\")"); equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0x43211234)"); equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, 0x43211234)"); equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, 0x43211234) <=> engine->evaluate(\"0x43211234\")"); equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0x10000)"); equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x10000)"); equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, 0x10000) <=> engine->evaluate(\"0x10000\")"); equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0x10001)"); equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x10001)"); equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, 0x10001) <=> engine->evaluate(\"0x10001\")"); equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(qInf())"); equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(\"Infinity\")"); equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(0, qInf())"); equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(0, \"Infinity\")"); equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, qInf()) <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(-qInf())"); equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(\"-Infinity\")"); equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, -qInf())"); equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, \"-Infinity\")"); equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -qInf())"); equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"-Infinity\")"); equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(\"NaN\")"); equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"NaN\")"); equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"NaN\")"); @@ -2293,24 +2809,28 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"Infinity\")"); equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(-qInf())"); equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"-Infinity\")"); equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, -qInf())"); equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")"); equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, -qInf())"); equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"-Infinity\")"); equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(\"ciao\")"); equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(0, \"ciao\")"); equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, \"ciao\")"); equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"'ciao'\")"); equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")"); equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")"); equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")"); equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")"); equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(false)"); equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0)"); equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0.0)"); @@ -2329,6 +2849,11 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"''\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->newArray()"); equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(false)"); equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0)"); equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0.0)"); @@ -2347,6 +2872,11 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"''\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->newArray()"); equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(false)"); equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0)"); equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0.0)"); @@ -2359,12 +2889,18 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0)"); equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0.0)"); equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"'0'\")"); equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(123.0)"); equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(QString(\"123\"))"); equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 123.0)"); equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))"); equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 123.0)"); equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"'123'\")"); equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString(\"1.23\"))"); equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(false)"); equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0)"); @@ -2382,6 +2918,10 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"\"))"); equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString())"); equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"[]\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"false\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"0\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"0.0\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"''\")"); equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::UndefinedValue)"); equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::UndefinedValue)"); @@ -2389,6 +2929,8 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::NullValue)"); equals.insert("engine->evaluate(\"{}\") <=> engine->evaluate(\"{}\")"); + equals.insert("engine->evaluate(\"{}\") <=> engine->evaluate(\"undefined\")"); + equals.insert("engine->evaluate(\"{}\") <=> engine->evaluate(\"null\")"); equals.insert("engine->evaluate(\"{}\") <=> engine->nullValue()"); equals.insert("engine->evaluate(\"{}\") <=> engine->undefinedValue()"); equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object.prototype\")"); @@ -2409,6 +2951,10 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"\"))"); equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString())"); equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"false\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"0\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"0.0\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"''\")"); equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Function.prototype\")"); equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Error.prototype\")"); equals.insert("engine->evaluate(\"Object\") <=> engine->evaluate(\"Object\")"); @@ -2436,7 +2982,229 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"\"))"); equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString())"); equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Array()\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"false\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"0\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"0.0\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"''\")"); equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"Null\")"); + equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"True\")"); + equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"False\")"); + equals.insert("engine->evaluate(\"undefined\") <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("engine->evaluate(\"undefined\") <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("engine->evaluate(\"undefined\") <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("engine->evaluate(\"undefined\") <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("engine->evaluate(\"undefined\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); + equals.insert("engine->evaluate(\"undefined\") <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("engine->evaluate(\"undefined\") <=> engine->evaluate(\"{}\")"); + equals.insert("engine->evaluate(\"undefined\") <=> engine->evaluate(\"undefined\")"); + equals.insert("engine->evaluate(\"undefined\") <=> engine->evaluate(\"null\")"); + equals.insert("engine->evaluate(\"undefined\") <=> engine->nullValue()"); + equals.insert("engine->evaluate(\"undefined\") <=> engine->undefinedValue()"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"{}\")"); + equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"undefined\")"); + equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"null\")"); + equals.insert("engine->evaluate(\"null\") <=> engine->nullValue()"); + equals.insert("engine->evaluate(\"null\") <=> engine->undefinedValue()"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(true)"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, true)"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, true)"); + equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"true\")"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(false)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0.0)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(QString(\"\"))"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(QString())"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(QString(\"0\"))"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, false)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, 0)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, 0.0)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, QString(\"\"))"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, QString())"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, false)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, 0)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, 0.0)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, QString())"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"[]\")"); + equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"new Array()\")"); + equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"false\")"); + equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"0\")"); + equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"0.0\")"); + equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"''\")"); + equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"'0'\")"); + equals.insert("engine->evaluate(\"false\") <=> engine->newArray()"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(int(122))"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0, int(122))"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(engine, int(122))"); + equals.insert("engine->evaluate(\"122\") <=> engine->evaluate(\"122\")"); + equals.insert("engine->evaluate(\"124\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"124\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"124\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"124\") <=> engine->evaluate(\"124\")"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(false)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0.0)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(QString(\"\"))"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(QString())"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(QString(\"0\"))"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, false)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, 0)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, 0.0)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, QString(\"\"))"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, QString())"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, false)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, 0)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, 0.0)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, QString())"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"[]\")"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"new Array()\")"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"false\")"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"0\")"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"0.0\")"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"''\")"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"'0'\")"); + equals.insert("engine->evaluate(\"0\") <=> engine->newArray()"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(false)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0.0)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(QString(\"\"))"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(QString())"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(QString(\"0\"))"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, false)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, 0)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, 0.0)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, QString(\"\"))"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, QString())"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, false)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0.0)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString())"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"[]\")"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"new Array()\")"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"false\")"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"0\")"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"0.0\")"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"''\")"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"'0'\")"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->newArray()"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(123.0)"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0, 123.0)"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"123.0\") <=> engine->evaluate(\"123.0\")"); + equals.insert("engine->evaluate(\"123.0\") <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(6.37e-8)"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 6.37e-8)"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(-6.37e-8)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, -6.37e-8)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"-6.37e-8\")"); + equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"0x43211234\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"0x10000\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"0x10001\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"Infinity\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"Infinity\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"Infinity\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"Infinity\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"Infinity\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"Infinity\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"Infinity\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(-qInf())"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(\"-Infinity\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, -qInf())"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, -qInf())"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"-Infinity\")"); + equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(false)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0.0)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(QString(\"\"))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(QString())"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, false)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, 0)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, 0.0)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, QString(\"\"))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, QString())"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, false)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, 0)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, 0.0)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, QString())"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"[]\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"new Array()\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"false\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"0\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"0.0\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"''\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->newArray()"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(false)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0.0)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(QString(\"0\"))"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, false)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, 0)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, 0.0)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, false)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0.0)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"false\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"0\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"0.0\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"'0'\")"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(123.0)"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, 123.0)"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"123.0\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"'12.4'\")"); equals.insert("engine->nullValue() <=> QScriptValue(QScriptValue::UndefinedValue)"); equals.insert("engine->nullValue() <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("engine->nullValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)"); @@ -2444,6 +3212,8 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("engine->nullValue() <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("engine->nullValue() <=> QScriptValue(engine, QScriptValue::NullValue)"); equals.insert("engine->nullValue() <=> engine->evaluate(\"{}\")"); + equals.insert("engine->nullValue() <=> engine->evaluate(\"undefined\")"); + equals.insert("engine->nullValue() <=> engine->evaluate(\"null\")"); equals.insert("engine->nullValue() <=> engine->nullValue()"); equals.insert("engine->nullValue() <=> engine->undefinedValue()"); equals.insert("engine->undefinedValue() <=> QScriptValue(QScriptValue::UndefinedValue)"); @@ -2453,8 +3223,33 @@ void tst_QScriptValue::equals_makeData(const char *expr) equals.insert("engine->undefinedValue() <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("engine->undefinedValue() <=> QScriptValue(engine, QScriptValue::NullValue)"); equals.insert("engine->undefinedValue() <=> engine->evaluate(\"{}\")"); + equals.insert("engine->undefinedValue() <=> engine->evaluate(\"undefined\")"); + equals.insert("engine->undefinedValue() <=> engine->evaluate(\"null\")"); equals.insert("engine->undefinedValue() <=> engine->nullValue()"); equals.insert("engine->undefinedValue() <=> engine->undefinedValue()"); + equals.insert("engine->newObject() <=> engine->newObject()"); + equals.insert("engine->newArray() <=> QScriptValue(false)"); + equals.insert("engine->newArray() <=> QScriptValue(0)"); + equals.insert("engine->newArray() <=> QScriptValue(0.0)"); + equals.insert("engine->newArray() <=> QScriptValue(QString(\"\"))"); + equals.insert("engine->newArray() <=> QScriptValue(QString())"); + equals.insert("engine->newArray() <=> QScriptValue(0, false)"); + equals.insert("engine->newArray() <=> QScriptValue(0, 0)"); + equals.insert("engine->newArray() <=> QScriptValue(0, 0.0)"); + equals.insert("engine->newArray() <=> QScriptValue(0, QString(\"\"))"); + equals.insert("engine->newArray() <=> QScriptValue(0, QString())"); + equals.insert("engine->newArray() <=> QScriptValue(engine, false)"); + equals.insert("engine->newArray() <=> QScriptValue(engine, 0)"); + equals.insert("engine->newArray() <=> QScriptValue(engine, 0.0)"); + equals.insert("engine->newArray() <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("engine->newArray() <=> QScriptValue(engine, QString())"); + equals.insert("engine->newArray() <=> engine->evaluate(\"false\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"0\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"0.0\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"''\")"); + equals.insert("engine->newArray() <=> engine->newArray()"); + equals.insert("engine->newArray(10) <=> engine->newArray(10)"); + equals.insert("engine->newDate(QDateTime()) <=> engine->newDate(QDateTime())"); } QHash<QString, QScriptValue>::const_iterator it; for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { @@ -2489,59 +3284,77 @@ void tst_QScriptValue::strictlyEquals_makeData(const char *expr) equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")"); equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->undefinedValue()"); equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)"); equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"null\")"); equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->nullValue()"); equals.insert("QScriptValue(true) <=> QScriptValue(true)"); equals.insert("QScriptValue(true) <=> QScriptValue(0, true)"); equals.insert("QScriptValue(true) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(true) <=> engine->evaluate(\"true\")"); equals.insert("QScriptValue(false) <=> QScriptValue(false)"); equals.insert("QScriptValue(false) <=> QScriptValue(0, false)"); equals.insert("QScriptValue(false) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(false) <=> engine->evaluate(\"false\")"); equals.insert("QScriptValue(int(122)) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, int(122))"); equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(int(122)) <=> engine->evaluate(\"122\")"); equals.insert("QScriptValue(uint(124)) <=> QScriptValue(uint(124))"); equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, uint(124))"); equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(uint(124)) <=> engine->evaluate(\"124\")"); equals.insert("QScriptValue(0) <=> QScriptValue(0)"); equals.insert("QScriptValue(0) <=> QScriptValue(0.0)"); equals.insert("QScriptValue(0) <=> QScriptValue(0, 0)"); equals.insert("QScriptValue(0) <=> QScriptValue(0, 0.0)"); equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0)"); equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"0.0\")"); equals.insert("QScriptValue(0.0) <=> QScriptValue(0)"); equals.insert("QScriptValue(0.0) <=> QScriptValue(0.0)"); equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0)"); equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0.0)"); equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0)"); equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"0.0\")"); equals.insert("QScriptValue(123.0) <=> QScriptValue(123.0)"); equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 123.0)"); equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(123.0) <=> engine->evaluate(\"123.0\")"); equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(6.37e-8)"); equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 6.37e-8)"); equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"6.37e-8\")"); equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(-6.37e-8)"); equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, -6.37e-8)"); equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"-6.37e-8\")"); equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0x43211234)"); equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, 0x43211234)"); equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0x43211234) <=> engine->evaluate(\"0x43211234\")"); equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x10000)"); equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x10000)"); equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0x10000) <=> engine->evaluate(\"0x10000\")"); equals.insert("QScriptValue(0x10001) <=> QScriptValue(0x10001)"); equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, 0x10001)"); equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0x10001) <=> engine->evaluate(\"0x10001\")"); equals.insert("QScriptValue(qInf()) <=> QScriptValue(qInf())"); equals.insert("QScriptValue(qInf()) <=> QScriptValue(0, qInf())"); equals.insert("QScriptValue(qInf()) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(qInf()) <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(-qInf()) <=> QScriptValue(-qInf())"); equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, -qInf())"); equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, -qInf())"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"-Infinity\")"); equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(\"NaN\")"); equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, \"NaN\")"); equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, \"NaN\")"); @@ -2557,88 +3370,113 @@ void tst_QScriptValue::strictlyEquals_makeData(const char *expr) equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(engine, \"ciao\")"); equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"'ciao'\")"); equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")"); equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")"); equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")"); equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")"); equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"\"))"); equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString())"); equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"\"))"); equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString())"); equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"\"))"); equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"''\")"); equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"\"))"); equals.insert("QScriptValue(QString()) <=> QScriptValue(QString())"); equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"\"))"); equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString())"); equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"\"))"); equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"''\")"); equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"0\"))"); equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))"); equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"'0'\")"); equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(QString(\"123\"))"); equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))"); equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"'123'\")"); equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")"); equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->undefinedValue()"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"null\")"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->nullValue()"); equals.insert("QScriptValue(0, true) <=> QScriptValue(true)"); equals.insert("QScriptValue(0, true) <=> QScriptValue(0, true)"); equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"true\")"); equals.insert("QScriptValue(0, false) <=> QScriptValue(false)"); equals.insert("QScriptValue(0, false) <=> QScriptValue(0, false)"); equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"false\")"); equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, int(122))"); equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, int(122)) <=> engine->evaluate(\"122\")"); equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(uint(124))"); equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, uint(124))"); equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, uint(124)) <=> engine->evaluate(\"124\")"); equals.insert("QScriptValue(0, 0) <=> QScriptValue(0)"); equals.insert("QScriptValue(0, 0) <=> QScriptValue(0.0)"); equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0)"); equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0.0)"); equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0)"); equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"0.0\")"); equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0)"); equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0.0)"); equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0)"); equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0.0)"); equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0)"); equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"0.0\")"); equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(123.0)"); equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 123.0)"); equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, 123.0) <=> engine->evaluate(\"123.0\")"); equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(6.37e-8)"); equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 6.37e-8)"); equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"6.37e-8\")"); equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(-6.37e-8)"); equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, -6.37e-8)"); equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"-6.37e-8\")"); equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0x43211234)"); equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, 0x43211234)"); equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, 0x43211234) <=> engine->evaluate(\"0x43211234\")"); equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0x10000)"); equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x10000)"); equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, 0x10000) <=> engine->evaluate(\"0x10000\")"); equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0x10001)"); equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x10001)"); equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, 0x10001) <=> engine->evaluate(\"0x10001\")"); equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(qInf())"); equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(0, qInf())"); equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, qInf()) <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(-qInf())"); equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, -qInf())"); equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, -qInf())"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"-Infinity\")"); equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(\"NaN\")"); equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"NaN\")"); equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"NaN\")"); @@ -2654,88 +3492,112 @@ void tst_QScriptValue::strictlyEquals_makeData(const char *expr) equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(engine, \"ciao\")"); equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"'ciao'\")"); equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")"); equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")"); equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")"); equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")"); equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"\"))"); equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString())"); equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"\"))"); equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString())"); equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))"); equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"''\")"); equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"\"))"); equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString())"); equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"\"))"); equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString())"); equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"\"))"); equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"''\")"); equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"0\"))"); equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))"); equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"'0'\")"); equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(QString(\"123\"))"); equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))"); equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"'123'\")"); equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString(\"12.3\"))"); equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); + equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")"); equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->undefinedValue()"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"null\")"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->nullValue()"); equals.insert("QScriptValue(engine, true) <=> QScriptValue(true)"); equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, true)"); equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"true\")"); equals.insert("QScriptValue(engine, false) <=> QScriptValue(false)"); equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, false)"); equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"false\")"); equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, int(122))"); equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, int(122)) <=> engine->evaluate(\"122\")"); equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(uint(124))"); equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, uint(124))"); equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, uint(124)) <=> engine->evaluate(\"124\")"); equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0)"); equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0.0)"); equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0)"); equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0.0)"); equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0)"); equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"0.0\")"); equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0)"); equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0.0)"); equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0)"); equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0.0)"); equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0)"); equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"0.0\")"); equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(123.0)"); equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 123.0)"); equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, 123.0) <=> engine->evaluate(\"123.0\")"); equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(6.37e-8)"); equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 6.37e-8)"); equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"6.37e-8\")"); equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(-6.37e-8)"); equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, -6.37e-8)"); equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"-6.37e-8\")"); equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0x43211234)"); equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, 0x43211234)"); equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, 0x43211234) <=> engine->evaluate(\"0x43211234\")"); equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0x10000)"); equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x10000)"); equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, 0x10000) <=> engine->evaluate(\"0x10000\")"); equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0x10001)"); equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x10001)"); equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, 0x10001) <=> engine->evaluate(\"0x10001\")"); equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(qInf())"); equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(0, qInf())"); equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, qInf()) <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(-qInf())"); equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, -qInf())"); equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -qInf())"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"-Infinity\")"); equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(\"NaN\")"); equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"NaN\")"); equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"NaN\")"); @@ -2751,36 +3613,43 @@ void tst_QScriptValue::strictlyEquals_makeData(const char *expr) equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, \"ciao\")"); equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"'ciao'\")"); equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")"); equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")"); equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")"); equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")"); equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"\"))"); equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString())"); equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"\"))"); equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString())"); equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))"); equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"''\")"); equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"\"))"); equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString())"); equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"\"))"); equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString())"); equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"\"))"); equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"''\")"); equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"0\"))"); equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))"); equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"'0'\")"); equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(QString(\"123\"))"); equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))"); equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"'123'\")"); equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString(\"1.23\"))"); equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"[]\")"); equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::UndefinedValue)"); equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::UndefinedValue)"); equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("engine->evaluate(\"{}\") <=> engine->evaluate(\"{}\")"); + equals.insert("engine->evaluate(\"{}\") <=> engine->evaluate(\"undefined\")"); equals.insert("engine->evaluate(\"{}\") <=> engine->undefinedValue()"); equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object.prototype\")"); equals.insert("engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Date.prototype\")"); @@ -2798,15 +3667,125 @@ void tst_QScriptValue::strictlyEquals_makeData(const char *expr) equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"new Object()\")"); equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Array()\")"); equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"Null\")"); + equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"True\")"); + equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"False\")"); + equals.insert("engine->evaluate(\"undefined\") <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("engine->evaluate(\"undefined\") <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("engine->evaluate(\"undefined\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); + equals.insert("engine->evaluate(\"undefined\") <=> engine->evaluate(\"{}\")"); + equals.insert("engine->evaluate(\"undefined\") <=> engine->evaluate(\"undefined\")"); + equals.insert("engine->evaluate(\"undefined\") <=> engine->undefinedValue()"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"null\")"); + equals.insert("engine->evaluate(\"null\") <=> engine->nullValue()"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(true)"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, true)"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, true)"); + equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"true\")"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(false)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, false)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, false)"); + equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"false\")"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(int(122))"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0, int(122))"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(engine, int(122))"); + equals.insert("engine->evaluate(\"122\") <=> engine->evaluate(\"122\")"); + equals.insert("engine->evaluate(\"124\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"124\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"124\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"124\") <=> engine->evaluate(\"124\")"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0.0)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, 0)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, 0.0)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, 0)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, 0.0)"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"0\")"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"0.0\")"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0.0)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, 0)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, 0.0)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0.0)"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"0\")"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"0.0\")"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(123.0)"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0, 123.0)"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->evaluate(\"123.0\") <=> engine->evaluate(\"123.0\")"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(6.37e-8)"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 6.37e-8)"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(-6.37e-8)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, -6.37e-8)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"-6.37e-8\")"); + equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"0x43211234\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"0x10000\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"0x10001\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"Infinity\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"Infinity\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"Infinity\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"Infinity\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(-qInf())"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, -qInf())"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, -qInf())"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"-Infinity\")"); + equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(QString(\"\"))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(QString())"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, QString(\"\"))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, QString())"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, QString())"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"''\")"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(QString(\"0\"))"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"'0'\")"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"'12.4'\")"); equals.insert("engine->nullValue() <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("engine->nullValue() <=> QScriptValue(0, QScriptValue::NullValue)"); equals.insert("engine->nullValue() <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("engine->nullValue() <=> engine->evaluate(\"null\")"); equals.insert("engine->nullValue() <=> engine->nullValue()"); equals.insert("engine->undefinedValue() <=> QScriptValue(QScriptValue::UndefinedValue)"); equals.insert("engine->undefinedValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)"); equals.insert("engine->undefinedValue() <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); equals.insert("engine->undefinedValue() <=> engine->evaluate(\"{}\")"); + equals.insert("engine->undefinedValue() <=> engine->evaluate(\"undefined\")"); equals.insert("engine->undefinedValue() <=> engine->undefinedValue()"); + equals.insert("engine->newObject() <=> engine->newObject()"); + equals.insert("engine->newArray() <=> engine->newArray()"); + equals.insert("engine->newArray(10) <=> engine->newArray(10)"); + equals.insert("engine->newDate(QDateTime()) <=> engine->newDate(QDateTime())"); } QHash<QString, QScriptValue>::const_iterator it; for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { @@ -2872,6 +3851,18 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")"); equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))"); equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(true) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(true) <=> QScriptValue(uint(124))"); equals.insert("QScriptValue(true) <=> QScriptValue(123.0)"); @@ -2902,6 +3893,16 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(true) <=> QScriptValue(engine, \"Infinity\")"); equals.insert("QScriptValue(true) <=> QScriptValue(engine, QString(\"123\"))"); equals.insert("QScriptValue(true) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(true) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(true) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(true) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(true) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(true) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(true) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(true) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(true) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(true) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(true) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(false) <=> QScriptValue(true)"); equals.insert("QScriptValue(false) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(false) <=> QScriptValue(uint(124))"); @@ -2938,6 +3939,18 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(false) <=> QScriptValue(engine, \"Infinity\")"); equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString(\"123\"))"); equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(false) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(false) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(false) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(false) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(false) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(false) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(false) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(false) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(false) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(false) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(false) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(false) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(int(122)) <=> QScriptValue(uint(124))"); equals.insert("QScriptValue(int(122)) <=> QScriptValue(123.0)"); equals.insert("QScriptValue(int(122)) <=> QScriptValue(0x43211234)"); @@ -2962,6 +3975,13 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, \"Infinity\")"); equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(int(122)) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(int(122)) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(int(122)) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(int(122)) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(int(122)) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(int(122)) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(int(122)) <=> engine->evaluate(\"'123'\")"); equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0x43211234)"); equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0x10000)"); equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0x10001)"); @@ -2977,6 +3997,10 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, 0x10001)"); equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(uint(124)) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(uint(124)) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(uint(124)) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(uint(124)) <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(0) <=> QScriptValue(true)"); equals.insert("QScriptValue(0) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(0) <=> QScriptValue(uint(124))"); @@ -3013,6 +4037,18 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0) <=> QScriptValue(engine, \"Infinity\")"); equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString(\"123\"))"); equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(0) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(0.0) <=> QScriptValue(true)"); equals.insert("QScriptValue(0.0) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(0.0) <=> QScriptValue(uint(124))"); @@ -3049,6 +4085,18 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, \"Infinity\")"); equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString(\"123\"))"); equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(123.0) <=> QScriptValue(uint(124))"); equals.insert("QScriptValue(123.0) <=> QScriptValue(0x43211234)"); equals.insert("QScriptValue(123.0) <=> QScriptValue(0x10000)"); @@ -3067,6 +4115,11 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 0x10001)"); equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(123.0) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(123.0) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(123.0) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(123.0) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(123.0) <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(true)"); equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(uint(124))"); @@ -3100,6 +4153,17 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, \"Infinity\")"); equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, QString(\"123\"))"); equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(true)"); equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(false)"); @@ -3160,13 +4224,33 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"null\")"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"''\")"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(-6.37e-8) <=> engine->nullValue()"); + equals.insert("QScriptValue(-6.37e-8) <=> engine->newArray()"); equals.insert("QScriptValue(0x43211234) <=> QScriptValue(qInf())"); equals.insert("QScriptValue(0x43211234) <=> QScriptValue(\"Infinity\")"); equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, qInf())"); equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, \"Infinity\")"); equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0x43211234) <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x43211234)"); equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x10001)"); equals.insert("QScriptValue(0x10000) <=> QScriptValue(qInf())"); @@ -3179,6 +4263,9 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x10001)"); equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0x10000) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0x10000) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(0x10000) <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(0x10001) <=> QScriptValue(0x43211234)"); equals.insert("QScriptValue(0x10001) <=> QScriptValue(qInf())"); equals.insert("QScriptValue(0x10001) <=> QScriptValue(\"Infinity\")"); @@ -3188,6 +4275,8 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, 0x43211234)"); equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0x10001) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0x10001) <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("QScriptValue(-qInf()) <=> QScriptValue(true)"); equals.insert("QScriptValue(-qInf()) <=> QScriptValue(false)"); @@ -3251,7 +4340,27 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"null\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"-6.37e-8\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"''\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(-qInf()) <=> engine->nullValue()"); + equals.insert("QScriptValue(-qInf()) <=> engine->newArray()"); equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(\"ciao\")"); equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, \"ciao\")"); @@ -3268,6 +4377,12 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(\"NaN\") <=> engine->newObject()"); equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(\"NaN\")"); equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(\"ciao\")"); equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); @@ -3287,6 +4402,12 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->newObject()"); equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(true)"); equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(false)"); @@ -3363,7 +4484,31 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"/foo/\")"); equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Object()\")"); equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"null\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"-6.37e-8\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(\"-Infinity\") <=> engine->nullValue()"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->newObject()"); equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Function.prototype\")"); equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Object\")"); equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Array\")"); @@ -3444,6 +4589,26 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"/foo/\")"); equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Object()\")"); equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"'12.4'\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->newObject()"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->newArray(10)"); equals.insert("QScriptValue(QString()) <=> QScriptValue(true)"); equals.insert("QScriptValue(QString()) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(QString()) <=> QScriptValue(uint(124))"); @@ -3508,6 +4673,26 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"/foo/\")"); equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"new Object()\")"); equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"'12.4'\")"); + equals.insert("QScriptValue(QString()) <=> engine->newObject()"); + equals.insert("QScriptValue(QString()) <=> engine->newArray(10)"); equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(true)"); equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(uint(124))"); @@ -3565,6 +4750,24 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"new Object()\")"); equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"'12.4'\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->newObject()"); equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(uint(124))"); equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0x43211234)"); equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0x10000)"); @@ -3604,6 +4807,17 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"new Object()\")"); equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->newObject()"); equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(uint(124))"); equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(123.0)"); @@ -3652,6 +4866,21 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"new Object()\")"); equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->newObject()"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(true)"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(uint(124))"); @@ -3688,6 +4917,18 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))"); equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(0, true) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(0, true) <=> QScriptValue(uint(124))"); equals.insert("QScriptValue(0, true) <=> QScriptValue(123.0)"); @@ -3718,6 +4959,16 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, \"Infinity\")"); equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, QString(\"123\"))"); equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(0, false) <=> QScriptValue(true)"); equals.insert("QScriptValue(0, false) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(0, false) <=> QScriptValue(uint(124))"); @@ -3754,6 +5005,18 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, \"Infinity\")"); equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString(\"123\"))"); equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(uint(124))"); equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(123.0)"); equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0x43211234)"); @@ -3778,6 +5041,13 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, \"Infinity\")"); equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, int(122)) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(0, int(122)) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(0, int(122)) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0, int(122)) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(0, int(122)) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(0, int(122)) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(0, int(122)) <=> engine->evaluate(\"'123'\")"); equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0x43211234)"); equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0x10000)"); equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0x10001)"); @@ -3793,6 +5063,10 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, 0x10001)"); equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, uint(124)) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0, uint(124)) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(0, uint(124)) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(0, uint(124)) <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(0, 0) <=> QScriptValue(true)"); equals.insert("QScriptValue(0, 0) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(0, 0) <=> QScriptValue(uint(124))"); @@ -3829,6 +5103,18 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, \"Infinity\")"); equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"123\"))"); equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(true)"); equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(uint(124))"); @@ -3865,6 +5151,18 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, \"Infinity\")"); equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"123\"))"); equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(uint(124))"); equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0x43211234)"); equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0x10000)"); @@ -3883,6 +5181,11 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 0x10001)"); equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, 123.0) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(0, 123.0) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0, 123.0) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(0, 123.0) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(0, 123.0) <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(true)"); equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(uint(124))"); @@ -3916,6 +5219,17 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, \"Infinity\")"); equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, QString(\"123\"))"); equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(true)"); equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(false)"); @@ -3976,13 +5290,33 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"null\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"''\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(0, -6.37e-8) <=> engine->nullValue()"); + equals.insert("QScriptValue(0, -6.37e-8) <=> engine->newArray()"); equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(qInf())"); equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(\"Infinity\")"); equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, qInf())"); equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, \"Infinity\")"); equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, 0x43211234) <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0x43211234)"); equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0x10001)"); equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(qInf())"); @@ -3995,6 +5329,9 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x10001)"); equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, 0x10000) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0, 0x10000) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(0, 0x10000) <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0x43211234)"); equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(qInf())"); equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(\"Infinity\")"); @@ -4004,6 +5341,8 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, 0x43211234)"); equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, 0x10001) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0, 0x10001) <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(true)"); equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(false)"); @@ -4067,7 +5406,27 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"null\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"-6.37e-8\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"''\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(0, -qInf()) <=> engine->nullValue()"); + equals.insert("QScriptValue(0, -qInf()) <=> engine->newArray()"); equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(\"ciao\")"); equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"ciao\")"); @@ -4084,6 +5443,12 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->newObject()"); equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(\"NaN\")"); equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(\"ciao\")"); equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); @@ -4103,6 +5468,12 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->newObject()"); equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(true)"); equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(false)"); @@ -4179,7 +5550,31 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"/foo/\")"); equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Object()\")"); equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"null\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"-6.37e-8\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->nullValue()"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->newObject()"); equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Function.prototype\")"); equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Object\")"); equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Array\")"); @@ -4260,6 +5655,26 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"/foo/\")"); equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Object()\")"); equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"'12.4'\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->newObject()"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->newArray(10)"); equals.insert("QScriptValue(0, QString()) <=> QScriptValue(true)"); equals.insert("QScriptValue(0, QString()) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(0, QString()) <=> QScriptValue(uint(124))"); @@ -4324,6 +5739,26 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"/foo/\")"); equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"new Object()\")"); equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"'12.4'\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->newObject()"); + equals.insert("QScriptValue(0, QString()) <=> engine->newArray(10)"); equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(true)"); equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(uint(124))"); @@ -4381,6 +5816,24 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"new Object()\")"); equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"'12.4'\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->newObject()"); equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(uint(124))"); equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x43211234)"); equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x10000)"); @@ -4420,6 +5873,17 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"new Object()\")"); equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->newObject()"); equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(uint(124))"); equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(123.0)"); @@ -4469,6 +5933,22 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"new Object()\")"); equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"'12.4'\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->newObject()"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(true)"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(uint(124))"); @@ -4505,6 +5985,18 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))"); equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(engine, true) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(engine, true) <=> QScriptValue(uint(124))"); equals.insert("QScriptValue(engine, true) <=> QScriptValue(123.0)"); @@ -4535,6 +6027,16 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, \"Infinity\")"); equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, QString(\"123\"))"); equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(engine, false) <=> QScriptValue(true)"); equals.insert("QScriptValue(engine, false) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(engine, false) <=> QScriptValue(uint(124))"); @@ -4571,6 +6073,18 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, \"Infinity\")"); equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"123\"))"); equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(uint(124))"); equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(123.0)"); equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0x43211234)"); @@ -4595,6 +6109,13 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, \"Infinity\")"); equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, int(122)) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(engine, int(122)) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(engine, int(122)) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(engine, int(122)) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(engine, int(122)) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(engine, int(122)) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(engine, int(122)) <=> engine->evaluate(\"'123'\")"); equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0x43211234)"); equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0x10000)"); equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0x10001)"); @@ -4610,6 +6131,10 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, 0x10001)"); equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, uint(124)) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(engine, uint(124)) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(engine, uint(124)) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(engine, uint(124)) <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(engine, 0) <=> QScriptValue(true)"); equals.insert("QScriptValue(engine, 0) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(engine, 0) <=> QScriptValue(uint(124))"); @@ -4646,6 +6171,18 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, \"Infinity\")"); equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"123\"))"); equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(true)"); equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(uint(124))"); @@ -4682,6 +6219,18 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, \"Infinity\")"); equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"123\"))"); equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(uint(124))"); equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0x43211234)"); equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0x10000)"); @@ -4700,6 +6249,11 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 0x10001)"); equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, 123.0) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(engine, 123.0) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(engine, 123.0) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(engine, 123.0) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(engine, 123.0) <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(true)"); equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(uint(124))"); @@ -4733,6 +6287,17 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, \"Infinity\")"); equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, QString(\"123\"))"); equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(true)"); equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(false)"); @@ -4793,13 +6358,33 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"null\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"''\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->nullValue()"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->newArray()"); equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(qInf())"); equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(\"Infinity\")"); equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, qInf())"); equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, \"Infinity\")"); equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, 0x43211234) <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0x43211234)"); equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0x10001)"); equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(qInf())"); @@ -4812,6 +6397,9 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x10001)"); equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, 0x10000) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(engine, 0x10000) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(engine, 0x10000) <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0x43211234)"); equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(qInf())"); equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(\"Infinity\")"); @@ -4821,6 +6409,8 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 0x43211234)"); equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, qInf())"); equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, 0x10001) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(engine, 0x10001) <=> engine->evaluate(\"Infinity\")"); equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(true)"); equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(false)"); @@ -4884,7 +6474,27 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"[]\")"); equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"Array.prototype\")"); equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"null\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"-6.37e-8\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"''\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(engine, -qInf()) <=> engine->nullValue()"); + equals.insert("QScriptValue(engine, -qInf()) <=> engine->newArray()"); equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(\"ciao\")"); equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"ciao\")"); @@ -4901,6 +6511,12 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->newObject()"); equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"NaN\")"); equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"ciao\")"); equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); @@ -4920,6 +6536,12 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->newObject()"); equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)"); equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(true)"); equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(false)"); @@ -4996,7 +6618,31 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"/foo/\")"); equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Object()\")"); equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"null\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"false\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"0\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"0.0\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"-6.37e-8\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"'12.4'\")"); equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->nullValue()"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->newObject()"); equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Function.prototype\")"); equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Object\")"); equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Array\")"); @@ -5077,6 +6723,26 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"/foo/\")"); equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Object()\")"); equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"'12.4'\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->newObject()"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->newArray(10)"); equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(true)"); equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(uint(124))"); @@ -5141,6 +6807,26 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"/foo/\")"); equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"new Object()\")"); equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"'0'\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"'12.4'\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->newObject()"); + equals.insert("QScriptValue(engine, QString()) <=> engine->newArray(10)"); equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(true)"); equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(uint(124))"); @@ -5198,6 +6884,24 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"new Object()\")"); equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"true\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"'12.4'\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->newObject()"); equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(uint(124))"); equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x43211234)"); equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x10000)"); @@ -5237,6 +6941,17 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"new Object()\")"); equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->newObject()"); equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(int(122))"); equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(uint(124))"); equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(123.0)"); @@ -5287,6 +7002,22 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"new Object()\")"); equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Undefined\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Null\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"True\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"False\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"122\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"124\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"123.0\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"0x43211234\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"0x10000\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"0x10001\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"'ciao'\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"'123'\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"'12.4'\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->newObject()"); equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(true)"); equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(int(122))"); equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(uint(124))"); @@ -5351,6 +7082,26 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"/foo/\")"); equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"new Object()\")"); equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Null\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"True\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"False\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"true\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"122\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"124\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"123.0\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"'0'\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"'12.4'\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->newObject()"); + equals.insert("engine->evaluate(\"[]\") <=> engine->newArray(10)"); equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(\"ciao\")"); equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(0, \"ciao\")"); @@ -5365,6 +7116,7 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")"); equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"'ciao'\")"); equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(true)"); equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(int(122))"); equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(uint(124))"); @@ -5429,6 +7181,26 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"/foo/\")"); equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"new Object()\")"); equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Null\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"True\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"False\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"true\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"122\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"124\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"123.0\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"'0'\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"'12.4'\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->newObject()"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->newArray(10)"); equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Object\")"); equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Array\")"); equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Number\")"); @@ -5458,6 +7230,12 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Null\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"True\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"False\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->newObject()"); equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Object\")"); equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Number\")"); equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Function\")"); @@ -5512,6 +7290,15 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"new Object()\")"); equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Null\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"True\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"False\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"'0'\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"'12.4'\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->newObject()"); equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(\"ciao\")"); equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(0, \"ciao\")"); @@ -5526,6 +7313,7 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { return 1; })\")"); equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"'ciao'\")"); equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(true)"); equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(int(122))"); equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(uint(124))"); @@ -5590,6 +7378,26 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"/foo/\")"); equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Object()\")"); equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Null\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"True\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"False\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"true\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"122\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"124\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"123.0\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"'0'\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"'12.4'\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->newObject()"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->newArray(10)"); equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(\"NaN\")"); equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(\"Infinity\")"); equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(\"ciao\")"); @@ -5612,6 +7420,951 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Null\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"True\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"False\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->newObject()"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(int(122))"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(123.0)"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, int(122))"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, 123.0)"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, int(122))"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"122\")"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"124\")"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"123.0\")"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->evaluate(\"Undefined\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"Undefined\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Undefined\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"Undefined\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Undefined\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"Undefined\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("engine->evaluate(\"Undefined\") <=> engine->newObject()"); + equals.insert("engine->evaluate(\"Null\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"Null\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Null\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"Null\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Null\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"Null\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"True\")"); + equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("engine->evaluate(\"Null\") <=> engine->newObject()"); + equals.insert("engine->evaluate(\"True\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"True\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"True\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"True\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"True\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"True\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("engine->evaluate(\"True\") <=> engine->newObject()"); + equals.insert("engine->evaluate(\"False\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"False\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"False\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"False\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"False\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"False\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"Null\")"); + equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"True\")"); + equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("engine->evaluate(\"False\") <=> engine->newObject()"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(true)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(int(122))"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(123.0)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(6.37e-8)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, true)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, int(122))"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, 123.0)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, 6.37e-8)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, true)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, int(122))"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"true\")"); + equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"122\")"); + equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"124\")"); + equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"123.0\")"); + equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"'12.4'\")"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(int(122))"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(123.0)"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, int(122))"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, 123.0)"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, int(122))"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"122\")"); + equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"124\")"); + equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"123.0\")"); + equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"'12.4'\")"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(true)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(int(122))"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(123.0)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(6.37e-8)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, true)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, int(122))"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, 123.0)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, 6.37e-8)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, true)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, int(122))"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"true\")"); + equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"122\")"); + equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"124\")"); + equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"123.0\")"); + equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"'12.4'\")"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(123.0)"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0, 123.0)"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"122\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"122\") <=> engine->evaluate(\"124\")"); + equals.insert("engine->evaluate(\"122\") <=> engine->evaluate(\"123.0\")"); + equals.insert("engine->evaluate(\"122\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"122\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->evaluate(\"122\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"122\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"122\") <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->evaluate(\"124\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"124\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"124\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"124\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"124\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"124\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"124\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"124\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"124\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"124\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"124\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"124\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"124\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"124\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"124\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"124\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"124\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->evaluate(\"124\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"124\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(true)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(int(122))"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(123.0)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(6.37e-8)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, true)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, int(122))"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, 123.0)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, 6.37e-8)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, true)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, int(122))"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"true\")"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"122\")"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"124\")"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"123.0\")"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"'12.4'\")"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(true)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(int(122))"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(123.0)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(6.37e-8)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, true)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, int(122))"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, 123.0)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, 6.37e-8)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, true)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, int(122))"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"true\")"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"122\")"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"124\")"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"123.0\")"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"'12.4'\")"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"123.0\") <=> engine->evaluate(\"124\")"); + equals.insert("engine->evaluate(\"123.0\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"123.0\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->evaluate(\"123.0\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"123.0\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(true)"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(int(122))"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(123.0)"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, true)"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, int(122))"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 123.0)"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, true)"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, int(122))"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"true\")"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"122\")"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"124\")"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"123.0\")"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"'12.4'\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(true)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(false)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(int(122))"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0.0)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(123.0)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(6.37e-8)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QString(\"\"))"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QString())"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QString(\"0\"))"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, true)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, false)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, int(122))"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 0)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 0.0)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 123.0)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 6.37e-8)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QString(\"\"))"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QString())"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, true)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, false)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, int(122))"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 0)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 0.0)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QString())"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"[]\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"new Array()\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"null\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"true\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"false\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"122\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"124\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"0\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"0.0\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"123.0\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"''\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"'0'\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"'12.4'\")"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->nullValue()"); + equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->newArray()"); + equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"0x43211234\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"0x10000\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"0x10000\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"0x10000\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"0x10001\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"0x10001\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(true)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(false)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(int(122))"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0.0)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(123.0)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(6.37e-8)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(-6.37e-8)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(QString(\"\"))"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(QString())"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(QString(\"0\"))"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, true)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, false)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, int(122))"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 0)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 0.0)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 123.0)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 6.37e-8)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, -6.37e-8)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QString(\"\"))"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QString())"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, true)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, false)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, int(122))"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 0)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 0.0)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QString())"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"[]\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"new Array()\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"null\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"true\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"false\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"122\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"124\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"0\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"0.0\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"123.0\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"-6.37e-8\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"''\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"'0'\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"'12.4'\")"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->nullValue()"); + equals.insert("engine->evaluate(\"-Infinity\") <=> engine->newArray()"); + equals.insert("engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(true)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(int(122))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(123.0)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(6.37e-8)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(\"NaN\")"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(\"-Infinity\")"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(QString(\"0\"))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, true)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, int(122))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, 123.0)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, 6.37e-8)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, true)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, int(122))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"/foo/\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Null\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"True\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"False\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"true\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"122\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"124\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"123.0\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"'0'\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"'12.4'\")"); + equals.insert("engine->evaluate(\"''\") <=> engine->newObject()"); + equals.insert("engine->evaluate(\"''\") <=> engine->newArray(10)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(true)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(int(122))"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(123.0)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(6.37e-8)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(\"NaN\")"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, true)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, int(122))"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, 123.0)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, 6.37e-8)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, true)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, int(122))"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"Null\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"True\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"False\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"true\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"122\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"124\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"123.0\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"'12.4'\")"); + equals.insert("engine->evaluate(\"'0'\") <=> engine->newObject()"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(\"NaN\")"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"Null\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"True\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"False\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"124\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("engine->evaluate(\"'123'\") <=> engine->newObject()"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(int(122))"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(123.0)"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(\"NaN\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, int(122))"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, 123.0)"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, int(122))"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Undefined\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Null\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"True\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"False\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"122\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"124\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"123.0\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"'ciao'\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->evaluate(\"'12.4'\") <=> engine->newObject()"); equals.insert("engine->nullValue() <=> QScriptValue(true)"); equals.insert("engine->nullValue() <=> QScriptValue(int(122))"); equals.insert("engine->nullValue() <=> QScriptValue(uint(124))"); @@ -5648,6 +8401,163 @@ void tst_QScriptValue::lessThan_makeData(const char *expr) equals.insert("engine->nullValue() <=> QScriptValue(engine, \"Infinity\")"); equals.insert("engine->nullValue() <=> QScriptValue(engine, QString(\"123\"))"); equals.insert("engine->nullValue() <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->nullValue() <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("engine->nullValue() <=> engine->evaluate(\"true\")"); + equals.insert("engine->nullValue() <=> engine->evaluate(\"122\")"); + equals.insert("engine->nullValue() <=> engine->evaluate(\"124\")"); + equals.insert("engine->nullValue() <=> engine->evaluate(\"123.0\")"); + equals.insert("engine->nullValue() <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("engine->nullValue() <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->nullValue() <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->nullValue() <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->nullValue() <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->nullValue() <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->nullValue() <=> engine->evaluate(\"'12.4'\")"); + equals.insert("engine->newObject() <=> QScriptValue(\"ciao\")"); + equals.insert("engine->newObject() <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->newObject() <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->newObject() <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->newObject() <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->newObject() <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->newObject() <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->newObject() <=> engine->evaluate(\"Object\")"); + equals.insert("engine->newObject() <=> engine->evaluate(\"Array\")"); + equals.insert("engine->newObject() <=> engine->evaluate(\"Number\")"); + equals.insert("engine->newObject() <=> engine->evaluate(\"Function\")"); + equals.insert("engine->newObject() <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->newObject() <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->newObject() <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->newObject() <=> engine->evaluate(\"'ciao'\")"); + equals.insert("engine->newArray() <=> QScriptValue(true)"); + equals.insert("engine->newArray() <=> QScriptValue(int(122))"); + equals.insert("engine->newArray() <=> QScriptValue(uint(124))"); + equals.insert("engine->newArray() <=> QScriptValue(123.0)"); + equals.insert("engine->newArray() <=> QScriptValue(6.37e-8)"); + equals.insert("engine->newArray() <=> QScriptValue(0x43211234)"); + equals.insert("engine->newArray() <=> QScriptValue(0x10000)"); + equals.insert("engine->newArray() <=> QScriptValue(0x10001)"); + equals.insert("engine->newArray() <=> QScriptValue(qInf())"); + equals.insert("engine->newArray() <=> QScriptValue(\"NaN\")"); + equals.insert("engine->newArray() <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->newArray() <=> QScriptValue(\"-Infinity\")"); + equals.insert("engine->newArray() <=> QScriptValue(\"ciao\")"); + equals.insert("engine->newArray() <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->newArray() <=> QScriptValue(QString(\"0\"))"); + equals.insert("engine->newArray() <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->newArray() <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->newArray() <=> QScriptValue(0, true)"); + equals.insert("engine->newArray() <=> QScriptValue(0, int(122))"); + equals.insert("engine->newArray() <=> QScriptValue(0, uint(124))"); + equals.insert("engine->newArray() <=> QScriptValue(0, 123.0)"); + equals.insert("engine->newArray() <=> QScriptValue(0, 6.37e-8)"); + equals.insert("engine->newArray() <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->newArray() <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->newArray() <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->newArray() <=> QScriptValue(0, qInf())"); + equals.insert("engine->newArray() <=> QScriptValue(0, \"NaN\")"); + equals.insert("engine->newArray() <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->newArray() <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("engine->newArray() <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->newArray() <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->newArray() <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("engine->newArray() <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->newArray() <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("engine->newArray() <=> QScriptValue(engine, true)"); + equals.insert("engine->newArray() <=> QScriptValue(engine, int(122))"); + equals.insert("engine->newArray() <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->newArray() <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->newArray() <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("engine->newArray() <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->newArray() <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->newArray() <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->newArray() <=> QScriptValue(engine, qInf())"); + equals.insert("engine->newArray() <=> QScriptValue(engine, \"NaN\")"); + equals.insert("engine->newArray() <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->newArray() <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("engine->newArray() <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->newArray() <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->newArray() <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("engine->newArray() <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->newArray() <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->newArray() <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"Object\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"Array\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"Number\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"Function\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"/foo/\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"new Object()\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"new Error()\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"Undefined\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"Null\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"True\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"False\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"true\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"122\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"124\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"123.0\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"6.37e-8\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"0x43211234\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"0x10000\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"0x10001\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"Infinity\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"'ciao'\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"'0'\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"'12.4'\")"); + equals.insert("engine->newArray() <=> engine->newObject()"); + equals.insert("engine->newArray() <=> engine->newArray(10)"); + equals.insert("engine->newArray(10) <=> QScriptValue(\"NaN\")"); + equals.insert("engine->newArray(10) <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->newArray(10) <=> QScriptValue(\"-Infinity\")"); + equals.insert("engine->newArray(10) <=> QScriptValue(\"ciao\")"); + equals.insert("engine->newArray(10) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->newArray(10) <=> QScriptValue(QString(\"0\"))"); + equals.insert("engine->newArray(10) <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->newArray(10) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->newArray(10) <=> QScriptValue(0, \"NaN\")"); + equals.insert("engine->newArray(10) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->newArray(10) <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("engine->newArray(10) <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->newArray(10) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->newArray(10) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("engine->newArray(10) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->newArray(10) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("engine->newArray(10) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("engine->newArray(10) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->newArray(10) <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("engine->newArray(10) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->newArray(10) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->newArray(10) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("engine->newArray(10) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->newArray(10) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"Object\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"Array\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"Number\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"Function\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"/foo/\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"new Object()\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"new Error()\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"Undefined\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"Null\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"True\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"False\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"'ciao'\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"'0'\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"'123'\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"'12.4'\")"); + equals.insert("engine->newArray(10) <=> engine->newObject()"); } QHash<QString, QScriptValue>::const_iterator it; for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { @@ -5702,6 +8612,16 @@ void tst_QScriptValue::instanceOf_makeData(const char *expr) equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object\")"); equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Array\")"); equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->newObject() <=> engine->evaluate(\"Object\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"Object\")"); + equals.insert("engine->newArray() <=> engine->evaluate(\"Array\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"Object\")"); + equals.insert("engine->newArray(10) <=> engine->evaluate(\"Array\")"); + equals.insert("engine->newDate(QDateTime()) <=> engine->evaluate(\"Object\")"); } QHash<QString, QScriptValue>::const_iterator it; for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { @@ -5833,8 +8753,39 @@ void tst_QScriptValue::qscriptvalue_castQString_makeData(const char* expr) value.insert("engine->evaluate(\"new Object()\")", "[object Object]"); value.insert("engine->evaluate(\"new Array()\")", ""); value.insert("engine->evaluate(\"new Error()\")", "Error: Unknown error"); + value.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", "22"); + value.insert("engine->evaluate(\"Undefined\")", "ReferenceError: Can't find variable: Undefined"); + value.insert("engine->evaluate(\"Null\")", "ReferenceError: Can't find variable: Null"); + value.insert("engine->evaluate(\"True\")", "ReferenceError: Can't find variable: True"); + value.insert("engine->evaluate(\"False\")", "ReferenceError: Can't find variable: False"); + value.insert("engine->evaluate(\"undefined\")", ""); + value.insert("engine->evaluate(\"null\")", ""); + value.insert("engine->evaluate(\"true\")", "true"); + value.insert("engine->evaluate(\"false\")", "false"); + value.insert("engine->evaluate(\"122\")", "122"); + value.insert("engine->evaluate(\"124\")", "124"); + value.insert("engine->evaluate(\"0\")", "0"); + value.insert("engine->evaluate(\"0.0\")", "0"); + value.insert("engine->evaluate(\"123.0\")", "123"); + value.insert("engine->evaluate(\"6.37e-8\")", "6.37e-8"); + value.insert("engine->evaluate(\"-6.37e-8\")", "-6.37e-8"); + value.insert("engine->evaluate(\"0x43211234\")", "1126240820"); + value.insert("engine->evaluate(\"0x10000\")", "65536"); + value.insert("engine->evaluate(\"0x10001\")", "65537"); + value.insert("engine->evaluate(\"NaN\")", "NaN"); + value.insert("engine->evaluate(\"Infinity\")", "Infinity"); + value.insert("engine->evaluate(\"-Infinity\")", "-Infinity"); + value.insert("engine->evaluate(\"'ciao'\")", "ciao"); + value.insert("engine->evaluate(\"''\")", ""); + value.insert("engine->evaluate(\"'0'\")", "0"); + value.insert("engine->evaluate(\"'123'\")", "123"); + value.insert("engine->evaluate(\"'12.4'\")", "12.4"); value.insert("engine->nullValue()", ""); value.insert("engine->undefinedValue()", ""); + value.insert("engine->newObject()", "[object Object]"); + value.insert("engine->newArray()", ""); + value.insert("engine->newArray(10)", ",,,,,,,,,"); + value.insert("engine->newDate(QDateTime())", "Invalid Date"); } newRow(expr) << value.value(expr); } @@ -5843,6 +8794,7 @@ void tst_QScriptValue::qscriptvalue_castQString_test(const char*, const QScriptV { QFETCH(QString, expected); QCOMPARE(qscriptvalue_cast<QString>(value), expected); + QCOMPARE(qscriptvalue_cast<QString>(value), expected); } DEFINE_TEST_FUNCTION(qscriptvalue_castQString) @@ -5961,8 +8913,39 @@ void tst_QScriptValue::qscriptvalue_castqsreal_makeData(const char* expr) value.insert("engine->evaluate(\"new Object()\")", qQNaN()); value.insert("engine->evaluate(\"new Array()\")", 0); value.insert("engine->evaluate(\"new Error()\")", qQNaN()); + value.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", 22); + value.insert("engine->evaluate(\"Undefined\")", qQNaN()); + value.insert("engine->evaluate(\"Null\")", qQNaN()); + value.insert("engine->evaluate(\"True\")", qQNaN()); + value.insert("engine->evaluate(\"False\")", qQNaN()); + value.insert("engine->evaluate(\"undefined\")", qQNaN()); + value.insert("engine->evaluate(\"null\")", 0); + value.insert("engine->evaluate(\"true\")", 1); + value.insert("engine->evaluate(\"false\")", 0); + value.insert("engine->evaluate(\"122\")", 122); + value.insert("engine->evaluate(\"124\")", 124); + value.insert("engine->evaluate(\"0\")", 0); + value.insert("engine->evaluate(\"0.0\")", 0); + value.insert("engine->evaluate(\"123.0\")", 123); + value.insert("engine->evaluate(\"6.37e-8\")", 6.369999999999999e-08); + value.insert("engine->evaluate(\"-6.37e-8\")", -6.369999999999999e-08); + value.insert("engine->evaluate(\"0x43211234\")", 1126240820); + value.insert("engine->evaluate(\"0x10000\")", 65536); + value.insert("engine->evaluate(\"0x10001\")", 65537); + value.insert("engine->evaluate(\"NaN\")", qQNaN()); + value.insert("engine->evaluate(\"Infinity\")", qInf()); + value.insert("engine->evaluate(\"-Infinity\")", qInf()); + value.insert("engine->evaluate(\"'ciao'\")", qQNaN()); + value.insert("engine->evaluate(\"''\")", 0); + value.insert("engine->evaluate(\"'0'\")", 0); + value.insert("engine->evaluate(\"'123'\")", 123); + value.insert("engine->evaluate(\"'12.4'\")", 12.4); value.insert("engine->nullValue()", 0); value.insert("engine->undefinedValue()", qQNaN()); + value.insert("engine->newObject()", qQNaN()); + value.insert("engine->newArray()", 0); + value.insert("engine->newArray(10)", qQNaN()); + value.insert("engine->newDate(QDateTime())", qQNaN()); } newRow(expr) << value.value(expr); } @@ -5972,13 +8955,16 @@ void tst_QScriptValue::qscriptvalue_castqsreal_test(const char*, const QScriptVa QFETCH(qsreal, expected); if (qIsNaN(expected)) { QVERIFY(qIsNaN(qscriptvalue_cast<qsreal>(value))); + QVERIFY(qIsNaN(qscriptvalue_cast<qsreal>(value))); return; } if (qIsInf(expected)) { QVERIFY(qIsInf(qscriptvalue_cast<qsreal>(value))); + QVERIFY(qIsInf(qscriptvalue_cast<qsreal>(value))); return; } QCOMPARE(qscriptvalue_cast<qsreal>(value), expected); + QCOMPARE(qscriptvalue_cast<qsreal>(value), expected); } DEFINE_TEST_FUNCTION(qscriptvalue_castqsreal) @@ -6097,8 +9083,39 @@ void tst_QScriptValue::qscriptvalue_castbool_makeData(const char* expr) value.insert("engine->evaluate(\"new Object()\")", true); value.insert("engine->evaluate(\"new Array()\")", true); value.insert("engine->evaluate(\"new Error()\")", true); + value.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", true); + value.insert("engine->evaluate(\"Undefined\")", true); + value.insert("engine->evaluate(\"Null\")", true); + value.insert("engine->evaluate(\"True\")", true); + value.insert("engine->evaluate(\"False\")", true); + value.insert("engine->evaluate(\"undefined\")", false); + value.insert("engine->evaluate(\"null\")", false); + value.insert("engine->evaluate(\"true\")", true); + value.insert("engine->evaluate(\"false\")", false); + value.insert("engine->evaluate(\"122\")", true); + value.insert("engine->evaluate(\"124\")", true); + value.insert("engine->evaluate(\"0\")", false); + value.insert("engine->evaluate(\"0.0\")", false); + value.insert("engine->evaluate(\"123.0\")", true); + value.insert("engine->evaluate(\"6.37e-8\")", true); + value.insert("engine->evaluate(\"-6.37e-8\")", true); + value.insert("engine->evaluate(\"0x43211234\")", true); + value.insert("engine->evaluate(\"0x10000\")", true); + value.insert("engine->evaluate(\"0x10001\")", true); + value.insert("engine->evaluate(\"NaN\")", false); + value.insert("engine->evaluate(\"Infinity\")", true); + value.insert("engine->evaluate(\"-Infinity\")", true); + value.insert("engine->evaluate(\"'ciao'\")", true); + value.insert("engine->evaluate(\"''\")", false); + value.insert("engine->evaluate(\"'0'\")", true); + value.insert("engine->evaluate(\"'123'\")", true); + value.insert("engine->evaluate(\"'12.4'\")", true); value.insert("engine->nullValue()", false); value.insert("engine->undefinedValue()", false); + value.insert("engine->newObject()", true); + value.insert("engine->newArray()", true); + value.insert("engine->newArray(10)", true); + value.insert("engine->newDate(QDateTime())", true); } newRow(expr) << value.value(expr); } @@ -6107,6 +9124,7 @@ void tst_QScriptValue::qscriptvalue_castbool_test(const char*, const QScriptValu { QFETCH(bool, expected); QCOMPARE(qscriptvalue_cast<bool>(value), expected); + QCOMPARE(qscriptvalue_cast<bool>(value), expected); } DEFINE_TEST_FUNCTION(qscriptvalue_castbool) @@ -6225,8 +9243,39 @@ void tst_QScriptValue::qscriptvalue_castqint32_makeData(const char* expr) value.insert("engine->evaluate(\"new Object()\")", 0); value.insert("engine->evaluate(\"new Array()\")", 0); value.insert("engine->evaluate(\"new Error()\")", 0); + value.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", 22); + value.insert("engine->evaluate(\"Undefined\")", 0); + value.insert("engine->evaluate(\"Null\")", 0); + value.insert("engine->evaluate(\"True\")", 0); + value.insert("engine->evaluate(\"False\")", 0); + value.insert("engine->evaluate(\"undefined\")", 0); + value.insert("engine->evaluate(\"null\")", 0); + value.insert("engine->evaluate(\"true\")", 1); + value.insert("engine->evaluate(\"false\")", 0); + value.insert("engine->evaluate(\"122\")", 122); + value.insert("engine->evaluate(\"124\")", 124); + value.insert("engine->evaluate(\"0\")", 0); + value.insert("engine->evaluate(\"0.0\")", 0); + value.insert("engine->evaluate(\"123.0\")", 123); + value.insert("engine->evaluate(\"6.37e-8\")", 0); + value.insert("engine->evaluate(\"-6.37e-8\")", 0); + value.insert("engine->evaluate(\"0x43211234\")", 1126240820); + value.insert("engine->evaluate(\"0x10000\")", 65536); + value.insert("engine->evaluate(\"0x10001\")", 65537); + value.insert("engine->evaluate(\"NaN\")", 0); + value.insert("engine->evaluate(\"Infinity\")", 0); + value.insert("engine->evaluate(\"-Infinity\")", 0); + value.insert("engine->evaluate(\"'ciao'\")", 0); + value.insert("engine->evaluate(\"''\")", 0); + value.insert("engine->evaluate(\"'0'\")", 0); + value.insert("engine->evaluate(\"'123'\")", 123); + value.insert("engine->evaluate(\"'12.4'\")", 12); value.insert("engine->nullValue()", 0); value.insert("engine->undefinedValue()", 0); + value.insert("engine->newObject()", 0); + value.insert("engine->newArray()", 0); + value.insert("engine->newArray(10)", 0); + value.insert("engine->newDate(QDateTime())", 0); } newRow(expr) << value.value(expr); } @@ -6235,6 +9284,7 @@ void tst_QScriptValue::qscriptvalue_castqint32_test(const char*, const QScriptVa { QFETCH(qint32, expected); QCOMPARE(qscriptvalue_cast<qint32>(value), expected); + QCOMPARE(qscriptvalue_cast<qint32>(value), expected); } DEFINE_TEST_FUNCTION(qscriptvalue_castqint32) @@ -6353,8 +9403,39 @@ void tst_QScriptValue::qscriptvalue_castquint32_makeData(const char* expr) value.insert("engine->evaluate(\"new Object()\")", 0); value.insert("engine->evaluate(\"new Array()\")", 0); value.insert("engine->evaluate(\"new Error()\")", 0); + value.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", 22); + value.insert("engine->evaluate(\"Undefined\")", 0); + value.insert("engine->evaluate(\"Null\")", 0); + value.insert("engine->evaluate(\"True\")", 0); + value.insert("engine->evaluate(\"False\")", 0); + value.insert("engine->evaluate(\"undefined\")", 0); + value.insert("engine->evaluate(\"null\")", 0); + value.insert("engine->evaluate(\"true\")", 1); + value.insert("engine->evaluate(\"false\")", 0); + value.insert("engine->evaluate(\"122\")", 122); + value.insert("engine->evaluate(\"124\")", 124); + value.insert("engine->evaluate(\"0\")", 0); + value.insert("engine->evaluate(\"0.0\")", 0); + value.insert("engine->evaluate(\"123.0\")", 123); + value.insert("engine->evaluate(\"6.37e-8\")", 0); + value.insert("engine->evaluate(\"-6.37e-8\")", 0); + value.insert("engine->evaluate(\"0x43211234\")", 1126240820); + value.insert("engine->evaluate(\"0x10000\")", 65536); + value.insert("engine->evaluate(\"0x10001\")", 65537); + value.insert("engine->evaluate(\"NaN\")", 0); + value.insert("engine->evaluate(\"Infinity\")", 0); + value.insert("engine->evaluate(\"-Infinity\")", 0); + value.insert("engine->evaluate(\"'ciao'\")", 0); + value.insert("engine->evaluate(\"''\")", 0); + value.insert("engine->evaluate(\"'0'\")", 0); + value.insert("engine->evaluate(\"'123'\")", 123); + value.insert("engine->evaluate(\"'12.4'\")", 12); value.insert("engine->nullValue()", 0); value.insert("engine->undefinedValue()", 0); + value.insert("engine->newObject()", 0); + value.insert("engine->newArray()", 0); + value.insert("engine->newArray(10)", 0); + value.insert("engine->newDate(QDateTime())", 0); } newRow(expr) << value.value(expr); } @@ -6363,6 +9444,7 @@ void tst_QScriptValue::qscriptvalue_castquint32_test(const char*, const QScriptV { QFETCH(quint32, expected); QCOMPARE(qscriptvalue_cast<quint32>(value), expected); + QCOMPARE(qscriptvalue_cast<quint32>(value), expected); } DEFINE_TEST_FUNCTION(qscriptvalue_castquint32) @@ -6481,8 +9563,39 @@ void tst_QScriptValue::qscriptvalue_castquint16_makeData(const char* expr) value.insert("engine->evaluate(\"new Object()\")", 0); value.insert("engine->evaluate(\"new Array()\")", 0); value.insert("engine->evaluate(\"new Error()\")", 0); + value.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", 22); + value.insert("engine->evaluate(\"Undefined\")", 0); + value.insert("engine->evaluate(\"Null\")", 0); + value.insert("engine->evaluate(\"True\")", 0); + value.insert("engine->evaluate(\"False\")", 0); + value.insert("engine->evaluate(\"undefined\")", 0); + value.insert("engine->evaluate(\"null\")", 0); + value.insert("engine->evaluate(\"true\")", 1); + value.insert("engine->evaluate(\"false\")", 0); + value.insert("engine->evaluate(\"122\")", 122); + value.insert("engine->evaluate(\"124\")", 124); + value.insert("engine->evaluate(\"0\")", 0); + value.insert("engine->evaluate(\"0.0\")", 0); + value.insert("engine->evaluate(\"123.0\")", 123); + value.insert("engine->evaluate(\"6.37e-8\")", 0); + value.insert("engine->evaluate(\"-6.37e-8\")", 0); + value.insert("engine->evaluate(\"0x43211234\")", 4660); + value.insert("engine->evaluate(\"0x10000\")", 0); + value.insert("engine->evaluate(\"0x10001\")", 1); + value.insert("engine->evaluate(\"NaN\")", 0); + value.insert("engine->evaluate(\"Infinity\")", 0); + value.insert("engine->evaluate(\"-Infinity\")", 0); + value.insert("engine->evaluate(\"'ciao'\")", 0); + value.insert("engine->evaluate(\"''\")", 0); + value.insert("engine->evaluate(\"'0'\")", 0); + value.insert("engine->evaluate(\"'123'\")", 123); + value.insert("engine->evaluate(\"'12.4'\")", 12); value.insert("engine->nullValue()", 0); value.insert("engine->undefinedValue()", 0); + value.insert("engine->newObject()", 0); + value.insert("engine->newArray()", 0); + value.insert("engine->newArray(10)", 0); + value.insert("engine->newDate(QDateTime())", 0); } newRow(expr) << value.value(expr); } @@ -6491,6 +9604,7 @@ void tst_QScriptValue::qscriptvalue_castquint16_test(const char*, const QScriptV { QFETCH(quint16, expected); QCOMPARE(qscriptvalue_cast<quint16>(value), expected); + QCOMPARE(qscriptvalue_cast<quint16>(value), expected); } DEFINE_TEST_FUNCTION(qscriptvalue_castquint16) |