diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-02-11 06:09:18 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-02-11 06:09:18 (GMT) |
commit | 9a76a90b1944db52bd4180d27c01781fbb3499d4 (patch) | |
tree | 46ac1557761e30127330520d2fa6412305e07443 /tests/auto | |
parent | b5fe99c0105a9791e34a8b959822430497a4aeb9 (diff) | |
parent | b9907e309885b4b8ce280c721231a56a583b51d0 (diff) | |
download | Qt-9a76a90b1944db52bd4180d27c01781fbb3499d4.zip Qt-9a76a90b1944db52bd4180d27c01781fbb3499d4.tar.gz Qt-9a76a90b1944db52bd4180d27c01781fbb3499d4.tar.bz2 |
Merge remote branch 'origin/4.6' into bearermanagement/integration
Conflicts:
src/s60installs/s60installs.pro
Diffstat (limited to 'tests/auto')
37 files changed, 9249 insertions, 288 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 97a6f8a..2d80ea2 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -590,3 +590,11 @@ contains(QT_CONFIG, declarative): SUBDIRS += declarative xmlpatternsview \ xmlpatternsxqts \ xmlpatternsxslts + + +############### make check recursively for testcases ################## +check.CONFIG = recursive +check.recurse = $$SUBDIRS +check.recurse_target = check +QMAKE_EXTRA_TARGETS += check +########################################################### diff --git a/tests/auto/maketestselftest/tst_maketestselftest.cpp b/tests/auto/maketestselftest/tst_maketestselftest.cpp index c674202..ef92c56 100644 --- a/tests/auto/maketestselftest/tst_maketestselftest.cpp +++ b/tests/auto/maketestselftest/tst_maketestselftest.cpp @@ -92,6 +92,9 @@ void tst_MakeTestSelfTest::auto_dot_pro_data() QStringList subdirs = dir.entryList(QDir::AllDirs|QDir::NoDotAndDotDot); foreach (const QString& subdir, subdirs) { + if (subdir == QString::fromLatin1("tmp")) { + continue; + } QTest::newRow(qPrintable(subdir)) << subdir; } } diff --git a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp index 504ceac..ea86c16 100644 --- a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp +++ b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp @@ -1213,14 +1213,14 @@ void tst_QAbstractItemView::task250754_fontChange() tree.setModel(m); w.show(); - w.resize(150,150); + w.resize(150,240); QTest::qWait(30); QFont font = tree.font(); - font.setPointSize(5); + font.setPixelSize(10); tree.setFont(font); QTRY_VERIFY(!tree.verticalScrollBar()->isVisible()); - font.setPointSize(45); + font.setPixelSize(60); tree.setFont(font); //now with the huge items, the scrollbar must be visible QTRY_VERIFY(tree.verticalScrollBar()->isVisible()); @@ -1444,7 +1444,10 @@ void tst_QAbstractItemView::QTBUG6407_extendedSelection() for(int i = 0; i < 50; ++i) view.addItem(QString::number(i)); - view.resize(200,200); + QFont font = view.font(); + font.setPixelSize(10); + view.setFont(font); + view.resize(200,240); view.show(); QApplication::setActiveWindow(&view); diff --git a/tests/auto/qabstractscrollarea/tst_qabstractscrollarea.cpp b/tests/auto/qabstractscrollarea/tst_qabstractscrollarea.cpp index 3e062b8..da83826 100644 --- a/tests/auto/qabstractscrollarea/tst_qabstractscrollarea.cpp +++ b/tests/auto/qabstractscrollarea/tst_qabstractscrollarea.cpp @@ -71,8 +71,6 @@ private slots: void viewportCrash(); void task214488_layoutDirection_data(); void task214488_layoutDirection(); - void wheelEvent_data(); - void wheelEvent(); }; tst_QAbstractScrollArea::tst_QAbstractScrollArea() @@ -298,10 +296,10 @@ public: setAttribute(Qt::WA_DropSiteRegistered, true); - startTimer(200); + startTimer(2000); } - void timerEvent(QTimerEvent *) + void timerEvent(QTimerEvent *event) { // should not crash. (void)new QScrollArea(this); @@ -387,96 +385,5 @@ void tst_QAbstractScrollArea::patternBackground() QCOMPARE(image.pixel(QPoint(20,20)) , QColor(Qt::red).rgb()); } -Q_DECLARE_METATYPE(QWheelEvent *); - -void tst_QAbstractScrollArea::wheelEvent_data() -{ - QTest::addColumn<QSize>("widgetSize"); - QTest::addColumn<QPoint>("initialOffset"); - QTest::addColumn<QWheelEvent *>("event"); - QTest::addColumn<int>("movedX"); // -1 , 0 , or 1 - QTest::addColumn<int>("movedY"); - - QPoint pos(100,100); - int delta =-120; - - QTest::newRow("1") << QSize(600,600) << QPoint(50,50) - << new QWheelEvent(pos, delta, 0, 0, Qt::Horizontal) << 1 << 0; - - QTest::newRow("2") << QSize(600,600) << QPoint(50,50) - << new QWheelEvent(pos, delta, 0, 0, Qt::Vertical) << 0 << 1; - - QTest::newRow("3") << QSize(600,600) << QPoint(50,50) - << new QWheelEvent(pos, -delta, 0, 0, Qt::Horizontal) << -1 << 0; - - QTest::newRow("4") << QSize(600,600) << QPoint(50,50) - << new QWheelEvent(pos, -delta, 0, 0, Qt::Vertical) << 0 << -1; - - QTest::newRow("5") << QSize(20,600) << QPoint(0,50) - << new QWheelEvent(pos, delta, 0, 0, Qt::Horizontal) << 0 << 1; - - QTest::newRow("6") << QSize(20,600) << QPoint(0,50) - << new QWheelEvent(pos, delta, 0, 0, Qt::Vertical) << 0 << 1; - - QTest::newRow("7") << QSize(20,600) << QPoint(0,50) - << new QWheelEvent(pos, -delta, 0, 0, Qt::Horizontal) << 0 << -1; - - QTest::newRow("8") << QSize(20,600) << QPoint(0,50) - << new QWheelEvent(pos, -delta, 0, 0, Qt::Vertical) << 0 << -1; - - QTest::newRow("9") << QSize(600,20) << QPoint(50,0) - << new QWheelEvent(pos, delta, 0, 0, Qt::Horizontal) << 1 << 0; - - QTest::newRow("a") << QSize(600,20) << QPoint(50,0) - << new QWheelEvent(pos, delta, 0, 0, Qt::Vertical) << 1 << 0; - - QTest::newRow("b") << QSize(600,20) << QPoint(50,0) - << new QWheelEvent(pos, -delta, 0, 0, Qt::Horizontal) << -1 << 0; - - QTest::newRow("c") << QSize(600,20) << QPoint(50,0) - << new QWheelEvent(pos, -delta, 0, 0, Qt::Vertical) << -1 << 0; -} - - - - -void tst_QAbstractScrollArea::wheelEvent() -{ - QFETCH(QSize, widgetSize); - QFETCH(QPoint, initialOffset); - QFETCH(QWheelEvent *, event); - QFETCH(int, movedX); - QFETCH(int, movedY); - - QScrollArea scrollArea; - scrollArea.resize(200, 200); - QLabel widget("H e l l o"); - widget.resize(widgetSize); - scrollArea.setWidget(&widget); - scrollArea.show(); - QTest::qWait(20); - - scrollArea.verticalScrollBar()->setValue(initialOffset.y()); - scrollArea.horizontalScrollBar()->setValue(initialOffset.x()); - - QCOMPARE(scrollArea.verticalScrollBar()->value(), initialOffset.y()); - QCOMPARE(scrollArea.horizontalScrollBar()->value(), initialOffset.x()); - - QApplication::sendEvent(scrollArea.viewport(), event); - - if(movedX == 0) - QCOMPARE(scrollArea.horizontalScrollBar()->value(), initialOffset.x()); - else - QVERIFY(movedX * scrollArea.horizontalScrollBar()->value() > movedX * initialOffset.x()); - - if(movedY == 0) - QCOMPARE(scrollArea.verticalScrollBar()->value(), initialOffset.y()); - else - QVERIFY(movedY * scrollArea.verticalScrollBar()->value() > movedY * initialOffset.y()); - - delete event; -} - - QTEST_MAIN(tst_QAbstractScrollArea) #include "tst_qabstractscrollarea.moc" diff --git a/tests/auto/qabstractslider/tst_qabstractslider.cpp b/tests/auto/qabstractslider/tst_qabstractslider.cpp index 40281c6..293af36 100644 --- a/tests/auto/qabstractslider/tst_qabstractslider.cpp +++ b/tests/auto/qabstractslider/tst_qabstractslider.cpp @@ -768,7 +768,7 @@ void tst_QAbstractSlider::wheelEvent_data() << true // inverted controls << 20 // wheel scroll lines << false // with modifiers - << 1 // delta + << -1 // delta << int(Qt::Horizontal) // orientation of slider << int(Qt::Horizontal) // orientation of wheel << 30 // expected position after @@ -782,7 +782,7 @@ void tst_QAbstractSlider::wheelEvent_data() << false // inverted controls << 1 // wheel scroll lines << false // with modifiers - << 2 // delta + << -2 // delta << int(Qt::Horizontal) // orientation of slider << int(Qt::Horizontal) // orientation of wheel << 100 // expected position after @@ -796,7 +796,7 @@ void tst_QAbstractSlider::wheelEvent_data() << false // inverted controls << 1 // wheel scroll lines << false // with modifiers - << -2 // delta + << 2 // delta << int(Qt::Horizontal) // orientation of slider << int(Qt::Horizontal) // orientation of wheel << 0 // expected position after @@ -810,7 +810,7 @@ void tst_QAbstractSlider::wheelEvent_data() << false // inverted controls << 20 // wheel scroll lines << true // with modifiers - << 1 // delta + << -1 // delta << int(Qt::Horizontal) // orientation of slider << int(Qt::Horizontal) // orientation of wheel << 90 // expected position after diff --git a/tests/auto/qgl/qgl.pro b/tests/auto/qgl/qgl.pro index 420c4bb..9116f39 100644 --- a/tests/auto/qgl/qgl.pro +++ b/tests/auto/qgl/qgl.pro @@ -6,6 +6,6 @@ load(qttest_p4) requires(contains(QT_CONFIG,opengl)) QT += opengl -SOURCES += tst_qgl.cpp - +SOURCES += tst_qgl.cpp +RESOURCES = qgl.qrc diff --git a/tests/auto/qgl/qgl.qrc b/tests/auto/qgl/qgl.qrc new file mode 100644 index 0000000..653794a --- /dev/null +++ b/tests/auto/qgl/qgl.qrc @@ -0,0 +1,5 @@ +<!DOCTYPE RCC><RCC version="1.0"> +<qresource> + <file alias="designer.png">../qpixmap/images/designer.png</file> +</qresource> +</RCC> diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp index cf4616e..d37d727 100644 --- a/tests/auto/qgl/tst_qgl.cpp +++ b/tests/auto/qgl/tst_qgl.cpp @@ -56,6 +56,7 @@ #ifdef QT_BUILD_INTERNAL #include <QtOpenGL/private/qgl_p.h> +#include <QtGui/private/qpixmapdata_p.h> #endif //TESTED_CLASS= @@ -91,6 +92,8 @@ private slots: void clipTest(); void destroyFBOAfterContext(); void shareRegister(); + void qglContextDefaultBindTexture(); + void textureCleanup(); }; tst_QGL::tst_QGL() @@ -1938,5 +1941,242 @@ void tst_QGL::shareRegister() #endif } +// Tests QGLContext::bindTexture with default options +void tst_QGL::qglContextDefaultBindTexture() +{ +#ifdef QT_BUILD_INTERNAL + QGLWidget w; + w.makeCurrent(); + + QGLContext *ctx = const_cast<QGLContext*>(w.context()); + + QImage *boundImage = new QImage(256, 256, QImage::Format_RGB32); + boundImage->fill(0xFFFFFFFF); + QPixmap *boundPixmap = new QPixmap(256, 256); + boundPixmap->fill(Qt::red); + + // Check that calling QGLContext::bindTexture with default args adds textures to cache + int startCacheItemCount = QGLTextureCache::instance()->size(); + GLuint boundImageTextureId = ctx->bindTexture(*boundImage); + GLuint boundPixmapTextureId = ctx->bindTexture(*boundPixmap); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + + // Make sure the texture IDs returned are valid: + QCOMPARE((bool)glIsTexture(boundImageTextureId), GL_TRUE); + QCOMPARE((bool)glIsTexture(boundPixmapTextureId), GL_TRUE); + + // Make sure the textures are still there after we delete the image/pixmap: + delete boundImage; + boundImage = 0; + delete boundPixmap; + boundPixmap = 0; + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + + // Make sure the textures are deleted from the cache after calling QGLContext::deleteTexture() + ctx->deleteTexture(boundImageTextureId); + ctx->deleteTexture(boundPixmapTextureId); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + + // Finally, make sure QGLContext::deleteTexture also deleted the texture IDs: + QCOMPARE((bool)glIsTexture(boundImageTextureId), GL_FALSE); + QCOMPARE((bool)glIsTexture(boundPixmapTextureId), GL_FALSE); +#endif +} + +void tst_QGL::textureCleanup() +{ +#ifdef QT_BUILD_INTERNAL + QGLWidget w; + w.resize(200,200); + w.show(); + w.makeCurrent(); + + // Test pixmaps which have been loaded via QPixmapCache are removed from the texture cache + // when the pixmap cache is cleared + { + int startCacheItemCount = QGLTextureCache::instance()->size(); + QPainter p(&w); + + QPixmap boundPixmap(":designer.png"); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + + p.drawPixmap(0, 0, boundPixmap); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + // Need to call end for the GL2 paint engine to release references to pixmap if using tfp + p.end(); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + // Check that the texture doesn't get removed from the cache when the pixmap is cleared + // as it should still be in the cache: + boundPixmap = QPixmap(); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + QPixmapCache::clear(); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + } + + // Test pixmaps which have been loaded via QPixmapCache are removed from the texture cache + // when they are explicitly removed from the pixmap cache + { + int startCacheItemCount = QGLTextureCache::instance()->size(); + QPainter p(&w); + + QPixmap boundPixmap(128, 128); + QString cacheKey = QString::fromLatin1("myPixmap"); + QPixmapCache::insert(cacheKey, boundPixmap); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + + p.drawPixmap(0, 0, boundPixmap); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + // Need to call end for the GL2 paint engine to release references to pixmap if using tfp + p.end(); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + // Check that the texture doesn't get removed from the cache when the pixmap is cleared + // as it should still be in the cache: + boundPixmap = QPixmap(); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + // Finally, we check that the texture cache entry is removed when we remove the + // pixmap cache entry, which should hold the last reference: + QPixmapCache::remove(cacheKey); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + } + + // Check images & pixmaps are removed from the cache when they are deleted + { + int startCacheItemCount = QGLTextureCache::instance()->size(); + QPainter p(&w); + + QImage *boundImage = new QImage(256, 256, QImage::Format_RGB32); + boundImage->fill(0xFFFFFFFF); + QPixmap *boundPixmap = new QPixmap(256, 256); + boundPixmap->fill(Qt::red); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + + p.drawImage(0, 0, *boundImage); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + p.drawPixmap(0, 0, *boundPixmap); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + + // Need to call end for the GL2 paint engine to release references to pixmap if using tfp + p.end(); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + + delete boundImage; + boundImage = 0; + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + delete boundPixmap; + boundPixmap = 0; + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + } + + // Check images & pixmaps are removed from the cache when they are assigned to + { + int startCacheItemCount = QGLTextureCache::instance()->size(); + QPainter p(&w); + + QImage boundImage(256, 256, QImage::Format_RGB32); + boundImage.fill(0xFFFFFFFF); + QPixmap boundPixmap(256, 256); + boundPixmap.fill(Qt::red); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + + p.drawImage(0, 0, boundImage); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + p.drawPixmap(0, 0, boundPixmap); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + + // Need to call end for the GL2 paint engine to release references to pixmap if using tfp + p.end(); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + + boundImage = QImage(64, 64, QImage::Format_RGB32); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + boundPixmap = QPixmap(64, 64); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + } + + // Check images & pixmaps are removed from the cache when they are modified (detached) + { + int startCacheItemCount = QGLTextureCache::instance()->size(); + QPainter p(&w); + + QImage boundImage(256, 256, QImage::Format_RGB32); + boundImage.fill(0xFFFFFFFF); + QPixmap boundPixmap(256, 256); + boundPixmap.fill(Qt::red); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + + p.drawImage(0, 0, boundImage); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + p.drawPixmap(0, 0, boundPixmap); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + + // Need to call end for the GL2 paint engine to release references to pixmap if using tfp + p.end(); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + + boundImage.fill(0x00000000); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + boundPixmap.fill(Qt::blue); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + } + + // Check that images/pixmaps aren't removed from the cache if a shallow copy has been made + QImage copyOfImage; + QPixmap copyOfPixmap; + int startCacheItemCount = QGLTextureCache::instance()->size(); + { + QPainter p(&w); + + QImage boundImage(256, 256, QImage::Format_RGB32); + boundImage.fill(0xFFFFFFFF); + QPixmap boundPixmap(256, 256); + boundPixmap.fill(Qt::red); + + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); + + p.drawImage(0, 0, boundImage); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + p.drawPixmap(0, 0, boundPixmap); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + + // Need to call end for the GL2 paint engine to release references to pixmap if using tfp + p.end(); + + copyOfImage = boundImage; + copyOfPixmap = boundPixmap; + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + } // boundImage & boundPixmap would have been deleted when they went out of scope + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2); + + copyOfImage = QImage(); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1); + + copyOfPixmap = QPixmap(); + QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); +#endif +} + QTEST_MAIN(tst_QGL) #include "tst_qgl.moc" diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 14b9ef0..7c1b97e 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -90,6 +90,8 @@ Q_DECLARE_METATYPE(QRectF) #define COMPARE_REGIONS QTRY_COMPARE #endif +static QGraphicsRectItem staticItem; //QTBUG-7629, we should not crash at exit. + static void sendMousePress(QGraphicsScene *scene, const QPointF &point, Qt::MouseButton button = Qt::LeftButton) { QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress); @@ -251,6 +253,21 @@ public: QBrush brush; }; +class MyGraphicsView : public QGraphicsView +{ +public: + int repaints; + QRegion paintedRegion; + MyGraphicsView(QGraphicsScene *scene) : QGraphicsView(scene), repaints(0) {} + void paintEvent(QPaintEvent *e) + { + paintedRegion += e->region(); + ++repaints; + QGraphicsView::paintEvent(e); + } + void reset() { repaints = 0; paintedRegion = QRegion(); } +}; + class tst_QGraphicsItem : public QObject { Q_OBJECT @@ -419,6 +436,8 @@ private slots: void QTBUG_4233_updateCachedWithSceneRect(); void QTBUG_5418_textItemSetDefaultColor(); void QTBUG_6738_missingUpdateWithSetParent(); + void QTBUG_7714_fullUpdateDiscardingOpacityUpdate2(); + void QT_2653_fullUpdateDiscardingOpacityUpdate(); private: QList<QGraphicsItem *> paintedItems; @@ -3165,7 +3184,6 @@ void tst_QGraphicsItem::childrenBoundingRect() childChild->setPos(500, 500); child->rotate(90); - scene.addPolygon(parent->mapToScene(parent->boundingRect() | parent->childrenBoundingRect()))->setPen(QPen(Qt::red));; QGraphicsView view(&scene); @@ -6252,13 +6270,6 @@ void tst_QGraphicsItem::opacity2() QGraphicsScene scene; scene.addItem(parent); - class MyGraphicsView : public QGraphicsView - { public: - int repaints; - MyGraphicsView(QGraphicsScene *scene) : QGraphicsView(scene), repaints(0) {} - void paintEvent(QPaintEvent *e) { ++repaints; QGraphicsView::paintEvent(e); } - }; - MyGraphicsView view(&scene); view.show(); QTest::qWaitForWindowShown(&view); @@ -6336,20 +6347,6 @@ void tst_QGraphicsItem::opacityZeroUpdates() QGraphicsScene scene; scene.addItem(parent); - class MyGraphicsView : public QGraphicsView - { public: - int repaints; - QRegion paintedRegion; - MyGraphicsView(QGraphicsScene *scene) : QGraphicsView(scene), repaints(0) {} - void paintEvent(QPaintEvent *e) - { - ++repaints; - paintedRegion += e->region(); - QGraphicsView::paintEvent(e); - } - void reset() { repaints = 0; paintedRegion = QRegion(); } - }; - MyGraphicsView view(&scene); view.show(); QTest::qWaitForWindowShown(&view); @@ -7076,21 +7073,6 @@ void tst_QGraphicsItem::deviceTransform() QCOMPARE(rect3->deviceTransform(deviceX).map(QPointF(50, 50)), mapResult3); } -class MyGraphicsView : public QGraphicsView -{ -public: - int repaints; - QRegion paintedRegion; - MyGraphicsView(QGraphicsScene *scene) : QGraphicsView(scene), repaints(0) {} - void paintEvent(QPaintEvent *e) - { - paintedRegion += e->region(); - ++repaints; - QGraphicsView::paintEvent(e); - } - void reset() { repaints = 0; paintedRegion = QRegion(); } -}; - void tst_QGraphicsItem::update() { QGraphicsScene scene; @@ -9835,7 +9817,7 @@ void tst_QGraphicsItem::scenePosChange() QCOMPARE(child2->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 0); } -void tst_QGraphicsItem::QTBUG_5418_textItemSetDefaultColor() +void tst_QGraphicsItem::QTBUG_5418_textItemSetDefaultColor() { struct Item : public QGraphicsTextItem { @@ -9914,20 +9896,6 @@ void tst_QGraphicsItem::QTBUG_6738_missingUpdateWithSetParent() QGraphicsScene scene; scene.addItem(parent); - class MyGraphicsView : public QGraphicsView - { public: - int repaints; - QRegion paintedRegion; - MyGraphicsView(QGraphicsScene *scene) : QGraphicsView(scene), repaints(0) {} - void paintEvent(QPaintEvent *e) - { - ++repaints; - paintedRegion += e->region(); - QGraphicsView::paintEvent(e); - } - void reset() { repaints = 0; paintedRegion = QRegion(); } - }; - MyGraphicsView view(&scene); view.show(); QTest::qWaitForWindowShown(&view); @@ -9955,5 +9923,84 @@ void tst_QGraphicsItem::QTBUG_6738_missingUpdateWithSetParent() QTRY_VERIFY(view.repaints == 1); } +void tst_QGraphicsItem::QT_2653_fullUpdateDiscardingOpacityUpdate() +{ + QGraphicsScene scene(0, 0, 200, 200); + MyGraphicsView view(&scene); + + EventTester *parentGreen = new EventTester(); + parentGreen->setGeometry(QRectF(20, 20, 100, 100)); + parentGreen->brush = Qt::green; + + EventTester *childYellow = new EventTester(parentGreen); + childYellow->setGeometry(QRectF(10, 10, 50, 50)); + childYellow->brush = Qt::yellow; + + scene.addItem(parentGreen); + + childYellow->setOpacity(0.0); + parentGreen->setOpacity(0.0); + + // set any of the flags below to trigger a fullUpdate to reproduce the bug: + // ItemIgnoresTransformations, ItemClipsChildrenToShape, ItemIsSelectable + parentGreen->setFlag(QGraphicsItem::ItemIgnoresTransformations); + + view.show(); + QTest::qWaitForWindowShown(&view); + view.reset(); + + parentGreen->setOpacity(1.0); + + QTRY_COMPARE(view.repaints, 1); + + view.reset(); + childYellow->repaints = 0; + + childYellow->setOpacity(1.0); + + QTRY_COMPARE(view.repaints, 1); + QTRY_COMPARE(childYellow->repaints, 1); +} + +void tst_QGraphicsItem::QTBUG_7714_fullUpdateDiscardingOpacityUpdate2() +{ + QGraphicsScene scene(0, 0, 200, 200); + MyGraphicsView view(&scene); + MyGraphicsView origView(&scene); + + EventTester *parentGreen = new EventTester(); + parentGreen->setGeometry(QRectF(20, 20, 100, 100)); + parentGreen->brush = Qt::green; + + EventTester *childYellow = new EventTester(parentGreen); + childYellow->setGeometry(QRectF(10, 10, 50, 50)); + childYellow->brush = Qt::yellow; + + scene.addItem(parentGreen); + + origView.show(); + QTest::qWaitForWindowShown(&origView); + origView.setGeometry(origView.width() + 20, 20, + origView.width(), origView.height()); + + parentGreen->setFlag(QGraphicsItem::ItemIgnoresTransformations); + + origView.reset(); + childYellow->setOpacity(0.0); + + QTRY_COMPARE(origView.repaints, 1); + + view.show(); + + QTest::qWaitForWindowShown(&view); + view.reset(); + origView.reset(); + + childYellow->setOpacity(1.0); + + QTRY_COMPARE(origView.repaints, 1); + QTRY_COMPARE(view.repaints, 1); +} + QTEST_MAIN(tst_QGraphicsItem) #include "tst_qgraphicsitem.moc" diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp index 6743fbe..469ded0 100644 --- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp @@ -2806,14 +2806,14 @@ void tst_QGraphicsScene::contextMenuEvent_ItemIgnoresTransformations() { QPoint pos(50, 50); - QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.mapToGlobal(pos)); + QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.viewport()->mapToGlobal(pos)); event.ignore(); QApplication::sendEvent(view.viewport(), &event); QVERIFY(event.isAccepted()); } { QPoint pos(150, 150); - QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.mapToGlobal(pos)); + QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.viewport()->mapToGlobal(pos)); event.ignore(); QApplication::sendEvent(view.viewport(), &event); QVERIFY(!event.isAccepted()); @@ -2821,14 +2821,14 @@ void tst_QGraphicsScene::contextMenuEvent_ItemIgnoresTransformations() view.scale(1.5, 1.5); { QPoint pos(25, 25); - QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.mapToGlobal(pos)); + QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.viewport()->mapToGlobal(pos)); event.ignore(); QApplication::sendEvent(view.viewport(), &event); QVERIFY(event.isAccepted()); } { QPoint pos(55, 55); - QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.mapToGlobal(pos)); + QContextMenuEvent event(QContextMenuEvent::Keyboard, pos, view.viewport()->mapToGlobal(pos)); event.ignore(); QApplication::sendEvent(view.viewport(), &event); QVERIFY(!event.isAccepted()); diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index d3132fe..00bf144 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -164,6 +164,7 @@ private slots: void polishEvent(); void polishEvent2(); void initialShow(); + void initialShow2(); // Task fixes void task236127_bspTreeIndexFails(); @@ -2881,6 +2882,48 @@ void tst_QGraphicsWidget::initialShow() QCOMPARE(widget->repaints, 1); } +void tst_QGraphicsWidget::initialShow2() +{ + class MyGraphicsWidget : public QGraphicsWidget + { public: + MyGraphicsWidget() : repaints(0) {} + int repaints; + void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget*) { ++repaints; } + void polishEvent() { update(); } + }; + + // Don't let paint events triggered by the windowing system + // influence our test case. We're only interested in knowing + // whether a QGraphicsWidget generates an additional repaint + // on the inital show. Hence create a dummy scenario to find out + // how many repaints we should expect. + QGraphicsScene dummyScene(0, 0, 200, 200); + dummyScene.addItem(new QGraphicsRectItem(0, 0, 100, 100)); + + QGraphicsView *dummyView = new QGraphicsView(&dummyScene); + dummyView->setWindowFlags(Qt::X11BypassWindowManagerHint); + EventSpy paintSpy(dummyView->viewport(), QEvent::Paint); + dummyView->show(); + QTest::qWaitForWindowShown(dummyView); + const int expectedRepaintCount = paintSpy.count(); + delete dummyView; + dummyView = 0; + QTest::qWait(200); + + MyGraphicsWidget *widget = new MyGraphicsWidget; + widget->resize(100, 100); + + QGraphicsScene scene(0, 0, 200, 200); + scene.addItem(widget); + + QGraphicsView view(&scene); + view.setWindowFlags(Qt::X11BypassWindowManagerHint); + view.show(); + QTest::qWaitForWindowShown(&view); + + QCOMPARE(widget->repaints, expectedRepaintCount); +} + void tst_QGraphicsWidget::QT_BUG_6544_tabFocusFirstUnsetWhenRemovingItems() { QGraphicsScene scene; diff --git a/tests/auto/qimagereader/images/qt-gif-anim.gif b/tests/auto/qimagereader/images/qt-gif-anim.gif Binary files differnew file mode 100644 index 0000000..8bca4a8 --- /dev/null +++ b/tests/auto/qimagereader/images/qt-gif-anim.gif diff --git a/tests/auto/qimagereader/images/qt-gif-noanim.gif b/tests/auto/qimagereader/images/qt-gif-noanim.gif Binary files differnew file mode 100644 index 0000000..b6a8540 --- /dev/null +++ b/tests/auto/qimagereader/images/qt-gif-noanim.gif diff --git a/tests/auto/qimagereader/qimagereader.qrc b/tests/auto/qimagereader/qimagereader.qrc index 58f2f74..bc48244 100644 --- a/tests/auto/qimagereader/qimagereader.qrc +++ b/tests/auto/qimagereader/qimagereader.qrc @@ -1,5 +1,5 @@ <RCC> - <qresource prefix="/" > + <qresource prefix="/"> <file>images/16bpp.bmp</file> <file>images/4bpp-rle.bmp</file> <file>images/YCbCr_cmyk.jpg</file> @@ -59,5 +59,7 @@ <file>images/qt8.gif</file> <file>images/endless-anim.gif</file> <file>images/four-frames.gif</file> + <file>images/qt-gif-anim.gif</file> + <file>images/qt-gif-noanim.gif</file> </qresource> </RCC> diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index e7cfe68..99244c2 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -142,6 +142,7 @@ private slots: void gifHandlerBugs(); void animatedGif(); void gifImageCount(); + void gifLoopCount(); #endif void readCorruptImage_data(); @@ -765,6 +766,8 @@ void tst_QImageReader::gifImageCount() QVERIFY(io.canRead()); QImage greenFrame = io.read(); + QVERIFY(io.imageCount() == 4); + QVERIFY(io.canRead()); QImage blueFrame = io.read(); @@ -876,7 +879,25 @@ void tst_QImageReader::gifImageCount() QCOMPARE(blueFrame.size(), QSize(64,64)); QVERIFY(emptyFrame.isNull()); } + { + QImageReader io(":images/trolltech.gif"); + QVERIFY(io.imageCount() == 34); + QVERIFY(io.size() == QSize(128,64)); + } } + +void tst_QImageReader::gifLoopCount() +{ + { + QImageReader io(":images/qt-gif-anim.gif"); + QCOMPARE(io.loopCount(), -1); // infinite loop + } + { + QImageReader io(":images/qt-gif-noanim.gif"); + QCOMPARE(io.loopCount(), 0); // no loop + } +} + #endif class Server : public QObject @@ -1612,6 +1633,35 @@ void tst_QImageReader::autoDetectImageFormat() QVERIFY(reader.canRead()); QVERIFY(!reader.read().isNull()); } + +#ifdef QTEST_HAVE_JPEG + { + QImageReader io(prefix + "YCbCr_rgb.jpg"); + io.setAutoDetectImageFormat(false); + // This should fail since no format string is given + QImage image; + QVERIFY(!io.read(&image)); + } + { + QImageReader io(prefix + "YCbCr_rgb.jpg", "jpg"); + io.setAutoDetectImageFormat(false); + QImage image; + QVERIFY(io.read(&image)); + } +#endif + { + QImageReader io(prefix + "tst7.png"); + io.setAutoDetectImageFormat(false); + // This should fail since no format string is given + QImage image; + QVERIFY(!io.read(&image)); + } + { + QImageReader io(prefix + "tst7.png", "png"); + io.setAutoDetectImageFormat(false); + QImage image; + QVERIFY(io.read(&image)); + } } void tst_QImageReader::fileNameProbing() @@ -1641,10 +1691,16 @@ void tst_QImageReader::pixelCompareWithBaseline() { QFETCH(QString, fileName); + static int enteredCount = 0; // Used for better error diagnostics if something fails. We + static int loadFailCount = 0; // don't know if the reason load() fails is that the plugin + // does not exist or because of a bug in the plugin. But if at + // least one file succeeded we know that the plugin was built. + // The other failures are then real failures. QImage icoImg; const QString inputFileName(QString::fromAscii("images/%1").arg(fileName)); QFileInfo fi(inputFileName); + ++enteredCount; // might fail if the plugin does not exist, which is ok. if (icoImg.load(inputFileName)) { icoImg = icoImg.convertToFormat(QImage::Format_ARGB32_Premultiplied); @@ -1658,6 +1714,13 @@ void tst_QImageReader::pixelCompareWithBaseline() QCOMPARE(int(baseImg.format()), int(icoImg.format())); QCOMPARE(baseImg, icoImg); #endif + } else { + ++loadFailCount; + if (enteredCount != loadFailCount) { + QFAIL("Plugin is built, but some did not load properly"); + } else { + qWarning("loading failed, check if ico plugin is built"); + } } } diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp index 7283916..ca84b38 100644 --- a/tests/auto/qlineedit/tst_qlineedit.cpp +++ b/tests/auto/qlineedit/tst_qlineedit.cpp @@ -271,6 +271,7 @@ private slots: void taskQTBUG_4401_enterKeyClearsPassword(); void taskQTBUG_4679_moveToStartEndOfBlock(); void taskQTBUG_4679_selectToStartEndOfBlock(); + void taskQTBUG_7395_readOnlyShortcut(); protected slots: #ifdef QT3_SUPPORT @@ -3454,10 +3455,8 @@ void tst_QLineEdit::task210502_caseInsensitiveInlineCompletion() completer.setCompletionMode(QCompleter::InlineCompletion); lineEdit.setCompleter(&completer); lineEdit.show(); -#ifdef Q_WS_X11 - // to be safe and avoid failing setFocus with window managers - qt_x11_wait_for_window_manager(&lineEdit); -#endif + QTest::qWaitForWindowShown(&lineEdit); + QApplication::setActiveWindow(&lineEdit); lineEdit.setFocus(); QTRY_VERIFY(lineEdit.hasFocus()); QTest::keyPress(&lineEdit, 'a'); @@ -3638,5 +3637,26 @@ void tst_QLineEdit::taskQTBUG_4679_selectToStartEndOfBlock() #endif // Q_OS_MAC } +void tst_QLineEdit::taskQTBUG_7395_readOnlyShortcut() +{ + //ReadOnly QLineEdit should not intercept shortcut. + QLineEdit le; + le.setReadOnly(true); + + QAction action(QString::fromLatin1("hello"), &le); + action.setShortcut(QString::fromLatin1("p")); + QSignalSpy spy(&action, SIGNAL(triggered())); + le.addAction(&action); + + le.show(); + QTest::qWaitForWindowShown(&le); + QApplication::setActiveWindow(&le); + le.setFocus(); + QTRY_VERIFY(le.hasFocus()); + + QTest::keyClick(0, Qt::Key_P); + QCOMPARE(spy.count(), 1); +} + QTEST_MAIN(tst_QLineEdit) #include "tst_qlineedit.moc" diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp index 7109213..d2181f8 100644 --- a/tests/auto/qlistview/tst_qlistview.cpp +++ b/tests/auto/qlistview/tst_qlistview.cpp @@ -606,9 +606,8 @@ void tst_QListView::indexAt() view2.setWrapping(true); // We really want to make sure it is shown, because the layout won't be known until it is shown view2.show(); - for (int i = 0; i < 5 && !view2.m_shown; ++i) { - QTest::qWait(500); - } + QTest::qWaitForWindowShown(&view2); + QTRY_VERIFY(view2.m_shown); QVERIFY(view2.m_index.isValid()); QVERIFY(view2.m_index.row() != 0); @@ -760,7 +759,8 @@ void tst_QListView::hideFirstRow() view.setUniformItemSizes(true); view.setRowHidden(0,true); view.show(); - QTest::qWait(100); + QTest::qWaitForWindowShown(&view); + QTest::qWait(10); } void tst_QListView::batchedMode() @@ -778,10 +778,10 @@ void tst_QListView::batchedMode() view.setBatchSize(2); view.resize(200,400); view.show(); - -#if !defined(Q_OS_WINCE) + QTest::qWaitForWindowShown(&view); QTest::qWait(100); -#else + +#if defined(Q_OS_WINCE) QTest::qWait(2000); #endif QBitArray ba; @@ -1203,9 +1203,9 @@ void tst_QListView::scrollTo() //we click the item QPoint p = lv.visualRect(index).center(); QTest::mouseClick(lv.viewport(), Qt::LeftButton, Qt::NoModifier, p); - //let's wait 1 second because the scrolling is delayed - QTest::qWait(1000); - QCOMPARE(lv.visualRect(index).y(),0); + //let's wait because the scrolling is delayed + QTest::qWait(QApplication::doubleClickInterval() + 150); + QTRY_COMPARE(lv.visualRect(index).y(),0); //we scroll down. As the item is to tall for the view, it will disappear QTest::keyClick(lv.viewport(), Qt::Key_Down, Qt::NoModifier); @@ -1222,9 +1222,9 @@ void tst_QListView::scrollTo() //we click the item p = lv.visualRect(index).center(); QTest::mouseClick(lv.viewport(), Qt::LeftButton, Qt::NoModifier, p); - //let's wait 1 second because the scrolling is delayed - QTest::qWait(1000); - QCOMPARE(lv.visualRect(index).x(),0); + //let's wait because the scrolling is delayed + QTest::qWait(QApplication::doubleClickInterval() + 150); + QTRY_COMPARE(lv.visualRect(index).x(),0); //we scroll right. As the item is too wide for the view, it will disappear QTest::keyClick(lv.viewport(), Qt::Key_Right, Qt::NoModifier); @@ -1243,9 +1243,9 @@ void tst_QListView::scrollTo() //we click the item p = lv.visualRect(index).center(); QTest::mouseClick(lv.viewport(), Qt::LeftButton, Qt::NoModifier, p); - //let's wait 1 second because the scrolling is delayed - QTest::qWait(1000); - QCOMPARE(lv.visualRect(index).y(),0); + //let's wait because the scrolling is delayed + QTest::qWait(QApplication::doubleClickInterval() + 150); + QTRY_COMPARE(lv.visualRect(index).y(),0); //we scroll down. As the item is too tall for the view, it will partially disappear QTest::keyClick(lv.viewport(), Qt::Key_Down, Qt::NoModifier); @@ -1277,7 +1277,7 @@ void tst_QListView::scrollBarRanges() for (int h = 30; h <= 210; ++h) { lv.resize(250, h); - QTest::qWait(100); // wait for the layout to be done + QApplication::processEvents(); // wait for the layout to be done int visibleRowCount = lv.viewport()->size().height() / rowHeight; int invisibleRowCount = rowCount - visibleRowCount; QCOMPARE(lv.verticalScrollBar()->maximum(), invisibleRowCount); @@ -1366,7 +1366,7 @@ void tst_QListView::scrollBarAsNeeded() model.setStringList(list); QApplication::processEvents(); - QTest::qWait(100); + QTest::qWait(50); QStringList replacement; for (i = 0; i < itemCount; ++i) { @@ -1375,10 +1375,9 @@ void tst_QListView::scrollBarAsNeeded() model.setStringList(replacement); QApplication::processEvents(); - QTest::qWait(100); - QCOMPARE(lv.horizontalScrollBar()->isVisible(), horizontalScrollBarVisible); - QCOMPARE(lv.verticalScrollBar()->isVisible(), verticalScrollBarVisible); + QTRY_COMPARE(lv.horizontalScrollBar()->isVisible(), horizontalScrollBarVisible); + QTRY_COMPARE(lv.verticalScrollBar()->isVisible(), verticalScrollBarVisible); } } @@ -1433,10 +1432,9 @@ void tst_QListView::wordWrap() lv.setFixedSize(150, 150); lv.show(); QApplication::processEvents(); - QTest::qWait(100); - QCOMPARE(lv.horizontalScrollBar()->isVisible(), false); - QCOMPARE(lv.verticalScrollBar()->isVisible(), true); + QTRY_COMPARE(lv.horizontalScrollBar()->isVisible(), false); + QTRY_COMPARE(lv.verticalScrollBar()->isVisible(), true); } #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) @@ -1557,7 +1555,8 @@ void tst_QListView::task248430_crashWith0SizedItem() QStringListModel model(QStringList() << QLatin1String("item1") << QString()); view.setModel(&model); view.show(); - QTest::qWait(100); + QTest::qWaitForWindowShown(&view); + QTest::qWait(20); } void tst_QListView::task250446_scrollChanged() @@ -1569,21 +1568,21 @@ void tst_QListView::task250446_scrollChanged() QVERIFY(index.isValid()); view.setCurrentIndex(index); view.show(); - QTest::qWait(100); + QTest::qWaitForWindowShown(&view); const int scrollValue = view.verticalScrollBar()->maximum(); view.verticalScrollBar()->setValue(scrollValue); QCOMPARE(view.verticalScrollBar()->value(), scrollValue); QCOMPARE(view.currentIndex(), index); view.showMinimized(); - QTest::qWait(100); - QCOMPARE(view.verticalScrollBar()->value(), scrollValue); - QCOMPARE(view.currentIndex(), index); + QTest::qWait(50); + QTRY_COMPARE(view.verticalScrollBar()->value(), scrollValue); + QTRY_COMPARE(view.currentIndex(), index); view.showNormal(); - QTest::qWait(100); - QCOMPARE(view.verticalScrollBar()->value(), scrollValue); - QCOMPARE(view.currentIndex(), index); + QTest::qWait(50); + QTRY_COMPARE(view.verticalScrollBar()->value(), scrollValue); + QTRY_COMPARE(view.currentIndex(), index); } void tst_QListView::task196118_visualRegionForSelection() @@ -1699,7 +1698,7 @@ void tst_QListView::shiftSelectionWithNonUniformItemSizes() view.setViewMode(QListView::IconMode); view.setModel(&model); view.show(); - QTest::qWait(30); + QTest::qWaitForWindowShown(&view); // Verfify that item sizes are non-uniform QVERIFY(view.sizeHintForIndex(model.index(0, 0)).height() > view.sizeHintForIndex(model.index(1, 0)).height()); @@ -1729,7 +1728,7 @@ void tst_QListView::shiftSelectionWithNonUniformItemSizes() view.setViewMode(QListView::IconMode); view.setModel(&model); view.show(); - QTest::qWait(30); + QTest::qWaitForWindowShown(&view); // Verfify that item sizes are non-uniform QVERIFY(view.sizeHintForIndex(model.index(0, 0)).width() > view.sizeHintForIndex(model.index(1, 0)).width()); @@ -1789,7 +1788,6 @@ void tst_QListView::task262152_setModelColumnNavigate() view.show(); QApplication::setActiveWindow(&view); QTest::qWaitForWindowShown(&view); - QTest::qWait(30); QTRY_COMPARE(static_cast<QWidget *>(&view), QApplication::activeWindow()); QTest::keyClick(&view, Qt::Key_Down); QTest::qWait(30); @@ -1834,6 +1832,24 @@ void tst_QListView::taskQTBUG_2233_scrollHiddenItems() QVERIFY(index.isValid()); QCOMPARE(index.row(), 2 * i + 1); } + + //QTBUG-7929 should not crash + view.show(); + QTest::qWaitForWindowShown(&view); + QScrollBar *bar = view.flow() == QListView::TopToBottom + ? view.verticalScrollBar() : view.horizontalScrollBar(); + + int nbVisibleItem = rowCount / 2 - bar->maximum(); + + bar->setValue(bar->maximum()); + QApplication::processEvents(); + for (int i = rowCount; i > rowCount / 2; i--) { + view.setRowHidden(i, true); + } + QApplication::processEvents(); + QTest::qWait(50); + QCOMPARE(bar->value(), bar->maximum()); + QCOMPARE(bar->maximum(), rowCount/4 - nbVisibleItem); } void tst_QListView::taskQTBUG_633_changeModelData() diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp index 8bcd5e8..d7c6ad3 100644 --- a/tests/auto/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/qpixmap/tst_qpixmap.cpp @@ -145,9 +145,11 @@ private slots: void fromWinHICON(); #endif -#if defined(Q_WS_S60) +#if defined(Q_OS_SYMBIAN) void fromSymbianCFbsBitmap_data(); void fromSymbianCFbsBitmap(); + void toSymbianCFbsBitmap_data(); + void toSymbianCFbsBitmap(); #endif void onlyNullPixmapsOutsideGuiThread(); @@ -1110,7 +1112,7 @@ void tst_QPixmap::fromWinHICON() #endif // Q_WS_WIN -#if defined(Q_WS_S60) +#if defined(Q_OS_SYMBIAN) Q_DECLARE_METATYPE(TDisplayMode) void tst_QPixmap::fromSymbianCFbsBitmap_data() @@ -1206,6 +1208,45 @@ void tst_QPixmap::fromSymbianCFbsBitmap() CleanupStack::PopAndDestroy(3); } + +void tst_QPixmap::toSymbianCFbsBitmap_data() +{ + QTest::addColumn<int>("red"); + QTest::addColumn<int>("green"); + QTest::addColumn<int>("blue"); + + QTest::newRow("red") << 255 << 0 << 0; + QTest::newRow("green") << 0 << 255 << 0; + QTest::newRow("blue") << 0 << 0 << 255; +} + +void tst_QPixmap::toSymbianCFbsBitmap() +{ + QFETCH(int, red); + QFETCH(int, green); + QFETCH(int, blue); + + QPixmap pm(100, 100); + pm.fill(QColor(red, green, blue)); + + CFbsBitmap *bitmap = pm.toSymbianCFbsBitmap(); + + QVERIFY(bitmap != 0); + + // Verify size + QCOMPARE(100, (int) bitmap->SizeInPixels().iWidth); + QCOMPARE(100, (int) bitmap->SizeInPixels().iHeight); + + // Verify pixel color + TRgb pixel; + bitmap->GetPixel(pixel, TPoint(0,0)); + QCOMPARE((int)pixel.Red(), red); + QCOMPARE((int)pixel.Green(), green); + QCOMPARE((int)pixel.Blue(), blue); + + // Clean up + delete bitmap; +} #endif void tst_QPixmap::onlyNullPixmapsOutsideGuiThread() diff --git a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp index 8e26696..ac9ca46 100644 --- a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp +++ b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp @@ -832,6 +832,7 @@ void tst_QScriptEngineAgent::functionEntryAndExit_builtin_data() /** check behaiviour of built-in function */ void tst_QScriptEngineAgent::functionEntryAndExit_builtin() { + QSKIP("The test fails on platforms others than Linux. The issue will be fixed with next JSC update", SkipAll); QFETCH(QString, script); QFETCH(QString, result); QScriptEngine eng; diff --git a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp index b2a85d7..41df98c 100644 --- a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp +++ b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp @@ -683,8 +683,72 @@ tst_Suite::tst_Suite() addExpectedFailure("ecma_3/String/15.5.4.11.js", "Section 7", willFixInNextReleaseMessage); addExpectedFailure("ecma_3/String/15.5.4.11.js", "Section 26", willFixInNextReleaseMessage); +#ifndef Q_CC_MINGW addExpectedFailure("ecma/Expressions/11.4.7-02.js", "-(-2147483648) == 2147483648", willFixInNextReleaseMessage); addExpectedFailure("ecma/TypeConversion/9.3.1-3.js", "- -\"0x80000000\"", willFixInNextReleaseMessage); +#endif + +#ifdef Q_OS_WIN + addExpectedFailure("ecma_3/Expressions/11.7.3-01.js", "11.7.3 - >>> should evaluate operands in order: order", "QTBUG-8056"); + addExpectedFailure("ecma_3/Operators/order-01.js", "operator evaluation order: 11.7.3 >>>", "QTBUG-8056"); + addExpectedFailure("ecma_3/Operators/order-01.js", "operator evaluation order: 11.13.2 >>>=", "QTBUG-8056"); +#endif + +#ifdef Q_CC_MINGW + addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(NaN,0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(NaN,-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(Infinity, Infinity)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(Infinity, -Infinity)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(-Infinity, Infinity)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(-Infinity, -Infinity)", willFixInNextReleaseMessage); +#endif + +#ifdef Q_OS_SOLARIS + addExpectedFailure("ecma/Expressions/11.13.2-2.js", "VAR1 = -0; VAR2= Infinity; VAR2 /= VAR1", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Expressions/11.13.2-2.js", "VAR1 = -0; VAR2= -Infinity; VAR2 /= VAR1", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Expressions/11.13.2-2.js", "VAR1 = 1; VAR2= -0; VAR1 /= VAR2", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Expressions/11.13.2-2.js", "VAR1 = -1; VAR2= -0; VAR1 /= VAR2", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Expressions/11.5.2.js", "Number.POSITIVE_INFINITY / -0", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Expressions/11.5.2.js", "Number.NEGATIVE_INFINITY / -0", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Expressions/11.5.2.js", "1 / -0", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Expressions/11.5.2.js", "-1 / -0", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.10.js", "Math.log(-0.0000001)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.10.js", "Math.log(-1)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.11.js", "Infinity/Math.max(-0,-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.12.js", "Infinity/Math.min(0,-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.12.js", "Infinity/Math.min(-0,-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(NaN,0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(NaN,-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.13.js", "Infinity/Math.pow(-Infinity, -1)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(0, -1)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(0, -0.5)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(0, -1000)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.13.js", "Infinity/Math.pow(-0, 1)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.13.js", "Infinity/Math.pow(-0, 3)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(-0, -2)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.15.js", "Infinity/Math.round(-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.15.js", "Infinity/Math.round(-0.49)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.15.js", "Infinity/Math.round(-0.5)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.17.js", "Infinity/Math.sqrt(-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.18.js", "Infinity/Math.tan(-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.2.js", "Math.acos(1.00000001)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.2.js", "Math.acos(11.00000001)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.3.js", "Math.asin(1.000001)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.3.js", "Math.asin(-1.000001)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.3.js", "Infinity/Math.asin(-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.4.js", "Infinity/Math.atan(-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(0, -0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.5.js", "Infinity/Math.atan2(-0, 1)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(-0,\t-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(-0,\t-1)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.6.js", "Infinity/Math.ceil('-0')", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.6.js", "Infinity/Math.ceil(-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.6.js", "Infinity/Math.ceil(-Number.MIN_VALUE)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.6.js", "Infinity/Math.ceil(-0.9)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/Math/15.8.2.9.js", "Infinity/Math.floor(-0)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/TypeConversion/9.3.1-3.js", "var z = 0; print(1/-z)", willFixInNextReleaseMessage); + addExpectedFailure("ecma/TypeConversion/9.3.1-3.js", "1/-1e-2000", willFixInNextReleaseMessage); +#endif static const char klass[] = "tst_QScriptJsTestSuite"; diff --git a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp index 147896e..a3dfd6c 100644 --- a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp +++ b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp @@ -236,6 +236,16 @@ tst_Suite::tst_Suite() addExpectedFailure("global-const-var-conflicts", "false", "true", willFixInNextReleaseMessage); addExpectedFailure("string-lastindexof", "0", "-1", "test is wrong?"); +#ifndef Q_OS_LINUX + addExpectedFailure("to-precision", "1.235e+27", "1.234e+27", "QTBUG-8053: toPrecision(4) gives wrong result on Mac"); +#endif + +#ifdef Q_OS_SOLARIS + addExpectedFailure("math-min-max", "Infinity", "-Infinity", willFixInNextReleaseMessage); + addExpectedFailure("negate-zero", "false", "true", willFixInNextReleaseMessage); + addExpectedFailure("str-to-num", "Infinity", "-Infinity", willFixInNextReleaseMessage); +#endif + addTestExclusion("debug-*", "not applicable"); addTestExclusion("mirror-*", "not applicable"); @@ -245,6 +255,10 @@ tst_Suite::tst_Suite() addTestExclusion("string-case", "V8-specific behavior? (Doesn't pass on SpiderMonkey either)"); +#ifdef Q_CC_MINGW + addTestExclusion("date$", "QTBUG-7698: Date.prototype.setMonth() crashes on win32-g++"); +#endif + #ifdef Q_OS_WINCE addTestExclusion("deep-recursion", "Demands too much memory on WinCE"); addTestExclusion("nested-repetition-count-overflow", "Demands too much memory on WinCE"); diff --git a/tests/auto/qscriptvalue/qscriptvalue.pro b/tests/auto/qscriptvalue/qscriptvalue.pro index 9efde80..1588cc5 100644 --- a/tests/auto/qscriptvalue/qscriptvalue.pro +++ b/tests/auto/qscriptvalue/qscriptvalue.pro @@ -1,5 +1,7 @@ load(qttest_p4) QT = core gui script SOURCES += tst_qscriptvalue.cpp +HEADERS += tst_qscriptvalue.h - +# Generated by testgen +SOURCES += tst_qscriptvalue_generated.cpp diff --git a/tests/auto/qscriptvalue/testgen/data.txt b/tests/auto/qscriptvalue/testgen/data.txt new file mode 100644 index 0000000..a041c9b --- /dev/null +++ b/tests/auto/qscriptvalue/testgen/data.txt @@ -0,0 +1,120 @@ +# Data set for QScriptValue autotest. + +# Each line is a c++ code that should return a QScriptValue object. +# Lines that are empty or start with '#' will be ignored + +QScriptValue() + +#Unbound values +QScriptValue(QScriptValue::UndefinedValue) +QScriptValue(QScriptValue::NullValue) +QScriptValue(true) +QScriptValue(false) +QScriptValue(int(122)) +QScriptValue(uint(124)) +QScriptValue(0) +QScriptValue(0.0) +QScriptValue(123.0) +QScriptValue(6.37e-8) +QScriptValue(-6.37e-8) +QScriptValue(0x43211234) +QScriptValue(0x10000) +QScriptValue(0x10001) +QScriptValue(qSNaN()) +QScriptValue(qQNaN()) +QScriptValue(qInf()) +QScriptValue(-qInf()) +QScriptValue("NaN") +QScriptValue("Infinity") +QScriptValue("-Infinity") +QScriptValue("ciao") +QScriptValue(QString::fromLatin1("ciao")) +QScriptValue(QString("")) +QScriptValue(QString()) +QScriptValue(QString("0")) +QScriptValue(QString("123")) +QScriptValue(QString("12.4")) + +#Unbound values (bound to a null engine) +QScriptValue(0, QScriptValue::UndefinedValue) +QScriptValue(0, QScriptValue::NullValue) +QScriptValue(0, true) +QScriptValue(0, false) +QScriptValue(0, int(122)) +QScriptValue(0, uint(124)) +QScriptValue(0, 0) +QScriptValue(0, 0.0) +QScriptValue(0, 123.0) +QScriptValue(0, 6.37e-8) +QScriptValue(0, -6.37e-8) +QScriptValue(0, 0x43211234) +QScriptValue(0, 0x10000) +QScriptValue(0, 0x10001) +QScriptValue(0, qSNaN()) +QScriptValue(0, qQNaN()) +QScriptValue(0, qInf()) +QScriptValue(0, -qInf()) +QScriptValue(0, "NaN") +QScriptValue(0, "Infinity") +QScriptValue(0, "-Infinity") +QScriptValue(0, "ciao") +QScriptValue(0, QString::fromLatin1("ciao")) +QScriptValue(0, QString("")) +QScriptValue(0, QString()) +QScriptValue(0, QString("0")) +QScriptValue(0, QString("123")) +QScriptValue(0, QString("12.3")) + +#Bound values +QScriptValue(engine, QScriptValue::UndefinedValue) +QScriptValue(engine, QScriptValue::NullValue) +QScriptValue(engine, true) +QScriptValue(engine, false) +QScriptValue(engine, int(122)) +QScriptValue(engine, uint(124)) +QScriptValue(engine, 0) +QScriptValue(engine, 0.0) +QScriptValue(engine, 123.0) +QScriptValue(engine, 6.37e-8) +QScriptValue(engine, -6.37e-8) +QScriptValue(engine, 0x43211234) +QScriptValue(engine, 0x10000) +QScriptValue(engine, 0x10001) +QScriptValue(engine, qSNaN()) +QScriptValue(engine, qQNaN()) +QScriptValue(engine, qInf()) +QScriptValue(engine, -qInf()) +QScriptValue(engine, "NaN") +QScriptValue(engine, "Infinity") +QScriptValue(engine, "-Infinity") +QScriptValue(engine, "ciao") +QScriptValue(engine, QString::fromLatin1("ciao")) +QScriptValue(engine, QString("")) +QScriptValue(engine, QString()) +QScriptValue(engine, QString("0")) +QScriptValue(engine, QString("123")) +QScriptValue(engine, QString("1.23")) + +# evaluate +engine->evaluate("[]") +engine->evaluate("{}") +engine->evaluate("Object.prototype") +engine->evaluate("Date.prototype") +engine->evaluate("Array.prototype") +engine->evaluate("Function.prototype") +engine->evaluate("Error.prototype") +engine->evaluate("Object") +engine->evaluate("Array") +engine->evaluate("Number") +engine->evaluate("Function") +engine->evaluate("(function() { return 1; })") +engine->evaluate("(function() { return 'ciao'; })") +engine->evaluate("(function() { throw new Error('foo'); })") +engine->evaluate("/foo/") +engine->evaluate("new Object()") +engine->evaluate("new Array()") +engine->evaluate("new Error()") + +#other +engine->nullValue() +engine->undefinedValue()
\ No newline at end of file diff --git a/tests/auto/qscriptvalue/testgen/gen.py b/tests/auto/qscriptvalue/testgen/gen.py new file mode 100755 index 0000000..b3c81b9 --- /dev/null +++ b/tests/auto/qscriptvalue/testgen/gen.py @@ -0,0 +1,242 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +#Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + +## $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$ + +from __future__ import with_statement +from string import Template + +class Options(): + """Option manager. It parse and check all paramteres, set internal variables.""" + def __init__(self, args): + import logging as log + log.basicConfig() + #comand line options parser + from optparse import OptionParser + #load some directory searching stuff + import os.path, sys + + opt = OptionParser("%prog [options] path_to_input_file path_to_output_file.") + + self._o, self._a = opt.parse_args(args) + + try: + if not (os.path.exists(self._a[0])): + raise Exception("Path doesn't exist") + if len(self._a) != 2: + raise IndexError("Only two files!") + self._o.ipath = self._a[0] + self._o.opath = self._a[1] + except IndexError: + log.error("Bad usage. Please try -h or --help") + sys.exit(1) + except Exception: + log.error("Path '" + self._a[0] + " or " + self._a[1] + "' don't exist") + sys.exit(2) + + def __getattr__(self, attr): + """map all options properties into this object (remove one level of indirection)""" + return getattr(self._o, attr) + + +mainTempl = Template("""/* +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ + +//////////////////////////////////////////////////////////////// +// THIS FILE IS AUTOGENERATED, ALL MODIFICATIONS WILL BE LAST // +//////////////////////////////////////////////////////////////// + +#include "testgenerator.h" + +#include <QtCore/qdatastream.h> +#include <QtCore/qdatetime.h> +#include <QtCore/qdebug.h> +#include <QtCore/qfile.h> +#include <QtCore/qnumeric.h> +#include <QtCore/qvariant.h> +#include <QtCore/qvector.h> +#include <QtScript/qscriptvalue.h> +#include <QtScript/qscriptengine.h> + + + +typedef bool (QScriptValue::*ComparisionType) (const QScriptValue&) const; +static QVector<bool> compare(ComparisionType compare, QScriptValue value, const QScriptValueList& values) { + QVector<bool> result; + result.reserve(${count}); + + QScriptValueList::const_iterator i = values.constBegin(); + for (; i != values.constEnd(); ++i) { + result << (value.*compare)(*i); + } + return result; +} + +static void dump(QDataStream& out, QScriptValue& value, const QString& expression, const QScriptValueList& allValues) +{ + out << QString(expression); + + out << value.isValid(); + out << value.isBool(); + out << value.isBoolean(); + out << value.isNumber(); + out << value.isFunction(); + out << value.isNull(); + out << value.isString(); + out << value.isUndefined(); + out << value.isVariant(); + out << value.isQObject(); + out << value.isQMetaObject(); + out << value.isObject(); + out << value.isDate(); + out << value.isRegExp(); + out << value.isArray(); + out << value.isError(); + + out << value.toString(); + out << value.toNumber(); + out << value.toBool(); + out << value.toBoolean(); + out << value.toInteger(); + out << value.toInt32(); + out << value.toUInt32(); + out << value.toUInt16(); + + out << compare(&QScriptValue::equals, value, allValues); + out << compare(&QScriptValue::strictlyEquals, value, allValues); + out << compare(&QScriptValue::lessThan, value, allValues); + out << compare(&QScriptValue::instanceOf, value, allValues); + + out << qscriptvalue_cast<QString>(value); + out << qscriptvalue_cast<qsreal>(value); + out << qscriptvalue_cast<bool>(value); + out << qscriptvalue_cast<qint32>(value); + out << qscriptvalue_cast<quint32>(value); + out << qscriptvalue_cast<quint16>(value); +} + +void TestGenerator::prepareData() +{ + QScriptEngine* engine = new QScriptEngine; + + QScriptValueList allValues; + allValues << ${values}; + QVector<QString> allDataTags; + allDataTags.reserve(${count}); + allDataTags << ${dataTags}; + QDataStream out(&m_tempFile); + out << allDataTags; + + for(unsigned i = 0; i < ${count}; ++i) + dump(out, allValues[i], allDataTags[i], allValues); + + delete engine; +} +""") +qsvTempl = Template(""" + { + QScriptValue value = ${expr}; + dump(out, value, "${expr_esc}", allValues); + }""") + + + +if __name__ == '__main__': + import sys + o = Options(sys.argv[1:]) + out = [] + qsv = [] + # load input file + with open(o.ipath) as f: + for row in f.readlines(): + qsv.append(row) + + #skip comments and empty lines + qsv = filter(lambda w: len(w.strip()) and not w.startswith('#'), qsv) + + escape = lambda w: w.replace('\\','\\\\').replace('"','\\"') + + for row in qsv: + row = row.replace('\n','') + row_esc = escape(row) + out.append(qsvTempl.substitute(expr = row, expr_esc = row_esc)) + + result = mainTempl.safe_substitute(dump= "".join(out) \ + , values = (11 * ' ' + '<< ').join(qsv) \ + , count = len(qsv) \ + , dataTags = (11 * ' ' + '<< ').join(map(lambda w: '"' + escape(w.replace('\n','')) + '"\n', qsv))) + + with open(o.opath, 'w') as f: + f.write(result) + + diff --git a/tests/auto/qscriptvalue/testgen/main.cpp b/tests/auto/qscriptvalue/testgen/main.cpp new file mode 100644 index 0000000..fe35de9 --- /dev/null +++ b/tests/auto/qscriptvalue/testgen/main.cpp @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ + +#include "testgenerator.h" +#include <QtCore/qdebug.h> +#include <QtCore/qfile.h> +#include <QtCore/qstringlist.h> +#include <QtCore/QCoreApplication> + +int main(int argc, char *argv[]) +{ + QCoreApplication a(argc, argv); + + if (argc != 2) { + qWarning() << "./prog outputfile"; + exit(1); + } + + //Procced + TestGenerator gen(a.arguments()[1]); + gen.run(); + + return 0; +} diff --git a/tests/auto/qscriptvalue/testgen/testgen.pro b/tests/auto/qscriptvalue/testgen/testgen.pro new file mode 100644 index 0000000..47709a8 --- /dev/null +++ b/tests/auto/qscriptvalue/testgen/testgen.pro @@ -0,0 +1,18 @@ +QT += core script +TARGET = testgen +CONFIG += console +CONFIG -= app_bundle +TEMPLATE = app + +SOURCES += main.cpp \ + testgenerator.cpp +HEADERS += testgenerator.h + + +INPUT_DATASET = data.txt +dataset.name = Generating QScraiptValue autotest's dataset +dataset.output = autogenerated.cpp +dataset.commands = python gen.py data.txt autogenerated.cpp +dataset.input = INPUT_DATASET +dataset.variable_out = SOURCES +QMAKE_EXTRA_COMPILERS += dataset diff --git a/tests/auto/qscriptvalue/testgen/testgenerator.cpp b/tests/auto/qscriptvalue/testgen/testgenerator.cpp new file mode 100644 index 0000000..d852ea5 --- /dev/null +++ b/tests/auto/qscriptvalue/testgen/testgenerator.cpp @@ -0,0 +1,688 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ + +#include "testgenerator.h" + +#include <QtCore/qdatastream.h> +#include <QtCore/qdatetime.h> +#include <QtCore/qdebug.h> +#include <QtCore/qnumeric.h> +#include <QtCore/qstringlist.h> +#include <QtCore/qtextstream.h> +#include <QtCore/qvariant.h> +#include <QtScript/qscriptvalue.h> + +void TestGenerator::save(const QString& data) +{ + QTextStream out(&m_ofile); + out << data; +} + +static QString escape(QString txt) +{ + return txt.replace("\\","\\\\").replace("\"","\\\"").replace("\n","\\n"); +} + +template<typename T> +QString prepareToInsert(T value) {return QString::fromAscii("\"") + escape(value) + "\"";} +template<> +QString prepareToInsert<qsreal>(qsreal value) +{ + if (qIsNaN(value)) + return "qQNaN()"; + if (qIsInf(value)) + return "qInf()"; + return QString::number(value, 'g', 16); +} +template<> +QString prepareToInsert<qint32>(qint32 value) {return QString::number(value);} +template<> +QString prepareToInsert<quint32>(quint32 value) {return QString::number(value);} +template<> +QString prepareToInsert<quint16>(quint16 value) {return QString::number(value);} +template<> +QString prepareToInsert<bool>(bool value) {return value ? "true" : "false";} +template<> +QString prepareToInsert<QString>(QString value) {return QString::fromAscii("\"") + escape(value) + "\"";} + +template<typename T> +QString typeName() {return QString();} +template<> +QString typeName<qsreal>() {return "qsreal";} +template<> +QString typeName<qint32>() {return "qint32";} +template<> +QString typeName<quint32>() {return "quint32";} +template<> +QString typeName<quint16>() {return "quint16";} +template<> +QString typeName<bool>() {return "bool";} +template<> +QString typeName<QString>() {return "QString";} + +static QString generateIsXXXDef(const QString& name, const QList<QString>& list) +{ + static const QString templ("void tst_QScriptValue::%1_initData()\n"\ + "{\n"\ + " QTest::addColumn<bool>(\"expected\");\n"\ + " initScriptValues();\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::%1_makeData(const char* expr)\n"\ + "{\n"\ + " static QSet<QString> %1;\n"\ + " if (%1.isEmpty()) {\n"\ + " %1%2\n"\ + " }\n"\ + " newRow(expr) << %1.contains(expr);\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::%1_test(const char*, const QScriptValue& value)\n"\ + "{\n"\ + " QFETCH(bool, expected);\n"\ + " QCOMPARE(value.%1(), expected);\n"\ + "}\n"\ + "\n"\ + "DEFINE_TEST_FUNCTION(%1)\n"\ + "\n"); + + if (!list.size()) { + qWarning() << name << ": nothing to add!" ; + return QString(); + } + + QString result = templ; + QStringList set; + foreach(QString t, list) { + t = escape(t); + t.append('\"'); + t.prepend('\"'); + set.append(QString(" << ")); + set.append(t); + set.append("\n "); + } + set.append(";"); + return result.arg(name, set.join(QString())); +} + +template<typename T> +static QString generateToXXXDef(const QString& name, const QList<QPair<QString, T> >& list) +{ + static const QString templ = "\n"\ + "void tst_QScriptValue::%1_initData()\n"\ + "{\n"\ + " QTest::addColumn<%2>(\"expected\");\n"\ + " initScriptValues();\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::%1_makeData(const char* expr)\n"\ + "{\n"\ + " static QHash<QString, %2> %1;\n"\ + " if (%1.isEmpty()) {\n"\ + "%3"\ + " }\n"\ + " newRow(expr) << %1.value(expr);\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::%1_test(const char*, const QScriptValue& value)\n"\ + "{\n"\ + " QFETCH(%2, expected);\n"\ + " QCOMPARE(value.%1(), expected);\n"\ + "}\n"\ + "\n"\ + "DEFINE_TEST_FUNCTION(%1)\n"; + QString result = templ; + + typename QList<QPair<QString, T> >::const_iterator i = list.constBegin(); + QStringList set; + for(; i != list.constEnd(); ++i) { + QPair<QString, T> t = *i; + t.first = escape(t.first); + set.append(QString(" ")); + set.append(name); + set.append(".insert(\""); + set.append(t.first); + set.append(QString::fromAscii("\", ")); + set.append(prepareToInsert<T>(t.second)); + set.append(QString::fromAscii(");\n")); + } + return result.arg(name, typeName<T>(), set.join(QString())); +} + + +template<> +QString generateToXXXDef<qsreal>(const QString& name, const QList<QPair<QString, qsreal> >& list) +{ + static const QString templ = "\n"\ + "void tst_QScriptValue::%1_initData()\n"\ + "{\n"\ + " QTest::addColumn<%2>(\"expected\");\n"\ + " initScriptValues();\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::%1_makeData(const char* expr)\n"\ + "{\n"\ + " static QHash<QString, %2> %1;\n"\ + " if (%1.isEmpty()) {\n"\ + "%3"\ + " }\n"\ + " newRow(expr) << %1.value(expr);\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::%1_test(const char*, const QScriptValue& value)\n"\ + "{\n"\ + " QFETCH(%2, expected);\n"\ + "%666" + " if (qIsInf(expected)) {\n"\ + " QVERIFY(qIsInf(value.%1()));\n"\ + " return;\n"\ + " }\n"\ + " QCOMPARE(value.%1(), expected);\n"\ + "}\n"\ + "\n"\ + "DEFINE_TEST_FUNCTION(%1)\n"; + QString result = templ; + + QList<QPair<QString, qsreal> >::const_iterator i = list.constBegin(); + QStringList set; + for(; i != list.constEnd(); ++i) { + QPair<QString, qsreal> t = *i; + t.first = escape(t.first); + set.append(QString(" ")); + set.append(name); + set.append(".insert(\""); + set.append(t.first); + set.append(QString::fromAscii("\", ")); + set.append(prepareToInsert<qsreal>(t.second)); + set.append(QString::fromAscii(");\n")); + } + // toInteger shouldn't return NaN, so it would be nice to catch the case. + QString hook; + if (name == "toNumber") { + hook = + " if (qIsNaN(expected)) {\n"\ + " QVERIFY(qIsNaN(value.toNumber()));\n"\ + " return;\n"\ + " }\n"; + } + return result.arg(name, typeName<qsreal>(), set.join(QString()), hook); +} + +template<typename T> +static QString generateCastDef(const QList<QPair<QString, T> >& list) +{ + static const QString templ = "\n"\ + "void tst_QScriptValue::qscriptvalue_cast%2_initData()\n"\ + "{\n"\ + " QTest::addColumn<%2>(\"expected\");\n"\ + " initScriptValues();\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::qscriptvalue_cast%2_makeData(const char* expr)\n"\ + "{\n"\ + " static QHash<QString, %2> value;\n"\ + " if (value.isEmpty()) {\n"\ + "%3"\ + " }\n"\ + " newRow(expr) << value.value(expr);\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::qscriptvalue_cast%2_test(const char*, const QScriptValue& value)\n"\ + "{\n"\ + " QFETCH(%2, expected);\n"\ + " QCOMPARE(qscriptvalue_cast<%2>(value), expected);\n"\ + "}\n"\ + "\n"\ + "DEFINE_TEST_FUNCTION(qscriptvalue_cast%2)\n"; + QString result = templ; + + typename QList<QPair<QString, T> >::const_iterator i = list.constBegin(); + QStringList set; + for(; i != list.constEnd(); ++i) { + QPair<QString, T> t = *i; + t.first = escape(t.first); + set.append(QString(" ")); + set.append("value.insert(\""); + set.append(t.first); + set.append(QString::fromAscii("\", ")); + set.append(prepareToInsert<T>(t.second)); + set.append(QString::fromAscii(");\n")); + } + return result.arg(typeName<T>(), set.join(QString())); +} + +template<> +QString generateCastDef<qsreal>(const QList<QPair<QString, qsreal> >& list) +{ + static const QString templ = "\n"\ + "void tst_QScriptValue::qscriptvalue_cast%2_initData()\n"\ + "{\n"\ + " QTest::addColumn<%2>(\"expected\");\n"\ + " initScriptValues();\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::qscriptvalue_cast%2_makeData(const char* expr)\n"\ + "{\n"\ + " static QHash<QString, %2> value;\n"\ + " if (value.isEmpty()) {\n"\ + "%3"\ + " }\n"\ + " newRow(expr) << value.value(expr);\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::qscriptvalue_cast%2_test(const char*, const QScriptValue& value)\n"\ + "{\n"\ + " QFETCH(%2, expected);\n"\ + " if (qIsNaN(expected)) {\n" + " QVERIFY(qIsNaN(qscriptvalue_cast<%2>(value)));\n" + " return;\n" + " }\n"\ + " if (qIsInf(expected)) {\n" + " QVERIFY(qIsInf(qscriptvalue_cast<%2>(value)));\n" + " return;\n" + " }\n" + " QCOMPARE(qscriptvalue_cast<%2>(value), expected);\n"\ + "}\n"\ + "\n"\ + "DEFINE_TEST_FUNCTION(qscriptvalue_cast%2)\n"; + QString result = templ; + + QList<QPair<QString, qsreal> >::const_iterator i = list.constBegin(); + QStringList set; + for(; i != list.constEnd(); ++i) { + QPair<QString, qsreal> t = *i; + t.first = escape(t.first); + set.append(QString(" ")); + set.append("value.insert(\""); + set.append(t.first); + set.append(QString::fromAscii("\", ")); + set.append(prepareToInsert<qsreal>(t.second)); + set.append(QString::fromAscii(");\n")); + } + return result.arg(typeName<qsreal>(), set.join(QString())); +} + +static QString generateCompareDef(const QString& comparisionType, const QList<QString> tags) +{ + static const QString templ = "\n"\ + "void tst_QScriptValue::%1_initData()\n"\ + "{\n"\ + " QTest::addColumn<QScriptValue>(\"other\");\n"\ + " QTest::addColumn<bool>(\"expected\");\n"\ + " initScriptValues();\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::%1_makeData(const char *expr)\n"\ + "{\n"\ + " static QSet<QString> equals;\n"\ + " if (equals.isEmpty()) {\n"\ + "%2\n"\ + " }\n"\ + " QHash<QString, QScriptValue>::const_iterator it;\n"\ + " for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {\n"\ + " QString tag = QString::fromLatin1(\"%20 <=> %21\").arg(expr).arg(it.key());\n"\ + " newRow(tag.toLatin1()) << it.value() << equals.contains(tag);\n"\ + " }\n"\ + "}\n"\ + "\n"\ + "void tst_QScriptValue::%1_test(const char *, const QScriptValue& value)\n"\ + "{\n"\ + " QFETCH(QScriptValue, other);\n"\ + " QFETCH(bool, expected);\n"\ + " QCOMPARE(value.%1(other), expected);\n"\ + "}\n"\ + "\n"\ + "DEFINE_TEST_FUNCTION(%1)\n"; + Q_ASSERT(comparisionType == "strictlyEquals" + || comparisionType == "equals" + || comparisionType == "lessThan" + || comparisionType == "instanceOf"); + QString result = templ; + + QStringList set; + foreach(const QString& tmp, tags) { + set.append(" equals.insert(\"" + escape(tmp) + "\");"); + } + return result.arg(comparisionType, set.join("\n")); +} + +static QString generateInitDef(const QVector<QString>& allDataTags) +{ + static const QString templ = "/****************************************************************************\n" + "**\n" + "** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).\n" + "** All rights reserved.\n" + "** Contact: Nokia Corporation (qt-info@nokia.com)\n" + "**\n" + "** This file is part of the test suite of the Qt Toolkit.\n" + "**\n" + "** $QT_BEGIN_LICENSE:LGPL$\n" + "** No Commercial Usage\n" + "** This file contains pre-release code and may not be distributed.\n" + "** You may use this file in accordance with the terms and conditions\n" + "** contained in the Technology Preview License Agreement accompanying\n" + "** this package.\n" + "**\n" + "** GNU Lesser General Public License Usage\n" + "** Alternatively, this file may be used under the terms of the GNU Lesser\n" + "** General Public License version 2.1 as published by the Free Software\n" + "** Foundation and appearing in the file LICENSE.LGPL included in the\n" + "** packaging of this file. Please review the following information to\n" + "** ensure the GNU Lesser General Public License version 2.1 requirements\n" + "** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n" + "**\n" + "** In addition, as a special exception, Nokia gives you certain additional\n" + "** rights. These rights are described in the Nokia Qt LGPL Exception\n" + "** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n" + "**\n" + "** If you have questions regarding the use of this file, please contact\n" + "** Nokia at qt-info@nokia.com.\n" + "**\n" + "**\n" + "**\n" + "**\n" + "**\n" + "**\n" + "**\n" + "**\n" + "** $QT_END_LICENSE$\n" + "**\n" + "****************************************************************************/\n" + "\n"\ + "#include \"tst_qscriptvalue.h\"\n\n"\ + "#define DEFINE_TEST_VALUE(expr) m_values.insert(QString::fromLatin1(#expr), expr)\n"\ + "\n"\ + "void tst_QScriptValue::initScriptValues()\n"\ + "{\n"\ + " m_values.clear();\n"\ + " if (engine) \n"\ + " delete engine;\n"\ + " engine = new QScriptEngine;\n"\ + "%1\n}\n\n"; + QString result = templ; + QStringList set; + foreach(const QString tag, allDataTags) { + set.append(" DEFINE_TEST_VALUE(" + tag + ");"); + } + + return result.arg(set.join("\n")); +} + +static void squashTags(QString dataTag, const QVector<bool>& results, QList<QString>& tags, QVector<QString> dataTags) +{ + for(int i = 0; i < results.count(); ++i) { + if (results.at(i)) + tags.append(dataTag + " <=> " + dataTags[i]); + } +} + + +QString TestGenerator::generateTest() +{ + // All data tags keept in one place. + QVector<QString> dataTags; + + // Data tags for values that return true in isXXX call + QList<QString> isValidList; + QList<QString> isBoolList; + QList<QString> isBooleanList; + QList<QString> isNumberList; + QList<QString> isFunctionList; + QList<QString> isNullList; + QList<QString> isStringList; + QList<QString> isUndefinedList; + QList<QString> isVariantList; + QList<QString> isQObjectList; + QList<QString> isQMetaObjectList; + QList<QString> isObjectList; + QList<QString> isDateList; + QList<QString> isRegExpList; + QList<QString> isArrayList; + QList<QString> isErrorList; + + // List of pairs data tag and value returned from toXXX call + QList<QPair<QString, QString> > toStringList; + QList<QPair<QString, qsreal> > toNumberList; + QList<QPair<QString, bool> > toBoolList; + QList<QPair<QString, bool> > toBooleanList; + QList<QPair<QString, qsreal> > toIntegerList; + QList<QPair<QString, qint32> > toInt32List; + QList<QPair<QString, quint32> > toUInt32List; + QList<QPair<QString, quint16> > toUInt16List; + + // List of complex tags returning true + QList<QString> equalsList; + QList<QString> strictlyEqualsList; + QList<QString> lessThanList; + QList<QString> instanceOfList; + + QList<QPair<QString, QString> > castStringList; + QList<QPair<QString, qsreal> > castSRealList; + QList<QPair<QString, bool> > castBoolList; + QList<QPair<QString, qint32> > castInt32List; + QList<QPair<QString, quint32> > castUInt32List; + QList<QPair<QString, quint16> > castUInt16List; + + // Load. + m_tempFile.seek(0); + QDataStream in(&m_tempFile); + in >> dataTags; + Q_ASSERT(in.status() == in.Ok); + + while(!in.atEnd()) + { + bool isValidRes; + bool isBoolRes; + bool isBooleanRes; + bool isNumberRes; + bool isFunctionRes; + bool isNullRes; + bool isStringRes; + bool isUndefinedRes; + bool isVariantRes; + bool isQObjectRes; + bool isQMetaObjectRes; + bool isObjectRes; + bool isDateRes; + bool isRegExpRes; + bool isArrayRes; + bool isErrorRes; + + QString toStringRes; + qsreal toNumberRes; + bool toBoolRes; + bool toBooleanRes; + qsreal toIntegerRes; + qint32 toInt32Res; + quint32 toUInt32Res; + quint16 toUInt16Res; + //toVariantRes; + //toDateTimeRes; + + QVector<bool> equalsRes; + QVector<bool> strictlyEqualsRes; + QVector<bool> lessThanRes; + QVector<bool> instanceOfRes; + + QString castStringRes; + qsreal castSRealRes; + bool castBoolRes; + qint32 castInt32Res; + quint32 castUInt32Res; + quint16 castUInt16Res; + + QString dataTag; + in >> dataTag; + in >> isValidRes; + in >> isBoolRes; + in >> isBooleanRes; + in >> isNumberRes; + in >> isFunctionRes; + in >> isNullRes; + in >> isStringRes; + in >> isUndefinedRes; + in >> isVariantRes; + in >> isQObjectRes; + in >> isQMetaObjectRes; + in >> isObjectRes; + in >> isDateRes; + in >> isRegExpRes; + in >> isArrayRes; + in >> isErrorRes; + + if (isValidRes) isValidList.append(dataTag); + if (isBoolRes) isBoolList.append(dataTag); + if (isBooleanRes) isBooleanList.append(dataTag); + if (isNumberRes) isNumberList.append(dataTag); + if (isFunctionRes) isFunctionList.append(dataTag); + if (isNullRes) isNullList.append(dataTag); + if (isStringRes) isStringList.append(dataTag); + if (isUndefinedRes) isUndefinedList.append(dataTag); + if (isVariantRes) isVariantList.append(dataTag); + if (isQObjectRes) isQObjectList.append(dataTag); + if (isQMetaObjectRes) isQMetaObjectList.append(dataTag); + if (isObjectRes) isObjectList.append(dataTag); + if (isDateRes) isDateList.append(dataTag); + if (isRegExpRes) isRegExpList.append(dataTag); + if (isArrayRes) isArrayList.append(dataTag); + if (isErrorRes) isErrorList.append(dataTag); + + in >> toStringRes; + in >> toNumberRes; + in >> toBoolRes; + in >> toBooleanRes; + in >> toIntegerRes; + in >> toInt32Res; + in >> toUInt32Res; + in >> toUInt16Res; + //in >> toVariantRes; + //in >> toDateTimeRes; + + toStringList.append(QPair<QString, QString>(dataTag, toStringRes)); + toNumberList.append(QPair<QString, qsreal>(dataTag, toNumberRes)); + toBoolList.append(QPair<QString, bool>(dataTag, toBoolRes)); + toBooleanList.append(QPair<QString, bool>(dataTag, toBooleanRes)); + toIntegerList.append(QPair<QString, qsreal>(dataTag, toIntegerRes)); + toInt32List.append(QPair<QString, qint32>(dataTag, toInt32Res)); + toUInt32List.append(QPair<QString, quint32>(dataTag, toUInt32Res)); + toUInt16List.append(QPair<QString, quint16>(dataTag, toUInt16Res)); + + in >> equalsRes; + in >> strictlyEqualsRes; + in >> lessThanRes; + in >> instanceOfRes; + + squashTags(dataTag, equalsRes, equalsList, dataTags); + squashTags(dataTag, strictlyEqualsRes, strictlyEqualsList, dataTags); + squashTags(dataTag, lessThanRes, lessThanList, dataTags); + squashTags(dataTag, instanceOfRes, instanceOfList, dataTags); + + in >> castStringRes; + in >> castSRealRes; + in >> castBoolRes; + in >> castInt32Res; + in >> castUInt32Res; + in >> castUInt16Res; + + castStringList.append(QPair<QString, QString>(dataTag, castStringRes)); + castSRealList.append(QPair<QString, qsreal>(dataTag, castSRealRes)); + castBoolList.append(QPair<QString, bool>(dataTag, castBoolRes)); + castInt32List.append(QPair<QString, qint32>(dataTag, castInt32Res)); + castUInt32List.append(QPair<QString, quint32>(dataTag, castUInt32Res)); + castUInt16List.append(QPair<QString, quint16>(dataTag, castUInt16Res)); + + Q_ASSERT(in.status() == in.Ok); + } + + Q_ASSERT(in.atEnd()); + + // Generate. + QStringList result; + result.append(generateInitDef(dataTags)); + result.append(generateIsXXXDef("isValid", isValidList)); + result.append(generateIsXXXDef("isBool", isBoolList)); + result.append(generateIsXXXDef("isBoolean", isBooleanList)); + result.append(generateIsXXXDef("isNumber", isNumberList)); + result.append(generateIsXXXDef("isFunction", isFunctionList)); + result.append(generateIsXXXDef("isNull", isNullList)); + result.append(generateIsXXXDef("isString", isStringList)); + result.append(generateIsXXXDef("isUndefined", isUndefinedList)); + result.append(generateIsXXXDef("isVariant", isVariantList)); + result.append(generateIsXXXDef("isQObject", isQObjectList)); + result.append(generateIsXXXDef("isQMetaObject", isQMetaObjectList)); + result.append(generateIsXXXDef("isObject", isObjectList)); + result.append(generateIsXXXDef("isDate", isDateList)); + result.append(generateIsXXXDef("isRegExp", isRegExpList)); + result.append(generateIsXXXDef("isArray", isArrayList)); + result.append(generateIsXXXDef("isError", isErrorList)); + + result.append(generateToXXXDef<QString>("toString", toStringList)); + result.append(generateToXXXDef<qsreal>("toNumber", toNumberList)); + result.append(generateToXXXDef<bool>("toBool", toBoolList)); + result.append(generateToXXXDef<bool>("toBoolean", toBooleanList)); + result.append(generateToXXXDef<qsreal>("toInteger", toIntegerList)); + result.append(generateToXXXDef<qint32>("toInt32", toInt32List)); + result.append(generateToXXXDef<quint32>("toUInt32", toUInt32List)); + result.append(generateToXXXDef<quint16>("toUInt16", toUInt16List)); + + result.append(generateCompareDef("equals", equalsList)); + result.append(generateCompareDef("strictlyEquals", strictlyEqualsList)); + result.append(generateCompareDef("lessThan", lessThanList)); + result.append(generateCompareDef("instanceOf", instanceOfList)); + + result.append(generateCastDef(castStringList)); + result.append(generateCastDef(castSRealList)); + result.append(generateCastDef(castBoolList)); + result.append(generateCastDef(castInt32List)); + result.append(generateCastDef(castUInt32List)); + result.append(generateCastDef(castUInt16List)); + + return result.join("\n"); +} + + + + + + + + + diff --git a/tests/auto/qscriptvalue/testgen/testgenerator.h b/tests/auto/qscriptvalue/testgen/testgenerator.h new file mode 100644 index 0000000..8f4a357 --- /dev/null +++ b/tests/auto/qscriptvalue/testgen/testgenerator.h @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ + +#ifndef TESTGENERATOR_H +#define TESTGENERATOR_H + +#include <QtCore/qdebug.h> +#include <QtCore/qfile.h> +#include <QtCore/qtemporaryfile.h> + +class TestGenerator { +public: + TestGenerator(QString& outputpath) + : m_ofile(outputpath) + { + // Open output file + if (!m_ofile.open(QIODevice::WriteOnly | QIODevice::Text)) { + qWarning() << "Can't open output file: " << outputpath; + exit(2); + } + m_tempFile.open(); + } + + void run() + { + prepareData(); + Q_ASSERT(m_tempFile.size()); + save(generateTest()); + } + + void prepareData(); + QString generateTest(); + void save(const QString& data); +private: + QFile m_ofile; + QTemporaryFile m_tempFile; +}; + +#endif // TESTGENERATOR_H diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp index 2aeabf0..f83cf58 100644 --- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp +++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp @@ -39,14 +39,8 @@ ** ****************************************************************************/ - -#include <QtTest/QtTest> +#include "tst_qscriptvalue.h" #include <QtGui/QPushButton> -#include <QtCore/qnumeric.h> - -#include <QtScript/qscriptclass.h> -#include <QtScript/qscriptvalue.h> -#include <QtScript/qscriptengine.h> //TESTED_CLASS= //TESTED_FILES= @@ -55,62 +49,70 @@ QT_BEGIN_NAMESPACE extern bool qt_script_isJITEnabled(); QT_END_NAMESPACE -class tst_QScriptValue : public QObject +tst_QScriptValue::tst_QScriptValue() + : engine(0) { - Q_OBJECT +} -public: - tst_QScriptValue(); - virtual ~tst_QScriptValue(); - -private slots: - void ctor(); - void engine(); - void toString(); - void toNumber(); - void toBoolean(); - void toBool(); - void toInteger(); - void toInt32(); - void toUInt32(); - void toUInt16(); - void toVariant(); - void toQObject(); - void toObject(); - void toDateTime(); - void toRegExp(); - void instanceOf(); - void isArray(); - void isDate(); - void isError(); - void isRegExp(); - void getSetPrototype(); - void getSetScope(); - void getSetProperty(); - void arrayElementGetterSetter(); - void getSetData(); - void getSetScriptClass(); - void call(); - void construct(); - void lessThan(); - void equals(); - void strictlyEquals(); - void castToPointer(); - void prettyPrinter_data(); - void prettyPrinter(); - void engineDeleted(); - void valueOfWithClosure(); - void objectId(); -}; +tst_QScriptValue::~tst_QScriptValue() +{ + delete engine; +} -tst_QScriptValue::tst_QScriptValue() +void tst_QScriptValue::dataHelper(InitDataFunction init, DefineDataFunction define) { + QTest::addColumn<QString>("__expression__"); + (this->*init)(); + QHash<QString,QScriptValue>::const_iterator it; + for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { + m_currentExpression = it.key(); + (this->*define)(it.key().toLatin1()); + } + m_currentExpression = QString(); } -tst_QScriptValue::~tst_QScriptValue() +QTestData &tst_QScriptValue::newRow(const char *tag) { + return QTest::newRow(tag) << m_currentExpression; } +void tst_QScriptValue::testHelper(TestFunction fun) +{ + QFETCH(QString, __expression__); + QScriptValue value = m_values.value(__expression__); + (this->*fun)(__expression__.toLatin1(), value); +} + +void tst_QScriptValue::assignAndCopyConstruct_initData() +{ + QTest::addColumn<int>("dummy"); + initScriptValues(); +} + +void tst_QScriptValue::assignAndCopyConstruct_makeData(const char *expr) +{ + newRow(expr) << 0; +} + +void tst_QScriptValue::assignAndCopyConstruct_test(const char *, const QScriptValue &value) +{ + QScriptValue copy(value); + QCOMPARE(copy.strictlyEquals(value), !value.isNumber() || !qIsNaN(value.toNumber())); + QCOMPARE(copy.engine(), value.engine()); + + QScriptValue assigned = copy; + QCOMPARE(assigned.strictlyEquals(value), !copy.isNumber() || !qIsNaN(copy.toNumber())); + QCOMPARE(assigned.engine(), assigned.engine()); + + QScriptValue other(!value.toBool()); + assigned = other; + QVERIFY(!assigned.strictlyEquals(copy)); + QVERIFY(assigned.strictlyEquals(other)); + QCOMPARE(assigned.engine(), other.engine()); +} + +DEFINE_TEST_FUNCTION(assignAndCopyConstruct) + void tst_QScriptValue::ctor() { QScriptEngine eng; @@ -330,19 +332,12 @@ void tst_QScriptValue::ctor() QVERIFY(QScriptValue(0, QString("ciao")).isString()); } -void tst_QScriptValue::engine() -{ - QScriptEngine eng; - QScriptValue object = eng.newObject(); - QCOMPARE(object.engine(), &eng); -} - static QScriptValue myFunction(QScriptContext *, QScriptEngine *eng) { return eng->undefinedValue(); } -void tst_QScriptValue::toString() +void tst_QScriptValue::toString_old() { QScriptEngine eng; @@ -456,7 +451,7 @@ void tst_QScriptValue::toString() QVERIFY(variant.toString().isEmpty()); } -void tst_QScriptValue::toNumber() +void tst_QScriptValue::toNumber_old() { QScriptEngine eng; @@ -529,7 +524,7 @@ void tst_QScriptValue::toNumber() } } -void tst_QScriptValue::toBoolean() // deprecated +void tst_QScriptValue::toBoolean_old() // deprecated { QScriptEngine eng; @@ -626,7 +621,7 @@ void tst_QScriptValue::toBoolean() // deprecated } } -void tst_QScriptValue::toBool() +void tst_QScriptValue::toBool_old() { QScriptEngine eng; @@ -723,7 +718,7 @@ void tst_QScriptValue::toBool() } } -void tst_QScriptValue::toInteger() +void tst_QScriptValue::toInteger_old() { QScriptEngine eng; @@ -810,7 +805,7 @@ void tst_QScriptValue::toInteger() QCOMPARE(inv.toInteger(), 0.0); } -void tst_QScriptValue::toInt32() +void tst_QScriptValue::toInt32_old() { QScriptEngine eng; @@ -946,7 +941,7 @@ void tst_QScriptValue::toInt32() QCOMPARE(qscriptvalue_cast<qint32>(inv), 0); } -void tst_QScriptValue::toUInt32() +void tst_QScriptValue::toUInt32_old() { QScriptEngine eng; @@ -1078,7 +1073,7 @@ void tst_QScriptValue::toUInt32() QCOMPARE(qscriptvalue_cast<quint32>(inv), quint32(0)); } -void tst_QScriptValue::toUInt16() +void tst_QScriptValue::toUInt16_old() { QScriptEngine eng; @@ -1239,7 +1234,7 @@ void tst_QScriptValue::toUInt16() Q_DECLARE_METATYPE(QVariant) #endif -void tst_QScriptValue::toVariant() +void tst_QScriptValue::toVariant_old() { QScriptEngine eng; @@ -1346,7 +1341,7 @@ void tst_QScriptValue::toVariant() // unfortunately, this is necessary in order to do qscriptvalue_cast<QPushButton*>(...) Q_DECLARE_METATYPE(QPushButton*) -void tst_QScriptValue::toQObject() +void tst_QScriptValue::toQObject_old() { QScriptEngine eng; @@ -1541,7 +1536,7 @@ void tst_QScriptValue::toObject() } } -void tst_QScriptValue::toDateTime() +void tst_QScriptValue::toDateTime_old() { QScriptEngine eng; QDateTime dt = eng.evaluate("new Date(0)").toDateTime(); @@ -1559,7 +1554,7 @@ void tst_QScriptValue::toDateTime() QVERIFY(!eng.undefinedValue().toDateTime().isValid()); } -void tst_QScriptValue::toRegExp() +void tst_QScriptValue::toRegExp_old() { QScriptEngine eng; { @@ -1589,7 +1584,7 @@ void tst_QScriptValue::toRegExp() QVERIFY(eng.undefinedValue().toRegExp().isEmpty()); } -void tst_QScriptValue::instanceOf() +void tst_QScriptValue::instanceOf_old() { QScriptEngine eng; QScriptValue obj = eng.newObject(); @@ -1625,7 +1620,7 @@ void tst_QScriptValue::instanceOf() QCOMPARE(obj.instanceOf(otherEngine.globalObject().property("Object")), false); } -void tst_QScriptValue::isArray() +void tst_QScriptValue::isArray_old() { QScriptEngine eng; QVERIFY(eng.evaluate("[]").isArray()); @@ -1638,7 +1633,7 @@ void tst_QScriptValue::isArray() QVERIFY(!eng.undefinedValue().isArray()); } -void tst_QScriptValue::isDate() +void tst_QScriptValue::isDate_old() { QScriptEngine eng; QVERIFY(eng.evaluate("new Date()").isDate()); @@ -1652,7 +1647,7 @@ void tst_QScriptValue::isDate() QVERIFY(!eng.undefinedValue().isDate()); } -void tst_QScriptValue::isError() +void tst_QScriptValue::isError_old() { QStringList errors; errors << "Error" @@ -1677,7 +1672,7 @@ void tst_QScriptValue::isError() QVERIFY(!eng.evaluate("new Object()").isError()); } -void tst_QScriptValue::isRegExp() +void tst_QScriptValue::isRegExp_old() { QScriptEngine eng; QVERIFY(eng.evaluate("/foo/").isRegExp()); @@ -2718,7 +2713,7 @@ void tst_QScriptValue::construct() QVERIFY(!QScriptValue(QScriptValue::NullValue).construct().isValid()); } -void tst_QScriptValue::lessThan() +void tst_QScriptValue::lessThan_old() { QScriptEngine eng; @@ -2812,7 +2807,7 @@ void tst_QScriptValue::lessThan() QCOMPARE(date1.lessThan(QScriptValue(&otherEngine, 123)), false); } -void tst_QScriptValue::equals() +void tst_QScriptValue::equals_old() { QScriptEngine eng; @@ -2907,7 +2902,7 @@ void tst_QScriptValue::equals() QScriptValue qobj1 = eng.newQObject(this); QScriptValue qobj2 = eng.newQObject(this); QScriptValue qobj3 = eng.newQObject(0); - QScriptValue qobj4 = eng.newQObject(new QObject()); + QScriptValue qobj4 = eng.newQObject(new QObject(), QScriptEngine::ScriptOwnership); QVERIFY(qobj1.equals(qobj2)); // compares the QObject pointers QVERIFY(!qobj2.equals(qobj4)); // compares the QObject pointers QVERIFY(!qobj2.equals(obj2)); // compares the QObject pointers @@ -3005,7 +3000,7 @@ void tst_QScriptValue::equals() QCOMPARE(date1.equals(QScriptValue(&otherEngine, 123)), false); } -void tst_QScriptValue::strictlyEquals() +void tst_QScriptValue::strictlyEquals_old() { QScriptEngine eng; @@ -3456,4 +3451,3 @@ void tst_QScriptValue::objectId() } QTEST_MAIN(tst_QScriptValue) -#include "tst_qscriptvalue.moc" diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.h b/tests/auto/qscriptvalue/tst_qscriptvalue.h new file mode 100644 index 0000000..6215506 --- /dev/null +++ b/tests/auto/qscriptvalue/tst_qscriptvalue.h @@ -0,0 +1,410 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ + +#ifndef TST_QSCRIPTVALUE_H +#define TST_QSCRIPTVALUE_H + +#include <QtCore/qobject.h> +#include <QtCore/qnumeric.h> +#include <QtScript/qscriptclass.h> +#include <QtScript/qscriptengine.h> +#include <QtScript/qscriptvalue.h> +#include <QtTest/QtTest> + +Q_DECLARE_METATYPE(QVariant) +Q_DECLARE_METATYPE(QScriptValue) + +class tst_QScriptValue : public QObject +{ + Q_OBJECT + +public: + tst_QScriptValue(); + virtual ~tst_QScriptValue(); + +private slots: + // Generated test functions + void isArray_data(); + void isArray(); + + void isBool_data(); + void isBool(); + + void isBoolean_data(); + void isBoolean(); + + void isDate_data(); + void isDate(); + + void isError_data(); + void isError(); + + void isFunction_data(); + void isFunction(); + + void isNull_data(); + void isNull(); + + void isNumber_data(); + void isNumber(); + + void isObject_data(); + void isObject(); + +// void isQMetaObject_data(); +// void isQMetaObject(); + +// void isQObject_data(); +// void isQObject(); + + void isRegExp_data(); + void isRegExp(); + + void isString_data(); + void isString(); + + void isUndefined_data(); + void isUndefined(); + + void isValid_data(); + void isValid(); + +// void isVariant_data(); +// void isVariant(); + + void toBool_data(); + void toBool(); + + void toBoolean_data(); + void toBoolean(); + +// void toDateTime_data(); +// void toDateTime(); + + void toInt32_data(); + void toInt32(); + + void toInteger_data(); + void toInteger(); + + void toNumber_data(); + void toNumber(); + +// void toQMetaObject_data(); +// void toQMetaObject(); + +// void toQObject_data(); +// void toQObject(); + +// void toRegExp_data(); +// void toRegExp(); + + void toString_data(); + void toString(); + + void toUInt16_data(); + void toUInt16(); + + void toUInt32_data(); + void toUInt32(); + +// void toVariant_data(); +// void toVariant(); + + void equals_data(); + void equals(); + + void strictlyEquals_data(); + void strictlyEquals(); + + void lessThan_data(); + void lessThan(); + + void instanceOf_data(); + void instanceOf(); + + void assignAndCopyConstruct_data(); + void assignAndCopyConstruct(); + + void qscriptvalue_castQString_data(); + void qscriptvalue_castQString(); + + void qscriptvalue_castqsreal_data(); + void qscriptvalue_castqsreal(); + + void qscriptvalue_castbool_data(); + void qscriptvalue_castbool(); + + void qscriptvalue_castqint32_data(); + void qscriptvalue_castqint32(); + + void qscriptvalue_castquint32_data(); + void qscriptvalue_castquint32(); + + void qscriptvalue_castquint16_data(); + void qscriptvalue_castquint16(); + + // Non-generated test functions + + void toObject(); + void ctor(); + + void toString_old(); + void toNumber_old(); + void toBoolean_old(); + void toBool_old(); + void toInteger_old(); + void toInt32_old(); + void toUInt32_old(); + void toUInt16_old(); + void toVariant_old(); + void toQObject_old(); + void toDateTime_old(); + void toRegExp_old(); + void instanceOf_old(); + void isArray_old(); + void isDate_old(); + void isError_old(); + void isRegExp_old(); + + void lessThan_old(); + void equals_old(); + void strictlyEquals_old(); + + void getSetPrototype(); + void getSetScope(); + void getSetProperty(); + void arrayElementGetterSetter(); + void getSetData(); + void getSetScriptClass(); + void call(); + void construct(); + void castToPointer(); + void prettyPrinter_data(); + void prettyPrinter(); + void engineDeleted(); + void valueOfWithClosure(); + void objectId(); + +private: + typedef void (tst_QScriptValue::*InitDataFunction)(); + typedef void (tst_QScriptValue::*DefineDataFunction)(const char *); + void dataHelper(InitDataFunction init, DefineDataFunction define); + QTestData &newRow(const char *tag); + + typedef void (tst_QScriptValue::*TestFunction)(const char *, const QScriptValue &); + void testHelper(TestFunction fun); + + // Generated functions + + void initScriptValues(); + + void isArray_initData(); + void isArray_makeData(const char *expr); + void isArray_test(const char *expr, const QScriptValue &value); + + void isBool_initData(); + void isBool_makeData(const char *expr); + void isBool_test(const char *expr, const QScriptValue &value); + + void isBoolean_initData(); + void isBoolean_makeData(const char *expr); + void isBoolean_test(const char *expr, const QScriptValue &value); + + void isDate_initData(); + void isDate_makeData(const char *expr); + void isDate_test(const char *expr, const QScriptValue &value); + + void isError_initData(); + void isError_makeData(const char *expr); + void isError_test(const char *expr, const QScriptValue &value); + + void isFunction_initData(); + void isFunction_makeData(const char *expr); + void isFunction_test(const char *expr, const QScriptValue &value); + + void isNull_initData(); + void isNull_makeData(const char *expr); + void isNull_test(const char *expr, const QScriptValue &value); + + void isNumber_initData(); + void isNumber_makeData(const char *expr); + void isNumber_test(const char *expr, const QScriptValue &value); + + void isObject_initData(); + void isObject_makeData(const char *expr); + void isObject_test(const char *expr, const QScriptValue &value); + + void isQMetaObject_initData(); + void isQMetaObject_makeData(const char *expr); + void isQMetaObject_test(const char *expr, const QScriptValue &value); + + void isQObject_initData(); + void isQObject_makeData(const char *expr); + void isQObject_test(const char *expr, const QScriptValue &value); + + void isRegExp_initData(); + void isRegExp_makeData(const char *expr); + void isRegExp_test(const char *expr, const QScriptValue &value); + + void isString_initData(); + void isString_makeData(const char *expr); + void isString_test(const char *expr, const QScriptValue &value); + + void isUndefined_initData(); + void isUndefined_makeData(const char *expr); + void isUndefined_test(const char *expr, const QScriptValue &value); + + void isValid_initData(); + void isValid_makeData(const char *expr); + void isValid_test(const char *expr, const QScriptValue &value); + + void isVariant_initData(); + void isVariant_makeData(const char *expr); + void isVariant_test(const char *expr, const QScriptValue &value); + + void toBool_initData(); + void toBool_makeData(const char *); + void toBool_test(const char *, const QScriptValue &value); + + void toBoolean_initData(); + void toBoolean_makeData(const char *); + void toBoolean_test(const char *, const QScriptValue &value); + + void toDateTime_initData(); + void toDateTime_makeData(const char *); + void toDateTime_test(const char *, const QScriptValue &value); + + void toInt32_initData(); + void toInt32_makeData(const char *); + void toInt32_test(const char *, const QScriptValue &value); + + void toInteger_initData(); + void toInteger_makeData(const char *); + void toInteger_test(const char *, const QScriptValue &value); + + void toNumber_initData(); + void toNumber_makeData(const char *); + void toNumber_test(const char *, const QScriptValue &value); + + void toQMetaObject_initData(); + void toQMetaObject_makeData(const char *); + void toQMetaObject_test(const char *, const QScriptValue &value); + + void toQObject_initData(); + void toQObject_makeData(const char *); + void toQObject_test(const char *, const QScriptValue &value); + + void toRegExp_initData(); + void toRegExp_makeData(const char *); + void toRegExp_test(const char *, const QScriptValue &value); + + void toString_initData(); + void toString_makeData(const char *); + void toString_test(const char *, const QScriptValue &value); + + void toUInt16_initData(); + void toUInt16_makeData(const char *); + void toUInt16_test(const char *, const QScriptValue &value); + + void toUInt32_initData(); + void toUInt32_makeData(const char *); + void toUInt32_test(const char *, const QScriptValue &value); + + void toVariant_initData(); + void toVariant_makeData(const char *); + void toVariant_test(const char *, const QScriptValue &value); + + void equals_initData(); + void equals_makeData(const char *); + void equals_test(const char *, const QScriptValue &value); + + void strictlyEquals_initData(); + void strictlyEquals_makeData(const char *); + void strictlyEquals_test(const char *, const QScriptValue &value); + + void lessThan_initData(); + void lessThan_makeData(const char *); + void lessThan_test(const char *, const QScriptValue &value); + + void instanceOf_initData(); + void instanceOf_makeData(const char *); + void instanceOf_test(const char *, const QScriptValue &value); + + void assignAndCopyConstruct_initData(); + void assignAndCopyConstruct_makeData(const char *); + void assignAndCopyConstruct_test(const char *, const QScriptValue &value); + + void qscriptvalue_castQString_initData(); + void qscriptvalue_castQString_makeData(const char *); + void qscriptvalue_castQString_test(const char *, const QScriptValue &value); + + void qscriptvalue_castqsreal_initData(); + void qscriptvalue_castqsreal_makeData(const char *); + void qscriptvalue_castqsreal_test(const char *, const QScriptValue &value); + + void qscriptvalue_castbool_initData(); + void qscriptvalue_castbool_makeData(const char *); + void qscriptvalue_castbool_test(const char *, const QScriptValue &value); + + void qscriptvalue_castqint32_initData(); + void qscriptvalue_castqint32_makeData(const char *); + void qscriptvalue_castqint32_test(const char *, const QScriptValue &value); + + void qscriptvalue_castquint32_initData(); + void qscriptvalue_castquint32_makeData(const char *); + void qscriptvalue_castquint32_test(const char *, const QScriptValue &value); + + void qscriptvalue_castquint16_initData(); + void qscriptvalue_castquint16_makeData(const char *); + void qscriptvalue_castquint16_test(const char *, const QScriptValue &value); + +private: + QScriptEngine *engine; + QHash<QString, QScriptValue> m_values; + QString m_currentExpression; +}; + +#define DEFINE_TEST_FUNCTION(name) \ +void tst_QScriptValue::name##_data() { dataHelper(&tst_QScriptValue::name##_initData, &tst_QScriptValue::name##_makeData); } \ +void tst_QScriptValue::name() { testHelper(&tst_QScriptValue::name##_test); } + +#endif diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp new file mode 100644 index 0000000..4e621b3 --- /dev/null +++ b/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp @@ -0,0 +1,6496 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ + +#include "tst_qscriptvalue.h" + +#define DEFINE_TEST_VALUE(expr) m_values.insert(QString::fromLatin1(#expr), expr) + +void tst_QScriptValue::initScriptValues() +{ + m_values.clear(); + if (engine) + delete engine; + engine = new QScriptEngine; + DEFINE_TEST_VALUE(QScriptValue()); + DEFINE_TEST_VALUE(QScriptValue(QScriptValue::UndefinedValue)); + DEFINE_TEST_VALUE(QScriptValue(QScriptValue::NullValue)); + DEFINE_TEST_VALUE(QScriptValue(true)); + DEFINE_TEST_VALUE(QScriptValue(false)); + DEFINE_TEST_VALUE(QScriptValue(int(122))); + DEFINE_TEST_VALUE(QScriptValue(uint(124))); + DEFINE_TEST_VALUE(QScriptValue(0)); + DEFINE_TEST_VALUE(QScriptValue(0.0)); + DEFINE_TEST_VALUE(QScriptValue(123.0)); + DEFINE_TEST_VALUE(QScriptValue(6.37e-8)); + DEFINE_TEST_VALUE(QScriptValue(-6.37e-8)); + DEFINE_TEST_VALUE(QScriptValue(0x43211234)); + DEFINE_TEST_VALUE(QScriptValue(0x10000)); + DEFINE_TEST_VALUE(QScriptValue(0x10001)); + DEFINE_TEST_VALUE(QScriptValue(qSNaN())); + DEFINE_TEST_VALUE(QScriptValue(qQNaN())); + DEFINE_TEST_VALUE(QScriptValue(qInf())); + DEFINE_TEST_VALUE(QScriptValue(-qInf())); + DEFINE_TEST_VALUE(QScriptValue("NaN")); + DEFINE_TEST_VALUE(QScriptValue("Infinity")); + DEFINE_TEST_VALUE(QScriptValue("-Infinity")); + DEFINE_TEST_VALUE(QScriptValue("ciao")); + DEFINE_TEST_VALUE(QScriptValue(QString::fromLatin1("ciao"))); + DEFINE_TEST_VALUE(QScriptValue(QString(""))); + DEFINE_TEST_VALUE(QScriptValue(QString())); + DEFINE_TEST_VALUE(QScriptValue(QString("0"))); + DEFINE_TEST_VALUE(QScriptValue(QString("123"))); + DEFINE_TEST_VALUE(QScriptValue(QString("12.4"))); + DEFINE_TEST_VALUE(QScriptValue(0, QScriptValue::UndefinedValue)); + DEFINE_TEST_VALUE(QScriptValue(0, QScriptValue::NullValue)); + DEFINE_TEST_VALUE(QScriptValue(0, true)); + DEFINE_TEST_VALUE(QScriptValue(0, false)); + DEFINE_TEST_VALUE(QScriptValue(0, int(122))); + DEFINE_TEST_VALUE(QScriptValue(0, uint(124))); + DEFINE_TEST_VALUE(QScriptValue(0, 0)); + DEFINE_TEST_VALUE(QScriptValue(0, 0.0)); + DEFINE_TEST_VALUE(QScriptValue(0, 123.0)); + DEFINE_TEST_VALUE(QScriptValue(0, 6.37e-8)); + DEFINE_TEST_VALUE(QScriptValue(0, -6.37e-8)); + DEFINE_TEST_VALUE(QScriptValue(0, 0x43211234)); + DEFINE_TEST_VALUE(QScriptValue(0, 0x10000)); + DEFINE_TEST_VALUE(QScriptValue(0, 0x10001)); + DEFINE_TEST_VALUE(QScriptValue(0, qSNaN())); + DEFINE_TEST_VALUE(QScriptValue(0, qQNaN())); + DEFINE_TEST_VALUE(QScriptValue(0, qInf())); + DEFINE_TEST_VALUE(QScriptValue(0, -qInf())); + DEFINE_TEST_VALUE(QScriptValue(0, "NaN")); + DEFINE_TEST_VALUE(QScriptValue(0, "Infinity")); + DEFINE_TEST_VALUE(QScriptValue(0, "-Infinity")); + DEFINE_TEST_VALUE(QScriptValue(0, "ciao")); + DEFINE_TEST_VALUE(QScriptValue(0, QString::fromLatin1("ciao"))); + DEFINE_TEST_VALUE(QScriptValue(0, QString(""))); + DEFINE_TEST_VALUE(QScriptValue(0, QString())); + DEFINE_TEST_VALUE(QScriptValue(0, QString("0"))); + DEFINE_TEST_VALUE(QScriptValue(0, QString("123"))); + DEFINE_TEST_VALUE(QScriptValue(0, QString("12.3"))); + DEFINE_TEST_VALUE(QScriptValue(engine, QScriptValue::UndefinedValue)); + DEFINE_TEST_VALUE(QScriptValue(engine, QScriptValue::NullValue)); + DEFINE_TEST_VALUE(QScriptValue(engine, true)); + DEFINE_TEST_VALUE(QScriptValue(engine, false)); + DEFINE_TEST_VALUE(QScriptValue(engine, int(122))); + DEFINE_TEST_VALUE(QScriptValue(engine, uint(124))); + DEFINE_TEST_VALUE(QScriptValue(engine, 0)); + DEFINE_TEST_VALUE(QScriptValue(engine, 0.0)); + DEFINE_TEST_VALUE(QScriptValue(engine, 123.0)); + DEFINE_TEST_VALUE(QScriptValue(engine, 6.37e-8)); + DEFINE_TEST_VALUE(QScriptValue(engine, -6.37e-8)); + DEFINE_TEST_VALUE(QScriptValue(engine, 0x43211234)); + DEFINE_TEST_VALUE(QScriptValue(engine, 0x10000)); + DEFINE_TEST_VALUE(QScriptValue(engine, 0x10001)); + DEFINE_TEST_VALUE(QScriptValue(engine, qSNaN())); + DEFINE_TEST_VALUE(QScriptValue(engine, qQNaN())); + DEFINE_TEST_VALUE(QScriptValue(engine, qInf())); + DEFINE_TEST_VALUE(QScriptValue(engine, -qInf())); + DEFINE_TEST_VALUE(QScriptValue(engine, "NaN")); + DEFINE_TEST_VALUE(QScriptValue(engine, "Infinity")); + DEFINE_TEST_VALUE(QScriptValue(engine, "-Infinity")); + DEFINE_TEST_VALUE(QScriptValue(engine, "ciao")); + DEFINE_TEST_VALUE(QScriptValue(engine, QString::fromLatin1("ciao"))); + DEFINE_TEST_VALUE(QScriptValue(engine, QString(""))); + DEFINE_TEST_VALUE(QScriptValue(engine, QString())); + DEFINE_TEST_VALUE(QScriptValue(engine, QString("0"))); + DEFINE_TEST_VALUE(QScriptValue(engine, QString("123"))); + DEFINE_TEST_VALUE(QScriptValue(engine, QString("1.23"))); + DEFINE_TEST_VALUE(engine->evaluate("[]")); + DEFINE_TEST_VALUE(engine->evaluate("{}")); + DEFINE_TEST_VALUE(engine->evaluate("Object.prototype")); + DEFINE_TEST_VALUE(engine->evaluate("Date.prototype")); + DEFINE_TEST_VALUE(engine->evaluate("Array.prototype")); + DEFINE_TEST_VALUE(engine->evaluate("Function.prototype")); + DEFINE_TEST_VALUE(engine->evaluate("Error.prototype")); + DEFINE_TEST_VALUE(engine->evaluate("Object")); + DEFINE_TEST_VALUE(engine->evaluate("Array")); + DEFINE_TEST_VALUE(engine->evaluate("Number")); + DEFINE_TEST_VALUE(engine->evaluate("Function")); + DEFINE_TEST_VALUE(engine->evaluate("(function() { return 1; })")); + DEFINE_TEST_VALUE(engine->evaluate("(function() { return 'ciao'; })")); + DEFINE_TEST_VALUE(engine->evaluate("(function() { throw new Error('foo'); })")); + DEFINE_TEST_VALUE(engine->evaluate("/foo/")); + 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->nullValue()); + DEFINE_TEST_VALUE(engine->undefinedValue()); +} + + +void tst_QScriptValue::isValid_initData() +{ + QTest::addColumn<bool>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isValid_makeData(const char* expr) +{ + static QSet<QString> isValid; + if (isValid.isEmpty()) { + isValid << "QScriptValue(QScriptValue::UndefinedValue)" + << "QScriptValue(QScriptValue::NullValue)" + << "QScriptValue(true)" + << "QScriptValue(false)" + << "QScriptValue(int(122))" + << "QScriptValue(uint(124))" + << "QScriptValue(0)" + << "QScriptValue(0.0)" + << "QScriptValue(123.0)" + << "QScriptValue(6.37e-8)" + << "QScriptValue(-6.37e-8)" + << "QScriptValue(0x43211234)" + << "QScriptValue(0x10000)" + << "QScriptValue(0x10001)" + << "QScriptValue(qSNaN())" + << "QScriptValue(qQNaN())" + << "QScriptValue(qInf())" + << "QScriptValue(-qInf())" + << "QScriptValue(\"NaN\")" + << "QScriptValue(\"Infinity\")" + << "QScriptValue(\"-Infinity\")" + << "QScriptValue(\"ciao\")" + << "QScriptValue(QString::fromLatin1(\"ciao\"))" + << "QScriptValue(QString(\"\"))" + << "QScriptValue(QString())" + << "QScriptValue(QString(\"0\"))" + << "QScriptValue(QString(\"123\"))" + << "QScriptValue(QString(\"12.4\"))" + << "QScriptValue(0, QScriptValue::UndefinedValue)" + << "QScriptValue(0, QScriptValue::NullValue)" + << "QScriptValue(0, true)" + << "QScriptValue(0, false)" + << "QScriptValue(0, int(122))" + << "QScriptValue(0, uint(124))" + << "QScriptValue(0, 0)" + << "QScriptValue(0, 0.0)" + << "QScriptValue(0, 123.0)" + << "QScriptValue(0, 6.37e-8)" + << "QScriptValue(0, -6.37e-8)" + << "QScriptValue(0, 0x43211234)" + << "QScriptValue(0, 0x10000)" + << "QScriptValue(0, 0x10001)" + << "QScriptValue(0, qSNaN())" + << "QScriptValue(0, qQNaN())" + << "QScriptValue(0, qInf())" + << "QScriptValue(0, -qInf())" + << "QScriptValue(0, \"NaN\")" + << "QScriptValue(0, \"Infinity\")" + << "QScriptValue(0, \"-Infinity\")" + << "QScriptValue(0, \"ciao\")" + << "QScriptValue(0, QString::fromLatin1(\"ciao\"))" + << "QScriptValue(0, QString(\"\"))" + << "QScriptValue(0, QString())" + << "QScriptValue(0, QString(\"0\"))" + << "QScriptValue(0, QString(\"123\"))" + << "QScriptValue(0, QString(\"12.3\"))" + << "QScriptValue(engine, QScriptValue::UndefinedValue)" + << "QScriptValue(engine, QScriptValue::NullValue)" + << "QScriptValue(engine, true)" + << "QScriptValue(engine, false)" + << "QScriptValue(engine, int(122))" + << "QScriptValue(engine, uint(124))" + << "QScriptValue(engine, 0)" + << "QScriptValue(engine, 0.0)" + << "QScriptValue(engine, 123.0)" + << "QScriptValue(engine, 6.37e-8)" + << "QScriptValue(engine, -6.37e-8)" + << "QScriptValue(engine, 0x43211234)" + << "QScriptValue(engine, 0x10000)" + << "QScriptValue(engine, 0x10001)" + << "QScriptValue(engine, qSNaN())" + << "QScriptValue(engine, qQNaN())" + << "QScriptValue(engine, qInf())" + << "QScriptValue(engine, -qInf())" + << "QScriptValue(engine, \"NaN\")" + << "QScriptValue(engine, \"Infinity\")" + << "QScriptValue(engine, \"-Infinity\")" + << "QScriptValue(engine, \"ciao\")" + << "QScriptValue(engine, QString::fromLatin1(\"ciao\"))" + << "QScriptValue(engine, QString(\"\"))" + << "QScriptValue(engine, QString())" + << "QScriptValue(engine, QString(\"0\"))" + << "QScriptValue(engine, QString(\"123\"))" + << "QScriptValue(engine, QString(\"1.23\"))" + << "engine->evaluate(\"[]\")" + << "engine->evaluate(\"{}\")" + << "engine->evaluate(\"Object.prototype\")" + << "engine->evaluate(\"Date.prototype\")" + << "engine->evaluate(\"Array.prototype\")" + << "engine->evaluate(\"Function.prototype\")" + << "engine->evaluate(\"Error.prototype\")" + << "engine->evaluate(\"Object\")" + << "engine->evaluate(\"Array\")" + << "engine->evaluate(\"Number\")" + << "engine->evaluate(\"Function\")" + << "engine->evaluate(\"(function() { return 1; })\")" + << "engine->evaluate(\"(function() { return 'ciao'; })\")" + << "engine->evaluate(\"(function() { throw new Error('foo'); })\")" + << "engine->evaluate(\"/foo/\")" + << "engine->evaluate(\"new Object()\")" + << "engine->evaluate(\"new Array()\")" + << "engine->evaluate(\"new Error()\")" + << "engine->nullValue()" + << "engine->undefinedValue()" + ; + } + newRow(expr) << isValid.contains(expr); +} + +void tst_QScriptValue::isValid_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isValid(), expected); +} + +DEFINE_TEST_FUNCTION(isValid) + + +void tst_QScriptValue::isBool_initData() +{ + QTest::addColumn<bool>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isBool_makeData(const char* expr) +{ + static QSet<QString> isBool; + if (isBool.isEmpty()) { + isBool << "QScriptValue(true)" + << "QScriptValue(false)" + << "QScriptValue(0, true)" + << "QScriptValue(0, false)" + << "QScriptValue(engine, true)" + << "QScriptValue(engine, false)" + ; + } + newRow(expr) << isBool.contains(expr); +} + +void tst_QScriptValue::isBool_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isBool(), expected); +} + +DEFINE_TEST_FUNCTION(isBool) + + +void tst_QScriptValue::isBoolean_initData() +{ + QTest::addColumn<bool>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isBoolean_makeData(const char* expr) +{ + static QSet<QString> isBoolean; + if (isBoolean.isEmpty()) { + isBoolean << "QScriptValue(true)" + << "QScriptValue(false)" + << "QScriptValue(0, true)" + << "QScriptValue(0, false)" + << "QScriptValue(engine, true)" + << "QScriptValue(engine, false)" + ; + } + newRow(expr) << isBoolean.contains(expr); +} + +void tst_QScriptValue::isBoolean_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isBoolean(), expected); +} + +DEFINE_TEST_FUNCTION(isBoolean) + + +void tst_QScriptValue::isNumber_initData() +{ + QTest::addColumn<bool>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isNumber_makeData(const char* expr) +{ + static QSet<QString> isNumber; + if (isNumber.isEmpty()) { + isNumber << "QScriptValue(int(122))" + << "QScriptValue(uint(124))" + << "QScriptValue(0)" + << "QScriptValue(0.0)" + << "QScriptValue(123.0)" + << "QScriptValue(6.37e-8)" + << "QScriptValue(-6.37e-8)" + << "QScriptValue(0x43211234)" + << "QScriptValue(0x10000)" + << "QScriptValue(0x10001)" + << "QScriptValue(qSNaN())" + << "QScriptValue(qQNaN())" + << "QScriptValue(qInf())" + << "QScriptValue(-qInf())" + << "QScriptValue(0, int(122))" + << "QScriptValue(0, uint(124))" + << "QScriptValue(0, 0)" + << "QScriptValue(0, 0.0)" + << "QScriptValue(0, 123.0)" + << "QScriptValue(0, 6.37e-8)" + << "QScriptValue(0, -6.37e-8)" + << "QScriptValue(0, 0x43211234)" + << "QScriptValue(0, 0x10000)" + << "QScriptValue(0, 0x10001)" + << "QScriptValue(0, qSNaN())" + << "QScriptValue(0, qQNaN())" + << "QScriptValue(0, qInf())" + << "QScriptValue(0, -qInf())" + << "QScriptValue(engine, int(122))" + << "QScriptValue(engine, uint(124))" + << "QScriptValue(engine, 0)" + << "QScriptValue(engine, 0.0)" + << "QScriptValue(engine, 123.0)" + << "QScriptValue(engine, 6.37e-8)" + << "QScriptValue(engine, -6.37e-8)" + << "QScriptValue(engine, 0x43211234)" + << "QScriptValue(engine, 0x10000)" + << "QScriptValue(engine, 0x10001)" + << "QScriptValue(engine, qSNaN())" + << "QScriptValue(engine, qQNaN())" + << "QScriptValue(engine, qInf())" + << "QScriptValue(engine, -qInf())" + ; + } + newRow(expr) << isNumber.contains(expr); +} + +void tst_QScriptValue::isNumber_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isNumber(), expected); +} + +DEFINE_TEST_FUNCTION(isNumber) + + +void tst_QScriptValue::isFunction_initData() +{ + QTest::addColumn<bool>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isFunction_makeData(const char* expr) +{ + static QSet<QString> isFunction; + if (isFunction.isEmpty()) { + isFunction << "engine->evaluate(\"Function.prototype\")" + << "engine->evaluate(\"Object\")" + << "engine->evaluate(\"Array\")" + << "engine->evaluate(\"Number\")" + << "engine->evaluate(\"Function\")" + << "engine->evaluate(\"(function() { return 1; })\")" + << "engine->evaluate(\"(function() { return 'ciao'; })\")" + << "engine->evaluate(\"(function() { throw new Error('foo'); })\")" + << "engine->evaluate(\"/foo/\")" + ; + } + newRow(expr) << isFunction.contains(expr); +} + +void tst_QScriptValue::isFunction_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isFunction(), expected); +} + +DEFINE_TEST_FUNCTION(isFunction) + + +void tst_QScriptValue::isNull_initData() +{ + QTest::addColumn<bool>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isNull_makeData(const char* expr) +{ + static QSet<QString> isNull; + if (isNull.isEmpty()) { + isNull << "QScriptValue(QScriptValue::NullValue)" + << "QScriptValue(0, QScriptValue::NullValue)" + << "QScriptValue(engine, QScriptValue::NullValue)" + << "engine->nullValue()" + ; + } + newRow(expr) << isNull.contains(expr); +} + +void tst_QScriptValue::isNull_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isNull(), expected); +} + +DEFINE_TEST_FUNCTION(isNull) + + +void tst_QScriptValue::isString_initData() +{ + QTest::addColumn<bool>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isString_makeData(const char* expr) +{ + static QSet<QString> isString; + if (isString.isEmpty()) { + isString << "QScriptValue(\"NaN\")" + << "QScriptValue(\"Infinity\")" + << "QScriptValue(\"-Infinity\")" + << "QScriptValue(\"ciao\")" + << "QScriptValue(QString::fromLatin1(\"ciao\"))" + << "QScriptValue(QString(\"\"))" + << "QScriptValue(QString())" + << "QScriptValue(QString(\"0\"))" + << "QScriptValue(QString(\"123\"))" + << "QScriptValue(QString(\"12.4\"))" + << "QScriptValue(0, \"NaN\")" + << "QScriptValue(0, \"Infinity\")" + << "QScriptValue(0, \"-Infinity\")" + << "QScriptValue(0, \"ciao\")" + << "QScriptValue(0, QString::fromLatin1(\"ciao\"))" + << "QScriptValue(0, QString(\"\"))" + << "QScriptValue(0, QString())" + << "QScriptValue(0, QString(\"0\"))" + << "QScriptValue(0, QString(\"123\"))" + << "QScriptValue(0, QString(\"12.3\"))" + << "QScriptValue(engine, \"NaN\")" + << "QScriptValue(engine, \"Infinity\")" + << "QScriptValue(engine, \"-Infinity\")" + << "QScriptValue(engine, \"ciao\")" + << "QScriptValue(engine, QString::fromLatin1(\"ciao\"))" + << "QScriptValue(engine, QString(\"\"))" + << "QScriptValue(engine, QString())" + << "QScriptValue(engine, QString(\"0\"))" + << "QScriptValue(engine, QString(\"123\"))" + << "QScriptValue(engine, QString(\"1.23\"))" + ; + } + newRow(expr) << isString.contains(expr); +} + +void tst_QScriptValue::isString_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isString(), expected); +} + +DEFINE_TEST_FUNCTION(isString) + + +void tst_QScriptValue::isUndefined_initData() +{ + QTest::addColumn<bool>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isUndefined_makeData(const char* expr) +{ + static QSet<QString> isUndefined; + if (isUndefined.isEmpty()) { + isUndefined << "QScriptValue(QScriptValue::UndefinedValue)" + << "QScriptValue(0, QScriptValue::UndefinedValue)" + << "QScriptValue(engine, QScriptValue::UndefinedValue)" + << "engine->evaluate(\"{}\")" + << "engine->undefinedValue()" + ; + } + newRow(expr) << isUndefined.contains(expr); +} + +void tst_QScriptValue::isUndefined_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isUndefined(), expected); +} + +DEFINE_TEST_FUNCTION(isUndefined) + + + + + +void tst_QScriptValue::isObject_initData() +{ + QTest::addColumn<bool>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isObject_makeData(const char* expr) +{ + static QSet<QString> isObject; + if (isObject.isEmpty()) { + isObject << "engine->evaluate(\"[]\")" + << "engine->evaluate(\"Object.prototype\")" + << "engine->evaluate(\"Date.prototype\")" + << "engine->evaluate(\"Array.prototype\")" + << "engine->evaluate(\"Function.prototype\")" + << "engine->evaluate(\"Error.prototype\")" + << "engine->evaluate(\"Object\")" + << "engine->evaluate(\"Array\")" + << "engine->evaluate(\"Number\")" + << "engine->evaluate(\"Function\")" + << "engine->evaluate(\"(function() { return 1; })\")" + << "engine->evaluate(\"(function() { return 'ciao'; })\")" + << "engine->evaluate(\"(function() { throw new Error('foo'); })\")" + << "engine->evaluate(\"/foo/\")" + << "engine->evaluate(\"new Object()\")" + << "engine->evaluate(\"new Array()\")" + << "engine->evaluate(\"new Error()\")" + ; + } + newRow(expr) << isObject.contains(expr); +} + +void tst_QScriptValue::isObject_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isObject(), expected); +} + +DEFINE_TEST_FUNCTION(isObject) + + +void tst_QScriptValue::isDate_initData() +{ + QTest::addColumn<bool>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isDate_makeData(const char* expr) +{ + static QSet<QString> isDate; + if (isDate.isEmpty()) { + isDate << "engine->evaluate(\"Date.prototype\")" + ; + } + newRow(expr) << isDate.contains(expr); +} + +void tst_QScriptValue::isDate_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isDate(), expected); +} + +DEFINE_TEST_FUNCTION(isDate) + + +void tst_QScriptValue::isRegExp_initData() +{ + QTest::addColumn<bool>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isRegExp_makeData(const char* expr) +{ + static QSet<QString> isRegExp; + if (isRegExp.isEmpty()) { + isRegExp << "engine->evaluate(\"/foo/\")" + ; + } + newRow(expr) << isRegExp.contains(expr); +} + +void tst_QScriptValue::isRegExp_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isRegExp(), expected); +} + +DEFINE_TEST_FUNCTION(isRegExp) + + +void tst_QScriptValue::isArray_initData() +{ + QTest::addColumn<bool>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isArray_makeData(const char* expr) +{ + static QSet<QString> isArray; + if (isArray.isEmpty()) { + isArray << "engine->evaluate(\"[]\")" + << "engine->evaluate(\"Array.prototype\")" + << "engine->evaluate(\"new Array()\")" + ; + } + newRow(expr) << isArray.contains(expr); +} + +void tst_QScriptValue::isArray_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isArray(), expected); +} + +DEFINE_TEST_FUNCTION(isArray) + + +void tst_QScriptValue::isError_initData() +{ + QTest::addColumn<bool>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::isError_makeData(const char* expr) +{ + static QSet<QString> isError; + if (isError.isEmpty()) { + isError << "engine->evaluate(\"Error.prototype\")" + << "engine->evaluate(\"new Error()\")" + ; + } + newRow(expr) << isError.contains(expr); +} + +void tst_QScriptValue::isError_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isError(), expected); +} + +DEFINE_TEST_FUNCTION(isError) + + + +void tst_QScriptValue::toString_initData() +{ + QTest::addColumn<QString>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::toString_makeData(const char* expr) +{ + static QHash<QString, QString> toString; + if (toString.isEmpty()) { + toString.insert("QScriptValue()", ""); + toString.insert("QScriptValue(QScriptValue::UndefinedValue)", "undefined"); + toString.insert("QScriptValue(QScriptValue::NullValue)", "null"); + toString.insert("QScriptValue(true)", "true"); + toString.insert("QScriptValue(false)", "false"); + toString.insert("QScriptValue(int(122))", "122"); + toString.insert("QScriptValue(uint(124))", "124"); + toString.insert("QScriptValue(0)", "0"); + toString.insert("QScriptValue(0.0)", "0"); + toString.insert("QScriptValue(123.0)", "123"); + toString.insert("QScriptValue(6.37e-8)", "6.37e-8"); + toString.insert("QScriptValue(-6.37e-8)", "-6.37e-8"); + toString.insert("QScriptValue(0x43211234)", "1126240820"); + toString.insert("QScriptValue(0x10000)", "65536"); + toString.insert("QScriptValue(0x10001)", "65537"); + toString.insert("QScriptValue(qSNaN())", "NaN"); + toString.insert("QScriptValue(qQNaN())", "NaN"); + toString.insert("QScriptValue(qInf())", "Infinity"); + toString.insert("QScriptValue(-qInf())", "-Infinity"); + toString.insert("QScriptValue(\"NaN\")", "NaN"); + toString.insert("QScriptValue(\"Infinity\")", "Infinity"); + toString.insert("QScriptValue(\"-Infinity\")", "-Infinity"); + toString.insert("QScriptValue(\"ciao\")", "ciao"); + toString.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", "ciao"); + toString.insert("QScriptValue(QString(\"\"))", ""); + toString.insert("QScriptValue(QString())", ""); + toString.insert("QScriptValue(QString(\"0\"))", "0"); + toString.insert("QScriptValue(QString(\"123\"))", "123"); + toString.insert("QScriptValue(QString(\"12.4\"))", "12.4"); + toString.insert("QScriptValue(0, QScriptValue::UndefinedValue)", "undefined"); + toString.insert("QScriptValue(0, QScriptValue::NullValue)", "null"); + toString.insert("QScriptValue(0, true)", "true"); + toString.insert("QScriptValue(0, false)", "false"); + toString.insert("QScriptValue(0, int(122))", "122"); + toString.insert("QScriptValue(0, uint(124))", "124"); + toString.insert("QScriptValue(0, 0)", "0"); + toString.insert("QScriptValue(0, 0.0)", "0"); + toString.insert("QScriptValue(0, 123.0)", "123"); + toString.insert("QScriptValue(0, 6.37e-8)", "6.37e-8"); + toString.insert("QScriptValue(0, -6.37e-8)", "-6.37e-8"); + toString.insert("QScriptValue(0, 0x43211234)", "1126240820"); + toString.insert("QScriptValue(0, 0x10000)", "65536"); + toString.insert("QScriptValue(0, 0x10001)", "65537"); + toString.insert("QScriptValue(0, qSNaN())", "NaN"); + toString.insert("QScriptValue(0, qQNaN())", "NaN"); + toString.insert("QScriptValue(0, qInf())", "Infinity"); + toString.insert("QScriptValue(0, -qInf())", "-Infinity"); + toString.insert("QScriptValue(0, \"NaN\")", "NaN"); + toString.insert("QScriptValue(0, \"Infinity\")", "Infinity"); + toString.insert("QScriptValue(0, \"-Infinity\")", "-Infinity"); + toString.insert("QScriptValue(0, \"ciao\")", "ciao"); + toString.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", "ciao"); + toString.insert("QScriptValue(0, QString(\"\"))", ""); + toString.insert("QScriptValue(0, QString())", ""); + toString.insert("QScriptValue(0, QString(\"0\"))", "0"); + toString.insert("QScriptValue(0, QString(\"123\"))", "123"); + toString.insert("QScriptValue(0, QString(\"12.3\"))", "12.3"); + toString.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", "undefined"); + toString.insert("QScriptValue(engine, QScriptValue::NullValue)", "null"); + toString.insert("QScriptValue(engine, true)", "true"); + toString.insert("QScriptValue(engine, false)", "false"); + toString.insert("QScriptValue(engine, int(122))", "122"); + toString.insert("QScriptValue(engine, uint(124))", "124"); + toString.insert("QScriptValue(engine, 0)", "0"); + toString.insert("QScriptValue(engine, 0.0)", "0"); + toString.insert("QScriptValue(engine, 123.0)", "123"); + toString.insert("QScriptValue(engine, 6.37e-8)", "6.37e-8"); + toString.insert("QScriptValue(engine, -6.37e-8)", "-6.37e-8"); + toString.insert("QScriptValue(engine, 0x43211234)", "1126240820"); + toString.insert("QScriptValue(engine, 0x10000)", "65536"); + toString.insert("QScriptValue(engine, 0x10001)", "65537"); + toString.insert("QScriptValue(engine, qSNaN())", "NaN"); + toString.insert("QScriptValue(engine, qQNaN())", "NaN"); + toString.insert("QScriptValue(engine, qInf())", "Infinity"); + toString.insert("QScriptValue(engine, -qInf())", "-Infinity"); + toString.insert("QScriptValue(engine, \"NaN\")", "NaN"); + toString.insert("QScriptValue(engine, \"Infinity\")", "Infinity"); + toString.insert("QScriptValue(engine, \"-Infinity\")", "-Infinity"); + toString.insert("QScriptValue(engine, \"ciao\")", "ciao"); + toString.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", "ciao"); + toString.insert("QScriptValue(engine, QString(\"\"))", ""); + toString.insert("QScriptValue(engine, QString())", ""); + toString.insert("QScriptValue(engine, QString(\"0\"))", "0"); + toString.insert("QScriptValue(engine, QString(\"123\"))", "123"); + toString.insert("QScriptValue(engine, QString(\"1.23\"))", "1.23"); + toString.insert("engine->evaluate(\"[]\")", ""); + toString.insert("engine->evaluate(\"{}\")", "undefined"); + toString.insert("engine->evaluate(\"Object.prototype\")", "[object Object]"); + toString.insert("engine->evaluate(\"Date.prototype\")", "Invalid Date"); + toString.insert("engine->evaluate(\"Array.prototype\")", ""); + toString.insert("engine->evaluate(\"Function.prototype\")", "function () {\n [native code]\n}"); + toString.insert("engine->evaluate(\"Error.prototype\")", "Error: Unknown error"); + toString.insert("engine->evaluate(\"Object\")", "function Object() {\n [native code]\n}"); + toString.insert("engine->evaluate(\"Array\")", "function Array() {\n [native code]\n}"); + toString.insert("engine->evaluate(\"Number\")", "function Number() {\n [native code]\n}"); + toString.insert("engine->evaluate(\"Function\")", "function Function() {\n [native code]\n}"); + toString.insert("engine->evaluate(\"(function() { return 1; })\")", "function () { return 1; }"); + toString.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", "function () { return 'ciao'; }"); + toString.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", "function () { throw new Error('foo'); }"); + toString.insert("engine->evaluate(\"/foo/\")", "/foo/"); + 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->nullValue()", "null"); + toString.insert("engine->undefinedValue()", "undefined"); + } + newRow(expr) << toString.value(expr); +} + +void tst_QScriptValue::toString_test(const char*, const QScriptValue& value) +{ + QFETCH(QString, expected); + QCOMPARE(value.toString(), expected); +} + +DEFINE_TEST_FUNCTION(toString) + + +void tst_QScriptValue::toNumber_initData() +{ + QTest::addColumn<qsreal>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::toNumber_makeData(const char* expr) +{ + static QHash<QString, qsreal> toNumber; + if (toNumber.isEmpty()) { + toNumber.insert("QScriptValue()", 0); + toNumber.insert("QScriptValue(QScriptValue::UndefinedValue)", qQNaN()); + toNumber.insert("QScriptValue(QScriptValue::NullValue)", 0); + toNumber.insert("QScriptValue(true)", 1); + toNumber.insert("QScriptValue(false)", 0); + toNumber.insert("QScriptValue(int(122))", 122); + toNumber.insert("QScriptValue(uint(124))", 124); + toNumber.insert("QScriptValue(0)", 0); + toNumber.insert("QScriptValue(0.0)", 0); + toNumber.insert("QScriptValue(123.0)", 123); + toNumber.insert("QScriptValue(6.37e-8)", 6.369999999999999e-08); + toNumber.insert("QScriptValue(-6.37e-8)", -6.369999999999999e-08); + toNumber.insert("QScriptValue(0x43211234)", 1126240820); + toNumber.insert("QScriptValue(0x10000)", 65536); + toNumber.insert("QScriptValue(0x10001)", 65537); + toNumber.insert("QScriptValue(qSNaN())", qQNaN()); + toNumber.insert("QScriptValue(qQNaN())", qQNaN()); + toNumber.insert("QScriptValue(qInf())", qInf()); + toNumber.insert("QScriptValue(-qInf())", qInf()); + toNumber.insert("QScriptValue(\"NaN\")", qQNaN()); + toNumber.insert("QScriptValue(\"Infinity\")", qInf()); + toNumber.insert("QScriptValue(\"-Infinity\")", qInf()); + toNumber.insert("QScriptValue(\"ciao\")", qQNaN()); + toNumber.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", qQNaN()); + toNumber.insert("QScriptValue(QString(\"\"))", 0); + toNumber.insert("QScriptValue(QString())", 0); + toNumber.insert("QScriptValue(QString(\"0\"))", 0); + toNumber.insert("QScriptValue(QString(\"123\"))", 123); + toNumber.insert("QScriptValue(QString(\"12.4\"))", 12.4); + toNumber.insert("QScriptValue(0, QScriptValue::UndefinedValue)", qQNaN()); + toNumber.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + toNumber.insert("QScriptValue(0, true)", 1); + toNumber.insert("QScriptValue(0, false)", 0); + toNumber.insert("QScriptValue(0, int(122))", 122); + toNumber.insert("QScriptValue(0, uint(124))", 124); + toNumber.insert("QScriptValue(0, 0)", 0); + toNumber.insert("QScriptValue(0, 0.0)", 0); + toNumber.insert("QScriptValue(0, 123.0)", 123); + toNumber.insert("QScriptValue(0, 6.37e-8)", 6.369999999999999e-08); + toNumber.insert("QScriptValue(0, -6.37e-8)", -6.369999999999999e-08); + toNumber.insert("QScriptValue(0, 0x43211234)", 1126240820); + toNumber.insert("QScriptValue(0, 0x10000)", 65536); + toNumber.insert("QScriptValue(0, 0x10001)", 65537); + toNumber.insert("QScriptValue(0, qSNaN())", qQNaN()); + toNumber.insert("QScriptValue(0, qQNaN())", qQNaN()); + toNumber.insert("QScriptValue(0, qInf())", qInf()); + toNumber.insert("QScriptValue(0, -qInf())", qInf()); + toNumber.insert("QScriptValue(0, \"NaN\")", qQNaN()); + toNumber.insert("QScriptValue(0, \"Infinity\")", qInf()); + toNumber.insert("QScriptValue(0, \"-Infinity\")", qInf()); + toNumber.insert("QScriptValue(0, \"ciao\")", qQNaN()); + toNumber.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", qQNaN()); + toNumber.insert("QScriptValue(0, QString(\"\"))", 0); + toNumber.insert("QScriptValue(0, QString())", 0); + toNumber.insert("QScriptValue(0, QString(\"0\"))", 0); + toNumber.insert("QScriptValue(0, QString(\"123\"))", 123); + toNumber.insert("QScriptValue(0, QString(\"12.3\"))", 12.3); + toNumber.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", qQNaN()); + toNumber.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + toNumber.insert("QScriptValue(engine, true)", 1); + toNumber.insert("QScriptValue(engine, false)", 0); + toNumber.insert("QScriptValue(engine, int(122))", 122); + toNumber.insert("QScriptValue(engine, uint(124))", 124); + toNumber.insert("QScriptValue(engine, 0)", 0); + toNumber.insert("QScriptValue(engine, 0.0)", 0); + toNumber.insert("QScriptValue(engine, 123.0)", 123); + toNumber.insert("QScriptValue(engine, 6.37e-8)", 6.369999999999999e-08); + toNumber.insert("QScriptValue(engine, -6.37e-8)", -6.369999999999999e-08); + toNumber.insert("QScriptValue(engine, 0x43211234)", 1126240820); + toNumber.insert("QScriptValue(engine, 0x10000)", 65536); + toNumber.insert("QScriptValue(engine, 0x10001)", 65537); + toNumber.insert("QScriptValue(engine, qSNaN())", qQNaN()); + toNumber.insert("QScriptValue(engine, qQNaN())", qQNaN()); + toNumber.insert("QScriptValue(engine, qInf())", qInf()); + toNumber.insert("QScriptValue(engine, -qInf())", qInf()); + toNumber.insert("QScriptValue(engine, \"NaN\")", qQNaN()); + toNumber.insert("QScriptValue(engine, \"Infinity\")", qInf()); + toNumber.insert("QScriptValue(engine, \"-Infinity\")", qInf()); + toNumber.insert("QScriptValue(engine, \"ciao\")", qQNaN()); + toNumber.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", qQNaN()); + toNumber.insert("QScriptValue(engine, QString(\"\"))", 0); + toNumber.insert("QScriptValue(engine, QString())", 0); + toNumber.insert("QScriptValue(engine, QString(\"0\"))", 0); + toNumber.insert("QScriptValue(engine, QString(\"123\"))", 123); + toNumber.insert("QScriptValue(engine, QString(\"1.23\"))", 1.23); + toNumber.insert("engine->evaluate(\"[]\")", 0); + toNumber.insert("engine->evaluate(\"{}\")", qQNaN()); + toNumber.insert("engine->evaluate(\"Object.prototype\")", qQNaN()); + toNumber.insert("engine->evaluate(\"Date.prototype\")", qQNaN()); + toNumber.insert("engine->evaluate(\"Array.prototype\")", 0); + toNumber.insert("engine->evaluate(\"Function.prototype\")", qQNaN()); + toNumber.insert("engine->evaluate(\"Error.prototype\")", qQNaN()); + toNumber.insert("engine->evaluate(\"Object\")", qQNaN()); + toNumber.insert("engine->evaluate(\"Array\")", qQNaN()); + toNumber.insert("engine->evaluate(\"Number\")", qQNaN()); + toNumber.insert("engine->evaluate(\"Function\")", qQNaN()); + toNumber.insert("engine->evaluate(\"(function() { return 1; })\")", qQNaN()); + toNumber.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", qQNaN()); + toNumber.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", qQNaN()); + toNumber.insert("engine->evaluate(\"/foo/\")", qQNaN()); + toNumber.insert("engine->evaluate(\"new Object()\")", qQNaN()); + toNumber.insert("engine->evaluate(\"new Array()\")", 0); + toNumber.insert("engine->evaluate(\"new Error()\")", qQNaN()); + toNumber.insert("engine->nullValue()", 0); + toNumber.insert("engine->undefinedValue()", qQNaN()); + } + newRow(expr) << toNumber.value(expr); +} + +void tst_QScriptValue::toNumber_test(const char*, const QScriptValue& value) +{ + QFETCH(qsreal, expected); + if (qIsNaN(expected)) { + QVERIFY(qIsNaN(value.toNumber())); + return; + } + if (qIsInf(expected)) { + QVERIFY(qIsInf(value.toNumber())); + return; + } + QCOMPARE(value.toNumber(), expected); +} + +DEFINE_TEST_FUNCTION(toNumber) + + +void tst_QScriptValue::toBool_initData() +{ + QTest::addColumn<bool>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::toBool_makeData(const char* expr) +{ + static QHash<QString, bool> toBool; + if (toBool.isEmpty()) { + toBool.insert("QScriptValue()", false); + toBool.insert("QScriptValue(QScriptValue::UndefinedValue)", false); + toBool.insert("QScriptValue(QScriptValue::NullValue)", false); + toBool.insert("QScriptValue(true)", true); + toBool.insert("QScriptValue(false)", false); + toBool.insert("QScriptValue(int(122))", true); + toBool.insert("QScriptValue(uint(124))", true); + toBool.insert("QScriptValue(0)", false); + toBool.insert("QScriptValue(0.0)", false); + toBool.insert("QScriptValue(123.0)", true); + toBool.insert("QScriptValue(6.37e-8)", true); + toBool.insert("QScriptValue(-6.37e-8)", true); + toBool.insert("QScriptValue(0x43211234)", true); + toBool.insert("QScriptValue(0x10000)", true); + toBool.insert("QScriptValue(0x10001)", true); + toBool.insert("QScriptValue(qSNaN())", false); + toBool.insert("QScriptValue(qQNaN())", false); + toBool.insert("QScriptValue(qInf())", true); + toBool.insert("QScriptValue(-qInf())", true); + toBool.insert("QScriptValue(\"NaN\")", true); + toBool.insert("QScriptValue(\"Infinity\")", true); + toBool.insert("QScriptValue(\"-Infinity\")", true); + toBool.insert("QScriptValue(\"ciao\")", true); + toBool.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", true); + toBool.insert("QScriptValue(QString(\"\"))", false); + toBool.insert("QScriptValue(QString())", false); + toBool.insert("QScriptValue(QString(\"0\"))", true); + toBool.insert("QScriptValue(QString(\"123\"))", true); + toBool.insert("QScriptValue(QString(\"12.4\"))", true); + toBool.insert("QScriptValue(0, QScriptValue::UndefinedValue)", false); + toBool.insert("QScriptValue(0, QScriptValue::NullValue)", false); + toBool.insert("QScriptValue(0, true)", true); + toBool.insert("QScriptValue(0, false)", false); + toBool.insert("QScriptValue(0, int(122))", true); + toBool.insert("QScriptValue(0, uint(124))", true); + toBool.insert("QScriptValue(0, 0)", false); + toBool.insert("QScriptValue(0, 0.0)", false); + toBool.insert("QScriptValue(0, 123.0)", true); + toBool.insert("QScriptValue(0, 6.37e-8)", true); + toBool.insert("QScriptValue(0, -6.37e-8)", true); + toBool.insert("QScriptValue(0, 0x43211234)", true); + toBool.insert("QScriptValue(0, 0x10000)", true); + toBool.insert("QScriptValue(0, 0x10001)", true); + toBool.insert("QScriptValue(0, qSNaN())", false); + toBool.insert("QScriptValue(0, qQNaN())", false); + toBool.insert("QScriptValue(0, qInf())", true); + toBool.insert("QScriptValue(0, -qInf())", true); + toBool.insert("QScriptValue(0, \"NaN\")", true); + toBool.insert("QScriptValue(0, \"Infinity\")", true); + toBool.insert("QScriptValue(0, \"-Infinity\")", true); + toBool.insert("QScriptValue(0, \"ciao\")", true); + toBool.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", true); + toBool.insert("QScriptValue(0, QString(\"\"))", false); + toBool.insert("QScriptValue(0, QString())", false); + toBool.insert("QScriptValue(0, QString(\"0\"))", true); + toBool.insert("QScriptValue(0, QString(\"123\"))", true); + toBool.insert("QScriptValue(0, QString(\"12.3\"))", true); + toBool.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", false); + toBool.insert("QScriptValue(engine, QScriptValue::NullValue)", false); + toBool.insert("QScriptValue(engine, true)", true); + toBool.insert("QScriptValue(engine, false)", false); + toBool.insert("QScriptValue(engine, int(122))", true); + toBool.insert("QScriptValue(engine, uint(124))", true); + toBool.insert("QScriptValue(engine, 0)", false); + toBool.insert("QScriptValue(engine, 0.0)", false); + toBool.insert("QScriptValue(engine, 123.0)", true); + toBool.insert("QScriptValue(engine, 6.37e-8)", true); + toBool.insert("QScriptValue(engine, -6.37e-8)", true); + toBool.insert("QScriptValue(engine, 0x43211234)", true); + toBool.insert("QScriptValue(engine, 0x10000)", true); + toBool.insert("QScriptValue(engine, 0x10001)", true); + toBool.insert("QScriptValue(engine, qSNaN())", false); + toBool.insert("QScriptValue(engine, qQNaN())", false); + toBool.insert("QScriptValue(engine, qInf())", true); + toBool.insert("QScriptValue(engine, -qInf())", true); + toBool.insert("QScriptValue(engine, \"NaN\")", true); + toBool.insert("QScriptValue(engine, \"Infinity\")", true); + toBool.insert("QScriptValue(engine, \"-Infinity\")", true); + toBool.insert("QScriptValue(engine, \"ciao\")", true); + toBool.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", true); + toBool.insert("QScriptValue(engine, QString(\"\"))", false); + toBool.insert("QScriptValue(engine, QString())", false); + toBool.insert("QScriptValue(engine, QString(\"0\"))", true); + toBool.insert("QScriptValue(engine, QString(\"123\"))", true); + toBool.insert("QScriptValue(engine, QString(\"1.23\"))", true); + toBool.insert("engine->evaluate(\"[]\")", true); + toBool.insert("engine->evaluate(\"{}\")", false); + toBool.insert("engine->evaluate(\"Object.prototype\")", true); + toBool.insert("engine->evaluate(\"Date.prototype\")", true); + toBool.insert("engine->evaluate(\"Array.prototype\")", true); + toBool.insert("engine->evaluate(\"Function.prototype\")", true); + toBool.insert("engine->evaluate(\"Error.prototype\")", true); + toBool.insert("engine->evaluate(\"Object\")", true); + toBool.insert("engine->evaluate(\"Array\")", true); + toBool.insert("engine->evaluate(\"Number\")", true); + toBool.insert("engine->evaluate(\"Function\")", true); + toBool.insert("engine->evaluate(\"(function() { return 1; })\")", true); + toBool.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", true); + toBool.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", true); + toBool.insert("engine->evaluate(\"/foo/\")", true); + toBool.insert("engine->evaluate(\"new Object()\")", true); + toBool.insert("engine->evaluate(\"new Array()\")", true); + toBool.insert("engine->evaluate(\"new Error()\")", true); + toBool.insert("engine->nullValue()", false); + toBool.insert("engine->undefinedValue()", false); + } + newRow(expr) << toBool.value(expr); +} + +void tst_QScriptValue::toBool_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.toBool(), expected); +} + +DEFINE_TEST_FUNCTION(toBool) + + +void tst_QScriptValue::toBoolean_initData() +{ + QTest::addColumn<bool>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::toBoolean_makeData(const char* expr) +{ + static QHash<QString, bool> toBoolean; + if (toBoolean.isEmpty()) { + toBoolean.insert("QScriptValue()", false); + toBoolean.insert("QScriptValue(QScriptValue::UndefinedValue)", false); + toBoolean.insert("QScriptValue(QScriptValue::NullValue)", false); + toBoolean.insert("QScriptValue(true)", true); + toBoolean.insert("QScriptValue(false)", false); + toBoolean.insert("QScriptValue(int(122))", true); + toBoolean.insert("QScriptValue(uint(124))", true); + toBoolean.insert("QScriptValue(0)", false); + toBoolean.insert("QScriptValue(0.0)", false); + toBoolean.insert("QScriptValue(123.0)", true); + toBoolean.insert("QScriptValue(6.37e-8)", true); + toBoolean.insert("QScriptValue(-6.37e-8)", true); + toBoolean.insert("QScriptValue(0x43211234)", true); + toBoolean.insert("QScriptValue(0x10000)", true); + toBoolean.insert("QScriptValue(0x10001)", true); + toBoolean.insert("QScriptValue(qSNaN())", false); + toBoolean.insert("QScriptValue(qQNaN())", false); + toBoolean.insert("QScriptValue(qInf())", true); + toBoolean.insert("QScriptValue(-qInf())", true); + toBoolean.insert("QScriptValue(\"NaN\")", true); + toBoolean.insert("QScriptValue(\"Infinity\")", true); + toBoolean.insert("QScriptValue(\"-Infinity\")", true); + toBoolean.insert("QScriptValue(\"ciao\")", true); + toBoolean.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", true); + toBoolean.insert("QScriptValue(QString(\"\"))", false); + toBoolean.insert("QScriptValue(QString())", false); + toBoolean.insert("QScriptValue(QString(\"0\"))", true); + toBoolean.insert("QScriptValue(QString(\"123\"))", true); + toBoolean.insert("QScriptValue(QString(\"12.4\"))", true); + toBoolean.insert("QScriptValue(0, QScriptValue::UndefinedValue)", false); + toBoolean.insert("QScriptValue(0, QScriptValue::NullValue)", false); + toBoolean.insert("QScriptValue(0, true)", true); + toBoolean.insert("QScriptValue(0, false)", false); + toBoolean.insert("QScriptValue(0, int(122))", true); + toBoolean.insert("QScriptValue(0, uint(124))", true); + toBoolean.insert("QScriptValue(0, 0)", false); + toBoolean.insert("QScriptValue(0, 0.0)", false); + toBoolean.insert("QScriptValue(0, 123.0)", true); + toBoolean.insert("QScriptValue(0, 6.37e-8)", true); + toBoolean.insert("QScriptValue(0, -6.37e-8)", true); + toBoolean.insert("QScriptValue(0, 0x43211234)", true); + toBoolean.insert("QScriptValue(0, 0x10000)", true); + toBoolean.insert("QScriptValue(0, 0x10001)", true); + toBoolean.insert("QScriptValue(0, qSNaN())", false); + toBoolean.insert("QScriptValue(0, qQNaN())", false); + toBoolean.insert("QScriptValue(0, qInf())", true); + toBoolean.insert("QScriptValue(0, -qInf())", true); + toBoolean.insert("QScriptValue(0, \"NaN\")", true); + toBoolean.insert("QScriptValue(0, \"Infinity\")", true); + toBoolean.insert("QScriptValue(0, \"-Infinity\")", true); + toBoolean.insert("QScriptValue(0, \"ciao\")", true); + toBoolean.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", true); + toBoolean.insert("QScriptValue(0, QString(\"\"))", false); + toBoolean.insert("QScriptValue(0, QString())", false); + toBoolean.insert("QScriptValue(0, QString(\"0\"))", true); + toBoolean.insert("QScriptValue(0, QString(\"123\"))", true); + toBoolean.insert("QScriptValue(0, QString(\"12.3\"))", true); + toBoolean.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", false); + toBoolean.insert("QScriptValue(engine, QScriptValue::NullValue)", false); + toBoolean.insert("QScriptValue(engine, true)", true); + toBoolean.insert("QScriptValue(engine, false)", false); + toBoolean.insert("QScriptValue(engine, int(122))", true); + toBoolean.insert("QScriptValue(engine, uint(124))", true); + toBoolean.insert("QScriptValue(engine, 0)", false); + toBoolean.insert("QScriptValue(engine, 0.0)", false); + toBoolean.insert("QScriptValue(engine, 123.0)", true); + toBoolean.insert("QScriptValue(engine, 6.37e-8)", true); + toBoolean.insert("QScriptValue(engine, -6.37e-8)", true); + toBoolean.insert("QScriptValue(engine, 0x43211234)", true); + toBoolean.insert("QScriptValue(engine, 0x10000)", true); + toBoolean.insert("QScriptValue(engine, 0x10001)", true); + toBoolean.insert("QScriptValue(engine, qSNaN())", false); + toBoolean.insert("QScriptValue(engine, qQNaN())", false); + toBoolean.insert("QScriptValue(engine, qInf())", true); + toBoolean.insert("QScriptValue(engine, -qInf())", true); + toBoolean.insert("QScriptValue(engine, \"NaN\")", true); + toBoolean.insert("QScriptValue(engine, \"Infinity\")", true); + toBoolean.insert("QScriptValue(engine, \"-Infinity\")", true); + toBoolean.insert("QScriptValue(engine, \"ciao\")", true); + toBoolean.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", true); + toBoolean.insert("QScriptValue(engine, QString(\"\"))", false); + toBoolean.insert("QScriptValue(engine, QString())", false); + toBoolean.insert("QScriptValue(engine, QString(\"0\"))", true); + toBoolean.insert("QScriptValue(engine, QString(\"123\"))", true); + toBoolean.insert("QScriptValue(engine, QString(\"1.23\"))", true); + toBoolean.insert("engine->evaluate(\"[]\")", true); + toBoolean.insert("engine->evaluate(\"{}\")", false); + toBoolean.insert("engine->evaluate(\"Object.prototype\")", true); + toBoolean.insert("engine->evaluate(\"Date.prototype\")", true); + toBoolean.insert("engine->evaluate(\"Array.prototype\")", true); + toBoolean.insert("engine->evaluate(\"Function.prototype\")", true); + toBoolean.insert("engine->evaluate(\"Error.prototype\")", true); + toBoolean.insert("engine->evaluate(\"Object\")", true); + toBoolean.insert("engine->evaluate(\"Array\")", true); + toBoolean.insert("engine->evaluate(\"Number\")", true); + toBoolean.insert("engine->evaluate(\"Function\")", true); + toBoolean.insert("engine->evaluate(\"(function() { return 1; })\")", true); + toBoolean.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", true); + toBoolean.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", true); + toBoolean.insert("engine->evaluate(\"/foo/\")", true); + toBoolean.insert("engine->evaluate(\"new Object()\")", true); + toBoolean.insert("engine->evaluate(\"new Array()\")", true); + toBoolean.insert("engine->evaluate(\"new Error()\")", true); + toBoolean.insert("engine->nullValue()", false); + toBoolean.insert("engine->undefinedValue()", false); + } + newRow(expr) << toBoolean.value(expr); +} + +void tst_QScriptValue::toBoolean_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.toBoolean(), expected); +} + +DEFINE_TEST_FUNCTION(toBoolean) + + +void tst_QScriptValue::toInteger_initData() +{ + QTest::addColumn<qsreal>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::toInteger_makeData(const char* expr) +{ + static QHash<QString, qsreal> toInteger; + if (toInteger.isEmpty()) { + toInteger.insert("QScriptValue()", 0); + toInteger.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); + toInteger.insert("QScriptValue(QScriptValue::NullValue)", 0); + toInteger.insert("QScriptValue(true)", 1); + toInteger.insert("QScriptValue(false)", 0); + toInteger.insert("QScriptValue(int(122))", 122); + toInteger.insert("QScriptValue(uint(124))", 124); + toInteger.insert("QScriptValue(0)", 0); + toInteger.insert("QScriptValue(0.0)", 0); + toInteger.insert("QScriptValue(123.0)", 123); + toInteger.insert("QScriptValue(6.37e-8)", 0); + toInteger.insert("QScriptValue(-6.37e-8)", 0); + toInteger.insert("QScriptValue(0x43211234)", 1126240820); + toInteger.insert("QScriptValue(0x10000)", 65536); + toInteger.insert("QScriptValue(0x10001)", 65537); + toInteger.insert("QScriptValue(qSNaN())", 0); + toInteger.insert("QScriptValue(qQNaN())", 0); + toInteger.insert("QScriptValue(qInf())", qInf()); + toInteger.insert("QScriptValue(-qInf())", qInf()); + toInteger.insert("QScriptValue(\"NaN\")", 0); + toInteger.insert("QScriptValue(\"Infinity\")", qInf()); + toInteger.insert("QScriptValue(\"-Infinity\")", qInf()); + toInteger.insert("QScriptValue(\"ciao\")", 0); + toInteger.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); + toInteger.insert("QScriptValue(QString(\"\"))", 0); + toInteger.insert("QScriptValue(QString())", 0); + toInteger.insert("QScriptValue(QString(\"0\"))", 0); + toInteger.insert("QScriptValue(QString(\"123\"))", 123); + toInteger.insert("QScriptValue(QString(\"12.4\"))", 12); + toInteger.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); + toInteger.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + toInteger.insert("QScriptValue(0, true)", 1); + toInteger.insert("QScriptValue(0, false)", 0); + toInteger.insert("QScriptValue(0, int(122))", 122); + toInteger.insert("QScriptValue(0, uint(124))", 124); + toInteger.insert("QScriptValue(0, 0)", 0); + toInteger.insert("QScriptValue(0, 0.0)", 0); + toInteger.insert("QScriptValue(0, 123.0)", 123); + toInteger.insert("QScriptValue(0, 6.37e-8)", 0); + toInteger.insert("QScriptValue(0, -6.37e-8)", 0); + toInteger.insert("QScriptValue(0, 0x43211234)", 1126240820); + toInteger.insert("QScriptValue(0, 0x10000)", 65536); + toInteger.insert("QScriptValue(0, 0x10001)", 65537); + toInteger.insert("QScriptValue(0, qSNaN())", 0); + toInteger.insert("QScriptValue(0, qQNaN())", 0); + toInteger.insert("QScriptValue(0, qInf())", qInf()); + toInteger.insert("QScriptValue(0, -qInf())", qInf()); + toInteger.insert("QScriptValue(0, \"NaN\")", 0); + toInteger.insert("QScriptValue(0, \"Infinity\")", qInf()); + toInteger.insert("QScriptValue(0, \"-Infinity\")", qInf()); + toInteger.insert("QScriptValue(0, \"ciao\")", 0); + toInteger.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); + toInteger.insert("QScriptValue(0, QString(\"\"))", 0); + toInteger.insert("QScriptValue(0, QString())", 0); + toInteger.insert("QScriptValue(0, QString(\"0\"))", 0); + toInteger.insert("QScriptValue(0, QString(\"123\"))", 123); + toInteger.insert("QScriptValue(0, QString(\"12.3\"))", 12); + toInteger.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); + toInteger.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + toInteger.insert("QScriptValue(engine, true)", 1); + toInteger.insert("QScriptValue(engine, false)", 0); + toInteger.insert("QScriptValue(engine, int(122))", 122); + toInteger.insert("QScriptValue(engine, uint(124))", 124); + toInteger.insert("QScriptValue(engine, 0)", 0); + toInteger.insert("QScriptValue(engine, 0.0)", 0); + toInteger.insert("QScriptValue(engine, 123.0)", 123); + toInteger.insert("QScriptValue(engine, 6.37e-8)", 0); + toInteger.insert("QScriptValue(engine, -6.37e-8)", 0); + toInteger.insert("QScriptValue(engine, 0x43211234)", 1126240820); + toInteger.insert("QScriptValue(engine, 0x10000)", 65536); + toInteger.insert("QScriptValue(engine, 0x10001)", 65537); + toInteger.insert("QScriptValue(engine, qSNaN())", 0); + toInteger.insert("QScriptValue(engine, qQNaN())", 0); + toInteger.insert("QScriptValue(engine, qInf())", qInf()); + toInteger.insert("QScriptValue(engine, -qInf())", qInf()); + toInteger.insert("QScriptValue(engine, \"NaN\")", 0); + toInteger.insert("QScriptValue(engine, \"Infinity\")", qInf()); + toInteger.insert("QScriptValue(engine, \"-Infinity\")", qInf()); + toInteger.insert("QScriptValue(engine, \"ciao\")", 0); + toInteger.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); + toInteger.insert("QScriptValue(engine, QString(\"\"))", 0); + toInteger.insert("QScriptValue(engine, QString())", 0); + toInteger.insert("QScriptValue(engine, QString(\"0\"))", 0); + toInteger.insert("QScriptValue(engine, QString(\"123\"))", 123); + toInteger.insert("QScriptValue(engine, QString(\"1.23\"))", 1); + toInteger.insert("engine->evaluate(\"[]\")", 0); + toInteger.insert("engine->evaluate(\"{}\")", 0); + toInteger.insert("engine->evaluate(\"Object.prototype\")", 0); + toInteger.insert("engine->evaluate(\"Date.prototype\")", 0); + toInteger.insert("engine->evaluate(\"Array.prototype\")", 0); + toInteger.insert("engine->evaluate(\"Function.prototype\")", 0); + toInteger.insert("engine->evaluate(\"Error.prototype\")", 0); + toInteger.insert("engine->evaluate(\"Object\")", 0); + toInteger.insert("engine->evaluate(\"Array\")", 0); + toInteger.insert("engine->evaluate(\"Number\")", 0); + toInteger.insert("engine->evaluate(\"Function\")", 0); + toInteger.insert("engine->evaluate(\"(function() { return 1; })\")", 0); + toInteger.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); + toInteger.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); + toInteger.insert("engine->evaluate(\"/foo/\")", 0); + toInteger.insert("engine->evaluate(\"new Object()\")", 0); + toInteger.insert("engine->evaluate(\"new Array()\")", 0); + toInteger.insert("engine->evaluate(\"new Error()\")", 0); + toInteger.insert("engine->nullValue()", 0); + toInteger.insert("engine->undefinedValue()", 0); + } + newRow(expr) << toInteger.value(expr); +} + +void tst_QScriptValue::toInteger_test(const char*, const QScriptValue& value) +{ + QFETCH(qsreal, expected); + if (qIsInf(expected)) { + QVERIFY(qIsInf(value.toInteger())); + return; + } + QCOMPARE(value.toInteger(), expected); +} + +DEFINE_TEST_FUNCTION(toInteger) + + +void tst_QScriptValue::toInt32_initData() +{ + QTest::addColumn<qint32>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::toInt32_makeData(const char* expr) +{ + static QHash<QString, qint32> toInt32; + if (toInt32.isEmpty()) { + toInt32.insert("QScriptValue()", 0); + toInt32.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); + toInt32.insert("QScriptValue(QScriptValue::NullValue)", 0); + toInt32.insert("QScriptValue(true)", 1); + toInt32.insert("QScriptValue(false)", 0); + toInt32.insert("QScriptValue(int(122))", 122); + toInt32.insert("QScriptValue(uint(124))", 124); + toInt32.insert("QScriptValue(0)", 0); + toInt32.insert("QScriptValue(0.0)", 0); + toInt32.insert("QScriptValue(123.0)", 123); + toInt32.insert("QScriptValue(6.37e-8)", 0); + toInt32.insert("QScriptValue(-6.37e-8)", 0); + toInt32.insert("QScriptValue(0x43211234)", 1126240820); + toInt32.insert("QScriptValue(0x10000)", 65536); + toInt32.insert("QScriptValue(0x10001)", 65537); + toInt32.insert("QScriptValue(qSNaN())", 0); + toInt32.insert("QScriptValue(qQNaN())", 0); + toInt32.insert("QScriptValue(qInf())", 0); + toInt32.insert("QScriptValue(-qInf())", 0); + toInt32.insert("QScriptValue(\"NaN\")", 0); + toInt32.insert("QScriptValue(\"Infinity\")", 0); + toInt32.insert("QScriptValue(\"-Infinity\")", 0); + toInt32.insert("QScriptValue(\"ciao\")", 0); + toInt32.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); + toInt32.insert("QScriptValue(QString(\"\"))", 0); + toInt32.insert("QScriptValue(QString())", 0); + toInt32.insert("QScriptValue(QString(\"0\"))", 0); + toInt32.insert("QScriptValue(QString(\"123\"))", 123); + toInt32.insert("QScriptValue(QString(\"12.4\"))", 12); + toInt32.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); + toInt32.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + toInt32.insert("QScriptValue(0, true)", 1); + toInt32.insert("QScriptValue(0, false)", 0); + toInt32.insert("QScriptValue(0, int(122))", 122); + toInt32.insert("QScriptValue(0, uint(124))", 124); + toInt32.insert("QScriptValue(0, 0)", 0); + toInt32.insert("QScriptValue(0, 0.0)", 0); + toInt32.insert("QScriptValue(0, 123.0)", 123); + toInt32.insert("QScriptValue(0, 6.37e-8)", 0); + toInt32.insert("QScriptValue(0, -6.37e-8)", 0); + toInt32.insert("QScriptValue(0, 0x43211234)", 1126240820); + toInt32.insert("QScriptValue(0, 0x10000)", 65536); + toInt32.insert("QScriptValue(0, 0x10001)", 65537); + toInt32.insert("QScriptValue(0, qSNaN())", 0); + toInt32.insert("QScriptValue(0, qQNaN())", 0); + toInt32.insert("QScriptValue(0, qInf())", 0); + toInt32.insert("QScriptValue(0, -qInf())", 0); + toInt32.insert("QScriptValue(0, \"NaN\")", 0); + toInt32.insert("QScriptValue(0, \"Infinity\")", 0); + toInt32.insert("QScriptValue(0, \"-Infinity\")", 0); + toInt32.insert("QScriptValue(0, \"ciao\")", 0); + toInt32.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); + toInt32.insert("QScriptValue(0, QString(\"\"))", 0); + toInt32.insert("QScriptValue(0, QString())", 0); + toInt32.insert("QScriptValue(0, QString(\"0\"))", 0); + toInt32.insert("QScriptValue(0, QString(\"123\"))", 123); + toInt32.insert("QScriptValue(0, QString(\"12.3\"))", 12); + toInt32.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); + toInt32.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + toInt32.insert("QScriptValue(engine, true)", 1); + toInt32.insert("QScriptValue(engine, false)", 0); + toInt32.insert("QScriptValue(engine, int(122))", 122); + toInt32.insert("QScriptValue(engine, uint(124))", 124); + toInt32.insert("QScriptValue(engine, 0)", 0); + toInt32.insert("QScriptValue(engine, 0.0)", 0); + toInt32.insert("QScriptValue(engine, 123.0)", 123); + toInt32.insert("QScriptValue(engine, 6.37e-8)", 0); + toInt32.insert("QScriptValue(engine, -6.37e-8)", 0); + toInt32.insert("QScriptValue(engine, 0x43211234)", 1126240820); + toInt32.insert("QScriptValue(engine, 0x10000)", 65536); + toInt32.insert("QScriptValue(engine, 0x10001)", 65537); + toInt32.insert("QScriptValue(engine, qSNaN())", 0); + toInt32.insert("QScriptValue(engine, qQNaN())", 0); + toInt32.insert("QScriptValue(engine, qInf())", 0); + toInt32.insert("QScriptValue(engine, -qInf())", 0); + toInt32.insert("QScriptValue(engine, \"NaN\")", 0); + toInt32.insert("QScriptValue(engine, \"Infinity\")", 0); + toInt32.insert("QScriptValue(engine, \"-Infinity\")", 0); + toInt32.insert("QScriptValue(engine, \"ciao\")", 0); + toInt32.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); + toInt32.insert("QScriptValue(engine, QString(\"\"))", 0); + toInt32.insert("QScriptValue(engine, QString())", 0); + toInt32.insert("QScriptValue(engine, QString(\"0\"))", 0); + toInt32.insert("QScriptValue(engine, QString(\"123\"))", 123); + toInt32.insert("QScriptValue(engine, QString(\"1.23\"))", 1); + toInt32.insert("engine->evaluate(\"[]\")", 0); + toInt32.insert("engine->evaluate(\"{}\")", 0); + toInt32.insert("engine->evaluate(\"Object.prototype\")", 0); + toInt32.insert("engine->evaluate(\"Date.prototype\")", 0); + toInt32.insert("engine->evaluate(\"Array.prototype\")", 0); + toInt32.insert("engine->evaluate(\"Function.prototype\")", 0); + toInt32.insert("engine->evaluate(\"Error.prototype\")", 0); + toInt32.insert("engine->evaluate(\"Object\")", 0); + toInt32.insert("engine->evaluate(\"Array\")", 0); + toInt32.insert("engine->evaluate(\"Number\")", 0); + toInt32.insert("engine->evaluate(\"Function\")", 0); + toInt32.insert("engine->evaluate(\"(function() { return 1; })\")", 0); + toInt32.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); + toInt32.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); + toInt32.insert("engine->evaluate(\"/foo/\")", 0); + toInt32.insert("engine->evaluate(\"new Object()\")", 0); + toInt32.insert("engine->evaluate(\"new Array()\")", 0); + toInt32.insert("engine->evaluate(\"new Error()\")", 0); + toInt32.insert("engine->nullValue()", 0); + toInt32.insert("engine->undefinedValue()", 0); + } + newRow(expr) << toInt32.value(expr); +} + +void tst_QScriptValue::toInt32_test(const char*, const QScriptValue& value) +{ + QFETCH(qint32, expected); + QCOMPARE(value.toInt32(), expected); +} + +DEFINE_TEST_FUNCTION(toInt32) + + +void tst_QScriptValue::toUInt32_initData() +{ + QTest::addColumn<quint32>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::toUInt32_makeData(const char* expr) +{ + static QHash<QString, quint32> toUInt32; + if (toUInt32.isEmpty()) { + toUInt32.insert("QScriptValue()", 0); + toUInt32.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); + toUInt32.insert("QScriptValue(QScriptValue::NullValue)", 0); + toUInt32.insert("QScriptValue(true)", 1); + toUInt32.insert("QScriptValue(false)", 0); + toUInt32.insert("QScriptValue(int(122))", 122); + toUInt32.insert("QScriptValue(uint(124))", 124); + toUInt32.insert("QScriptValue(0)", 0); + toUInt32.insert("QScriptValue(0.0)", 0); + toUInt32.insert("QScriptValue(123.0)", 123); + toUInt32.insert("QScriptValue(6.37e-8)", 0); + toUInt32.insert("QScriptValue(-6.37e-8)", 0); + toUInt32.insert("QScriptValue(0x43211234)", 1126240820); + toUInt32.insert("QScriptValue(0x10000)", 65536); + toUInt32.insert("QScriptValue(0x10001)", 65537); + toUInt32.insert("QScriptValue(qSNaN())", 0); + toUInt32.insert("QScriptValue(qQNaN())", 0); + toUInt32.insert("QScriptValue(qInf())", 0); + toUInt32.insert("QScriptValue(-qInf())", 0); + toUInt32.insert("QScriptValue(\"NaN\")", 0); + toUInt32.insert("QScriptValue(\"Infinity\")", 0); + toUInt32.insert("QScriptValue(\"-Infinity\")", 0); + toUInt32.insert("QScriptValue(\"ciao\")", 0); + toUInt32.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); + toUInt32.insert("QScriptValue(QString(\"\"))", 0); + toUInt32.insert("QScriptValue(QString())", 0); + toUInt32.insert("QScriptValue(QString(\"0\"))", 0); + toUInt32.insert("QScriptValue(QString(\"123\"))", 123); + toUInt32.insert("QScriptValue(QString(\"12.4\"))", 12); + toUInt32.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); + toUInt32.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + toUInt32.insert("QScriptValue(0, true)", 1); + toUInt32.insert("QScriptValue(0, false)", 0); + toUInt32.insert("QScriptValue(0, int(122))", 122); + toUInt32.insert("QScriptValue(0, uint(124))", 124); + toUInt32.insert("QScriptValue(0, 0)", 0); + toUInt32.insert("QScriptValue(0, 0.0)", 0); + toUInt32.insert("QScriptValue(0, 123.0)", 123); + toUInt32.insert("QScriptValue(0, 6.37e-8)", 0); + toUInt32.insert("QScriptValue(0, -6.37e-8)", 0); + toUInt32.insert("QScriptValue(0, 0x43211234)", 1126240820); + toUInt32.insert("QScriptValue(0, 0x10000)", 65536); + toUInt32.insert("QScriptValue(0, 0x10001)", 65537); + toUInt32.insert("QScriptValue(0, qSNaN())", 0); + toUInt32.insert("QScriptValue(0, qQNaN())", 0); + toUInt32.insert("QScriptValue(0, qInf())", 0); + toUInt32.insert("QScriptValue(0, -qInf())", 0); + toUInt32.insert("QScriptValue(0, \"NaN\")", 0); + toUInt32.insert("QScriptValue(0, \"Infinity\")", 0); + toUInt32.insert("QScriptValue(0, \"-Infinity\")", 0); + toUInt32.insert("QScriptValue(0, \"ciao\")", 0); + toUInt32.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); + toUInt32.insert("QScriptValue(0, QString(\"\"))", 0); + toUInt32.insert("QScriptValue(0, QString())", 0); + toUInt32.insert("QScriptValue(0, QString(\"0\"))", 0); + toUInt32.insert("QScriptValue(0, QString(\"123\"))", 123); + toUInt32.insert("QScriptValue(0, QString(\"12.3\"))", 12); + toUInt32.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); + toUInt32.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + toUInt32.insert("QScriptValue(engine, true)", 1); + toUInt32.insert("QScriptValue(engine, false)", 0); + toUInt32.insert("QScriptValue(engine, int(122))", 122); + toUInt32.insert("QScriptValue(engine, uint(124))", 124); + toUInt32.insert("QScriptValue(engine, 0)", 0); + toUInt32.insert("QScriptValue(engine, 0.0)", 0); + toUInt32.insert("QScriptValue(engine, 123.0)", 123); + toUInt32.insert("QScriptValue(engine, 6.37e-8)", 0); + toUInt32.insert("QScriptValue(engine, -6.37e-8)", 0); + toUInt32.insert("QScriptValue(engine, 0x43211234)", 1126240820); + toUInt32.insert("QScriptValue(engine, 0x10000)", 65536); + toUInt32.insert("QScriptValue(engine, 0x10001)", 65537); + toUInt32.insert("QScriptValue(engine, qSNaN())", 0); + toUInt32.insert("QScriptValue(engine, qQNaN())", 0); + toUInt32.insert("QScriptValue(engine, qInf())", 0); + toUInt32.insert("QScriptValue(engine, -qInf())", 0); + toUInt32.insert("QScriptValue(engine, \"NaN\")", 0); + toUInt32.insert("QScriptValue(engine, \"Infinity\")", 0); + toUInt32.insert("QScriptValue(engine, \"-Infinity\")", 0); + toUInt32.insert("QScriptValue(engine, \"ciao\")", 0); + toUInt32.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); + toUInt32.insert("QScriptValue(engine, QString(\"\"))", 0); + toUInt32.insert("QScriptValue(engine, QString())", 0); + toUInt32.insert("QScriptValue(engine, QString(\"0\"))", 0); + toUInt32.insert("QScriptValue(engine, QString(\"123\"))", 123); + toUInt32.insert("QScriptValue(engine, QString(\"1.23\"))", 1); + toUInt32.insert("engine->evaluate(\"[]\")", 0); + toUInt32.insert("engine->evaluate(\"{}\")", 0); + toUInt32.insert("engine->evaluate(\"Object.prototype\")", 0); + toUInt32.insert("engine->evaluate(\"Date.prototype\")", 0); + toUInt32.insert("engine->evaluate(\"Array.prototype\")", 0); + toUInt32.insert("engine->evaluate(\"Function.prototype\")", 0); + toUInt32.insert("engine->evaluate(\"Error.prototype\")", 0); + toUInt32.insert("engine->evaluate(\"Object\")", 0); + toUInt32.insert("engine->evaluate(\"Array\")", 0); + toUInt32.insert("engine->evaluate(\"Number\")", 0); + toUInt32.insert("engine->evaluate(\"Function\")", 0); + toUInt32.insert("engine->evaluate(\"(function() { return 1; })\")", 0); + toUInt32.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); + toUInt32.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); + toUInt32.insert("engine->evaluate(\"/foo/\")", 0); + toUInt32.insert("engine->evaluate(\"new Object()\")", 0); + toUInt32.insert("engine->evaluate(\"new Array()\")", 0); + toUInt32.insert("engine->evaluate(\"new Error()\")", 0); + toUInt32.insert("engine->nullValue()", 0); + toUInt32.insert("engine->undefinedValue()", 0); + } + newRow(expr) << toUInt32.value(expr); +} + +void tst_QScriptValue::toUInt32_test(const char*, const QScriptValue& value) +{ + QFETCH(quint32, expected); + QCOMPARE(value.toUInt32(), expected); +} + +DEFINE_TEST_FUNCTION(toUInt32) + + +void tst_QScriptValue::toUInt16_initData() +{ + QTest::addColumn<quint16>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::toUInt16_makeData(const char* expr) +{ + static QHash<QString, quint16> toUInt16; + if (toUInt16.isEmpty()) { + toUInt16.insert("QScriptValue()", 0); + toUInt16.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); + toUInt16.insert("QScriptValue(QScriptValue::NullValue)", 0); + toUInt16.insert("QScriptValue(true)", 1); + toUInt16.insert("QScriptValue(false)", 0); + toUInt16.insert("QScriptValue(int(122))", 122); + toUInt16.insert("QScriptValue(uint(124))", 124); + toUInt16.insert("QScriptValue(0)", 0); + toUInt16.insert("QScriptValue(0.0)", 0); + toUInt16.insert("QScriptValue(123.0)", 123); + toUInt16.insert("QScriptValue(6.37e-8)", 0); + toUInt16.insert("QScriptValue(-6.37e-8)", 0); + toUInt16.insert("QScriptValue(0x43211234)", 4660); + toUInt16.insert("QScriptValue(0x10000)", 0); + toUInt16.insert("QScriptValue(0x10001)", 1); + toUInt16.insert("QScriptValue(qSNaN())", 0); + toUInt16.insert("QScriptValue(qQNaN())", 0); + toUInt16.insert("QScriptValue(qInf())", 0); + toUInt16.insert("QScriptValue(-qInf())", 0); + toUInt16.insert("QScriptValue(\"NaN\")", 0); + toUInt16.insert("QScriptValue(\"Infinity\")", 0); + toUInt16.insert("QScriptValue(\"-Infinity\")", 0); + toUInt16.insert("QScriptValue(\"ciao\")", 0); + toUInt16.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); + toUInt16.insert("QScriptValue(QString(\"\"))", 0); + toUInt16.insert("QScriptValue(QString())", 0); + toUInt16.insert("QScriptValue(QString(\"0\"))", 0); + toUInt16.insert("QScriptValue(QString(\"123\"))", 123); + toUInt16.insert("QScriptValue(QString(\"12.4\"))", 12); + toUInt16.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); + toUInt16.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + toUInt16.insert("QScriptValue(0, true)", 1); + toUInt16.insert("QScriptValue(0, false)", 0); + toUInt16.insert("QScriptValue(0, int(122))", 122); + toUInt16.insert("QScriptValue(0, uint(124))", 124); + toUInt16.insert("QScriptValue(0, 0)", 0); + toUInt16.insert("QScriptValue(0, 0.0)", 0); + toUInt16.insert("QScriptValue(0, 123.0)", 123); + toUInt16.insert("QScriptValue(0, 6.37e-8)", 0); + toUInt16.insert("QScriptValue(0, -6.37e-8)", 0); + toUInt16.insert("QScriptValue(0, 0x43211234)", 4660); + toUInt16.insert("QScriptValue(0, 0x10000)", 0); + toUInt16.insert("QScriptValue(0, 0x10001)", 1); + toUInt16.insert("QScriptValue(0, qSNaN())", 0); + toUInt16.insert("QScriptValue(0, qQNaN())", 0); + toUInt16.insert("QScriptValue(0, qInf())", 0); + toUInt16.insert("QScriptValue(0, -qInf())", 0); + toUInt16.insert("QScriptValue(0, \"NaN\")", 0); + toUInt16.insert("QScriptValue(0, \"Infinity\")", 0); + toUInt16.insert("QScriptValue(0, \"-Infinity\")", 0); + toUInt16.insert("QScriptValue(0, \"ciao\")", 0); + toUInt16.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); + toUInt16.insert("QScriptValue(0, QString(\"\"))", 0); + toUInt16.insert("QScriptValue(0, QString())", 0); + toUInt16.insert("QScriptValue(0, QString(\"0\"))", 0); + toUInt16.insert("QScriptValue(0, QString(\"123\"))", 123); + toUInt16.insert("QScriptValue(0, QString(\"12.3\"))", 12); + toUInt16.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); + toUInt16.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + toUInt16.insert("QScriptValue(engine, true)", 1); + toUInt16.insert("QScriptValue(engine, false)", 0); + toUInt16.insert("QScriptValue(engine, int(122))", 122); + toUInt16.insert("QScriptValue(engine, uint(124))", 124); + toUInt16.insert("QScriptValue(engine, 0)", 0); + toUInt16.insert("QScriptValue(engine, 0.0)", 0); + toUInt16.insert("QScriptValue(engine, 123.0)", 123); + toUInt16.insert("QScriptValue(engine, 6.37e-8)", 0); + toUInt16.insert("QScriptValue(engine, -6.37e-8)", 0); + toUInt16.insert("QScriptValue(engine, 0x43211234)", 4660); + toUInt16.insert("QScriptValue(engine, 0x10000)", 0); + toUInt16.insert("QScriptValue(engine, 0x10001)", 1); + toUInt16.insert("QScriptValue(engine, qSNaN())", 0); + toUInt16.insert("QScriptValue(engine, qQNaN())", 0); + toUInt16.insert("QScriptValue(engine, qInf())", 0); + toUInt16.insert("QScriptValue(engine, -qInf())", 0); + toUInt16.insert("QScriptValue(engine, \"NaN\")", 0); + toUInt16.insert("QScriptValue(engine, \"Infinity\")", 0); + toUInt16.insert("QScriptValue(engine, \"-Infinity\")", 0); + toUInt16.insert("QScriptValue(engine, \"ciao\")", 0); + toUInt16.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); + toUInt16.insert("QScriptValue(engine, QString(\"\"))", 0); + toUInt16.insert("QScriptValue(engine, QString())", 0); + toUInt16.insert("QScriptValue(engine, QString(\"0\"))", 0); + toUInt16.insert("QScriptValue(engine, QString(\"123\"))", 123); + toUInt16.insert("QScriptValue(engine, QString(\"1.23\"))", 1); + toUInt16.insert("engine->evaluate(\"[]\")", 0); + toUInt16.insert("engine->evaluate(\"{}\")", 0); + toUInt16.insert("engine->evaluate(\"Object.prototype\")", 0); + toUInt16.insert("engine->evaluate(\"Date.prototype\")", 0); + toUInt16.insert("engine->evaluate(\"Array.prototype\")", 0); + toUInt16.insert("engine->evaluate(\"Function.prototype\")", 0); + toUInt16.insert("engine->evaluate(\"Error.prototype\")", 0); + toUInt16.insert("engine->evaluate(\"Object\")", 0); + toUInt16.insert("engine->evaluate(\"Array\")", 0); + toUInt16.insert("engine->evaluate(\"Number\")", 0); + toUInt16.insert("engine->evaluate(\"Function\")", 0); + toUInt16.insert("engine->evaluate(\"(function() { return 1; })\")", 0); + toUInt16.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); + toUInt16.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); + toUInt16.insert("engine->evaluate(\"/foo/\")", 0); + toUInt16.insert("engine->evaluate(\"new Object()\")", 0); + toUInt16.insert("engine->evaluate(\"new Array()\")", 0); + toUInt16.insert("engine->evaluate(\"new Error()\")", 0); + toUInt16.insert("engine->nullValue()", 0); + toUInt16.insert("engine->undefinedValue()", 0); + } + newRow(expr) << toUInt16.value(expr); +} + +void tst_QScriptValue::toUInt16_test(const char*, const QScriptValue& value) +{ + QFETCH(quint16, expected); + QCOMPARE(value.toUInt16(), expected); +} + +DEFINE_TEST_FUNCTION(toUInt16) + + +void tst_QScriptValue::equals_initData() +{ + QTest::addColumn<QScriptValue>("other"); + QTest::addColumn<bool>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::equals_makeData(const char *expr) +{ + static QSet<QString> equals; + if (equals.isEmpty()) { + equals.insert("QScriptValue() <=> QScriptValue()"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::NullValue)"); + 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->nullValue()"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->undefinedValue()"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)"); + 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->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(false) <=> QScriptValue(false)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(false) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(false) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(false) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString(\"0\"))"); + 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(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(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(0) <=> QScriptValue(false)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(0) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(0) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString(\"0\"))"); + 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.0) <=> QScriptValue(false)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString(\"0\"))"); + 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(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(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) <=> 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(0x43211234) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, 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()) <=> 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(\"NaN\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, \"NaN\")"); + 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\") <=> 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(\"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(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(\"\")) <=> QScriptValue(false)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString())"); + 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()) <=> QScriptValue(false)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString())"); + 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(\"0\")) <=> QScriptValue(false)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, false)"); + 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(\"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(\"12.4\")) <=> QScriptValue(QString(\"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)"); + equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::NullValue)"); + 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->nullValue()"); + equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->undefinedValue()"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)"); + 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->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, false) <=> QScriptValue(false)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString(\"0\"))"); + 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, 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, 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, 0) <=> QScriptValue(false)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"0\"))"); + 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.0) <=> QScriptValue(false)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, false)"); + 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(0, QString(\"\"))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, false)"); + 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) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"0\"))"); + 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, 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, 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) <=> 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, 0x43211234) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, 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, 0x10001) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, 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()) <=> 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, \"NaN\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"NaN\")"); + 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\") <=> 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, \"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, 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(\"\")) <=> QScriptValue(false)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0.0)"); + 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(\"\")) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(false)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0.0)"); + 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()) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"new Array()\")"); + 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)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, false)"); + 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(\"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(\"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)"); + equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::NullValue)"); + 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->nullValue()"); + equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->undefinedValue()"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)"); + 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->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, false) <=> QScriptValue(false)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"0\"))"); + 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, 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, 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, 0) <=> QScriptValue(false)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"0\"))"); + 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.0) <=> QScriptValue(false)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, false)"); + 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(0, QString(\"\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, false)"); + 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) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"0\"))"); + 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, 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, 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) <=> 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, 0x43211234) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, 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, 0x10001) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 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()) <=> 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, \"NaN\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"NaN\")"); + 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\") <=> 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, \"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, 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(\"\")) <=> QScriptValue(false)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0.0)"); + 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(\"\")) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Array()\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(false)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0.0)"); + 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()) <=> engine->evaluate(\"Array.prototype\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"new Array()\")"); + 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)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, false)"); + 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(\"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(\"1.23\")) <=> QScriptValue(engine, QString(\"1.23\"))"); + 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(\"{}\") <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::NullValue)"); + 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->nullValue()"); + 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\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(false)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0.0)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString())"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, false)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0.0)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString())"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, false)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0.0)"); + 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(\"Function.prototype\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("engine->evaluate(\"Object\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"/foo/\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(false)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0.0)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString())"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, false)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0.0)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString())"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, false)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0.0)"); + 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 Error()\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("engine->nullValue() <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("engine->nullValue() <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("engine->nullValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("engine->nullValue() <=> QScriptValue(0, QScriptValue::NullValue)"); + 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->nullValue()"); + equals.insert("engine->nullValue() <=> engine->undefinedValue()"); + equals.insert("engine->undefinedValue() <=> QScriptValue(QScriptValue::UndefinedValue)"); + equals.insert("engine->undefinedValue() <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("engine->undefinedValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)"); + equals.insert("engine->undefinedValue() <=> QScriptValue(0, QScriptValue::NullValue)"); + 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->nullValue()"); + equals.insert("engine->undefinedValue() <=> engine->undefinedValue()"); + } + QHash<QString, QScriptValue>::const_iterator it; + for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { + QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key()); + newRow(tag.toLatin1()) << it.value() << equals.contains(tag); + } +} + +void tst_QScriptValue::equals_test(const char *, const QScriptValue& value) +{ + QFETCH(QScriptValue, other); + QFETCH(bool, expected); + QCOMPARE(value.equals(other), expected); +} + +DEFINE_TEST_FUNCTION(equals) + + +void tst_QScriptValue::strictlyEquals_initData() +{ + QTest::addColumn<QScriptValue>("other"); + QTest::addColumn<bool>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::strictlyEquals_makeData(const char *expr) +{ + static QSet<QString> equals; + if (equals.isEmpty()) { + equals.insert("QScriptValue() <=> QScriptValue()"); + equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); + 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->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->nullValue()"); + equals.insert("QScriptValue(true) <=> QScriptValue(true)"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(true) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(false) <=> QScriptValue(false)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, 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(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(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.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(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(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) <=> 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(0x43211234) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, 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()) <=> QScriptValue(-qInf())"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, -qInf())"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, -qInf())"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"-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(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(\"\")) <=> 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()) <=> 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(\"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(\"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(\"12.4\")) <=> QScriptValue(QString(\"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->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->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, false) <=> QScriptValue(false)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 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, 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, 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.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, 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, 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) <=> 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, 0x43211234) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, 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, 0x10001) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, 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()) <=> QScriptValue(-qInf())"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, -qInf())"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, -qInf())"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"-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, 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(\"\")) <=> 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()) <=> 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(\"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(\"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(\"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->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->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, false) <=> QScriptValue(false)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 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, 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, 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.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, 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, 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) <=> 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, 0x43211234) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, 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, 0x10001) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 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()) <=> QScriptValue(-qInf())"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, -qInf())"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -qInf())"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"-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, 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(\"\")) <=> 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()) <=> 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(\"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(\"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(\"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->undefinedValue()"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Date.prototype\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array.prototype\")"); + 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\")"); + equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"/foo/\")"); + 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->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->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->undefinedValue()"); + } + QHash<QString, QScriptValue>::const_iterator it; + for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { + QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key()); + newRow(tag.toLatin1()) << it.value() << equals.contains(tag); + } +} + +void tst_QScriptValue::strictlyEquals_test(const char *, const QScriptValue& value) +{ + QFETCH(QScriptValue, other); + QFETCH(bool, expected); + QCOMPARE(value.strictlyEquals(other), expected); +} + +DEFINE_TEST_FUNCTION(strictlyEquals) + + +void tst_QScriptValue::lessThan_initData() +{ + QTest::addColumn<QScriptValue>("other"); + QTest::addColumn<bool>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::lessThan_makeData(const char *expr) +{ + static QSet<QString> equals; + if (equals.isEmpty()) { + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(true)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, qInf())"); + 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(true) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(true) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(true) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(true) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(true) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(true) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(true) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(true) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(true) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(true) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(true) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(true) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(true) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(true) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(true) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(true) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(true) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(true) <=> QScriptValue(engine, qInf())"); + 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(false) <=> QScriptValue(true)"); + equals.insert("QScriptValue(false) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(false) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(false) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(false) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(false) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(false) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(false) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(false) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(false) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(false) <=> QScriptValue(engine, qInf())"); + 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(int(122)) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, 0x10001)"); + 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(uint(124)) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, 0x10000)"); + 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(0) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0) <=> QScriptValue(engine, qInf())"); + 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.0) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, qInf())"); + 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(123.0) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 0x10000)"); + 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(6.37e-8) <=> QScriptValue(true)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, qInf())"); + 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) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(true)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(false)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"0\"))"); + 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(\"[]\")"); + 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->nullValue()"); + 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(0x10000) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(true)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(false)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(-6.37e-8)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, -6.37e-8)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"1.23\"))"); + 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->nullValue()"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { return 1; })\")"); + 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(\"Infinity\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")"); + 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\") <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(true)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(false)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(-6.37e-8)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, -6.37e-8)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")"); + 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(\"/foo/\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Object()\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Error()\")"); + equals.insert("QScriptValue(\"-Infinity\") <=> engine->nullValue()"); + equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(true)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + 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()) <=> QScriptValue(true)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + 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(\"0\")) <=> QScriptValue(true)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + 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(\"123\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + 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(\"12.4\")) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + 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(0, QScriptValue::NullValue) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, qInf())"); + 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, true) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, qInf())"); + 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, false) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, qInf())"); + 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, int(122)) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, 0x10001)"); + 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, uint(124)) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, 0x10000)"); + 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, 0) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, qInf())"); + 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.0) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, qInf())"); + 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, 123.0) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 0x10000)"); + 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, 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))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, qInf())"); + 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) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(false)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"0\"))"); + 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(\"[]\")"); + 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->nullValue()"); + 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, 0x10000) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x43211234)"); + 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, 0x10001) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, \"Infinity\")"); + 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, -qInf()) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(false)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(-6.37e-8)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, -6.37e-8)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"1.23\"))"); + 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->nullValue()"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { return 1; })\")"); + 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, \"Infinity\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")"); + 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\") <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(false)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(-6.37e-8)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, -6.37e-8)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")"); + 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(\"/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->nullValue()"); + 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\")"); + equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + 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()) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + 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(\"0\")) <=> QScriptValue(true)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + 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(\"123\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + 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(\"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)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + 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(engine, QScriptValue::NullValue) <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, qInf())"); + 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, true) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, qInf())"); + 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, false) <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, qInf())"); + 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, int(122)) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, 0x10001)"); + 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, uint(124)) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, 0x10000)"); + 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, 0) <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, qInf())"); + 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.0) <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, qInf())"); + 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, 123.0) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 0x10000)"); + 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, 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))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, qInf())"); + 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) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(false)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"0\"))"); + 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(\"[]\")"); + 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->nullValue()"); + 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, 0x10000) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x43211234)"); + 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, 0x10001) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, \"Infinity\")"); + 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, -qInf()) <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(false)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(-6.37e-8)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString())"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, -6.37e-8)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString())"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString())"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"1.23\"))"); + 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->nullValue()"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { return 1; })\")"); + 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, \"Infinity\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")"); + 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\") <=> QScriptValue(QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(false)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0.0)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(-6.37e-8)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, false)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0.0)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, -6.37e-8)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, false)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0.0)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, -6.37e-8)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")"); + 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(\"/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->nullValue()"); + 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\")"); + equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + 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()) <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(\"-Infinity\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + 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(\"0\")) <=> QScriptValue(true)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(int(122))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(123.0)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(6.37e-8)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, true)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 6.37e-8)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, true)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + 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(\"123\")) <=> QScriptValue(uint(124))"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + 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(\"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)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0x10000)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0x10001)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(qInf())"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(\"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(\"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(\"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, int(122))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, uint(124))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 123.0)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 0x10000)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 0x10001)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, qInf())"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, \"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, \"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, \"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, int(122))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, uint(124))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 123.0)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 0x43211234)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 0x10000)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 0x10001)"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, qInf())"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, \"NaN\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, \"ciao\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Object\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Array\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Number\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Function\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + 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("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(\"Object.prototype\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Function\")"); + 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(\"Array.prototype\") <=> QScriptValue(true)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(int(122))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(123.0)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(6.37e-8)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"NaN\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"-Infinity\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"0\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, true)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, int(122))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 123.0)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 6.37e-8)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, true)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, int(122))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + 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(\"Function.prototype\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(\"NaN\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")"); + 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(\"Array\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(\"NaN\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(QString(\"0\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + 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(\"new Object()\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Function\")"); + 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 Array()\") <=> QScriptValue(true)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(int(122))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(uint(124))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(123.0)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(6.37e-8)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0x43211234)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0x10000)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0x10001)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(qInf())"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(\"NaN\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(\"-Infinity\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"0\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, true)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, int(122))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, uint(124))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 123.0)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 6.37e-8)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, qInf())"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"-Infinity\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"0\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, true)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, int(122))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, qInf())"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"-Infinity\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"0\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"1.23\"))"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Error.prototype\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"(function() { return 1; })\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); + equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); + 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 Error()\") <=> QScriptValue(\"NaN\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(\"ciao\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(0, \"NaN\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(0, \"ciao\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(engine, \"NaN\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(engine, \"ciao\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object.prototype\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Function.prototype\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Number\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { return 1; })\")"); + 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->nullValue() <=> QScriptValue(true)"); + equals.insert("engine->nullValue() <=> QScriptValue(int(122))"); + equals.insert("engine->nullValue() <=> QScriptValue(uint(124))"); + equals.insert("engine->nullValue() <=> QScriptValue(123.0)"); + equals.insert("engine->nullValue() <=> QScriptValue(6.37e-8)"); + equals.insert("engine->nullValue() <=> QScriptValue(0x43211234)"); + equals.insert("engine->nullValue() <=> QScriptValue(0x10000)"); + equals.insert("engine->nullValue() <=> QScriptValue(0x10001)"); + equals.insert("engine->nullValue() <=> QScriptValue(qInf())"); + equals.insert("engine->nullValue() <=> QScriptValue(\"Infinity\")"); + equals.insert("engine->nullValue() <=> QScriptValue(QString(\"123\"))"); + equals.insert("engine->nullValue() <=> QScriptValue(QString(\"12.4\"))"); + equals.insert("engine->nullValue() <=> QScriptValue(0, true)"); + equals.insert("engine->nullValue() <=> QScriptValue(0, int(122))"); + equals.insert("engine->nullValue() <=> QScriptValue(0, uint(124))"); + equals.insert("engine->nullValue() <=> QScriptValue(0, 123.0)"); + equals.insert("engine->nullValue() <=> QScriptValue(0, 6.37e-8)"); + equals.insert("engine->nullValue() <=> QScriptValue(0, 0x43211234)"); + equals.insert("engine->nullValue() <=> QScriptValue(0, 0x10000)"); + equals.insert("engine->nullValue() <=> QScriptValue(0, 0x10001)"); + equals.insert("engine->nullValue() <=> QScriptValue(0, qInf())"); + equals.insert("engine->nullValue() <=> QScriptValue(0, \"Infinity\")"); + equals.insert("engine->nullValue() <=> QScriptValue(0, QString(\"123\"))"); + equals.insert("engine->nullValue() <=> QScriptValue(0, QString(\"12.3\"))"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, true)"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, int(122))"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, uint(124))"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, 123.0)"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, 6.37e-8)"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, 0x43211234)"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, 0x10000)"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, 0x10001)"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, qInf())"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, \"Infinity\")"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, QString(\"123\"))"); + equals.insert("engine->nullValue() <=> QScriptValue(engine, QString(\"1.23\"))"); + } + QHash<QString, QScriptValue>::const_iterator it; + for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { + QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key()); + newRow(tag.toLatin1()) << it.value() << equals.contains(tag); + } +} + +void tst_QScriptValue::lessThan_test(const char *, const QScriptValue& value) +{ + QFETCH(QScriptValue, other); + QFETCH(bool, expected); + QCOMPARE(value.lessThan(other), expected); +} + +DEFINE_TEST_FUNCTION(lessThan) + + +void tst_QScriptValue::instanceOf_initData() +{ + QTest::addColumn<QScriptValue>("other"); + QTest::addColumn<bool>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::instanceOf_makeData(const char *expr) +{ + static QSet<QString> equals; + if (equals.isEmpty()) { + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Array\")"); + equals.insert("engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Object\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Object\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Function\")"); + equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Object\")"); + equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Object\")"); + 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\")"); + } + QHash<QString, QScriptValue>::const_iterator it; + for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { + QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key()); + newRow(tag.toLatin1()) << it.value() << equals.contains(tag); + } +} + +void tst_QScriptValue::instanceOf_test(const char *, const QScriptValue& value) +{ + QFETCH(QScriptValue, other); + QFETCH(bool, expected); + QCOMPARE(value.instanceOf(other), expected); +} + +DEFINE_TEST_FUNCTION(instanceOf) + + +void tst_QScriptValue::qscriptvalue_castQString_initData() +{ + QTest::addColumn<QString>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::qscriptvalue_castQString_makeData(const char* expr) +{ + static QHash<QString, QString> value; + if (value.isEmpty()) { + value.insert("QScriptValue()", ""); + value.insert("QScriptValue(QScriptValue::UndefinedValue)", ""); + value.insert("QScriptValue(QScriptValue::NullValue)", ""); + value.insert("QScriptValue(true)", "true"); + value.insert("QScriptValue(false)", "false"); + value.insert("QScriptValue(int(122))", "122"); + value.insert("QScriptValue(uint(124))", "124"); + value.insert("QScriptValue(0)", "0"); + value.insert("QScriptValue(0.0)", "0"); + value.insert("QScriptValue(123.0)", "123"); + value.insert("QScriptValue(6.37e-8)", "6.37e-8"); + value.insert("QScriptValue(-6.37e-8)", "-6.37e-8"); + value.insert("QScriptValue(0x43211234)", "1126240820"); + value.insert("QScriptValue(0x10000)", "65536"); + value.insert("QScriptValue(0x10001)", "65537"); + value.insert("QScriptValue(qSNaN())", "NaN"); + value.insert("QScriptValue(qQNaN())", "NaN"); + value.insert("QScriptValue(qInf())", "Infinity"); + value.insert("QScriptValue(-qInf())", "-Infinity"); + value.insert("QScriptValue(\"NaN\")", "NaN"); + value.insert("QScriptValue(\"Infinity\")", "Infinity"); + value.insert("QScriptValue(\"-Infinity\")", "-Infinity"); + value.insert("QScriptValue(\"ciao\")", "ciao"); + value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", "ciao"); + value.insert("QScriptValue(QString(\"\"))", ""); + value.insert("QScriptValue(QString())", ""); + value.insert("QScriptValue(QString(\"0\"))", "0"); + value.insert("QScriptValue(QString(\"123\"))", "123"); + value.insert("QScriptValue(QString(\"12.4\"))", "12.4"); + value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", ""); + value.insert("QScriptValue(0, QScriptValue::NullValue)", ""); + value.insert("QScriptValue(0, true)", "true"); + value.insert("QScriptValue(0, false)", "false"); + value.insert("QScriptValue(0, int(122))", "122"); + value.insert("QScriptValue(0, uint(124))", "124"); + value.insert("QScriptValue(0, 0)", "0"); + value.insert("QScriptValue(0, 0.0)", "0"); + value.insert("QScriptValue(0, 123.0)", "123"); + value.insert("QScriptValue(0, 6.37e-8)", "6.37e-8"); + value.insert("QScriptValue(0, -6.37e-8)", "-6.37e-8"); + value.insert("QScriptValue(0, 0x43211234)", "1126240820"); + value.insert("QScriptValue(0, 0x10000)", "65536"); + value.insert("QScriptValue(0, 0x10001)", "65537"); + value.insert("QScriptValue(0, qSNaN())", "NaN"); + value.insert("QScriptValue(0, qQNaN())", "NaN"); + value.insert("QScriptValue(0, qInf())", "Infinity"); + value.insert("QScriptValue(0, -qInf())", "-Infinity"); + value.insert("QScriptValue(0, \"NaN\")", "NaN"); + value.insert("QScriptValue(0, \"Infinity\")", "Infinity"); + value.insert("QScriptValue(0, \"-Infinity\")", "-Infinity"); + value.insert("QScriptValue(0, \"ciao\")", "ciao"); + value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", "ciao"); + value.insert("QScriptValue(0, QString(\"\"))", ""); + value.insert("QScriptValue(0, QString())", ""); + value.insert("QScriptValue(0, QString(\"0\"))", "0"); + value.insert("QScriptValue(0, QString(\"123\"))", "123"); + value.insert("QScriptValue(0, QString(\"12.3\"))", "12.3"); + value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", ""); + value.insert("QScriptValue(engine, QScriptValue::NullValue)", ""); + value.insert("QScriptValue(engine, true)", "true"); + value.insert("QScriptValue(engine, false)", "false"); + value.insert("QScriptValue(engine, int(122))", "122"); + value.insert("QScriptValue(engine, uint(124))", "124"); + value.insert("QScriptValue(engine, 0)", "0"); + value.insert("QScriptValue(engine, 0.0)", "0"); + value.insert("QScriptValue(engine, 123.0)", "123"); + value.insert("QScriptValue(engine, 6.37e-8)", "6.37e-8"); + value.insert("QScriptValue(engine, -6.37e-8)", "-6.37e-8"); + value.insert("QScriptValue(engine, 0x43211234)", "1126240820"); + value.insert("QScriptValue(engine, 0x10000)", "65536"); + value.insert("QScriptValue(engine, 0x10001)", "65537"); + value.insert("QScriptValue(engine, qSNaN())", "NaN"); + value.insert("QScriptValue(engine, qQNaN())", "NaN"); + value.insert("QScriptValue(engine, qInf())", "Infinity"); + value.insert("QScriptValue(engine, -qInf())", "-Infinity"); + value.insert("QScriptValue(engine, \"NaN\")", "NaN"); + value.insert("QScriptValue(engine, \"Infinity\")", "Infinity"); + value.insert("QScriptValue(engine, \"-Infinity\")", "-Infinity"); + value.insert("QScriptValue(engine, \"ciao\")", "ciao"); + value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", "ciao"); + value.insert("QScriptValue(engine, QString(\"\"))", ""); + value.insert("QScriptValue(engine, QString())", ""); + value.insert("QScriptValue(engine, QString(\"0\"))", "0"); + value.insert("QScriptValue(engine, QString(\"123\"))", "123"); + value.insert("QScriptValue(engine, QString(\"1.23\"))", "1.23"); + value.insert("engine->evaluate(\"[]\")", ""); + value.insert("engine->evaluate(\"{}\")", ""); + value.insert("engine->evaluate(\"Object.prototype\")", "[object Object]"); + value.insert("engine->evaluate(\"Date.prototype\")", "Invalid Date"); + value.insert("engine->evaluate(\"Array.prototype\")", ""); + value.insert("engine->evaluate(\"Function.prototype\")", "function () {\n [native code]\n}"); + value.insert("engine->evaluate(\"Error.prototype\")", "Error: Unknown error"); + value.insert("engine->evaluate(\"Object\")", "function Object() {\n [native code]\n}"); + value.insert("engine->evaluate(\"Array\")", "function Array() {\n [native code]\n}"); + value.insert("engine->evaluate(\"Number\")", "function Number() {\n [native code]\n}"); + value.insert("engine->evaluate(\"Function\")", "function Function() {\n [native code]\n}"); + value.insert("engine->evaluate(\"(function() { return 1; })\")", "function () { return 1; }"); + value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", "function () { return 'ciao'; }"); + value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", "function () { throw new Error('foo'); }"); + value.insert("engine->evaluate(\"/foo/\")", "/foo/"); + 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->nullValue()", ""); + value.insert("engine->undefinedValue()", ""); + } + newRow(expr) << value.value(expr); +} + +void tst_QScriptValue::qscriptvalue_castQString_test(const char*, const QScriptValue& value) +{ + QFETCH(QString, expected); + QCOMPARE(qscriptvalue_cast<QString>(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castQString) + + +void tst_QScriptValue::qscriptvalue_castqsreal_initData() +{ + QTest::addColumn<qsreal>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::qscriptvalue_castqsreal_makeData(const char* expr) +{ + static QHash<QString, qsreal> value; + if (value.isEmpty()) { + value.insert("QScriptValue()", 0); + value.insert("QScriptValue(QScriptValue::UndefinedValue)", qQNaN()); + value.insert("QScriptValue(QScriptValue::NullValue)", 0); + value.insert("QScriptValue(true)", 1); + value.insert("QScriptValue(false)", 0); + value.insert("QScriptValue(int(122))", 122); + value.insert("QScriptValue(uint(124))", 124); + value.insert("QScriptValue(0)", 0); + value.insert("QScriptValue(0.0)", 0); + value.insert("QScriptValue(123.0)", 123); + value.insert("QScriptValue(6.37e-8)", 6.369999999999999e-08); + value.insert("QScriptValue(-6.37e-8)", -6.369999999999999e-08); + value.insert("QScriptValue(0x43211234)", 1126240820); + value.insert("QScriptValue(0x10000)", 65536); + value.insert("QScriptValue(0x10001)", 65537); + value.insert("QScriptValue(qSNaN())", qQNaN()); + value.insert("QScriptValue(qQNaN())", qQNaN()); + value.insert("QScriptValue(qInf())", qInf()); + value.insert("QScriptValue(-qInf())", qInf()); + value.insert("QScriptValue(\"NaN\")", qQNaN()); + value.insert("QScriptValue(\"Infinity\")", qInf()); + value.insert("QScriptValue(\"-Infinity\")", qInf()); + value.insert("QScriptValue(\"ciao\")", qQNaN()); + value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", qQNaN()); + value.insert("QScriptValue(QString(\"\"))", 0); + value.insert("QScriptValue(QString())", 0); + value.insert("QScriptValue(QString(\"0\"))", 0); + value.insert("QScriptValue(QString(\"123\"))", 123); + value.insert("QScriptValue(QString(\"12.4\"))", 12.4); + value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", qQNaN()); + value.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + value.insert("QScriptValue(0, true)", 1); + value.insert("QScriptValue(0, false)", 0); + value.insert("QScriptValue(0, int(122))", 122); + value.insert("QScriptValue(0, uint(124))", 124); + value.insert("QScriptValue(0, 0)", 0); + value.insert("QScriptValue(0, 0.0)", 0); + value.insert("QScriptValue(0, 123.0)", 123); + value.insert("QScriptValue(0, 6.37e-8)", 6.369999999999999e-08); + value.insert("QScriptValue(0, -6.37e-8)", -6.369999999999999e-08); + value.insert("QScriptValue(0, 0x43211234)", 1126240820); + value.insert("QScriptValue(0, 0x10000)", 65536); + value.insert("QScriptValue(0, 0x10001)", 65537); + value.insert("QScriptValue(0, qSNaN())", qQNaN()); + value.insert("QScriptValue(0, qQNaN())", qQNaN()); + value.insert("QScriptValue(0, qInf())", qInf()); + value.insert("QScriptValue(0, -qInf())", qInf()); + value.insert("QScriptValue(0, \"NaN\")", qQNaN()); + value.insert("QScriptValue(0, \"Infinity\")", qInf()); + value.insert("QScriptValue(0, \"-Infinity\")", qInf()); + value.insert("QScriptValue(0, \"ciao\")", qQNaN()); + value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", qQNaN()); + value.insert("QScriptValue(0, QString(\"\"))", 0); + value.insert("QScriptValue(0, QString())", 0); + value.insert("QScriptValue(0, QString(\"0\"))", 0); + value.insert("QScriptValue(0, QString(\"123\"))", 123); + value.insert("QScriptValue(0, QString(\"12.3\"))", 12.3); + value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", qQNaN()); + value.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + value.insert("QScriptValue(engine, true)", 1); + value.insert("QScriptValue(engine, false)", 0); + value.insert("QScriptValue(engine, int(122))", 122); + value.insert("QScriptValue(engine, uint(124))", 124); + value.insert("QScriptValue(engine, 0)", 0); + value.insert("QScriptValue(engine, 0.0)", 0); + value.insert("QScriptValue(engine, 123.0)", 123); + value.insert("QScriptValue(engine, 6.37e-8)", 6.369999999999999e-08); + value.insert("QScriptValue(engine, -6.37e-8)", -6.369999999999999e-08); + value.insert("QScriptValue(engine, 0x43211234)", 1126240820); + value.insert("QScriptValue(engine, 0x10000)", 65536); + value.insert("QScriptValue(engine, 0x10001)", 65537); + value.insert("QScriptValue(engine, qSNaN())", qQNaN()); + value.insert("QScriptValue(engine, qQNaN())", qQNaN()); + value.insert("QScriptValue(engine, qInf())", qInf()); + value.insert("QScriptValue(engine, -qInf())", qInf()); + value.insert("QScriptValue(engine, \"NaN\")", qQNaN()); + value.insert("QScriptValue(engine, \"Infinity\")", qInf()); + value.insert("QScriptValue(engine, \"-Infinity\")", qInf()); + value.insert("QScriptValue(engine, \"ciao\")", qQNaN()); + value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", qQNaN()); + value.insert("QScriptValue(engine, QString(\"\"))", 0); + value.insert("QScriptValue(engine, QString())", 0); + value.insert("QScriptValue(engine, QString(\"0\"))", 0); + value.insert("QScriptValue(engine, QString(\"123\"))", 123); + value.insert("QScriptValue(engine, QString(\"1.23\"))", 1.23); + value.insert("engine->evaluate(\"[]\")", 0); + value.insert("engine->evaluate(\"{}\")", qQNaN()); + value.insert("engine->evaluate(\"Object.prototype\")", qQNaN()); + value.insert("engine->evaluate(\"Date.prototype\")", qQNaN()); + value.insert("engine->evaluate(\"Array.prototype\")", 0); + value.insert("engine->evaluate(\"Function.prototype\")", qQNaN()); + value.insert("engine->evaluate(\"Error.prototype\")", qQNaN()); + value.insert("engine->evaluate(\"Object\")", qQNaN()); + value.insert("engine->evaluate(\"Array\")", qQNaN()); + value.insert("engine->evaluate(\"Number\")", qQNaN()); + value.insert("engine->evaluate(\"Function\")", qQNaN()); + value.insert("engine->evaluate(\"(function() { return 1; })\")", qQNaN()); + value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", qQNaN()); + value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", qQNaN()); + value.insert("engine->evaluate(\"/foo/\")", qQNaN()); + value.insert("engine->evaluate(\"new Object()\")", qQNaN()); + value.insert("engine->evaluate(\"new Array()\")", 0); + value.insert("engine->evaluate(\"new Error()\")", qQNaN()); + value.insert("engine->nullValue()", 0); + value.insert("engine->undefinedValue()", qQNaN()); + } + newRow(expr) << value.value(expr); +} + +void tst_QScriptValue::qscriptvalue_castqsreal_test(const char*, const QScriptValue& value) +{ + QFETCH(qsreal, expected); + if (qIsNaN(expected)) { + QVERIFY(qIsNaN(qscriptvalue_cast<qsreal>(value))); + return; + } + if (qIsInf(expected)) { + QVERIFY(qIsInf(qscriptvalue_cast<qsreal>(value))); + return; + } + QCOMPARE(qscriptvalue_cast<qsreal>(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castqsreal) + + +void tst_QScriptValue::qscriptvalue_castbool_initData() +{ + QTest::addColumn<bool>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::qscriptvalue_castbool_makeData(const char* expr) +{ + static QHash<QString, bool> value; + if (value.isEmpty()) { + value.insert("QScriptValue()", false); + value.insert("QScriptValue(QScriptValue::UndefinedValue)", false); + value.insert("QScriptValue(QScriptValue::NullValue)", false); + value.insert("QScriptValue(true)", true); + value.insert("QScriptValue(false)", false); + value.insert("QScriptValue(int(122))", true); + value.insert("QScriptValue(uint(124))", true); + value.insert("QScriptValue(0)", false); + value.insert("QScriptValue(0.0)", false); + value.insert("QScriptValue(123.0)", true); + value.insert("QScriptValue(6.37e-8)", true); + value.insert("QScriptValue(-6.37e-8)", true); + value.insert("QScriptValue(0x43211234)", true); + value.insert("QScriptValue(0x10000)", true); + value.insert("QScriptValue(0x10001)", true); + value.insert("QScriptValue(qSNaN())", false); + value.insert("QScriptValue(qQNaN())", false); + value.insert("QScriptValue(qInf())", true); + value.insert("QScriptValue(-qInf())", true); + value.insert("QScriptValue(\"NaN\")", true); + value.insert("QScriptValue(\"Infinity\")", true); + value.insert("QScriptValue(\"-Infinity\")", true); + value.insert("QScriptValue(\"ciao\")", true); + value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", true); + value.insert("QScriptValue(QString(\"\"))", false); + value.insert("QScriptValue(QString())", false); + value.insert("QScriptValue(QString(\"0\"))", true); + value.insert("QScriptValue(QString(\"123\"))", true); + value.insert("QScriptValue(QString(\"12.4\"))", true); + value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", false); + value.insert("QScriptValue(0, QScriptValue::NullValue)", false); + value.insert("QScriptValue(0, true)", true); + value.insert("QScriptValue(0, false)", false); + value.insert("QScriptValue(0, int(122))", true); + value.insert("QScriptValue(0, uint(124))", true); + value.insert("QScriptValue(0, 0)", false); + value.insert("QScriptValue(0, 0.0)", false); + value.insert("QScriptValue(0, 123.0)", true); + value.insert("QScriptValue(0, 6.37e-8)", true); + value.insert("QScriptValue(0, -6.37e-8)", true); + value.insert("QScriptValue(0, 0x43211234)", true); + value.insert("QScriptValue(0, 0x10000)", true); + value.insert("QScriptValue(0, 0x10001)", true); + value.insert("QScriptValue(0, qSNaN())", false); + value.insert("QScriptValue(0, qQNaN())", false); + value.insert("QScriptValue(0, qInf())", true); + value.insert("QScriptValue(0, -qInf())", true); + value.insert("QScriptValue(0, \"NaN\")", true); + value.insert("QScriptValue(0, \"Infinity\")", true); + value.insert("QScriptValue(0, \"-Infinity\")", true); + value.insert("QScriptValue(0, \"ciao\")", true); + value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", true); + value.insert("QScriptValue(0, QString(\"\"))", false); + value.insert("QScriptValue(0, QString())", false); + value.insert("QScriptValue(0, QString(\"0\"))", true); + value.insert("QScriptValue(0, QString(\"123\"))", true); + value.insert("QScriptValue(0, QString(\"12.3\"))", true); + value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", false); + value.insert("QScriptValue(engine, QScriptValue::NullValue)", false); + value.insert("QScriptValue(engine, true)", true); + value.insert("QScriptValue(engine, false)", false); + value.insert("QScriptValue(engine, int(122))", true); + value.insert("QScriptValue(engine, uint(124))", true); + value.insert("QScriptValue(engine, 0)", false); + value.insert("QScriptValue(engine, 0.0)", false); + value.insert("QScriptValue(engine, 123.0)", true); + value.insert("QScriptValue(engine, 6.37e-8)", true); + value.insert("QScriptValue(engine, -6.37e-8)", true); + value.insert("QScriptValue(engine, 0x43211234)", true); + value.insert("QScriptValue(engine, 0x10000)", true); + value.insert("QScriptValue(engine, 0x10001)", true); + value.insert("QScriptValue(engine, qSNaN())", false); + value.insert("QScriptValue(engine, qQNaN())", false); + value.insert("QScriptValue(engine, qInf())", true); + value.insert("QScriptValue(engine, -qInf())", true); + value.insert("QScriptValue(engine, \"NaN\")", true); + value.insert("QScriptValue(engine, \"Infinity\")", true); + value.insert("QScriptValue(engine, \"-Infinity\")", true); + value.insert("QScriptValue(engine, \"ciao\")", true); + value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", true); + value.insert("QScriptValue(engine, QString(\"\"))", false); + value.insert("QScriptValue(engine, QString())", false); + value.insert("QScriptValue(engine, QString(\"0\"))", true); + value.insert("QScriptValue(engine, QString(\"123\"))", true); + value.insert("QScriptValue(engine, QString(\"1.23\"))", true); + value.insert("engine->evaluate(\"[]\")", true); + value.insert("engine->evaluate(\"{}\")", false); + value.insert("engine->evaluate(\"Object.prototype\")", true); + value.insert("engine->evaluate(\"Date.prototype\")", true); + value.insert("engine->evaluate(\"Array.prototype\")", true); + value.insert("engine->evaluate(\"Function.prototype\")", true); + value.insert("engine->evaluate(\"Error.prototype\")", true); + value.insert("engine->evaluate(\"Object\")", true); + value.insert("engine->evaluate(\"Array\")", true); + value.insert("engine->evaluate(\"Number\")", true); + value.insert("engine->evaluate(\"Function\")", true); + value.insert("engine->evaluate(\"(function() { return 1; })\")", true); + value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", true); + value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", true); + value.insert("engine->evaluate(\"/foo/\")", true); + value.insert("engine->evaluate(\"new Object()\")", true); + value.insert("engine->evaluate(\"new Array()\")", true); + value.insert("engine->evaluate(\"new Error()\")", true); + value.insert("engine->nullValue()", false); + value.insert("engine->undefinedValue()", false); + } + newRow(expr) << value.value(expr); +} + +void tst_QScriptValue::qscriptvalue_castbool_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(qscriptvalue_cast<bool>(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castbool) + + +void tst_QScriptValue::qscriptvalue_castqint32_initData() +{ + QTest::addColumn<qint32>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::qscriptvalue_castqint32_makeData(const char* expr) +{ + static QHash<QString, qint32> value; + if (value.isEmpty()) { + value.insert("QScriptValue()", 0); + value.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); + value.insert("QScriptValue(QScriptValue::NullValue)", 0); + value.insert("QScriptValue(true)", 1); + value.insert("QScriptValue(false)", 0); + value.insert("QScriptValue(int(122))", 122); + value.insert("QScriptValue(uint(124))", 124); + value.insert("QScriptValue(0)", 0); + value.insert("QScriptValue(0.0)", 0); + value.insert("QScriptValue(123.0)", 123); + value.insert("QScriptValue(6.37e-8)", 0); + value.insert("QScriptValue(-6.37e-8)", 0); + value.insert("QScriptValue(0x43211234)", 1126240820); + value.insert("QScriptValue(0x10000)", 65536); + value.insert("QScriptValue(0x10001)", 65537); + value.insert("QScriptValue(qSNaN())", 0); + value.insert("QScriptValue(qQNaN())", 0); + value.insert("QScriptValue(qInf())", 0); + value.insert("QScriptValue(-qInf())", 0); + value.insert("QScriptValue(\"NaN\")", 0); + value.insert("QScriptValue(\"Infinity\")", 0); + value.insert("QScriptValue(\"-Infinity\")", 0); + value.insert("QScriptValue(\"ciao\")", 0); + value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); + value.insert("QScriptValue(QString(\"\"))", 0); + value.insert("QScriptValue(QString())", 0); + value.insert("QScriptValue(QString(\"0\"))", 0); + value.insert("QScriptValue(QString(\"123\"))", 123); + value.insert("QScriptValue(QString(\"12.4\"))", 12); + value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); + value.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + value.insert("QScriptValue(0, true)", 1); + value.insert("QScriptValue(0, false)", 0); + value.insert("QScriptValue(0, int(122))", 122); + value.insert("QScriptValue(0, uint(124))", 124); + value.insert("QScriptValue(0, 0)", 0); + value.insert("QScriptValue(0, 0.0)", 0); + value.insert("QScriptValue(0, 123.0)", 123); + value.insert("QScriptValue(0, 6.37e-8)", 0); + value.insert("QScriptValue(0, -6.37e-8)", 0); + value.insert("QScriptValue(0, 0x43211234)", 1126240820); + value.insert("QScriptValue(0, 0x10000)", 65536); + value.insert("QScriptValue(0, 0x10001)", 65537); + value.insert("QScriptValue(0, qSNaN())", 0); + value.insert("QScriptValue(0, qQNaN())", 0); + value.insert("QScriptValue(0, qInf())", 0); + value.insert("QScriptValue(0, -qInf())", 0); + value.insert("QScriptValue(0, \"NaN\")", 0); + value.insert("QScriptValue(0, \"Infinity\")", 0); + value.insert("QScriptValue(0, \"-Infinity\")", 0); + value.insert("QScriptValue(0, \"ciao\")", 0); + value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); + value.insert("QScriptValue(0, QString(\"\"))", 0); + value.insert("QScriptValue(0, QString())", 0); + value.insert("QScriptValue(0, QString(\"0\"))", 0); + value.insert("QScriptValue(0, QString(\"123\"))", 123); + value.insert("QScriptValue(0, QString(\"12.3\"))", 12); + value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); + value.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + value.insert("QScriptValue(engine, true)", 1); + value.insert("QScriptValue(engine, false)", 0); + value.insert("QScriptValue(engine, int(122))", 122); + value.insert("QScriptValue(engine, uint(124))", 124); + value.insert("QScriptValue(engine, 0)", 0); + value.insert("QScriptValue(engine, 0.0)", 0); + value.insert("QScriptValue(engine, 123.0)", 123); + value.insert("QScriptValue(engine, 6.37e-8)", 0); + value.insert("QScriptValue(engine, -6.37e-8)", 0); + value.insert("QScriptValue(engine, 0x43211234)", 1126240820); + value.insert("QScriptValue(engine, 0x10000)", 65536); + value.insert("QScriptValue(engine, 0x10001)", 65537); + value.insert("QScriptValue(engine, qSNaN())", 0); + value.insert("QScriptValue(engine, qQNaN())", 0); + value.insert("QScriptValue(engine, qInf())", 0); + value.insert("QScriptValue(engine, -qInf())", 0); + value.insert("QScriptValue(engine, \"NaN\")", 0); + value.insert("QScriptValue(engine, \"Infinity\")", 0); + value.insert("QScriptValue(engine, \"-Infinity\")", 0); + value.insert("QScriptValue(engine, \"ciao\")", 0); + value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); + value.insert("QScriptValue(engine, QString(\"\"))", 0); + value.insert("QScriptValue(engine, QString())", 0); + value.insert("QScriptValue(engine, QString(\"0\"))", 0); + value.insert("QScriptValue(engine, QString(\"123\"))", 123); + value.insert("QScriptValue(engine, QString(\"1.23\"))", 1); + value.insert("engine->evaluate(\"[]\")", 0); + value.insert("engine->evaluate(\"{}\")", 0); + value.insert("engine->evaluate(\"Object.prototype\")", 0); + value.insert("engine->evaluate(\"Date.prototype\")", 0); + value.insert("engine->evaluate(\"Array.prototype\")", 0); + value.insert("engine->evaluate(\"Function.prototype\")", 0); + value.insert("engine->evaluate(\"Error.prototype\")", 0); + value.insert("engine->evaluate(\"Object\")", 0); + value.insert("engine->evaluate(\"Array\")", 0); + value.insert("engine->evaluate(\"Number\")", 0); + value.insert("engine->evaluate(\"Function\")", 0); + value.insert("engine->evaluate(\"(function() { return 1; })\")", 0); + value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); + value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); + value.insert("engine->evaluate(\"/foo/\")", 0); + value.insert("engine->evaluate(\"new Object()\")", 0); + value.insert("engine->evaluate(\"new Array()\")", 0); + value.insert("engine->evaluate(\"new Error()\")", 0); + value.insert("engine->nullValue()", 0); + value.insert("engine->undefinedValue()", 0); + } + newRow(expr) << value.value(expr); +} + +void tst_QScriptValue::qscriptvalue_castqint32_test(const char*, const QScriptValue& value) +{ + QFETCH(qint32, expected); + QCOMPARE(qscriptvalue_cast<qint32>(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castqint32) + + +void tst_QScriptValue::qscriptvalue_castquint32_initData() +{ + QTest::addColumn<quint32>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::qscriptvalue_castquint32_makeData(const char* expr) +{ + static QHash<QString, quint32> value; + if (value.isEmpty()) { + value.insert("QScriptValue()", 0); + value.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); + value.insert("QScriptValue(QScriptValue::NullValue)", 0); + value.insert("QScriptValue(true)", 1); + value.insert("QScriptValue(false)", 0); + value.insert("QScriptValue(int(122))", 122); + value.insert("QScriptValue(uint(124))", 124); + value.insert("QScriptValue(0)", 0); + value.insert("QScriptValue(0.0)", 0); + value.insert("QScriptValue(123.0)", 123); + value.insert("QScriptValue(6.37e-8)", 0); + value.insert("QScriptValue(-6.37e-8)", 0); + value.insert("QScriptValue(0x43211234)", 1126240820); + value.insert("QScriptValue(0x10000)", 65536); + value.insert("QScriptValue(0x10001)", 65537); + value.insert("QScriptValue(qSNaN())", 0); + value.insert("QScriptValue(qQNaN())", 0); + value.insert("QScriptValue(qInf())", 0); + value.insert("QScriptValue(-qInf())", 0); + value.insert("QScriptValue(\"NaN\")", 0); + value.insert("QScriptValue(\"Infinity\")", 0); + value.insert("QScriptValue(\"-Infinity\")", 0); + value.insert("QScriptValue(\"ciao\")", 0); + value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); + value.insert("QScriptValue(QString(\"\"))", 0); + value.insert("QScriptValue(QString())", 0); + value.insert("QScriptValue(QString(\"0\"))", 0); + value.insert("QScriptValue(QString(\"123\"))", 123); + value.insert("QScriptValue(QString(\"12.4\"))", 12); + value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); + value.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + value.insert("QScriptValue(0, true)", 1); + value.insert("QScriptValue(0, false)", 0); + value.insert("QScriptValue(0, int(122))", 122); + value.insert("QScriptValue(0, uint(124))", 124); + value.insert("QScriptValue(0, 0)", 0); + value.insert("QScriptValue(0, 0.0)", 0); + value.insert("QScriptValue(0, 123.0)", 123); + value.insert("QScriptValue(0, 6.37e-8)", 0); + value.insert("QScriptValue(0, -6.37e-8)", 0); + value.insert("QScriptValue(0, 0x43211234)", 1126240820); + value.insert("QScriptValue(0, 0x10000)", 65536); + value.insert("QScriptValue(0, 0x10001)", 65537); + value.insert("QScriptValue(0, qSNaN())", 0); + value.insert("QScriptValue(0, qQNaN())", 0); + value.insert("QScriptValue(0, qInf())", 0); + value.insert("QScriptValue(0, -qInf())", 0); + value.insert("QScriptValue(0, \"NaN\")", 0); + value.insert("QScriptValue(0, \"Infinity\")", 0); + value.insert("QScriptValue(0, \"-Infinity\")", 0); + value.insert("QScriptValue(0, \"ciao\")", 0); + value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); + value.insert("QScriptValue(0, QString(\"\"))", 0); + value.insert("QScriptValue(0, QString())", 0); + value.insert("QScriptValue(0, QString(\"0\"))", 0); + value.insert("QScriptValue(0, QString(\"123\"))", 123); + value.insert("QScriptValue(0, QString(\"12.3\"))", 12); + value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); + value.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + value.insert("QScriptValue(engine, true)", 1); + value.insert("QScriptValue(engine, false)", 0); + value.insert("QScriptValue(engine, int(122))", 122); + value.insert("QScriptValue(engine, uint(124))", 124); + value.insert("QScriptValue(engine, 0)", 0); + value.insert("QScriptValue(engine, 0.0)", 0); + value.insert("QScriptValue(engine, 123.0)", 123); + value.insert("QScriptValue(engine, 6.37e-8)", 0); + value.insert("QScriptValue(engine, -6.37e-8)", 0); + value.insert("QScriptValue(engine, 0x43211234)", 1126240820); + value.insert("QScriptValue(engine, 0x10000)", 65536); + value.insert("QScriptValue(engine, 0x10001)", 65537); + value.insert("QScriptValue(engine, qSNaN())", 0); + value.insert("QScriptValue(engine, qQNaN())", 0); + value.insert("QScriptValue(engine, qInf())", 0); + value.insert("QScriptValue(engine, -qInf())", 0); + value.insert("QScriptValue(engine, \"NaN\")", 0); + value.insert("QScriptValue(engine, \"Infinity\")", 0); + value.insert("QScriptValue(engine, \"-Infinity\")", 0); + value.insert("QScriptValue(engine, \"ciao\")", 0); + value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); + value.insert("QScriptValue(engine, QString(\"\"))", 0); + value.insert("QScriptValue(engine, QString())", 0); + value.insert("QScriptValue(engine, QString(\"0\"))", 0); + value.insert("QScriptValue(engine, QString(\"123\"))", 123); + value.insert("QScriptValue(engine, QString(\"1.23\"))", 1); + value.insert("engine->evaluate(\"[]\")", 0); + value.insert("engine->evaluate(\"{}\")", 0); + value.insert("engine->evaluate(\"Object.prototype\")", 0); + value.insert("engine->evaluate(\"Date.prototype\")", 0); + value.insert("engine->evaluate(\"Array.prototype\")", 0); + value.insert("engine->evaluate(\"Function.prototype\")", 0); + value.insert("engine->evaluate(\"Error.prototype\")", 0); + value.insert("engine->evaluate(\"Object\")", 0); + value.insert("engine->evaluate(\"Array\")", 0); + value.insert("engine->evaluate(\"Number\")", 0); + value.insert("engine->evaluate(\"Function\")", 0); + value.insert("engine->evaluate(\"(function() { return 1; })\")", 0); + value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); + value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); + value.insert("engine->evaluate(\"/foo/\")", 0); + value.insert("engine->evaluate(\"new Object()\")", 0); + value.insert("engine->evaluate(\"new Array()\")", 0); + value.insert("engine->evaluate(\"new Error()\")", 0); + value.insert("engine->nullValue()", 0); + value.insert("engine->undefinedValue()", 0); + } + newRow(expr) << value.value(expr); +} + +void tst_QScriptValue::qscriptvalue_castquint32_test(const char*, const QScriptValue& value) +{ + QFETCH(quint32, expected); + QCOMPARE(qscriptvalue_cast<quint32>(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castquint32) + + +void tst_QScriptValue::qscriptvalue_castquint16_initData() +{ + QTest::addColumn<quint16>("expected"); + initScriptValues(); +} + +void tst_QScriptValue::qscriptvalue_castquint16_makeData(const char* expr) +{ + static QHash<QString, quint16> value; + if (value.isEmpty()) { + value.insert("QScriptValue()", 0); + value.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); + value.insert("QScriptValue(QScriptValue::NullValue)", 0); + value.insert("QScriptValue(true)", 1); + value.insert("QScriptValue(false)", 0); + value.insert("QScriptValue(int(122))", 122); + value.insert("QScriptValue(uint(124))", 124); + value.insert("QScriptValue(0)", 0); + value.insert("QScriptValue(0.0)", 0); + value.insert("QScriptValue(123.0)", 123); + value.insert("QScriptValue(6.37e-8)", 0); + value.insert("QScriptValue(-6.37e-8)", 0); + value.insert("QScriptValue(0x43211234)", 4660); + value.insert("QScriptValue(0x10000)", 0); + value.insert("QScriptValue(0x10001)", 1); + value.insert("QScriptValue(qSNaN())", 0); + value.insert("QScriptValue(qQNaN())", 0); + value.insert("QScriptValue(qInf())", 0); + value.insert("QScriptValue(-qInf())", 0); + value.insert("QScriptValue(\"NaN\")", 0); + value.insert("QScriptValue(\"Infinity\")", 0); + value.insert("QScriptValue(\"-Infinity\")", 0); + value.insert("QScriptValue(\"ciao\")", 0); + value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); + value.insert("QScriptValue(QString(\"\"))", 0); + value.insert("QScriptValue(QString())", 0); + value.insert("QScriptValue(QString(\"0\"))", 0); + value.insert("QScriptValue(QString(\"123\"))", 123); + value.insert("QScriptValue(QString(\"12.4\"))", 12); + value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); + value.insert("QScriptValue(0, QScriptValue::NullValue)", 0); + value.insert("QScriptValue(0, true)", 1); + value.insert("QScriptValue(0, false)", 0); + value.insert("QScriptValue(0, int(122))", 122); + value.insert("QScriptValue(0, uint(124))", 124); + value.insert("QScriptValue(0, 0)", 0); + value.insert("QScriptValue(0, 0.0)", 0); + value.insert("QScriptValue(0, 123.0)", 123); + value.insert("QScriptValue(0, 6.37e-8)", 0); + value.insert("QScriptValue(0, -6.37e-8)", 0); + value.insert("QScriptValue(0, 0x43211234)", 4660); + value.insert("QScriptValue(0, 0x10000)", 0); + value.insert("QScriptValue(0, 0x10001)", 1); + value.insert("QScriptValue(0, qSNaN())", 0); + value.insert("QScriptValue(0, qQNaN())", 0); + value.insert("QScriptValue(0, qInf())", 0); + value.insert("QScriptValue(0, -qInf())", 0); + value.insert("QScriptValue(0, \"NaN\")", 0); + value.insert("QScriptValue(0, \"Infinity\")", 0); + value.insert("QScriptValue(0, \"-Infinity\")", 0); + value.insert("QScriptValue(0, \"ciao\")", 0); + value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); + value.insert("QScriptValue(0, QString(\"\"))", 0); + value.insert("QScriptValue(0, QString())", 0); + value.insert("QScriptValue(0, QString(\"0\"))", 0); + value.insert("QScriptValue(0, QString(\"123\"))", 123); + value.insert("QScriptValue(0, QString(\"12.3\"))", 12); + value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); + value.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); + value.insert("QScriptValue(engine, true)", 1); + value.insert("QScriptValue(engine, false)", 0); + value.insert("QScriptValue(engine, int(122))", 122); + value.insert("QScriptValue(engine, uint(124))", 124); + value.insert("QScriptValue(engine, 0)", 0); + value.insert("QScriptValue(engine, 0.0)", 0); + value.insert("QScriptValue(engine, 123.0)", 123); + value.insert("QScriptValue(engine, 6.37e-8)", 0); + value.insert("QScriptValue(engine, -6.37e-8)", 0); + value.insert("QScriptValue(engine, 0x43211234)", 4660); + value.insert("QScriptValue(engine, 0x10000)", 0); + value.insert("QScriptValue(engine, 0x10001)", 1); + value.insert("QScriptValue(engine, qSNaN())", 0); + value.insert("QScriptValue(engine, qQNaN())", 0); + value.insert("QScriptValue(engine, qInf())", 0); + value.insert("QScriptValue(engine, -qInf())", 0); + value.insert("QScriptValue(engine, \"NaN\")", 0); + value.insert("QScriptValue(engine, \"Infinity\")", 0); + value.insert("QScriptValue(engine, \"-Infinity\")", 0); + value.insert("QScriptValue(engine, \"ciao\")", 0); + value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); + value.insert("QScriptValue(engine, QString(\"\"))", 0); + value.insert("QScriptValue(engine, QString())", 0); + value.insert("QScriptValue(engine, QString(\"0\"))", 0); + value.insert("QScriptValue(engine, QString(\"123\"))", 123); + value.insert("QScriptValue(engine, QString(\"1.23\"))", 1); + value.insert("engine->evaluate(\"[]\")", 0); + value.insert("engine->evaluate(\"{}\")", 0); + value.insert("engine->evaluate(\"Object.prototype\")", 0); + value.insert("engine->evaluate(\"Date.prototype\")", 0); + value.insert("engine->evaluate(\"Array.prototype\")", 0); + value.insert("engine->evaluate(\"Function.prototype\")", 0); + value.insert("engine->evaluate(\"Error.prototype\")", 0); + value.insert("engine->evaluate(\"Object\")", 0); + value.insert("engine->evaluate(\"Array\")", 0); + value.insert("engine->evaluate(\"Number\")", 0); + value.insert("engine->evaluate(\"Function\")", 0); + value.insert("engine->evaluate(\"(function() { return 1; })\")", 0); + value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); + value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); + value.insert("engine->evaluate(\"/foo/\")", 0); + value.insert("engine->evaluate(\"new Object()\")", 0); + value.insert("engine->evaluate(\"new Array()\")", 0); + value.insert("engine->evaluate(\"new Error()\")", 0); + value.insert("engine->nullValue()", 0); + value.insert("engine->undefinedValue()", 0); + } + newRow(expr) << value.value(expr); +} + +void tst_QScriptValue::qscriptvalue_castquint16_test(const char*, const QScriptValue& value) +{ + QFETCH(quint16, expected); + QCOMPARE(qscriptvalue_cast<quint16>(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castquint16) diff --git a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp index 5b61da2..fe084fa 100644 --- a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp +++ b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp @@ -202,6 +202,8 @@ private slots: void sqlStatementUseIsNull_189093_data() { generic_data(); } void sqlStatementUseIsNull_189093(); + void sqlite_enable_cache_mode_data() { generic_data("QSQLITE"); } + void sqlite_enable_cache_mode(); private: void createTestTables(QSqlDatabase db); @@ -2485,5 +2487,23 @@ void tst_QSqlDatabase::oci_tables() QVERIFY(db.tables(QSql::SystemTables).contains(systemTableName.toUpper())); } +void tst_QSqlDatabase::sqlite_enable_cache_mode() +{ + QFETCH(QString, dbName); + if(dbName.endsWith(":memory:")) + QSKIP( "cache mode is meaningless for :memory: databases", SkipSingle ); + QSqlDatabase db = QSqlDatabase::database(dbName); + CHECK_DATABASE(db); + db.close(); + db.setConnectOptions("QSQLITE_ENABLE_SHARED_CACHE"); + QVERIFY_SQL(db, open()); + QSqlDatabase db2 = QSqlDatabase::cloneDatabase(db, dbName+":cachemodeconn2"); + db2.setConnectOptions("QSQLITE_ENABLE_SHARED_CACHE"); + QVERIFY_SQL(db2, open()); + QSqlQuery q(db), q2(db2); + QVERIFY_SQL(q, exec("select * from "+qTableName("qtest"))); + QVERIFY_SQL(q2, exec("select * from "+qTableName("qtest"))); +} + QTEST_MAIN(tst_QSqlDatabase) #include "tst_qsqldatabase.moc" diff --git a/tests/auto/qstyle/tst_qstyle.cpp b/tests/auto/qstyle/tst_qstyle.cpp index 51fde74..a76c82d 100644 --- a/tests/auto/qstyle/tst_qstyle.cpp +++ b/tests/auto/qstyle/tst_qstyle.cpp @@ -52,6 +52,7 @@ #include <qstyleoption.h> #include <qscrollbar.h> #include <qprogressbar.h> +#include <qtoolbutton.h> #include <qplastiquestyle.h> #include <qwindowsstyle.h> @@ -445,6 +446,8 @@ void tst_QStyle::testWindowsVistaStyle() if (QSysInfo::WindowsVersion == QSysInfo::WV_VISTA) testPainting(&vistastyle, "vista"); + else if (QSysInfo::WindowsVersion == QSysInfo::WV_XP) + testPainting(&vistastyle, "xp"); #endif } @@ -460,6 +463,7 @@ void comparePixmap(const QString &filename, const QPixmap &pixmap) void tst_QStyle::testPainting(QStyle *style, const QString &platform) { +qDebug("TEST PAINTING"); //Test Menu QString fileName = "images/" + platform + "/menu.png"; QMenu menu; @@ -538,6 +542,19 @@ void tst_QStyle::testPainting(QStyle *style, const QString &platform) pixmap = QPixmap::grabWidget(&mdiArea); mdiArea.hide(); comparePixmap(fileName, pixmap); + + // QToolButton + fileName = "images/" + platform + "/toolbutton.png"; + QToolButton tb; + tb.setToolButtonStyle(Qt::ToolButtonTextUnderIcon); + tb.setText("AaQqPpXx"); + tb.setIcon(style->standardPixmap(QStyle::SP_DirHomeIcon)); + tb.setStyle(style); + tb.show(); + pixmap = QPixmap::grabWidget(&tb); + tb.hide(); + comparePixmap(fileName, pixmap); + } void tst_QStyle::testMacStyle() diff --git a/tests/auto/qtextcodec/tst_qtextcodec.cpp b/tests/auto/qtextcodec/tst_qtextcodec.cpp index eb348fb..65b0448 100644 --- a/tests/auto/qtextcodec/tst_qtextcodec.cpp +++ b/tests/auto/qtextcodec/tst_qtextcodec.cpp @@ -47,6 +47,8 @@ #include <qtextdocument.h> #include <time.h> #include <qprocess.h> +#include <QtConcurrentMap> +#include <QThreadPool> #ifdef Q_OS_SYMBIAN #define SRCDIR "" @@ -58,6 +60,9 @@ class tst_QTextCodec : public QObject Q_OBJECT private slots: + + void threadSafety(); + void toUnicode_data(); void toUnicode(); void codecForName_data(); @@ -1904,5 +1909,46 @@ void tst_QTextCodec::toLocal8Bit() } #endif +static QByteArray loadAndConvert(const QByteArray &codecName) +{ + QTextCodec *c = QTextCodec::codecForName(codecName); + if (!c) { + qDebug() << "WARNING " << codecName << " not found? "; + return QByteArray(); + } + QString str = QString::fromLatin1(codecName); + QByteArray b = c->fromUnicode(str); + c->toUnicode(b); + return codecName; +} + +static int loadAndConvertMIB(int mib) +{ + QTextCodec *c = QTextCodec::codecForMib(mib); + if (!c) { + qDebug() << "WARNING " << mib << " not found? "; + return 0; + } + QString str = QString::number(mib); + QByteArray b = c->fromUnicode(str); + c->toUnicode(b); + return mib; +} + + +void tst_QTextCodec::threadSafety() +{ + QThreadPool::globalInstance()->setMaxThreadCount(12); + + QList<QByteArray> codecList = QTextCodec::availableCodecs(); + QFuture<QByteArray> res = QtConcurrent::mapped(codecList, loadAndConvert); + + QList<int> mibList = QTextCodec::availableMibs(); + QFuture<int> res2 = QtConcurrent::mapped(mibList, loadAndConvertMIB); + + QCOMPARE(res.results(), codecList); + QCOMPARE(res2.results(), mibList); +} + QTEST_MAIN(tst_QTextCodec) #include "tst_qtextcodec.moc" diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index ea90ae3..b59017b 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -250,6 +250,7 @@ private slots: #else void persistentWinId(); #endif + void showNativeChild(); void qobject_castInDestroyedSlot(); void showHideEvent_data(); @@ -391,11 +392,17 @@ private slots: #ifdef Q_OS_SYMBIAN void cbaVisibility(); + void fullScreenWindowModeTransitions(); + void maximizedWindowModeTransitions(); + void minimizedWindowModeTransitions(); + void normalWindowModeTransitions(); #endif void focusProxyAndInputMethods(); void scrollWithoutBackingStore(); + void taskQTBUG_7532_tabOrderWithFocusProxy(); + private: bool ensureScreenSize(int width, int height); QWidget *testWidget; @@ -4580,6 +4587,16 @@ void tst_QWidget::persistentWinId() } #endif // Q_OS_SYMBIAN +void tst_QWidget::showNativeChild() +{ + QWidget topLevel; + topLevel.setGeometry(0, 0, 100, 100); + QWidget child(&topLevel); + child.winId(); + topLevel.show(); + QTest::qWaitForWindowShown(&topLevel); +} + class ShowHideEventWidget : public QWidget { public: @@ -9687,6 +9704,226 @@ void tst_QWidget::cbaVisibility() CEikButtonGroupContainer* buttonGroup = CEikonEnv::Static()->AppUiFactory()->Cba(); QVERIFY(buttonGroup->IsVisible()); } + +void tst_QWidget::fullScreenWindowModeTransitions() +{ + QWidget widget; + QVBoxLayout *layout = new QVBoxLayout; + QPushButton *button = new QPushButton("test Button"); + layout->addWidget(button); + widget.setLayout(layout); + widget.show(); + + const QRect normalGeometry = widget.normalGeometry(); + const QRect fullScreenGeometry = qApp->desktop()->screenGeometry(&widget); + const QRect maximumScreenGeometry = qApp->desktop()->availableGeometry(&widget); + CEikStatusPane *statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane(); + CEikButtonGroupContainer *buttonGroup = CEikonEnv::Static()->AppUiFactory()->Cba(); + + //Enter + widget.showNormal(); + widget.showFullScreen(); + QCOMPARE(widget.geometry(), fullScreenGeometry); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); + + widget.showMaximized(); + widget.showFullScreen(); + QCOMPARE(widget.geometry(), fullScreenGeometry); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); + + widget.showMinimized(); + widget.showFullScreen(); + QCOMPARE(widget.geometry(), fullScreenGeometry); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); + + //Exit + widget.showFullScreen(); + widget.showNormal(); + QCOMPARE(widget.geometry(), normalGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + widget.showFullScreen(); + widget.showMaximized(); + QCOMPARE(widget.geometry(), maximumScreenGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + widget.showFullScreen(); + widget.showMinimized(); + QCOMPARE(widget.geometry(), fullScreenGeometry); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); +} + +void tst_QWidget::maximizedWindowModeTransitions() +{ + QWidget widget; + QVBoxLayout *layout = new QVBoxLayout; + QPushButton *button = new QPushButton("test Button"); + layout->addWidget(button); + widget.setLayout(layout); + widget.show(); + + const QRect normalGeometry = widget.normalGeometry(); + const QRect fullScreenGeometry = qApp->desktop()->screenGeometry(&widget); + const QRect maximumScreenGeometry = qApp->desktop()->availableGeometry(&widget); + CEikStatusPane *statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane(); + CEikButtonGroupContainer *buttonGroup = CEikonEnv::Static()->AppUiFactory()->Cba(); + + //Enter + widget.showNormal(); + widget.showMaximized(); + QCOMPARE(widget.geometry(), maximumScreenGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + widget.showFullScreen(); + widget.showMaximized(); + QCOMPARE(widget.geometry(), maximumScreenGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + widget.showMinimized(); + widget.showMaximized(); + QCOMPARE(widget.geometry(), maximumScreenGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + //Exit + widget.showMaximized(); + widget.showNormal(); + QCOMPARE(widget.geometry(), normalGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + widget.showMaximized(); + widget.showFullScreen(); + QCOMPARE(widget.geometry(), fullScreenGeometry); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); + + widget.showMaximized(); + widget.showMinimized(); + // Since showMinimized hides window decoration availableGeometry gives different value + // than with decoration visible. Altual size does not really matter since widget is invisible. + QCOMPARE(widget.geometry(), qApp->desktop()->availableGeometry(&widget)); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); +} + +void tst_QWidget::minimizedWindowModeTransitions() +{ + QWidget widget; + QVBoxLayout *layout = new QVBoxLayout; + QPushButton *button = new QPushButton("test Button"); + layout->addWidget(button); + widget.setLayout(layout); + widget.show(); + + const QRect normalGeometry = widget.normalGeometry(); + const QRect fullScreenGeometry = qApp->desktop()->screenGeometry(&widget); + const QRect maximumScreenGeometry = qApp->desktop()->availableGeometry(&widget); + CEikStatusPane *statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane(); + CEikButtonGroupContainer *buttonGroup = CEikonEnv::Static()->AppUiFactory()->Cba(); + + //Enter + widget.showNormal(); + widget.showMinimized(); + QCOMPARE(widget.geometry(), normalGeometry); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); + + widget.showFullScreen(); + widget.showMinimized(); + QCOMPARE(widget.geometry(), fullScreenGeometry); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); + + widget.showMaximized(); + widget.showMinimized(); + // Since showMinimized hides window decoration availableGeometry gives different value + // than with decoration visible. Altual size does not really matter since widget is invisible. + QCOMPARE(widget.geometry(), qApp->desktop()->availableGeometry(&widget)); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); + + //Exit + widget.showMinimized(); + widget.showNormal(); + QCOMPARE(widget.geometry(), normalGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + widget.showMinimized(); + widget.showFullScreen(); + QCOMPARE(widget.geometry(), fullScreenGeometry); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); + + widget.showMinimized(); + widget.showMaximized(); + QCOMPARE(widget.geometry(), maximumScreenGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); +} + +void tst_QWidget::normalWindowModeTransitions() +{ + QWidget widget; + QVBoxLayout *layout = new QVBoxLayout; + QPushButton *button = new QPushButton("test Button"); + layout->addWidget(button); + widget.setLayout(layout); + widget.show(); + + const QRect normalGeometry = widget.normalGeometry(); + const QRect fullScreenGeometry = qApp->desktop()->screenGeometry(&widget); + const QRect maximumScreenGeometry = qApp->desktop()->availableGeometry(&widget); + CEikStatusPane *statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane(); + CEikButtonGroupContainer *buttonGroup = CEikonEnv::Static()->AppUiFactory()->Cba(); + + //Enter + widget.showMaximized(); + widget.showNormal(); + QCOMPARE(widget.geometry(), normalGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + widget.showFullScreen(); + widget.showNormal(); + QCOMPARE(widget.geometry(), normalGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + widget.showMinimized(); + widget.showNormal(); + QCOMPARE(widget.geometry(), normalGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + //Exit + widget.showNormal(); + widget.showMaximized(); + QCOMPARE(widget.geometry(), maximumScreenGeometry); + QVERIFY(buttonGroup->IsVisible()); + QVERIFY(statusPane->IsVisible()); + + widget.showNormal(); + widget.showFullScreen(); + QCOMPARE(widget.geometry(), fullScreenGeometry); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); + + widget.showNormal(); + widget.showMinimized(); + QCOMPARE(widget.geometry(), normalGeometry); + QVERIFY(!buttonGroup->IsVisible()); + QVERIFY(!statusPane->IsVisible()); +} #endif class InputContextTester : public QInputContext @@ -9783,5 +10020,17 @@ void tst_QWidget::scrollWithoutBackingStore() QCOMPARE(child.pos(),QPoint(25,25)); } +void tst_QWidget::taskQTBUG_7532_tabOrderWithFocusProxy() +{ + QWidget w; + w.setFocusPolicy(Qt::TabFocus); + QWidget *fp = new QWidget(&w); + fp->setFocusPolicy(Qt::TabFocus); + w.setFocusProxy(fp); + QWidget::setTabOrder(&w, fp); + + // No Q_ASSERT, then it's allright. +} + QTEST_MAIN(tst_QWidget) #include "tst_qwidget.moc" diff --git a/tests/auto/uiloader/baseline/css_qtbug7737_borderimageradius.ui b/tests/auto/uiloader/baseline/css_qtbug7737_borderimageradius.ui new file mode 100644 index 0000000..089cb76 --- /dev/null +++ b/tests/auto/uiloader/baseline/css_qtbug7737_borderimageradius.ui @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>Form</class> + <widget class="QWidget" name="Form"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>207</width> + <height>69</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <property name="styleSheet"> + <string notr="true">QPushButton { border-image: url("images/pushbutton.png") 5 5 5 5; border-radius:8px; }</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QPushButton" name="pushButton"> + <property name="text"> + <string>Border image and radius</string> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro b/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro index 39267c8..3f49ccc 100644 --- a/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro +++ b/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro @@ -1,7 +1,6 @@ TEMPLATE = subdirs contains(QT_CONFIG,xmlpatterns) { SUBDIRS += lib - !wince*:lib.file = lib/lib.pro test.depends = lib } SUBDIRS += test |