summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2010-11-11 00:00:11 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2010-11-11 00:00:11 (GMT)
commitf153f135f18b0874d456f01ea8d73d127685b3fb (patch)
treed064f9acb095dbbab9970f8fc94326720ea8bac1
parentf3db8942eff666aba663c47f0dc234ac2d4ecbd4 (diff)
parente8ddca677db9b0d3ac8ff1b2079c3b000d59d6ec (diff)
downloadQt-f153f135f18b0874d456f01ea8d73d127685b3fb.zip
Qt-f153f135f18b0874d456f01ea8d73d127685b3fb.tar.gz
Qt-f153f135f18b0874d456f01ea8d73d127685b3fb.tar.bz2
Merge branch 'master-upstream' into master-water
-rw-r--r--examples/webkit/imageanalyzer/imageanalyzer.h4
-rw-r--r--examples/webkit/imageanalyzer/mainwindow.h2
-rw-r--r--src/corelib/tools/qbytearray.cpp10
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp2
-rw-r--r--src/gui/text/qfontengine.cpp5
-rw-r--r--src/gui/text/qfontengine_mac.mm4
-rw-r--r--src/gui/text/qfontengine_p.h3
-rw-r--r--src/gui/text/qtextcontrol.cpp3
-rw-r--r--src/gui/text/qtextcursor.h1
-rw-r--r--src/gui/text/qtextdocument.cpp8
-rw-r--r--src/script/api/qscriptengine.cpp18
-rw-r--r--tests/auto/collections/collections.pro1
-rw-r--r--tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp73
-rw-r--r--tests/auto/exceptionsafety/exceptionsafety.pro1
-rw-r--r--tests/auto/q_func_info/q_func_info.pro1
-rw-r--r--tests/auto/qanimationgroup/qanimationgroup.pro1
-rw-r--r--tests/auto/qatomicint/qatomicint.pro1
-rw-r--r--tests/auto/qatomicpointer/qatomicpointer.pro1
-rw-r--r--tests/auto/qbitarray/qbitarray.pro1
-rw-r--r--tests/auto/qbuffer/qbuffer.pro1
-rw-r--r--tests/auto/qbytearray/qbytearray.pro1
-rw-r--r--tests/auto/qbytearraymatcher/qbytearraymatcher.pro1
-rw-r--r--tests/auto/qcache/qcache.pro1
-rw-r--r--tests/auto/qchar/qchar.pro1
-rw-r--r--tests/auto/qcontiguouscache/qcontiguouscache.pro1
-rw-r--r--tests/auto/qcoreapplication/qcoreapplication.pro1
-rw-r--r--tests/auto/qcryptographichash/qcryptographichash.pro1
-rw-r--r--tests/auto/qdate/qdate.pro1
-rw-r--r--tests/auto/qdatetime/qdatetime.pro1
-rw-r--r--tests/auto/qdebug/qdebug.pro1
-rw-r--r--tests/auto/qdiriterator/qdiriterator.pro1
-rw-r--r--tests/auto/qeasingcurve/qeasingcurve.pro1
-rw-r--r--tests/auto/qelapsedtimer/qelapsedtimer.pro1
-rw-r--r--tests/auto/qevent/qevent.pro1
-rw-r--r--tests/auto/qexplicitlyshareddatapointer/qexplicitlyshareddatapointer.pro1
-rw-r--r--tests/auto/qflags/qflags.pro1
-rw-r--r--tests/auto/qfuture/qfuture.pro1
-rw-r--r--tests/auto/qfuturewatcher/qfuturewatcher.pro1
-rw-r--r--tests/auto/qgetputenv/qgetputenv.pro1
-rw-r--r--tests/auto/qglobal/qglobal.pro1
-rw-r--r--tests/auto/qhash/qhash.pro1
-rw-r--r--tests/auto/qlibrary/qlibrary.pro1
-rw-r--r--tests/auto/qline/qline.pro1
-rw-r--r--tests/auto/qmap/qmap.pro1
-rw-r--r--tests/auto/qmargins/qmargins.pro1
-rw-r--r--tests/auto/qmath/qmath.pro1
-rw-r--r--tests/auto/qmetatype/qmetatype.pro1
-rw-r--r--tests/auto/qmutex/qmutex.pro1
-rw-r--r--tests/auto/qmutexlocker/qmutexlocker.pro1
-rw-r--r--tests/auto/qnumeric/qnumeric.pro1
-rw-r--r--tests/auto/qobject/qobject.pro1
-rw-r--r--tests/auto/qobjectrace/qobjectrace.pro1
-rw-r--r--tests/auto/qpainter/tst_qpainter.cpp26
-rw-r--r--tests/auto/qplugin/qplugin.pro1
-rw-r--r--tests/auto/qpluginloader/qpluginloader.pro1
-rw-r--r--tests/auto/qpoint/qpoint.pro1
-rw-r--r--tests/auto/qprocessenvironment/qprocessenvironment.pro1
-rw-r--r--tests/auto/qqueue/qqueue.pro1
-rw-r--r--tests/auto/qrand/qrand.pro1
-rw-r--r--tests/auto/qreadlocker/qreadlocker.pro1
-rw-r--r--tests/auto/qreadwritelock/qreadwritelock.pro1
-rw-r--r--tests/auto/qrect/qrect.pro1
-rw-r--r--tests/auto/qregexp/qregexp.pro1
-rw-r--r--tests/auto/qresourceengine/qresourceengine.pro1
-rw-r--r--tests/auto/qringbuffer/qringbuffer.pro1
-rw-r--r--tests/auto/qscopedpointer/qscopedpointer.pro1
-rw-r--r--tests/auto/qscriptcontext/tst_qscriptcontext.cpp49
-rw-r--r--tests/auto/qscriptengine/idtranslatable-unicode.js5
-rw-r--r--tests/auto/qscriptengine/qscriptengine.qrc2
-rw-r--r--tests/auto/qscriptengine/translatable-unicode.js9
-rw-r--r--tests/auto/qscriptengine/translations/idtranslatable-unicode.qmbin0 -> 209 bytes
-rw-r--r--tests/auto/qscriptengine/translations/idtranslatable-unicode.ts26
-rw-r--r--tests/auto/qscriptengine/translations/translatable-unicode.qmbin0 -> 322 bytes
-rw-r--r--tests/auto/qscriptengine/translations/translatable-unicode.ts37
-rw-r--r--tests/auto/qscriptengine/tst_qscriptengine.cpp91
-rw-r--r--tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp94
-rw-r--r--tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp57
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue.cpp48
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue.h2
-rw-r--r--tests/auto/qscriptvaluegenerated/testgen/data.txt8
-rw-r--r--tests/auto/qscriptvaluegenerated/testgen/testgenerator.cpp41
-rw-r--r--tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_cast.cpp851
-rw-r--r--tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_comparison.cpp548
-rw-r--r--tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_init.cpp8
-rw-r--r--tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_isXXX.cpp112
-rw-r--r--tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_toXXX.cpp1058
-rw-r--r--tests/auto/qsemaphore/qsemaphore.pro1
-rw-r--r--tests/auto/qsequentialanimationgroup/qsequentialanimationgroup.pro1
-rw-r--r--tests/auto/qset/qset.pro1
-rw-r--r--tests/auto/qsharedpointer/qsharedpointer.pro1
-rw-r--r--tests/auto/qsignalspy/qsignalspy.pro1
-rw-r--r--tests/auto/qsize/qsize.pro1
-rw-r--r--tests/auto/qsizef/qsizef.pro1
-rw-r--r--tests/auto/qstate/qstate.pro1
-rw-r--r--tests/auto/qstl/qstl.pro1
-rw-r--r--tests/auto/qstring/qstring.pro1
-rw-r--r--tests/auto/qstringbuilder1/qstringbuilder1.pro1
-rw-r--r--tests/auto/qstringbuilder2/qstringbuilder2.pro1
-rw-r--r--tests/auto/qstringbuilder3/qstringbuilder3.pro1
-rw-r--r--tests/auto/qstringbuilder4/qstringbuilder4.pro1
-rw-r--r--tests/auto/qstringlist/qstringlist.pro1
-rw-r--r--tests/auto/qstringmatcher/qstringmatcher.pro1
-rw-r--r--tests/auto/qstringref/qstringref.pro1
-rw-r--r--tests/auto/qtconcurrentfilter/qtconcurrentfilter.pro2
-rw-r--r--tests/auto/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro2
-rw-r--r--tests/auto/qtconcurrentmap/qtconcurrentmap.pro2
-rw-r--r--tests/auto/qtconcurrentrun/qtconcurrentrun.pro2
-rw-r--r--tests/auto/qtconcurrentthreadengine/qtconcurrentthreadengine.pro2
-rw-r--r--tests/auto/qtextboundaryfinder/qtextboundaryfinder.pro1
-rw-r--r--tests/auto/qthread/qthread.pro1
-rw-r--r--tests/auto/qthreadonce/qthreadonce.pro1
-rw-r--r--tests/auto/qthreadpool/qthreadpool.pro1
-rw-r--r--tests/auto/qthreadstorage/qthreadstorage.pro1
-rw-r--r--tests/auto/qtime/qtime.pro1
-rw-r--r--tests/auto/qtimeline/qtimeline.pro1
-rw-r--r--tests/auto/qtimer/qtimer.pro1
-rw-r--r--tests/auto/qtmd5/qtmd5.pro1
-rw-r--r--tests/auto/qtokenautomaton/qtokenautomaton.pro1
-rw-r--r--tests/auto/qurl/qurl.pro1
-rw-r--r--tests/auto/quuid/quuid.pro1
-rw-r--r--tests/auto/qvarlengtharray/qvarlengtharray.pro1
-rw-r--r--tests/auto/qvector/qvector.pro1
-rw-r--r--tests/auto/qwaitcondition/qwaitcondition.pro1
-rw-r--r--tests/auto/qwineventnotifier/qwineventnotifier.pro1
-rw-r--r--tests/auto/qwritelocker/qwritelocker.pro1
-rw-r--r--tests/auto/selftests/selftests.pro1
-rw-r--r--tests/auto/utf8/utf8.pro1
-rw-r--r--tests/benchmarks/script/qscriptqobject/tst_qscriptqobject.cpp28
-rw-r--r--tools/qdoc3/tree.cpp71
129 files changed, 2369 insertions, 1034 deletions
diff --git a/examples/webkit/imageanalyzer/imageanalyzer.h b/examples/webkit/imageanalyzer/imageanalyzer.h
index 1bb25dc..5a96909 100644
--- a/examples/webkit/imageanalyzer/imageanalyzer.h
+++ b/examples/webkit/imageanalyzer/imageanalyzer.h
@@ -38,15 +38,17 @@
**
****************************************************************************/
-
#ifndef IMAGEANALYZER_H
#define IMAGEANALYZER_H
+
#include <QFutureWatcher>
#include <QtGui>
+QT_BEGIN_NAMESPACE
class QNetworkAccessManager;
class QNetworkReply;
class QNetworkDiskCache;
+QT_END_NAMESPACE
//! [ ImageAnalyzer - public interface ]
class ImageAnalyzer : public QObject
diff --git a/examples/webkit/imageanalyzer/mainwindow.h b/examples/webkit/imageanalyzer/mainwindow.h
index 076e586..3c943dc 100644
--- a/examples/webkit/imageanalyzer/mainwindow.h
+++ b/examples/webkit/imageanalyzer/mainwindow.h
@@ -45,7 +45,9 @@
#include <QWebView>
class ImageAnalyzer;
+QT_BEGIN_NAMESPACE
class QNetworkDiskCache;
+QT_END_NAMESPACE
class MainWin : public QWebView
{
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index dc2e8e9..f26d878 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -541,6 +541,11 @@ QByteArray qUncompress(const uchar* data, int nbytes)
forever {
ulong alloc = len;
+ if (len >= (1 << 31) - sizeof(QByteArray::Data)) {
+ //QByteArray does not support that huge size anyway.
+ qWarning("qUncompress: Input data is corrupted");
+ return QByteArray();
+ }
QByteArray::Data *p = static_cast<QByteArray::Data *>(qRealloc(d.data(), sizeof(QByteArray::Data) + alloc));
if (!p) {
// we are not allowed to crash here when compiling with QT_NO_EXCEPTIONS
@@ -556,6 +561,11 @@ QByteArray qUncompress(const uchar* data, int nbytes)
switch (res) {
case Z_OK:
if (len != alloc) {
+ if (len >= (1 << 31) - sizeof(QByteArray::Data)) {
+ //QByteArray does not support that huge size anyway.
+ qWarning("qUncompress: Input data is corrupted");
+ return QByteArray();
+ }
QByteArray::Data *p = static_cast<QByteArray::Data *>(qRealloc(d.data(), sizeof(QByteArray::Data) + len));
if (!p) {
// we are not allowed to crash here when compiling with QT_NO_EXCEPTIONS
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp
index 78c1019..4a6c03f 100644
--- a/src/gui/painting/qtextureglyphcache.cpp
+++ b/src/gui/painting/qtextureglyphcache.cpp
@@ -312,7 +312,7 @@ QImage QTextureGlyphCache::textureMapForGlyph(glyph_t g, QFixed subPixelPosition
if (m_type == QFontEngineGlyphCache::Raster_RGBMask)
return m_current_fontengine->alphaRGBMapForGlyph(g, subPixelPosition, glyphMargin(), m_transform);
else
- return m_current_fontengine->alphaMapForGlyph(g, m_transform);
+ return m_current_fontengine->alphaMapForGlyph(g, subPixelPosition, m_transform);
return QImage();
}
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index f73b816..816c14a 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -607,6 +607,11 @@ void QFontEngine::addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, int n
QImage QFontEngine::alphaMapForGlyph(glyph_t glyph, const QTransform &t)
{
+ return alphaMapForGlyph(glyph, 0, t);
+}
+
+QImage QFontEngine::alphaMapForGlyph(glyph_t glyph, QFixed /*subPixelPosition*/, const QTransform &t)
+{
QImage i = alphaMapForGlyph(glyph);
if (t.type() > QTransform::TxTranslate)
i = i.transformed(t).convertToFormat(QImage::Format_Indexed8);
diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm
index ebc1f6d..cebd1f5 100644
--- a/src/gui/text/qfontengine_mac.mm
+++ b/src/gui/text/qfontengine_mac.mm
@@ -713,9 +713,9 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition
return im;
}
-QImage QCoreTextFontEngine::alphaMapForGlyph(glyph_t glyph)
+QImage QCoreTextFontEngine::alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &t)
{
- QImage im = imageForGlyph(glyph, QFixed(), 0, false);
+ QImage im = imageForGlyph(glyph, subPixelPosition, 0, false);
QImage indexed(im.width(), im.height(), QImage::Format_Indexed8);
QVector<QRgb> colors(256);
diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h
index 6d6daaa..061bcfd 100644
--- a/src/gui/text/qfontengine_p.h
+++ b/src/gui/text/qfontengine_p.h
@@ -197,6 +197,7 @@ public:
*/
virtual QImage alphaMapForGlyph(glyph_t);
virtual QImage alphaMapForGlyph(glyph_t, const QTransform &t);
+ virtual QImage alphaMapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t);
virtual QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, int margin, const QTransform &t);
virtual glyph_metrics_t alphaMapBoundingBox(glyph_t glyph, const QTransform &matrix, GlyphFormat /*format*/)
@@ -473,7 +474,7 @@ public:
virtual FaceId faceId() const;
virtual bool getSfntTableData(uint /*tag*/, uchar * /*buffer*/, uint * /*length*/) const;
virtual void getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics);
- virtual QImage alphaMapForGlyph(glyph_t);
+ virtual QImage alphaMapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t);
virtual QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, int margin, const QTransform &t);
virtual qreal minRightBearing() const;
virtual qreal minLeftBearing() const;
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index d0f71ae..334246b 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -64,6 +64,7 @@
#include "qgraphicssceneevent.h"
#include "qprinter.h"
#include "qtextdocumentwriter.h"
+#include "private/qtextcursor_p.h"
#include <qtextformat.h>
#include <qdatetime.h>
@@ -1904,6 +1905,8 @@ void QTextControlPrivate::inputMethodEvent(QInputMethodEvent *e)
}
layout->setAdditionalFormats(overrides);
cursor.endEditBlock();
+ if (cursor.d)
+ cursor.d->setX();
}
QVariant QTextControl::inputMethodQuery(Qt::InputMethodQuery property) const
diff --git a/src/gui/text/qtextcursor.h b/src/gui/text/qtextcursor.h
index 251cb33..d34ee4e 100644
--- a/src/gui/text/qtextcursor.h
+++ b/src/gui/text/qtextcursor.h
@@ -230,6 +230,7 @@ private:
QSharedDataPointer<QTextCursorPrivate> d;
friend class QTextDocumentFragmentPrivate;
friend class QTextCopyHelper;
+ friend class QTextControlPrivate;
};
QT_END_NAMESPACE
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index 3aa6795..496accd 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -2612,8 +2612,8 @@ void QTextHtmlExporter::emitBlock(const QTextBlock &block)
if (format.hasProperty(QTextFormat::ListNumberPrefix)) {
QString numberPrefix = format.numberPrefix();
- numberPrefix.replace('"', "\\22");
- numberPrefix.replace('\'', "\\27"); // FIXME: There's a problem in the CSS parser the prevents this from being correctly restored
+ numberPrefix.replace(QLatin1Char('"'), QLatin1String("\\22"));
+ numberPrefix.replace(QLatin1Char('\''), QLatin1String("\\27")); // FIXME: There's a problem in the CSS parser the prevents this from being correctly restored
styleString += QLatin1String(" -qt-list-number-prefix: ");
styleString += QLatin1Char('\'');
styleString += numberPrefix;
@@ -2624,8 +2624,8 @@ void QTextHtmlExporter::emitBlock(const QTextBlock &block)
if (format.hasProperty(QTextFormat::ListNumberSuffix)) {
if (format.numberSuffix() != QLatin1String(".")) { // this is our default
QString numberSuffix = format.numberSuffix();
- numberSuffix.replace('"', "\\22");
- numberSuffix.replace('\'', "\\27"); // see above
+ numberSuffix.replace(QLatin1Char('"'), QLatin1String("\\22"));
+ numberSuffix.replace(QLatin1Char('\''), QLatin1String("\\27")); // see above
styleString += QLatin1String(" -qt-list-number-suffix: ");
styleString += QLatin1Char('\'');
styleString += numberSuffix;
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 2d5e5f4..69abcad 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -808,7 +808,7 @@ JSC::JSValue JSC_HOST_CALL functionQsTranslate(JSC::ExecState *exec, JSC::JSObje
JSC::UString comment;
if (args.size() > 2)
comment = args.at(2).toString(exec);
- QCoreApplication::Encoding encoding = QCoreApplication::CodecForTr;
+ QCoreApplication::Encoding encoding = QCoreApplication::UnicodeUTF8;
if (args.size() > 3) {
JSC::UString encStr = args.at(3).toString(exec);
if (encStr == "CodecForTr")
@@ -824,9 +824,9 @@ JSC::JSValue JSC_HOST_CALL functionQsTranslate(JSC::ExecState *exec, JSC::JSObje
#endif
JSC::UString result;
#ifndef QT_NO_QOBJECT
- result = QCoreApplication::translate(QScript::convertToLatin1(context).constData(),
- QScript::convertToLatin1(text).constData(),
- QScript::convertToLatin1(comment).constData(),
+ result = QCoreApplication::translate(context.UTF8String().c_str(),
+ text.UTF8String().c_str(),
+ comment.UTF8String().c_str(),
encoding, n);
#else
result = text;
@@ -878,10 +878,10 @@ JSC::JSValue JSC_HOST_CALL functionQsTr(JSC::ExecState *exec, JSC::JSObject*, JS
#endif
JSC::UString result;
#ifndef QT_NO_QOBJECT
- result = QCoreApplication::translate(QScript::convertToLatin1(context).constData(),
- QScript::convertToLatin1(text).constData(),
- QScript::convertToLatin1(comment).constData(),
- QCoreApplication::CodecForTr, n);
+ result = QCoreApplication::translate(context.UTF8String().c_str(),
+ text.UTF8String().c_str(),
+ comment.UTF8String().c_str(),
+ QCoreApplication::UnicodeUTF8, n);
#else
result = text;
#endif
@@ -907,7 +907,7 @@ JSC::JSValue JSC_HOST_CALL functionQsTrId(JSC::ExecState *exec, JSC::JSObject*,
int n = -1;
if (args.size() > 1)
n = args.at(1).toInt32(exec);
- return JSC::jsString(exec, qtTrId(QScript::convertToLatin1(id).constData(), n));
+ return JSC::jsString(exec, qtTrId(id.UTF8String().c_str(), n));
}
JSC::JSValue JSC_HOST_CALL functionQsTrIdNoOp(JSC::ExecState *, JSC::JSObject*, JSC::JSValue, const JSC::ArgList &args)
diff --git a/tests/auto/collections/collections.pro b/tests/auto/collections/collections.pro
index 876e903..8601ff8 100644
--- a/tests/auto/collections/collections.pro
+++ b/tests/auto/collections/collections.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_collections.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
index e6a81b8..f5f3284 100644
--- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
+++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
@@ -112,6 +112,7 @@ private slots:
void tst_QDeclarativeDebugContextReference();
void tst_QDeclarativeDebugPropertyReference();
+ void setBindingForObject();
void setMethodBody();
};
@@ -894,6 +895,78 @@ void tst_QDeclarativeDebug::tst_QDeclarativeDebugPropertyReference()
compareProperties(r, ref);
}
+
+void tst_QDeclarativeDebug::setBindingForObject()
+{
+ QDeclarativeDebugObjectReference rootObject = findRootObject();
+ QVERIFY(rootObject.debugId() != -1);
+ QDeclarativeDebugPropertyReference widthPropertyRef = findProperty(rootObject.properties(), "width");
+
+ QCOMPARE(widthPropertyRef.value(), QVariant(10));
+ QCOMPARE(widthPropertyRef.binding(), QString());
+
+ //
+ // set literal
+ //
+ m_dbg->setBindingForObject(rootObject.debugId(), "width", "15", true);
+
+ rootObject = findRootObject();
+ widthPropertyRef = findProperty(rootObject.properties(), "width");
+
+ QCOMPARE(widthPropertyRef.value(), QVariant(15));
+ QCOMPARE(widthPropertyRef.binding(), QString());
+
+ //
+ // set expression
+ //
+ m_dbg->setBindingForObject(rootObject.debugId(), "width", "height", false);
+
+ rootObject = findRootObject();
+ widthPropertyRef = findProperty(rootObject.properties(), "width");
+
+ QCOMPARE(widthPropertyRef.value(), QVariant(20));
+ QCOMPARE(widthPropertyRef.binding(), QString("height"));
+
+ //
+ // reset
+ //
+ m_dbg->resetBindingForObject(rootObject.debugId(), "width");
+
+ rootObject = findRootObject();
+ widthPropertyRef = findProperty(rootObject.properties(), "width");
+
+ // QCOMPARE(widthPropertyRef.value(), QVariant(0)); // TODO: Shouldn't this work?
+ QCOMPARE(widthPropertyRef.binding(), QString());
+
+ //
+ // set handler
+ //
+ rootObject = findRootObject();
+ QCOMPARE(rootObject.children().size(), 3);
+ QDeclarativeDebugObjectReference mouseAreaObject = rootObject.children().at(2);
+ QDeclarativeDebugObjectQuery *q_obj = m_dbg->queryObjectRecursive(mouseAreaObject, this);
+ waitForQuery(q_obj);
+ mouseAreaObject = q_obj->object();
+
+ QCOMPARE(mouseAreaObject.className(), QString("MouseArea"));
+
+ QDeclarativeDebugPropertyReference onEnteredRef = findProperty(mouseAreaObject.properties(), "onEntered");
+
+ QCOMPARE(onEnteredRef.name(), QString("onEntered"));
+ QCOMPARE(onEnteredRef.value(), QVariant("{ console.log('hello') }"));
+
+ m_dbg->setBindingForObject(mouseAreaObject.debugId(), "onEntered", "{console.log('hello, world') }", false) ;
+
+ rootObject = findRootObject();
+ mouseAreaObject = rootObject.children().at(2);
+ q_obj = m_dbg->queryObjectRecursive(mouseAreaObject, this);
+ waitForQuery(q_obj);
+ mouseAreaObject = q_obj->object();
+ onEnteredRef = findProperty(mouseAreaObject.properties(), "onEntered");
+ QCOMPARE(onEnteredRef.name(), QString("onEntered"));
+ QCOMPARE(onEnteredRef.value(), QVariant("{console.log('hello, world') }"));
+}
+
int main(int argc, char *argv[])
{
int _argc = argc + 1;
diff --git a/tests/auto/exceptionsafety/exceptionsafety.pro b/tests/auto/exceptionsafety/exceptionsafety.pro
index d162219..52ba9e2 100644
--- a/tests/auto/exceptionsafety/exceptionsafety.pro
+++ b/tests/auto/exceptionsafety/exceptionsafety.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_exceptionsafety.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/q_func_info/q_func_info.pro b/tests/auto/q_func_info/q_func_info.pro
index b30e3fb..64f08d4 100644
--- a/tests/auto/q_func_info/q_func_info.pro
+++ b/tests/auto/q_func_info/q_func_info.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_q_func_info.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qanimationgroup/qanimationgroup.pro b/tests/auto/qanimationgroup/qanimationgroup.pro
index 31667a8..5e1be0c 100644
--- a/tests/auto/qanimationgroup/qanimationgroup.pro
+++ b/tests/auto/qanimationgroup/qanimationgroup.pro
@@ -3,3 +3,4 @@ QT = core
SOURCES += tst_qanimationgroup.cpp
+CONFIG += parallel_test
diff --git a/tests/auto/qatomicint/qatomicint.pro b/tests/auto/qatomicint/qatomicint.pro
index 4a09d5f..7850d93 100644
--- a/tests/auto/qatomicint/qatomicint.pro
+++ b/tests/auto/qatomicint/qatomicint.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qatomicint.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qatomicpointer/qatomicpointer.pro b/tests/auto/qatomicpointer/qatomicpointer.pro
index d192bad..89ff137 100644
--- a/tests/auto/qatomicpointer/qatomicpointer.pro
+++ b/tests/auto/qatomicpointer/qatomicpointer.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qatomicpointer.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qbitarray/qbitarray.pro b/tests/auto/qbitarray/qbitarray.pro
index ec110c6..358d81b 100644
--- a/tests/auto/qbitarray/qbitarray.pro
+++ b/tests/auto/qbitarray/qbitarray.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qbitarray.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qbuffer/qbuffer.pro b/tests/auto/qbuffer/qbuffer.pro
index ea83657..b768eb8 100644
--- a/tests/auto/qbuffer/qbuffer.pro
+++ b/tests/auto/qbuffer/qbuffer.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qbuffer.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qbytearray/qbytearray.pro b/tests/auto/qbytearray/qbytearray.pro
index 35e48ad..f195dc8 100644
--- a/tests/auto/qbytearray/qbytearray.pro
+++ b/tests/auto/qbytearray/qbytearray.pro
@@ -18,3 +18,4 @@ wince* {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
}
+CONFIG += parallel_test
diff --git a/tests/auto/qbytearraymatcher/qbytearraymatcher.pro b/tests/auto/qbytearraymatcher/qbytearraymatcher.pro
index 1618c3e..a2458e6 100644
--- a/tests/auto/qbytearraymatcher/qbytearraymatcher.pro
+++ b/tests/auto/qbytearraymatcher/qbytearraymatcher.pro
@@ -2,3 +2,4 @@ load(qttest_p4)
SOURCES += tst_qbytearraymatcher.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qcache/qcache.pro b/tests/auto/qcache/qcache.pro
index 728b0b6..0da4e14 100644
--- a/tests/auto/qcache/qcache.pro
+++ b/tests/auto/qcache/qcache.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qcache.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qchar/qchar.pro b/tests/auto/qchar/qchar.pro
index 9cfccc2..9fcf132 100644
--- a/tests/auto/qchar/qchar.pro
+++ b/tests/auto/qchar/qchar.pro
@@ -13,3 +13,4 @@ symbian: {
} else {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
}
+CONFIG += parallel_test
diff --git a/tests/auto/qcontiguouscache/qcontiguouscache.pro b/tests/auto/qcontiguouscache/qcontiguouscache.pro
index 618efed..5951f87 100644
--- a/tests/auto/qcontiguouscache/qcontiguouscache.pro
+++ b/tests/auto/qcontiguouscache/qcontiguouscache.pro
@@ -6,3 +6,4 @@ SOURCES += tst_qcontiguouscache.cpp
+CONFIG += parallel_test
diff --git a/tests/auto/qcoreapplication/qcoreapplication.pro b/tests/auto/qcoreapplication/qcoreapplication.pro
index 27f5e58..031af39 100644
--- a/tests/auto/qcoreapplication/qcoreapplication.pro
+++ b/tests/auto/qcoreapplication/qcoreapplication.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qcoreapplication.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qcryptographichash/qcryptographichash.pro b/tests/auto/qcryptographichash/qcryptographichash.pro
index 7e1a866..65e31dc 100644
--- a/tests/auto/qcryptographichash/qcryptographichash.pro
+++ b/tests/auto/qcryptographichash/qcryptographichash.pro
@@ -6,3 +6,4 @@ symbian: {
TARGET.EPOCSTACKSIZE =0x5000
TARGET.EPOCHEAPSIZE="0x100000 0x1000000" # // Min 1Mb, max 16Mb
}
+CONFIG += parallel_test
diff --git a/tests/auto/qdate/qdate.pro b/tests/auto/qdate/qdate.pro
index 6e2781b3..1c04100 100644
--- a/tests/auto/qdate/qdate.pro
+++ b/tests/auto/qdate/qdate.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qdate.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qdatetime/qdatetime.pro b/tests/auto/qdatetime/qdatetime.pro
index 02d3989..08a321e 100644
--- a/tests/auto/qdatetime/qdatetime.pro
+++ b/tests/auto/qdatetime/qdatetime.pro
@@ -12,3 +12,4 @@ win32-msvc|win32-msvc9x {
}
+CONFIG += parallel_test
diff --git a/tests/auto/qdebug/qdebug.pro b/tests/auto/qdebug/qdebug.pro
index 6e75a09..2b57168 100644
--- a/tests/auto/qdebug/qdebug.pro
+++ b/tests/auto/qdebug/qdebug.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qdebug.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qdiriterator/qdiriterator.pro b/tests/auto/qdiriterator/qdiriterator.pro
index 020b229..140b57d 100644
--- a/tests/auto/qdiriterator/qdiriterator.pro
+++ b/tests/auto/qdiriterator/qdiriterator.pro
@@ -10,3 +10,4 @@ wince*|symbian: {
wince*mips*|wincewm50smart-msvc200*: DEFINES += WINCE_BROKEN_ITERATE=1
}
+CONFIG += parallel_test
diff --git a/tests/auto/qeasingcurve/qeasingcurve.pro b/tests/auto/qeasingcurve/qeasingcurve.pro
index 2b66081..2a3a075 100644
--- a/tests/auto/qeasingcurve/qeasingcurve.pro
+++ b/tests/auto/qeasingcurve/qeasingcurve.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
QT = core
SOURCES += tst_qeasingcurve.cpp
+CONFIG += parallel_test
diff --git a/tests/auto/qelapsedtimer/qelapsedtimer.pro b/tests/auto/qelapsedtimer/qelapsedtimer.pro
index ed75228..8768876 100644
--- a/tests/auto/qelapsedtimer/qelapsedtimer.pro
+++ b/tests/auto/qelapsedtimer/qelapsedtimer.pro
@@ -11,3 +11,4 @@ wince* {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
}
+CONFIG += parallel_test
diff --git a/tests/auto/qevent/qevent.pro b/tests/auto/qevent/qevent.pro
index 5c14299..6042b6c 100644
--- a/tests/auto/qevent/qevent.pro
+++ b/tests/auto/qevent/qevent.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qevent.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qexplicitlyshareddatapointer/qexplicitlyshareddatapointer.pro b/tests/auto/qexplicitlyshareddatapointer/qexplicitlyshareddatapointer.pro
index 8a45aa2..cf574ff 100644
--- a/tests/auto/qexplicitlyshareddatapointer/qexplicitlyshareddatapointer.pro
+++ b/tests/auto/qexplicitlyshareddatapointer/qexplicitlyshareddatapointer.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qexplicitlyshareddatapointer.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qflags/qflags.pro b/tests/auto/qflags/qflags.pro
index cd7f759..097a218 100644
--- a/tests/auto/qflags/qflags.pro
+++ b/tests/auto/qflags/qflags.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qflags.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qfuture/qfuture.pro b/tests/auto/qfuture/qfuture.pro
index c2b16b7..d6faae7 100644
--- a/tests/auto/qfuture/qfuture.pro
+++ b/tests/auto/qfuture/qfuture.pro
@@ -2,3 +2,4 @@ load(qttest_p4)
DEFINES += QT_STRICT_ITERATORS
SOURCES += tst_qfuture.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qfuturewatcher/qfuturewatcher.pro b/tests/auto/qfuturewatcher/qfuturewatcher.pro
index 79d8739..67f04ef 100644
--- a/tests/auto/qfuturewatcher/qfuturewatcher.pro
+++ b/tests/auto/qfuturewatcher/qfuturewatcher.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qfuturewatcher.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qgetputenv/qgetputenv.pro b/tests/auto/qgetputenv/qgetputenv.pro
index cbde272..df94f14 100644
--- a/tests/auto/qgetputenv/qgetputenv.pro
+++ b/tests/auto/qgetputenv/qgetputenv.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qgetputenv.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qglobal/qglobal.pro b/tests/auto/qglobal/qglobal.pro
index 8f1e00a..a4dffac 100644
--- a/tests/auto/qglobal/qglobal.pro
+++ b/tests/auto/qglobal/qglobal.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qglobal.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qhash/qhash.pro b/tests/auto/qhash/qhash.pro
index 86b98a2..16c9eab 100644
--- a/tests/auto/qhash/qhash.pro
+++ b/tests/auto/qhash/qhash.pro
@@ -6,3 +6,4 @@ symbian: {
TARGET.EPOCSTACKSIZE =0x5000
TARGET.EPOCHEAPSIZE="0x100000 0x1000000" # // Min 1Mb, max 16Mb
}
+CONFIG += parallel_test
diff --git a/tests/auto/qlibrary/qlibrary.pro b/tests/auto/qlibrary/qlibrary.pro
index fd5790b..5dc129f 100644
--- a/tests/auto/qlibrary/qlibrary.pro
+++ b/tests/auto/qlibrary/qlibrary.pro
@@ -15,3 +15,4 @@ TARGET = tst_qlibrary
# no special install rule for subdir
INSTALLS =
+CONFIG += parallel_test
diff --git a/tests/auto/qline/qline.pro b/tests/auto/qline/qline.pro
index 4651fd3..6e9af24 100644
--- a/tests/auto/qline/qline.pro
+++ b/tests/auto/qline/qline.pro
@@ -4,3 +4,4 @@ SOURCES += tst_qline.cpp
unix:!mac:!symbian:!vxworks:LIBS+=-lm
+CONFIG += parallel_test
diff --git a/tests/auto/qmap/qmap.pro b/tests/auto/qmap/qmap.pro
index 00b84d1..eaed926 100644
--- a/tests/auto/qmap/qmap.pro
+++ b/tests/auto/qmap/qmap.pro
@@ -4,3 +4,4 @@ QT = core
SOURCES += tst_qmap.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qmargins/qmargins.pro b/tests/auto/qmargins/qmargins.pro
index 5a6aa4f..0404da0 100644
--- a/tests/auto/qmargins/qmargins.pro
+++ b/tests/auto/qmargins/qmargins.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qmargins.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qmath/qmath.pro b/tests/auto/qmath/qmath.pro
index 03134ee..e5784ce 100644
--- a/tests/auto/qmath/qmath.pro
+++ b/tests/auto/qmath/qmath.pro
@@ -4,3 +4,4 @@ QT = core
SOURCES += tst_qmath.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qmetatype/qmetatype.pro b/tests/auto/qmetatype/qmetatype.pro
index a84d238..ed1de83 100644
--- a/tests/auto/qmetatype/qmetatype.pro
+++ b/tests/auto/qmetatype/qmetatype.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qmetatype.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qmutex/qmutex.pro b/tests/auto/qmutex/qmutex.pro
index bd24dcb..760dcfd 100644
--- a/tests/auto/qmutex/qmutex.pro
+++ b/tests/auto/qmutex/qmutex.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qmutex.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qmutexlocker/qmutexlocker.pro b/tests/auto/qmutexlocker/qmutexlocker.pro
index ff8a3da..01c3691 100644
--- a/tests/auto/qmutexlocker/qmutexlocker.pro
+++ b/tests/auto/qmutexlocker/qmutexlocker.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qmutexlocker.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qnumeric/qnumeric.pro b/tests/auto/qnumeric/qnumeric.pro
index 162f980..c0af962 100644
--- a/tests/auto/qnumeric/qnumeric.pro
+++ b/tests/auto/qnumeric/qnumeric.pro
@@ -4,3 +4,4 @@ QT = core
SOURCES += tst_qnumeric.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qobject/qobject.pro b/tests/auto/qobject/qobject.pro
index b6b3f20..113e14a 100644
--- a/tests/auto/qobject/qobject.pro
+++ b/tests/auto/qobject/qobject.pro
@@ -1,2 +1,3 @@
TEMPLATE = subdirs
SUBDIRS = tst_qobject.pro signalbug.pro
+CONFIG += parallel_test
diff --git a/tests/auto/qobjectrace/qobjectrace.pro b/tests/auto/qobjectrace/qobjectrace.pro
index 322adff..526875b 100644
--- a/tests/auto/qobjectrace/qobjectrace.pro
+++ b/tests/auto/qobjectrace/qobjectrace.pro
@@ -3,3 +3,4 @@ SOURCES += tst_qobjectrace.cpp
QT = core
TARGET.EPOCHEAPSIZE = 20000000 40000000
+CONFIG += parallel_test
diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp
index 42303d2..219f920 100644
--- a/tests/auto/qpainter/tst_qpainter.cpp
+++ b/tests/auto/qpainter/tst_qpainter.cpp
@@ -4581,32 +4581,6 @@ void tst_QPainter::drawText_subPixelPositionsInRaster_qtbug5053()
#if !defined(Q_WS_MAC) || !defined(QT_MAC_USE_COCOA)
QSKIP("Only Mac/Cocoa supports sub pixel positions in raster engine currently", SkipAll);
#endif
-
- int w = 10, h = 10;
- QImage image(w, h, QImage::Format_RGB32);
- image.fill(0xffffffff);
- QPainter p(&image);
- p.drawText(0, h, "X\\");
- p.end();
-
- bool foundNonGrayPixel = false;
- const int *bits = (const int *) ((const QImage &) image).bits();
- int bpl = image.bytesPerLine() / 4;
- for (int y=0; y<w; ++y) {
- for (int x=0; x<h; ++x) {
- int r = qRed(bits[x]);
- int g = qGreen(bits[x]);
- int b = qBlue(bits[x]);
- if (r != g || r != b) {
- foundNonGrayPixel = true;
- break;
- }
- }
- bits += bpl;
- }
- if (!foundNonGrayPixel)
- QSKIP("Font smoothing must be turned on for this test", SkipAll);
-
QFontMetricsF fm(qApp->font());
QImage baseLine(fm.width(QChar::fromLatin1('e')), fm.height(), QImage::Format_RGB32);
diff --git a/tests/auto/qplugin/qplugin.pro b/tests/auto/qplugin/qplugin.pro
index aafcb36..37a12da 100644
--- a/tests/auto/qplugin/qplugin.pro
+++ b/tests/auto/qplugin/qplugin.pro
@@ -25,3 +25,4 @@ mac {
SUBDIRS += tst_qplugin.pro
+CONFIG += parallel_test
diff --git a/tests/auto/qpluginloader/qpluginloader.pro b/tests/auto/qpluginloader/qpluginloader.pro
index 382d6e4..6e41b4c 100644
--- a/tests/auto/qpluginloader/qpluginloader.pro
+++ b/tests/auto/qpluginloader/qpluginloader.pro
@@ -11,3 +11,4 @@ TARGET = tst_qpluginloader
INSTALLS =
+CONFIG += parallel_test
diff --git a/tests/auto/qpoint/qpoint.pro b/tests/auto/qpoint/qpoint.pro
index 8b006c2..fd24046 100644
--- a/tests/auto/qpoint/qpoint.pro
+++ b/tests/auto/qpoint/qpoint.pro
@@ -5,3 +5,4 @@
load(qttest_p4)
SOURCES += tst_qpoint.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qprocessenvironment/qprocessenvironment.pro b/tests/auto/qprocessenvironment/qprocessenvironment.pro
index 398facc..60dba50 100644
--- a/tests/auto/qprocessenvironment/qprocessenvironment.pro
+++ b/tests/auto/qprocessenvironment/qprocessenvironment.pro
@@ -3,3 +3,4 @@ load(qttest_p4)
QT = core
SOURCES += tst_qprocessenvironment.cpp
+CONFIG += parallel_test
diff --git a/tests/auto/qqueue/qqueue.pro b/tests/auto/qqueue/qqueue.pro
index ed489f9..ce0d8c3 100644
--- a/tests/auto/qqueue/qqueue.pro
+++ b/tests/auto/qqueue/qqueue.pro
@@ -4,3 +4,4 @@ QT = core
SOURCES += tst_qqueue.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qrand/qrand.pro b/tests/auto/qrand/qrand.pro
index c868ed4..0db8af8 100644
--- a/tests/auto/qrand/qrand.pro
+++ b/tests/auto/qrand/qrand.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qrand.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qreadlocker/qreadlocker.pro b/tests/auto/qreadlocker/qreadlocker.pro
index 5919102..ee53307 100644
--- a/tests/auto/qreadlocker/qreadlocker.pro
+++ b/tests/auto/qreadlocker/qreadlocker.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qreadlocker.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qreadwritelock/qreadwritelock.pro b/tests/auto/qreadwritelock/qreadwritelock.pro
index 4318b18..93f7c68 100644
--- a/tests/auto/qreadwritelock/qreadwritelock.pro
+++ b/tests/auto/qreadwritelock/qreadwritelock.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qreadwritelock.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qrect/qrect.pro b/tests/auto/qrect/qrect.pro
index 75940b3..f1ad046e 100644
--- a/tests/auto/qrect/qrect.pro
+++ b/tests/auto/qrect/qrect.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qrect.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qregexp/qregexp.pro b/tests/auto/qregexp/qregexp.pro
index 80b6827..e0fef12 100644
--- a/tests/auto/qregexp/qregexp.pro
+++ b/tests/auto/qregexp/qregexp.pro
@@ -6,3 +6,4 @@ QT = core
QT = core
SOURCES += tst_qregexp.cpp
+CONFIG += parallel_test
diff --git a/tests/auto/qresourceengine/qresourceengine.pro b/tests/auto/qresourceengine/qresourceengine.pro
index 6bdeb1e..c0db52f 100644
--- a/tests/auto/qresourceengine/qresourceengine.pro
+++ b/tests/auto/qresourceengine/qresourceengine.pro
@@ -43,3 +43,4 @@ wince*|symbian:{
} else {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
}
+CONFIG += parallel_test
diff --git a/tests/auto/qringbuffer/qringbuffer.pro b/tests/auto/qringbuffer/qringbuffer.pro
index 91fb0a0..2e4f166 100644
--- a/tests/auto/qringbuffer/qringbuffer.pro
+++ b/tests/auto/qringbuffer/qringbuffer.pro
@@ -4,3 +4,4 @@ SOURCES += tst_qringbuffer.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qscopedpointer/qscopedpointer.pro b/tests/auto/qscopedpointer/qscopedpointer.pro
index 13d8425..4a3d5b8d 100644
--- a/tests/auto/qscopedpointer/qscopedpointer.pro
+++ b/tests/auto/qscopedpointer/qscopedpointer.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qscopedpointer.cpp
QT -= gui
+CONFIG += parallel_test
diff --git a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
index cbcd16a..5e7ede8 100644
--- a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
+++ b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
@@ -50,6 +50,7 @@
//TESTED_FILES=
Q_DECLARE_METATYPE(QScriptValueList)
+Q_DECLARE_METATYPE(QScriptContext::Error)
QT_BEGIN_NAMESPACE
extern bool qt_script_isJITEnabled();
@@ -91,6 +92,10 @@ private slots:
void qobjectAsActivationObject();
void parentContextCallee_QT2270();
void popNativeContextScope();
+ void throwErrorInGlobalContext();
+ void throwErrorWithTypeInGlobalContext_data();
+ void throwErrorWithTypeInGlobalContext();
+ void throwValueInGlobalContext();
};
tst_QScriptContext::tst_QScriptContext()
@@ -1323,5 +1328,49 @@ void tst_QScriptContext::parentContextCallee_QT2270()
QVERIFY(callee.equals(fun));
}
+void tst_QScriptContext::throwErrorInGlobalContext()
+{
+ QScriptEngine eng;
+ QScriptValue ret = eng.currentContext()->throwError("foo");
+ QVERIFY(ret.isError());
+ QVERIFY(eng.hasUncaughtException());
+ QVERIFY(eng.uncaughtException().strictlyEquals(ret));
+ QCOMPARE(ret.toString(), QString::fromLatin1("Error: foo"));
+}
+
+void tst_QScriptContext::throwErrorWithTypeInGlobalContext_data()
+{
+ QTest::addColumn<QScriptContext::Error>("error");
+ QTest::addColumn<QString>("stringRepresentation");
+ QTest::newRow("ReferenceError") << QScriptContext::ReferenceError << QString::fromLatin1("ReferenceError: foo");
+ QTest::newRow("SyntaxError") << QScriptContext::SyntaxError << QString::fromLatin1("SyntaxError: foo");
+ QTest::newRow("TypeError") << QScriptContext::TypeError << QString::fromLatin1("TypeError: foo");
+ QTest::newRow("RangeError") << QScriptContext::RangeError << QString::fromLatin1("RangeError: foo");
+ QTest::newRow("URIError") << QScriptContext::URIError << QString::fromLatin1("URIError: foo");
+ QTest::newRow("UnknownError") << QScriptContext::UnknownError << QString::fromLatin1("Error: foo");
+}
+
+void tst_QScriptContext::throwErrorWithTypeInGlobalContext()
+{
+ QFETCH(QScriptContext::Error, error);
+ QFETCH(QString, stringRepresentation);
+ QScriptEngine eng;
+ QScriptValue ret = eng.currentContext()->throwError(error, "foo");
+ QVERIFY(ret.isError());
+ QVERIFY(eng.hasUncaughtException());
+ QVERIFY(eng.uncaughtException().strictlyEquals(ret));
+ QCOMPARE(ret.toString(), stringRepresentation);
+}
+
+void tst_QScriptContext::throwValueInGlobalContext()
+{
+ QScriptEngine eng;
+ QScriptValue val(&eng, 123);
+ QScriptValue ret = eng.currentContext()->throwValue(val);
+ QVERIFY(ret.strictlyEquals(val));
+ QVERIFY(eng.hasUncaughtException());
+ QVERIFY(eng.uncaughtException().strictlyEquals(val));
+}
+
QTEST_MAIN(tst_QScriptContext)
#include "tst_qscriptcontext.moc"
diff --git a/tests/auto/qscriptengine/idtranslatable-unicode.js b/tests/auto/qscriptengine/idtranslatable-unicode.js
new file mode 100644
index 0000000..e17d617
--- /dev/null
+++ b/tests/auto/qscriptengine/idtranslatable-unicode.js
@@ -0,0 +1,5 @@
+qsTrId('\u01F8\u01D2\u0199\u01D0\u01E1');
+
+QT_TRID_NOOP("\u0191\u01CE\u0211\u0229\u019C\u018E\u019A\u01D0");
+
+qsTrId("\u0181\u01A1\u0213\u018F\u018C", 10);
diff --git a/tests/auto/qscriptengine/qscriptengine.qrc b/tests/auto/qscriptengine/qscriptengine.qrc
index fa55a5b..d05d115 100644
--- a/tests/auto/qscriptengine/qscriptengine.qrc
+++ b/tests/auto/qscriptengine/qscriptengine.qrc
@@ -2,5 +2,7 @@
<qresource>
<file>translations/translatable_la.qm</file>
<file>translations/idtranslatable_la.qm</file>
+ <file>translations/translatable-unicode.qm</file>
+ <file>translations/idtranslatable-unicode.qm</file>
</qresource>
</RCC>
diff --git a/tests/auto/qscriptengine/translatable-unicode.js b/tests/auto/qscriptengine/translatable-unicode.js
new file mode 100644
index 0000000..afe2aff
--- /dev/null
+++ b/tests/auto/qscriptengine/translatable-unicode.js
@@ -0,0 +1,9 @@
+qsTr("H\u2082O");
+qsTranslate("\u010C\u0101\u011F\u0115", "CO\u2082");
+
+var unicode_strings = [
+ QT_TR_NOOP("\u0391\u0392\u0393"),
+ QT_TRANSLATE_NOOP("\u010C\u0101\u011F\u0115", "\u0414\u0415\u0416")
+];
+
+qsTr("H\u2082O", "not the same H\u2082O");
diff --git a/tests/auto/qscriptengine/translations/idtranslatable-unicode.qm b/tests/auto/qscriptengine/translations/idtranslatable-unicode.qm
new file mode 100644
index 0000000..8c5fb91
--- /dev/null
+++ b/tests/auto/qscriptengine/translations/idtranslatable-unicode.qm
Binary files differ
diff --git a/tests/auto/qscriptengine/translations/idtranslatable-unicode.ts b/tests/auto/qscriptengine/translations/idtranslatable-unicode.ts
new file mode 100644
index 0000000..74ebf43
--- /dev/null
+++ b/tests/auto/qscriptengine/translations/idtranslatable-unicode.ts
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="nb_NO">
+<defaultcodec>UTF-8</defaultcodec>
+<context>
+ <name></name>
+ <message id="Ǹǒƙǐǡ">
+ <location filename="idtranslatable-unicode.js" line="1"/>
+ <source></source>
+ <translation>Ƨưƈȼȝȿș</translation>
+ </message>
+ <message id="ƑǎȑȩƜƎƚǐ">
+ <location filename="idtranslatable-unicode.js" line="3"/>
+ <source></source>
+ <translation>Ǡȡȋȅȕ</translation>
+ </message>
+ <message id="ƁơȓƏƌ" numerus="yes">
+ <location filename="idtranslatable-unicode.js" line="5"/>
+ <source></source>
+ <translation>
+ <numerusform>Ƒưǹ</numerusform>
+ <numerusform>%n ƒơǒ(ș)</numerusform>
+ </translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/qscriptengine/translations/translatable-unicode.qm b/tests/auto/qscriptengine/translations/translatable-unicode.qm
new file mode 100644
index 0000000..aa75ce6
--- /dev/null
+++ b/tests/auto/qscriptengine/translations/translatable-unicode.qm
Binary files differ
diff --git a/tests/auto/qscriptengine/translations/translatable-unicode.ts b/tests/auto/qscriptengine/translations/translatable-unicode.ts
new file mode 100644
index 0000000..1b8b4d2
--- /dev/null
+++ b/tests/auto/qscriptengine/translations/translatable-unicode.ts
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<defaultcodec>UTF-8</defaultcodec>
+<context>
+ <name>translatable-unicode</name>
+ <message>
+ <location filename="translatable-unicode.js" line="1"/>
+ <source>H₂O</source>
+ <translation>ͻͼͽ</translation>
+ </message>
+ <message>
+ <location filename="translatable-unicode.js" line="5"/>
+ <source>ΑΒΓ</source>
+ <translation>ӜҴѼ</translation>
+ </message>
+ <message>
+ <location filename="translatable-unicode.js" line="9"/>
+ <source>H₂O</source>
+ <comment>not the same H₂O</comment>
+ <translation>ԶՊՒ</translation>
+ </message>
+</context>
+<context>
+ <name>Čāğĕ</name>
+ <message>
+ <location filename="translatable-unicode.js" line="2"/>
+ <source>CO₂</source>
+ <translation>בךע</translation>
+ </message>
+ <message>
+ <location filename="translatable-unicode.js" line="6"/>
+ <source>ДЕЖ</source>
+ <translation>خسس</translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp
index 5f38c22..d529b8b 100644
--- a/tests/auto/qscriptengine/tst_qscriptengine.cpp
+++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp
@@ -186,6 +186,10 @@ private slots:
void translationContext_data();
void translationContext();
void translateScriptIdBased();
+ void translateScriptUnicode_data();
+ void translateScriptUnicode();
+ void translateScriptUnicodeIdBased_data();
+ void translateScriptUnicodeIdBased();
void functionScopes();
void nativeFunctionScopes();
void evaluateProgram();
@@ -4950,6 +4954,93 @@ void tst_QScriptEngine::translateScriptIdBased()
QString::fromLatin1("qtn_foo_bar")); // Doesn't have plural
}
+// How to add a new test row:
+// - Find a nice list of Unicode characters to choose from
+// - Write source string/context/comment in .js using Unicode escape sequences (\uABCD)
+// - Update corresponding .ts file (e.g. lupdate foo.js -ts foo.ts -codecfortr UTF-8)
+// - Enter translation in Linguist
+// - Update corresponding .qm file (e.g. lrelease foo.ts)
+// - Evaluate script that performs translation; make sure the correct result is returned
+// (e.g. by setting the resulting string as the text of a QLabel and visually verifying
+// that it looks the same as what you entered in Linguist :-) )
+// - Generate the expectedTranslation column data using toUtf8().toHex()
+void tst_QScriptEngine::translateScriptUnicode_data()
+{
+ QTest::addColumn<QString>("expression");
+ QTest::addColumn<QString>("fileName");
+ QTest::addColumn<QString>("expectedTranslation");
+
+ QString fileName = QString::fromLatin1("translatable-unicode.js");
+ QTest::newRow("qsTr('H\\u2082O')@translatable-unicode.js")
+ << QString::fromLatin1("qsTr('H\\u2082O')") << fileName << QString::fromUtf8("\xcd\xbb\xcd\xbc\xcd\xbd");
+ QTest::newRow("qsTranslate('\\u010C\\u0101\\u011F\\u0115', 'CO\\u2082')@translatable-unicode.js")
+ << QString::fromLatin1("qsTranslate('\\u010C\\u0101\\u011F\\u0115', 'CO\\u2082')") << fileName << QString::fromUtf8("\xd7\x91\xd7\x9a\xd7\xa2");
+ QTest::newRow("qsTr('\\u0391\\u0392\\u0393')@translatable-unicode.js")
+ << QString::fromLatin1("qsTr('\\u0391\\u0392\\u0393')") << fileName << QString::fromUtf8("\xd3\x9c\xd2\xb4\xd1\xbc");
+ QTest::newRow("qsTranslate('\\u010C\\u0101\\u011F\\u0115', '\\u0414\\u0415\\u0416')@translatable-unicode.js")
+ << QString::fromLatin1("qsTranslate('\\u010C\\u0101\\u011F\\u0115', '\\u0414\\u0415\\u0416')") << fileName << QString::fromUtf8("\xd8\xae\xd8\xb3\xd8\xb3");
+ QTest::newRow("qsTr('H\\u2082O', 'not the same H\\u2082O')@translatable-unicode.js")
+ << QString::fromLatin1("qsTr('H\\u2082O', 'not the same H\\u2082O')") << fileName << QString::fromUtf8("\xd4\xb6\xd5\x8a\xd5\x92");
+ QTest::newRow("qsTr('H\\u2082O')")
+ << QString::fromLatin1("qsTr('H\\u2082O')") << QString() << QString::fromUtf8("\x48\xe2\x82\x82\x4f");
+ QTest::newRow("qsTranslate('\\u010C\\u0101\\u011F\\u0115', 'CO\\u2082')")
+ << QString::fromLatin1("qsTranslate('\\u010C\\u0101\\u011F\\u0115', 'CO\\u2082')") << QString() << QString::fromUtf8("\xd7\x91\xd7\x9a\xd7\xa2");
+}
+
+void tst_QScriptEngine::translateScriptUnicode()
+{
+ QFETCH(QString, expression);
+ QFETCH(QString, fileName);
+ QFETCH(QString, expectedTranslation);
+
+ QScriptEngine engine;
+
+ QTranslator translator;
+ QVERIFY(translator.load(":/translations/translatable-unicode"));
+ QCoreApplication::instance()->installTranslator(&translator);
+ engine.installTranslatorFunctions();
+
+ QCOMPARE(engine.evaluate(expression, fileName).toString(), expectedTranslation);
+ QVERIFY(!engine.hasUncaughtException());
+
+ QCoreApplication::instance()->removeTranslator(&translator);
+}
+
+void tst_QScriptEngine::translateScriptUnicodeIdBased_data()
+{
+ QTest::addColumn<QString>("expression");
+ QTest::addColumn<QString>("expectedTranslation");
+
+ QTest::newRow("qsTrId('\\u01F8\\u01D2\\u0199\\u01D0\\u01E1'')")
+ << QString::fromLatin1("qsTrId('\\u01F8\\u01D2\\u0199\\u01D0\\u01E1')") << QString::fromUtf8("\xc6\xa7\xc6\xb0\xc6\x88\xc8\xbc\xc8\x9d\xc8\xbf\xc8\x99");
+ QTest::newRow("qsTrId('\\u0191\\u01CE\\u0211\\u0229\\u019C\\u018E\\u019A\\u01D0')")
+ << QString::fromLatin1("qsTrId('\\u0191\\u01CE\\u0211\\u0229\\u019C\\u018E\\u019A\\u01D0')") << QString::fromUtf8("\xc7\xa0\xc8\xa1\xc8\x8b\xc8\x85\xc8\x95");
+ QTest::newRow("qsTrId('\\u0181\\u01A1\\u0213\\u018F\\u018C', 10)")
+ << QString::fromLatin1("qsTrId('\\u0181\\u01A1\\u0213\\u018F\\u018C', 10)") << QString::fromUtf8("\x31\x30\x20\xc6\x92\xc6\xa1\xc7\x92\x28\xc8\x99\x29");
+ QTest::newRow("qsTrId('\\u0181\\u01A1\\u0213\\u018F\\u018C')")
+ << QString::fromLatin1("qsTrId('\\u0181\\u01A1\\u0213\\u018F\\u018C')") << QString::fromUtf8("\xc6\x91\xc6\xb0\xc7\xb9");
+ QTest::newRow("qsTrId('\\u01CD\\u0180\\u01A8\\u0190\\u019E\\u01AB')")
+ << QString::fromLatin1("qsTrId('\\u01CD\\u0180\\u01A8\\u0190\\u019E\\u01AB')") << QString::fromUtf8("\xc7\x8d\xc6\x80\xc6\xa8\xc6\x90\xc6\x9e\xc6\xab");
+}
+
+void tst_QScriptEngine::translateScriptUnicodeIdBased()
+{
+ QFETCH(QString, expression);
+ QFETCH(QString, expectedTranslation);
+
+ QScriptEngine engine;
+
+ QTranslator translator;
+ QVERIFY(translator.load(":/translations/idtranslatable-unicode"));
+ QCoreApplication::instance()->installTranslator(&translator);
+ engine.installTranslatorFunctions();
+
+ QCOMPARE(engine.evaluate(expression).toString(), expectedTranslation);
+ QVERIFY(!engine.hasUncaughtException());
+
+ QCoreApplication::instance()->removeTranslator(&translator);
+}
+
void tst_QScriptEngine::functionScopes()
{
QScriptEngine eng;
diff --git a/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp b/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp
index c5e4954..6b49858 100644
--- a/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp
+++ b/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp
@@ -50,24 +50,11 @@
#include <qmenu.h>
#include <qplaintextedit.h>
#include <qtoolbar.h>
+#include "../../shared/util.h"
//TESTED_CLASS=
//TESTED_FILES=
-// Will try to wait for the condition while allowing event processing
-#define QTRY_COMPARE(__expr, __expected) \
- do { \
- const int __step = 50; \
- const int __timeout = 5000; \
- if ((__expr) != (__expected)) { \
- QTest::qWait(0); \
- } \
- for (int __i = 0; __i < __timeout && ((__expr) != (__expected)); __i+=__step) { \
- QTest::qWait(__step); \
- } \
- QCOMPARE(__expr, __expected); \
- } while(0)
-
// Can't use QTest::qWait() because it causes event loop to hang on some platforms
static void qsWait(int ms)
{
@@ -89,6 +76,9 @@ public:
tst_QScriptEngineDebugger();
virtual ~tst_QScriptEngineDebugger();
+protected slots:
+ void recordDebuggerStateAndContinue();
+
private slots:
void attachAndDetach();
void action();
@@ -97,6 +87,11 @@ private slots:
void debuggerSignals();
void consoleCommands();
void multithreadedDebugging();
+ void autoShowStandardWindow();
+ void standardWindowOwnership();
+
+private:
+ QScriptEngineDebugger::DebuggerState m_recordedDebuggerState;
};
tst_QScriptEngineDebugger::tst_QScriptEngineDebugger()
@@ -107,6 +102,14 @@ tst_QScriptEngineDebugger::~tst_QScriptEngineDebugger()
{
}
+void tst_QScriptEngineDebugger::recordDebuggerStateAndContinue()
+{
+ QScriptEngineDebugger *debugger = qobject_cast<QScriptEngineDebugger*>(sender());
+ Q_ASSERT(debugger != 0);
+ m_recordedDebuggerState = debugger->state();
+ debugger->action(QScriptEngineDebugger::ContinueAction)->trigger();
+}
+
void tst_QScriptEngineDebugger::attachAndDetach()
{
#if defined(Q_OS_WINCE) && _WIN32_WCE < 0x600
@@ -784,5 +787,68 @@ void tst_QScriptEngineDebugger::multithreadedDebugging()
QTRY_COMPARE(threadFinishedSpy.count(), 1);
}
+void tst_QScriptEngineDebugger::autoShowStandardWindow()
+{
+ {
+ QScriptEngine engine;
+ QScriptEngineDebugger debugger;
+ QCOMPARE(debugger.autoShowStandardWindow(), true);
+ debugger.attachTo(&engine);
+ QObject::connect(&debugger, SIGNAL(evaluationSuspended()),
+ debugger.action(QScriptEngineDebugger::ContinueAction),
+ SLOT(trigger()));
+ engine.evaluate("debugger");
+ QTRY_VERIFY(debugger.standardWindow()->isVisible());
+
+ debugger.setAutoShowStandardWindow(true);
+ QCOMPARE(debugger.autoShowStandardWindow(), true);
+
+ debugger.setAutoShowStandardWindow(false);
+ QCOMPARE(debugger.autoShowStandardWindow(), false);
+
+ debugger.setAutoShowStandardWindow(true);
+ QCOMPARE(debugger.autoShowStandardWindow(), true);
+
+ debugger.standardWindow()->hide();
+
+ engine.evaluate("debugger");
+ QTRY_VERIFY(debugger.standardWindow()->isVisible());
+ }
+
+ {
+ QScriptEngine engine;
+ QScriptEngineDebugger debugger;
+ debugger.setAutoShowStandardWindow(false);
+ debugger.attachTo(&engine);
+ QObject::connect(&debugger, SIGNAL(evaluationSuspended()),
+ debugger.action(QScriptEngineDebugger::ContinueAction),
+ SLOT(trigger()));
+ QSignalSpy evaluationResumedSpy(&debugger, SIGNAL(evaluationResumed()));
+ engine.evaluate("debugger");
+ QTRY_COMPARE(evaluationResumedSpy.count(), 1);
+ QVERIFY(!debugger.standardWindow()->isVisible());
+ }
+}
+
+void tst_QScriptEngineDebugger::standardWindowOwnership()
+{
+ QScriptEngine engine;
+ QPointer<QMainWindow> win;
+ {
+ QScriptEngineDebugger debugger;
+ win = debugger.standardWindow();
+ }
+ QVERIFY(win == 0);
+
+ // Reparent the window.
+ QWidget widget;
+ {
+ QScriptEngineDebugger debugger;
+ win = debugger.standardWindow();
+ win->setParent(&widget);
+ }
+ QVERIFY(win != 0);
+}
+
QTEST_MAIN(tst_QScriptEngineDebugger)
#include "tst_qscriptenginedebugger.moc"
diff --git a/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp b/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp
index 1562118..29934d5 100644
--- a/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp
+++ b/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp
@@ -528,6 +528,20 @@ protected slots:
private slots:
void registeredTypes();
void getSetStaticProperty();
+ void getSetStaticProperty_propertyFlags();
+ void getSetStaticProperty_changeInCpp();
+ void getSetStaticProperty_changeInJS();
+ void getSetStaticProperty_compatibleVariantTypes();
+ void getSetStaticProperty_conversion();
+ void getSetStaticProperty_delete();
+ void getSetStaticProperty_nonScriptable();
+ void getSetStaticProperty_writeOnly();
+ void getSetStaticProperty_readOnly();
+ void getSetStaticProperty_enum();
+ void getSetStaticProperty_qflags();
+ void getSetStaticProperty_pointerDeref();
+ void getSetStaticProperty_customGetterSetter();
+ void getSetStaticProperty_methodPersistence();
void getSetDynamicProperty();
void getSetChildren();
void callQtInvokable();
@@ -655,7 +669,10 @@ void tst_QScriptExtQObject::getSetStaticProperty()
QCOMPARE(m_engine->evaluate("myObject.stringListProperty[1]").isString(), true);
QCOMPARE(m_engine->evaluate("myObject.stringListProperty[1]").toString(),
QLatin1String("zag"));
+}
+void tst_QScriptExtQObject::getSetStaticProperty_propertyFlags()
+{
// default flags for "normal" properties
{
QScriptValue mobj = m_engine->globalObject().property("myObject");
@@ -677,7 +694,10 @@ void tst_QScriptExtQObject::getSetStaticProperty()
QVERIFY(!(mobj.propertyFlags("mySlot()") & QScriptValue::SkipInEnumeration));
QVERIFY(mobj.propertyFlags("mySlot()") & QScriptValue::QObjectMember);
}
+}
+void tst_QScriptExtQObject::getSetStaticProperty_changeInCpp()
+{
// property change in C++ should be reflected in script
m_myObject->setIntProperty(456);
QCOMPARE(m_engine->evaluate("myObject.intProperty")
@@ -701,7 +721,10 @@ void tst_QScriptExtQObject::getSetStaticProperty()
m_myObject->setStringProperty(QLatin1String("zab"));
QCOMPARE(m_engine->evaluate("myObject.stringProperty")
.equals(QScriptValue(m_engine, QLatin1String("zab"))), true);
+}
+void tst_QScriptExtQObject::getSetStaticProperty_changeInJS()
+{
// property change in script should be reflected in C++
QCOMPARE(m_engine->evaluate("myObject.intProperty = 123")
.strictlyEquals(QScriptValue(m_engine, 123)), true);
@@ -784,7 +807,10 @@ void tst_QScriptExtQObject::getSetStaticProperty()
<< QLatin1String("two")
<< QLatin1String("true"));
}
+}
+void tst_QScriptExtQObject::getSetStaticProperty_compatibleVariantTypes()
+{
// test setting properties where we can't convert the type natively but where the
// types happen to be compatible variant types already
{
@@ -803,7 +829,10 @@ void tst_QScriptExtQObject::getSetStaticProperty()
mobj.setProperty("propWithCustomType", m_engine->newVariant(qVariantFromValue(t)));
QVERIFY(m_myObject->propWithCustomType().string == t.string);
}
+}
+void tst_QScriptExtQObject::getSetStaticProperty_conversion()
+{
// test that we do value conversion if necessary when setting properties
{
QScriptValue br = m_engine->evaluate("myObject.brushProperty");
@@ -823,28 +852,41 @@ void tst_QScriptExtQObject::getSetStaticProperty()
m_engine->globalObject().setProperty("myColor", QScriptValue());
}
+}
+void tst_QScriptExtQObject::getSetStaticProperty_delete()
+{
// try to delete
QCOMPARE(m_engine->evaluate("delete myObject.intProperty").toBoolean(), false);
QCOMPARE(m_engine->evaluate("myObject.intProperty").toNumber(), 123.0);
+ m_myObject->setVariantProperty(42);
QCOMPARE(m_engine->evaluate("delete myObject.variantProperty").toBoolean(), false);
QCOMPARE(m_engine->evaluate("myObject.variantProperty").toNumber(), 42.0);
+}
+void tst_QScriptExtQObject::getSetStaticProperty_nonScriptable()
+{
// non-scriptable property
QCOMPARE(m_myObject->hiddenProperty(), 456.0);
QCOMPARE(m_engine->evaluate("myObject.hiddenProperty").isUndefined(), true);
QCOMPARE(m_engine->evaluate("myObject.hiddenProperty = 123;"
"myObject.hiddenProperty").toInt32(), 123);
QCOMPARE(m_myObject->hiddenProperty(), 456.0);
+}
+void tst_QScriptExtQObject::getSetStaticProperty_writeOnly()
+{
// write-only property
QCOMPARE(m_myObject->writeOnlyProperty(), 789);
QCOMPARE(m_engine->evaluate("myObject.writeOnlyProperty").isUndefined(), true);
QCOMPARE(m_engine->evaluate("myObject.writeOnlyProperty = 123;"
"myObject.writeOnlyProperty").isUndefined(), true);
QCOMPARE(m_myObject->writeOnlyProperty(), 123);
+}
+void tst_QScriptExtQObject::getSetStaticProperty_readOnly()
+{
// read-only property
QCOMPARE(m_myObject->readOnlyProperty(), 987);
QCOMPARE(m_engine->evaluate("myObject.readOnlyProperty").toInt32(), 987);
@@ -856,7 +898,10 @@ void tst_QScriptExtQObject::getSetStaticProperty()
QCOMPARE(mobj.propertyFlags("readOnlyProperty") & QScriptValue::ReadOnly,
QScriptValue::ReadOnly);
}
+}
+void tst_QScriptExtQObject::getSetStaticProperty_enum()
+{
// enum property
QCOMPARE(m_myObject->enumProperty(), MyQObject::BarPolicy);
{
@@ -881,7 +926,10 @@ void tst_QScriptExtQObject::getSetStaticProperty()
QCOMPARE(m_myObject->enumProperty(), MyQObject::BazPolicy);
m_engine->evaluate("myObject.enumProperty = 'nada'");
QCOMPARE(m_myObject->enumProperty(), (MyQObject::Policy)-1);
+}
+void tst_QScriptExtQObject::getSetStaticProperty_qflags()
+{
// flags property
QCOMPARE(m_myObject->flagsProperty(), MyQObject::FooAbility);
{
@@ -900,7 +948,10 @@ void tst_QScriptExtQObject::getSetStaticProperty()
m_engine->evaluate("myObject.flagsProperty = 'ScoobyDoo'");
// ### ouch! Shouldn't QMetaProperty::write() rather not change the value...?
QCOMPARE(m_myObject->flagsProperty(), (MyQObject::Ability)-1);
+}
+void tst_QScriptExtQObject::getSetStaticProperty_pointerDeref()
+{
// auto-dereferencing of pointers
{
QBrush b = QColor(0xCA, 0xFE, 0xBA, 0xBE);
@@ -920,7 +971,10 @@ void tst_QScriptExtQObject::getSetStaticProperty()
}
m_engine->globalObject().setProperty("brushPointer", QScriptValue());
}
+}
+void tst_QScriptExtQObject::getSetStaticProperty_customGetterSetter()
+{
// install custom property getter+setter
{
QScriptValue mobj = m_engine->globalObject().property("myObject");
@@ -930,7 +984,10 @@ void tst_QScriptExtQObject::getSetStaticProperty()
mobj.setProperty("intProperty", 321);
QCOMPARE(mobj.property("intProperty").toInt32(), 321);
}
+}
+void tst_QScriptExtQObject::getSetStaticProperty_methodPersistence()
+{
// method properties are persistent
{
QScriptValue slot = m_engine->evaluate("myObject.mySlot");
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
index be51cf2..528b20e 100644
--- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
@@ -2332,6 +2332,54 @@ void tst_QScriptValue::getSetPrototype_twoEngines()
}
+void tst_QScriptValue::getSetPrototype_null()
+{
+ QScriptEngine eng;
+ QScriptValue object = eng.newObject();
+ object.setPrototype(QScriptValue(QScriptValue::NullValue));
+ QVERIFY(object.prototype().isNull());
+
+ QScriptValue newProto = eng.newObject();
+ object.setPrototype(newProto);
+ QVERIFY(object.prototype().equals(newProto));
+
+ object.setPrototype(QScriptValue(&eng, QScriptValue::NullValue));
+ QVERIFY(object.prototype().isNull());
+}
+
+void tst_QScriptValue::getSetPrototype_notObjectOrNull()
+{
+ QScriptEngine eng;
+ QScriptValue object = eng.newObject();
+ QScriptValue originalProto = object.prototype();
+
+ QEXPECT_FAIL("", "QTBUG-15154: QScriptValue::setPrototype() allows a non-Object value to be set as prototype", Abort);
+
+ // bool
+ object.setPrototype(true);
+ QVERIFY(object.prototype().equals(originalProto));
+ object.setPrototype(QScriptValue(&eng, true));
+ QVERIFY(object.prototype().equals(originalProto));
+
+ // number
+ object.setPrototype(123);
+ QVERIFY(object.prototype().equals(originalProto));
+ object.setPrototype(QScriptValue(&eng, 123));
+ QVERIFY(object.prototype().equals(originalProto));
+
+ // string
+ object.setPrototype("foo");
+ QVERIFY(object.prototype().equals(originalProto));
+ object.setPrototype(QScriptValue(&eng, "foo"));
+ QVERIFY(object.prototype().equals(originalProto));
+
+ // undefined
+ object.setPrototype(QScriptValue(QScriptValue::UndefinedValue));
+ QVERIFY(object.prototype().equals(originalProto));
+ object.setPrototype(QScriptValue(&eng, QScriptValue::UndefinedValue));
+ QVERIFY(object.prototype().equals(originalProto));
+}
+
void tst_QScriptValue::getSetPrototype()
{
QScriptEngine eng;
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.h b/tests/auto/qscriptvalue/tst_qscriptvalue.h
index 45a109e..c6b2202 100644
--- a/tests/auto/qscriptvalue/tst_qscriptvalue.h
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue.h
@@ -115,6 +115,8 @@ private slots:
void getSetPrototype_eval();
void getSetPrototype_invalidPrototype();
void getSetPrototype_twoEngines();
+ void getSetPrototype_null();
+ void getSetPrototype_notObjectOrNull();
void getSetPrototype();
void getSetScope();
void getSetProperty_HooliganTask162051();
diff --git a/tests/auto/qscriptvaluegenerated/testgen/data.txt b/tests/auto/qscriptvaluegenerated/testgen/data.txt
index 73677ec..2cc1229 100644
--- a/tests/auto/qscriptvaluegenerated/testgen/data.txt
+++ b/tests/auto/qscriptvaluegenerated/testgen/data.txt
@@ -116,6 +116,11 @@ engine->evaluate("/foo/")
engine->evaluate("new Object()")
engine->evaluate("new Array()")
engine->evaluate("new Error()")
+engine->evaluate("new Boolean(true)")
+engine->evaluate("new Boolean(false)")
+engine->evaluate("new Number(123)")
+engine->evaluate("new RegExp('foo', 'gim')")
+engine->evaluate("new String('ciao')")
engine->evaluate("a = new Object(); a.foo = 22; a.foo")
engine->evaluate("Undefined")
engine->evaluate("Null")
@@ -154,8 +159,9 @@ engine->newArray()
engine->newArray(10)
engine->newDate(QDateTime())
engine->newQMetaObject(&QObject::staticMetaObject)
+engine->newRegExp("foo", "gim")
engine->newVariant(QVariant())
engine->newVariant(QVariant(123))
engine->newVariant(QVariant(false))
engine->newQObject(0)
-engine->newQObject(engine) \ No newline at end of file
+engine->newQObject(engine)
diff --git a/tests/auto/qscriptvaluegenerated/testgen/testgenerator.cpp b/tests/auto/qscriptvaluegenerated/testgen/testgenerator.cpp
index 9d7d33d..183b62c 100644
--- a/tests/auto/qscriptvaluegenerated/testgen/testgenerator.cpp
+++ b/tests/auto/qscriptvaluegenerated/testgen/testgenerator.cpp
@@ -156,14 +156,14 @@ static QString generateLicence()
static QString generateIsXXXDef(const QString& name, const QList<QString>& list)
{
- static const QString templ("void tst_QScriptValue::%1_initData()\n"\
+ static const QString templ("void tst_QScriptValueGenerated::%1_initData()\n"\
"{\n"\
" QTest::addColumn<bool>(\"expected\");\n"\
" initScriptValues();\n"\
"}\n"\
"\n"\
"static QString %1_array[] = {%2};\n\n"\
- "void tst_QScriptValue::%1_makeData(const char* expr)\n"\
+ "void tst_QScriptValueGenerated::%1_makeData(const char* expr)\n"\
"{\n"\
" static QSet<QString> %1;\n"\
" if (%1.isEmpty()) {\n"\
@@ -174,7 +174,7 @@ static QString generateIsXXXDef(const QString& name, const QList<QString>& list)
" newRow(expr) << %1.contains(expr);\n"\
"}\n"\
"\n"\
- "void tst_QScriptValue::%1_test(const char*, const QScriptValue& value)\n"\
+ "void tst_QScriptValueGenerated::%1_test(const char*, const QScriptValue& value)\n"\
"{\n"\
" QFETCH(bool, expected);\n"\
" QCOMPARE(value.%1(), expected);\n"\
@@ -197,8 +197,9 @@ static QString generateIsXXXDef(const QString& name, const QList<QString>& list)
set.append("\",");
set.append("\n \"");
set.append(escape(t));
- set.append("\"");
}
+ if (!list.isEmpty())
+ set.append("\"\n");
return result.arg(name, set.join(QString()), QString::number(list.count()));
}
@@ -207,7 +208,7 @@ 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"\
+ "void tst_QScriptValueGenerated::%1_initData()\n"\
"{\n"\
" QTest::addColumn<%2>(\"expected\");\n"\
" initScriptValues();\n"\
@@ -215,7 +216,7 @@ static QString generateToXXXDef(const QString& name, const QList<QPair<QString,
"\n"\
"static QString %1_tagArray[] = {%4};\n\n"\
"static %2 %1_valueArray[] = {%5};\n\n"\
- "void tst_QScriptValue::%1_makeData(const char* expr)\n"\
+ "void tst_QScriptValueGenerated::%1_makeData(const char* expr)\n"\
"{\n"\
" static QHash<QString, %2> %1;\n"\
" if (%1.isEmpty()) {\n"\
@@ -226,7 +227,7 @@ static QString generateToXXXDef(const QString& name, const QList<QPair<QString,
" newRow(expr) << %1.value(expr);\n"\
"}\n"\
"\n"\
- "void tst_QScriptValue::%1_test(const char*, const QScriptValue& value)\n"\
+ "void tst_QScriptValueGenerated::%1_test(const char*, const QScriptValue& value)\n"\
"{\n"\
" QFETCH(%2, expected);\n"\
" QCOMPARE(value.%1(), expected);\n"\
@@ -268,7 +269,7 @@ template<>
QString generateToXXXDef<qsreal>(const QString& name, const QList<QPair<QString, qsreal> >& list)
{
static const QString templ = "\n"\
- "void tst_QScriptValue::%1_initData()\n"\
+ "void tst_QScriptValueGenerated::%1_initData()\n"\
"{\n"\
" QTest::addColumn<%2>(\"expected\");\n"\
" initScriptValues();\n"\
@@ -276,7 +277,7 @@ QString generateToXXXDef<qsreal>(const QString& name, const QList<QPair<QString,
"\n"\
"static QString %1_tagArray[] = {%3};\n"\
"static %2 %1_valueArray[] = {%4};\n"\
- "void tst_QScriptValue::%1_makeData(const char* expr)\n"\
+ "void tst_QScriptValueGenerated::%1_makeData(const char* expr)\n"\
"{\n"\
" static QHash<QString, %2> %1;\n"\
" if (%1.isEmpty()) {\n"\
@@ -287,7 +288,7 @@ QString generateToXXXDef<qsreal>(const QString& name, const QList<QPair<QString,
" newRow(expr) << %1.value(expr);\n"\
"}\n"\
"\n"\
- "void tst_QScriptValue::%1_test(const char*, const QScriptValue& value)\n"\
+ "void tst_QScriptValueGenerated::%1_test(const char*, const QScriptValue& value)\n"\
"{\n"\
" QFETCH(%2, expected);\n"\
"%666"
@@ -345,7 +346,7 @@ template<typename T>
static QString generateCastDef(const QList<QPair<QString, T> >& list)
{
static const QString templ = "\n"\
- "void tst_QScriptValue::qscriptvalue_cast%1_initData()\n"\
+ "void tst_QScriptValueGenerated::qscriptvalue_cast%1_initData()\n"\
"{\n"\
" QTest::addColumn<%1>(\"expected\");\n"\
" initScriptValues();\n"\
@@ -353,7 +354,7 @@ static QString generateCastDef(const QList<QPair<QString, T> >& list)
"\n"\
"static QString qscriptvalue_cast%1_tagArray[] = {%2};\n"\
"static %1 qscriptvalue_cast%1_valueArray[] = {%3};\n"\
- "void tst_QScriptValue::qscriptvalue_cast%1_makeData(const char* expr)\n"\
+ "void tst_QScriptValueGenerated::qscriptvalue_cast%1_makeData(const char* expr)\n"\
"{\n"\
" static QHash<QString, %1> value;\n"\
" if (value.isEmpty()) {\n"\
@@ -364,7 +365,7 @@ static QString generateCastDef(const QList<QPair<QString, T> >& list)
" newRow(expr) << value.value(expr);\n"\
"}\n"\
"\n"\
- "void tst_QScriptValue::qscriptvalue_cast%1_test(const char*, const QScriptValue& value)\n"\
+ "void tst_QScriptValueGenerated::qscriptvalue_cast%1_test(const char*, const QScriptValue& value)\n"\
"{\n"\
" QFETCH(%1, expected);\n"\
" QCOMPARE(qscriptvalue_cast<%1>(value), expected);\n"\
@@ -401,7 +402,7 @@ template<>
QString generateCastDef<qsreal>(const QList<QPair<QString, qsreal> >& list)
{
static const QString templ = "\n"\
- "void tst_QScriptValue::qscriptvalue_cast%1_initData()\n"\
+ "void tst_QScriptValueGenerated::qscriptvalue_cast%1_initData()\n"\
"{\n"\
" QTest::addColumn<%1>(\"expected\");\n"\
" initScriptValues();\n"\
@@ -409,7 +410,7 @@ QString generateCastDef<qsreal>(const QList<QPair<QString, qsreal> >& list)
"\n"\
"static QString qscriptvalue_cast%1_tagArray[] = {%2};\n"\
"static %1 qscriptvalue_cast%1_valueArray[] = {%3};\n"\
- "void tst_QScriptValue::qscriptvalue_cast%1_makeData(const char* expr)\n"\
+ "void tst_QScriptValueGenerated::qscriptvalue_cast%1_makeData(const char* expr)\n"\
"{\n"\
" static QHash<QString, %1> value;\n"\
" if (value.isEmpty()) {\n"\
@@ -420,7 +421,7 @@ QString generateCastDef<qsreal>(const QList<QPair<QString, qsreal> >& list)
" newRow(expr) << value.value(expr);\n"\
"}\n"\
"\n"\
- "void tst_QScriptValue::qscriptvalue_cast%1_test(const char*, const QScriptValue& value)\n"\
+ "void tst_QScriptValueGenerated::qscriptvalue_cast%1_test(const char*, const QScriptValue& value)\n"\
"{\n"\
" QFETCH(%1, expected);\n"\
" if (qIsNaN(expected)) {\n"
@@ -469,7 +470,7 @@ QString generateCastDef<qsreal>(const QList<QPair<QString, qsreal> >& list)
static QString generateCompareDef(const QString& comparisionType, const QList<QString> tags)
{
static const QString templ = "\n"\
- "void tst_QScriptValue::%1_initData()\n"\
+ "void tst_QScriptValueGenerated::%1_initData()\n"\
"{\n"\
" QTest::addColumn<QScriptValue>(\"other\");\n"\
" QTest::addColumn<bool>(\"expected\");\n"\
@@ -477,7 +478,7 @@ static QString generateCompareDef(const QString& comparisionType, const QList<QS
"}\n"\
"\n"\
"static QString %1_array[] = {%2};\n\n"\
- "void tst_QScriptValue::%1_makeData(const char *expr)\n"\
+ "void tst_QScriptValueGenerated::%1_makeData(const char *expr)\n"\
"{\n"\
" static QSet<QString> equals;\n"\
" if (equals.isEmpty()) {\n"\
@@ -492,7 +493,7 @@ static QString generateCompareDef(const QString& comparisionType, const QList<QS
" }\n"\
"}\n"\
"\n"\
- "void tst_QScriptValue::%1_test(const char *, const QScriptValue& value)\n"\
+ "void tst_QScriptValueGenerated::%1_test(const char *, const QScriptValue& value)\n"\
"{\n"\
" QFETCH(QScriptValue, other);\n"\
" QFETCH(bool, expected);\n"\
@@ -520,7 +521,7 @@ static QString generateCompareDef(const QString& comparisionType, const QList<QS
static QString generateInitDef(const QVector<QString>& allDataTags)
{
- static const QString templ = "void tst_QScriptValue::initScriptValues()\n"\
+ static const QString templ = "void tst_QScriptValueGenerated::initScriptValues()\n"\
"{\n"\
" m_values.clear();\n"\
" if (engine)\n"\
diff --git a/tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_cast.cpp b/tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_cast.cpp
index 90bc104..2353116 100644
--- a/tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_cast.cpp
+++ b/tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_cast.cpp
@@ -53,7 +53,7 @@ void tst_QScriptValueGenerated::qscriptvalue_castQString_initData()
initScriptValues();
}
-static QString qscriptvalue_castQString_tagArray [] = {
+static QString qscriptvalue_castQString_tagArray[] = {
"QScriptValue()",
"QScriptValue(QScriptValue::UndefinedValue)",
"QScriptValue(QScriptValue::NullValue)",
@@ -157,6 +157,11 @@ static QString qscriptvalue_castQString_tagArray [] = {
"engine->evaluate(\"new Object()\")",
"engine->evaluate(\"new Array()\")",
"engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"new Boolean(false)\")",
+ "engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Null\")",
@@ -191,89 +196,93 @@ static QString qscriptvalue_castQString_tagArray [] = {
"engine->newArray(10)",
"engine->newDate(QDateTime())",
"engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newRegExp(\"foo\", \"gim\")",
"engine->newVariant(QVariant())",
"engine->newVariant(QVariant(123))",
"engine->newVariant(QVariant(false))",
"engine->newQObject(0)",
- "engine->newQObject(engine)",};
-static QString qscriptvalue_castQString_valueArray [] = {
- "", "",
- "", "true",
- "false", "122",
- "124", "0",
- "0", "123",
- "6.37e-8", "-6.37e-8",
- "1126240820", "65536",
- "65537", "NaN",
- "NaN", "Infinity",
- "-Infinity", "NaN",
- "Infinity", "-Infinity",
- "ciao", "ciao",
- "", "",
- "0", "123",
- "12.4", "",
- "", "true",
- "false", "122",
- "124", "0",
- "0", "123",
- "6.37e-8", "-6.37e-8",
- "1126240820", "65536",
- "65537", "NaN",
- "NaN", "Infinity",
- "-Infinity", "NaN",
- "Infinity", "-Infinity",
- "ciao", "ciao",
- "", "",
- "0", "123",
- "12.3", "",
- "", "true",
- "false", "122",
- "124", "0",
- "0", "123",
- "6.37e-8", "-6.37e-8",
- "1126240820", "65536",
- "65537", "NaN",
- "NaN", "Infinity",
- "-Infinity", "NaN",
- "Infinity", "-Infinity",
- "ciao", "ciao",
- "", "",
- "0", "123",
- "1.23", "",
- "", "[object Object]",
- "Invalid Date", "",
- "function () {\n [native code]\n}", "Error: Unknown error",
- "function Object() {\n [native code]\n}", "function Array() {\n [native code]\n}",
- "function Number() {\n [native code]\n}", "function Function() {\n [native code]\n}",
- "function () { return 1; }", "function () { return 'ciao'; }",
- "function () { throw new Error('foo'); }", "/foo/",
- "[object Object]", "",
- "Error: Unknown error", "22",
- "ReferenceError: Can't find variable: Undefined", "ReferenceError: Can't find variable: Null",
- "ReferenceError: Can't find variable: True", "ReferenceError: Can't find variable: False",
- "", "",
- "true", "false",
- "122", "124",
- "0", "0",
- "123", "6.37e-8",
- "-6.37e-8", "1126240820",
- "65536", "65537",
- "NaN", "Infinity",
- "-Infinity", "ciao",
- "", "0",
- "123", "12.4",
- "", "",
- "[object Object]", "",
- ",,,,,,,,,", "Invalid Date",
- "[object QMetaObject]", "undefined",
- "123", "false",
- "", "QScriptEngine(name = \"\")", };
+ "engine->newQObject(engine)"};
+static QString qscriptvalue_castQString_valueArray[] = {
+ "", "",
+ "", "true",
+ "false", "122",
+ "124", "0",
+ "0", "123",
+ "6.37e-8", "-6.37e-8",
+ "1126240820", "65536",
+ "65537", "NaN",
+ "NaN", "Infinity",
+ "-Infinity", "NaN",
+ "Infinity", "-Infinity",
+ "ciao", "ciao",
+ "", "",
+ "0", "123",
+ "12.4", "",
+ "", "true",
+ "false", "122",
+ "124", "0",
+ "0", "123",
+ "6.37e-8", "-6.37e-8",
+ "1126240820", "65536",
+ "65537", "NaN",
+ "NaN", "Infinity",
+ "-Infinity", "NaN",
+ "Infinity", "-Infinity",
+ "ciao", "ciao",
+ "", "",
+ "0", "123",
+ "12.3", "",
+ "", "true",
+ "false", "122",
+ "124", "0",
+ "0", "123",
+ "6.37e-8", "-6.37e-8",
+ "1126240820", "65536",
+ "65537", "NaN",
+ "NaN", "Infinity",
+ "-Infinity", "NaN",
+ "Infinity", "-Infinity",
+ "ciao", "ciao",
+ "", "",
+ "0", "123",
+ "1.23", "",
+ "", "[object Object]",
+ "Invalid Date", "",
+ "function () {\n [native code]\n}", "Error: Unknown error",
+ "function Object() {\n [native code]\n}", "function Array() {\n [native code]\n}",
+ "function Number() {\n [native code]\n}", "function Function() {\n [native code]\n}",
+ "function () { return 1; }", "function () { return 'ciao'; }",
+ "function () { throw new Error('foo'); }", "/foo/",
+ "[object Object]", "",
+ "Error: Unknown error", "true",
+ "false", "123",
+ "/foo/gim", "ciao",
+ "22", "ReferenceError: Can't find variable: Undefined",
+ "ReferenceError: Can't find variable: Null", "ReferenceError: Can't find variable: True",
+ "ReferenceError: Can't find variable: False", "",
+ "", "true",
+ "false", "122",
+ "124", "0",
+ "0", "123",
+ "6.37e-8", "-6.37e-8",
+ "1126240820", "65536",
+ "65537", "NaN",
+ "Infinity", "-Infinity",
+ "ciao", "",
+ "0", "123",
+ "12.4", "",
+ "", "[object Object]",
+ "", ",,,,,,,,,",
+ "Invalid Date", "[object QMetaObject]",
+ "/foo/gim", "undefined",
+ "123", "false",
+ "", "QScriptEngine(name = \"\")"};
void tst_QScriptValueGenerated::qscriptvalue_castQString_makeData(const char* expr)
{
static QHash<QString, QString> value;
if (value.isEmpty()) {
- value.reserve(142);
- for (unsigned i = 0; i < 142; ++i)
+ value.reserve(148);
+ for (unsigned i = 0; i < 148; ++i)
value.insert(qscriptvalue_castQString_tagArray[i], qscriptvalue_castQString_valueArray[i]);
}
newRow(expr) << value.value(expr);
@@ -295,7 +304,7 @@ void tst_QScriptValueGenerated::qscriptvalue_castqsreal_initData()
initScriptValues();
}
-static QString qscriptvalue_castqsreal_tagArray [] = {
+static QString qscriptvalue_castqsreal_tagArray[] = {
"QScriptValue()",
"QScriptValue(QScriptValue::UndefinedValue)",
"QScriptValue(QScriptValue::NullValue)",
@@ -399,6 +408,11 @@ static QString qscriptvalue_castqsreal_tagArray [] = {
"engine->evaluate(\"new Object()\")",
"engine->evaluate(\"new Array()\")",
"engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"new Boolean(false)\")",
+ "engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Null\")",
@@ -433,33 +447,34 @@ static QString qscriptvalue_castqsreal_tagArray [] = {
"engine->newArray(10)",
"engine->newDate(QDateTime())",
"engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newRegExp(\"foo\", \"gim\")",
"engine->newVariant(QVariant())",
"engine->newVariant(QVariant(123))",
"engine->newVariant(QVariant(false))",
"engine->newQObject(0)",
- "engine->newQObject(engine)",};
-static qsreal qscriptvalue_castqsreal_valueArray [] = {
- 0, qQNaN(), 0, 1, 0, 122, 124, 0, 0, 123,
- 6.369999999999999e-08, -6.369999999999999e-08, 1126240820, 65536, 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(),
- qInf(), qInf(), qQNaN(), qQNaN(), 0, 0, 0, 123, 12.4, qQNaN(),
- 0, 1, 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08,
- 1126240820, 65536, 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(), qInf(), qInf(),
- qQNaN(), qQNaN(), 0, 0, 0, 123, 12.3, qQNaN(), 0, 1,
- 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08, 1126240820, 65536,
- 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(), qInf(), qInf(), qQNaN(), qQNaN(),
- 0, 0, 0, 123, 1.23, 0, qQNaN(), qQNaN(), qQNaN(), 0,
- qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(),
- qQNaN(), 0, qQNaN(), 22, qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), 0,
- 1, 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08, 1126240820,
- 65536, 65537, qQNaN(), qInf(), qInf(), qQNaN(), 0, 0, 123, 12.4,
- 0, qQNaN(), qQNaN(), 0, qQNaN(), qQNaN(), qQNaN(), qQNaN(), 123, 0,
- 0, qQNaN(), };
+ "engine->newQObject(engine)"};
+static qsreal qscriptvalue_castqsreal_valueArray[] = {
+ 0, qQNaN(), 0, 1, 0, 122, 124, 0, 0, 123,
+ 6.369999999999999e-08, -6.369999999999999e-08, 1126240820, 65536, 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(),
+ qInf(), qInf(), qQNaN(), qQNaN(), 0, 0, 0, 123, 12.4, qQNaN(),
+ 0, 1, 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08,
+ 1126240820, 65536, 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(), qInf(), qInf(),
+ qQNaN(), qQNaN(), 0, 0, 0, 123, 12.3, qQNaN(), 0, 1,
+ 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08, 1126240820, 65536,
+ 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(), qInf(), qInf(), qQNaN(), qQNaN(),
+ 0, 0, 0, 123, 1.23, 0, qQNaN(), qQNaN(), qQNaN(), 0,
+ qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(),
+ qQNaN(), 0, qQNaN(), 1, 0, 123, qQNaN(), qQNaN(), 22, qQNaN(),
+ qQNaN(), qQNaN(), qQNaN(), qQNaN(), 0, 1, 0, 122, 124, 0,
+ 0, 123, 6.369999999999999e-08, -6.369999999999999e-08, 1126240820, 65536, 65537, qQNaN(), qInf(), qInf(),
+ qQNaN(), 0, 0, 123, 12.4, 0, qQNaN(), qQNaN(), 0, qQNaN(),
+ qQNaN(), qQNaN(), qQNaN(), qQNaN(), 123, 0, 0, qQNaN()};
void tst_QScriptValueGenerated::qscriptvalue_castqsreal_makeData(const char* expr)
{
static QHash<QString, qsreal> value;
if (value.isEmpty()) {
- value.reserve(142);
- for (unsigned i = 0; i < 142; ++i)
+ value.reserve(148);
+ for (unsigned i = 0; i < 148; ++i)
value.insert(qscriptvalue_castqsreal_tagArray[i], qscriptvalue_castqsreal_valueArray[i]);
}
newRow(expr) << value.value(expr);
@@ -491,7 +506,7 @@ void tst_QScriptValueGenerated::qscriptvalue_castbool_initData()
initScriptValues();
}
-static QString qscriptvalue_castbool_tagArray [] = {
+static QString qscriptvalue_castbool_tagArray[] = {
"QScriptValue()",
"QScriptValue(QScriptValue::UndefinedValue)",
"QScriptValue(QScriptValue::NullValue)",
@@ -595,6 +610,11 @@ static QString qscriptvalue_castbool_tagArray [] = {
"engine->evaluate(\"new Object()\")",
"engine->evaluate(\"new Array()\")",
"engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"new Boolean(false)\")",
+ "engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Null\")",
@@ -629,89 +649,93 @@ static QString qscriptvalue_castbool_tagArray [] = {
"engine->newArray(10)",
"engine->newDate(QDateTime())",
"engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newRegExp(\"foo\", \"gim\")",
"engine->newVariant(QVariant())",
"engine->newVariant(QVariant(123))",
"engine->newVariant(QVariant(false))",
"engine->newQObject(0)",
- "engine->newQObject(engine)",};
-static bool qscriptvalue_castbool_valueArray [] = {
- false, false,
- false, true,
- false, true,
- true, false,
- false, true,
- true, true,
- true, true,
- true, false,
- false, true,
- true, true,
- true, true,
- true, true,
- false, false,
- true, true,
- true, false,
- false, true,
- false, true,
- true, false,
- false, true,
- true, true,
- true, true,
- true, false,
- false, true,
- true, true,
- true, true,
- true, true,
- false, false,
- true, true,
- true, false,
- false, true,
- false, true,
- true, false,
- false, true,
- true, true,
- true, true,
- true, false,
- false, true,
- true, true,
- true, true,
- true, true,
- false, false,
- true, true,
- true, true,
- false, true,
- true, true,
- true, true,
- true, true,
- true, true,
- true, true,
- true, true,
- true, true,
- true, true,
- true, true,
- true, true,
- false, false,
- true, false,
- true, true,
- false, false,
- true, true,
- true, true,
- true, true,
- false, true,
- true, true,
- false, true,
- true, true,
- false, false,
- true, true,
- true, true,
- true, true,
- true, true,
- false, true, };
+ "engine->newQObject(engine)"};
+static bool qscriptvalue_castbool_valueArray[] = {
+ false, false,
+ false, true,
+ false, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ false, false,
+ true, true,
+ true, false,
+ false, true,
+ false, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ false, false,
+ true, true,
+ true, false,
+ false, true,
+ false, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ false, false,
+ true, true,
+ true, true,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, false,
+ false, true,
+ false, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, false,
+ true, true,
+ true, false,
+ true, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ false, true};
void tst_QScriptValueGenerated::qscriptvalue_castbool_makeData(const char* expr)
{
static QHash<QString, bool> value;
if (value.isEmpty()) {
- value.reserve(142);
- for (unsigned i = 0; i < 142; ++i)
+ value.reserve(148);
+ for (unsigned i = 0; i < 148; ++i)
value.insert(qscriptvalue_castbool_tagArray[i], qscriptvalue_castbool_valueArray[i]);
}
newRow(expr) << value.value(expr);
@@ -733,7 +757,7 @@ void tst_QScriptValueGenerated::qscriptvalue_castqint32_initData()
initScriptValues();
}
-static QString qscriptvalue_castqint32_tagArray [] = {
+static QString qscriptvalue_castqint32_tagArray[] = {
"QScriptValue()",
"QScriptValue(QScriptValue::UndefinedValue)",
"QScriptValue(QScriptValue::NullValue)",
@@ -837,6 +861,11 @@ static QString qscriptvalue_castqint32_tagArray [] = {
"engine->evaluate(\"new Object()\")",
"engine->evaluate(\"new Array()\")",
"engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"new Boolean(false)\")",
+ "engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Null\")",
@@ -871,89 +900,93 @@ static QString qscriptvalue_castqint32_tagArray [] = {
"engine->newArray(10)",
"engine->newDate(QDateTime())",
"engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newRegExp(\"foo\", \"gim\")",
"engine->newVariant(QVariant())",
"engine->newVariant(QVariant(123))",
"engine->newVariant(QVariant(false))",
"engine->newQObject(0)",
- "engine->newQObject(engine)",};
-static qint32 qscriptvalue_castqint32_valueArray [] = {
- 0, 0,
- 0, 1,
- 0, 122,
- 124, 0,
- 0, 123,
- 0, 0,
- 1126240820, 65536,
- 65537, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 123,
- 12, 0,
- 0, 1,
- 0, 122,
- 124, 0,
- 0, 123,
- 0, 0,
- 1126240820, 65536,
- 65537, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 123,
- 12, 0,
- 0, 1,
- 0, 122,
- 124, 0,
- 0, 123,
- 0, 0,
- 1126240820, 65536,
- 65537, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 123,
- 1, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 22,
- 0, 0,
- 0, 0,
- 0, 0,
- 1, 0,
- 122, 124,
- 0, 0,
- 123, 0,
- 0, 1126240820,
- 65536, 65537,
- 0, 0,
- 0, 0,
- 0, 0,
- 123, 12,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 123, 0,
- 0, 0, };
+ "engine->newQObject(engine)"};
+static qint32 qscriptvalue_castqint32_valueArray[] = {
+ 0, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 1,
+ 0, 123,
+ 0, 0,
+ 22, 0,
+ 0, 0,
+ 0, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 123, 0,
+ 0, 0};
void tst_QScriptValueGenerated::qscriptvalue_castqint32_makeData(const char* expr)
{
static QHash<QString, qint32> value;
if (value.isEmpty()) {
- value.reserve(142);
- for (unsigned i = 0; i < 142; ++i)
+ value.reserve(148);
+ for (unsigned i = 0; i < 148; ++i)
value.insert(qscriptvalue_castqint32_tagArray[i], qscriptvalue_castqint32_valueArray[i]);
}
newRow(expr) << value.value(expr);
@@ -975,7 +1008,7 @@ void tst_QScriptValueGenerated::qscriptvalue_castquint32_initData()
initScriptValues();
}
-static QString qscriptvalue_castquint32_tagArray [] = {
+static QString qscriptvalue_castquint32_tagArray[] = {
"QScriptValue()",
"QScriptValue(QScriptValue::UndefinedValue)",
"QScriptValue(QScriptValue::NullValue)",
@@ -1079,6 +1112,11 @@ static QString qscriptvalue_castquint32_tagArray [] = {
"engine->evaluate(\"new Object()\")",
"engine->evaluate(\"new Array()\")",
"engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"new Boolean(false)\")",
+ "engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Null\")",
@@ -1113,89 +1151,93 @@ static QString qscriptvalue_castquint32_tagArray [] = {
"engine->newArray(10)",
"engine->newDate(QDateTime())",
"engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newRegExp(\"foo\", \"gim\")",
"engine->newVariant(QVariant())",
"engine->newVariant(QVariant(123))",
"engine->newVariant(QVariant(false))",
"engine->newQObject(0)",
- "engine->newQObject(engine)",};
-static quint32 qscriptvalue_castquint32_valueArray [] = {
- 0, 0,
- 0, 1,
- 0, 122,
- 124, 0,
- 0, 123,
- 0, 0,
- 1126240820, 65536,
- 65537, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 123,
- 12, 0,
- 0, 1,
- 0, 122,
- 124, 0,
- 0, 123,
- 0, 0,
- 1126240820, 65536,
- 65537, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 123,
- 12, 0,
- 0, 1,
- 0, 122,
- 124, 0,
- 0, 123,
- 0, 0,
- 1126240820, 65536,
- 65537, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 123,
- 1, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 22,
- 0, 0,
- 0, 0,
- 0, 0,
- 1, 0,
- 122, 124,
- 0, 0,
- 123, 0,
- 0, 1126240820,
- 65536, 65537,
- 0, 0,
- 0, 0,
- 0, 0,
- 123, 12,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 123, 0,
- 0, 0, };
+ "engine->newQObject(engine)"};
+static quint32 qscriptvalue_castquint32_valueArray[] = {
+ 0, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 1,
+ 0, 123,
+ 0, 0,
+ 22, 0,
+ 0, 0,
+ 0, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 123, 0,
+ 0, 0};
void tst_QScriptValueGenerated::qscriptvalue_castquint32_makeData(const char* expr)
{
static QHash<QString, quint32> value;
if (value.isEmpty()) {
- value.reserve(142);
- for (unsigned i = 0; i < 142; ++i)
+ value.reserve(148);
+ for (unsigned i = 0; i < 148; ++i)
value.insert(qscriptvalue_castquint32_tagArray[i], qscriptvalue_castquint32_valueArray[i]);
}
newRow(expr) << value.value(expr);
@@ -1217,7 +1259,7 @@ void tst_QScriptValueGenerated::qscriptvalue_castquint16_initData()
initScriptValues();
}
-static QString qscriptvalue_castquint16_tagArray [] = {
+static QString qscriptvalue_castquint16_tagArray[] = {
"QScriptValue()",
"QScriptValue(QScriptValue::UndefinedValue)",
"QScriptValue(QScriptValue::NullValue)",
@@ -1321,6 +1363,11 @@ static QString qscriptvalue_castquint16_tagArray [] = {
"engine->evaluate(\"new Object()\")",
"engine->evaluate(\"new Array()\")",
"engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"new Boolean(false)\")",
+ "engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Null\")",
@@ -1355,89 +1402,93 @@ static QString qscriptvalue_castquint16_tagArray [] = {
"engine->newArray(10)",
"engine->newDate(QDateTime())",
"engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newRegExp(\"foo\", \"gim\")",
"engine->newVariant(QVariant())",
"engine->newVariant(QVariant(123))",
"engine->newVariant(QVariant(false))",
"engine->newQObject(0)",
- "engine->newQObject(engine)",};
-static quint16 qscriptvalue_castquint16_valueArray [] = {
- 0, 0,
- 0, 1,
- 0, 122,
- 124, 0,
- 0, 123,
- 0, 0,
- 4660, 0,
- 1, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 123,
- 12, 0,
- 0, 1,
- 0, 122,
- 124, 0,
- 0, 123,
- 0, 0,
- 4660, 0,
- 1, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 123,
- 12, 0,
- 0, 1,
- 0, 122,
- 124, 0,
- 0, 123,
- 0, 0,
- 4660, 0,
- 1, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 123,
- 1, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 22,
- 0, 0,
- 0, 0,
- 0, 0,
- 1, 0,
- 122, 124,
- 0, 0,
- 123, 0,
- 0, 4660,
- 0, 1,
- 0, 0,
- 0, 0,
- 0, 0,
- 123, 12,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 123, 0,
- 0, 0, };
+ "engine->newQObject(engine)"};
+static quint16 qscriptvalue_castquint16_valueArray[] = {
+ 0, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 4660, 0,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 4660, 0,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 4660, 0,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 1,
+ 0, 123,
+ 0, 0,
+ 22, 0,
+ 0, 0,
+ 0, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 4660, 0,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 123, 0,
+ 0, 0};
void tst_QScriptValueGenerated::qscriptvalue_castquint16_makeData(const char* expr)
{
static QHash<QString, quint16> value;
if (value.isEmpty()) {
- value.reserve(142);
- for (unsigned i = 0; i < 142; ++i)
+ value.reserve(148);
+ for (unsigned i = 0; i < 148; ++i)
value.insert(qscriptvalue_castquint16_tagArray[i], qscriptvalue_castquint16_valueArray[i]);
}
newRow(expr) << value.value(expr);
diff --git a/tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_comparison.cpp b/tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_comparison.cpp
index 02243de..f8a6cda 100644
--- a/tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_comparison.cpp
+++ b/tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_comparison.cpp
@@ -54,7 +54,7 @@ void tst_QScriptValueGenerated::equals_initData()
initScriptValues();
}
-static QString equals_array [] = {
+static QString equals_array[] = {
"QScriptValue() <=> QScriptValue()",
"QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)",
"QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)",
@@ -83,6 +83,7 @@ static QString equals_array [] = {
"QScriptValue(true) <=> QScriptValue(true)",
"QScriptValue(true) <=> QScriptValue(0, true)",
"QScriptValue(true) <=> QScriptValue(engine, true)",
+ "QScriptValue(true) <=> engine->evaluate(\"new Boolean(true)\")",
"QScriptValue(true) <=> engine->evaluate(\"true\")",
"QScriptValue(false) <=> QScriptValue(false)",
"QScriptValue(false) <=> QScriptValue(0)",
@@ -105,6 +106,7 @@ static QString equals_array [] = {
"QScriptValue(false) <=> engine->evaluate(\"[]\")",
"QScriptValue(false) <=> engine->evaluate(\"Array.prototype\")",
"QScriptValue(false) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(false) <=> engine->evaluate(\"new Boolean(false)\")",
"QScriptValue(false) <=> engine->evaluate(\"false\")",
"QScriptValue(false) <=> engine->evaluate(\"0\")",
"QScriptValue(false) <=> engine->evaluate(\"0.0\")",
@@ -141,6 +143,7 @@ static QString equals_array [] = {
"QScriptValue(0) <=> engine->evaluate(\"[]\")",
"QScriptValue(0) <=> engine->evaluate(\"Array.prototype\")",
"QScriptValue(0) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(0) <=> engine->evaluate(\"new Boolean(false)\")",
"QScriptValue(0) <=> engine->evaluate(\"false\")",
"QScriptValue(0) <=> engine->evaluate(\"0\")",
"QScriptValue(0) <=> engine->evaluate(\"0.0\")",
@@ -169,6 +172,7 @@ static QString equals_array [] = {
"QScriptValue(0.0) <=> engine->evaluate(\"[]\")",
"QScriptValue(0.0) <=> engine->evaluate(\"Array.prototype\")",
"QScriptValue(0.0) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(0.0) <=> engine->evaluate(\"new Boolean(false)\")",
"QScriptValue(0.0) <=> engine->evaluate(\"false\")",
"QScriptValue(0.0) <=> engine->evaluate(\"0\")",
"QScriptValue(0.0) <=> engine->evaluate(\"0.0\")",
@@ -182,6 +186,7 @@ static QString equals_array [] = {
"QScriptValue(123.0) <=> QScriptValue(0, QString(\"123\"))",
"QScriptValue(123.0) <=> QScriptValue(engine, 123.0)",
"QScriptValue(123.0) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(123.0) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(123.0) <=> engine->evaluate(\"123.0\")",
"QScriptValue(123.0) <=> engine->evaluate(\"'123'\")",
"QScriptValue(123.0) <=> engine->newVariant(QVariant(123))",
@@ -242,6 +247,7 @@ static QString equals_array [] = {
"QScriptValue(\"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
"QScriptValue(\"ciao\") <=> QScriptValue(engine, \"ciao\")",
"QScriptValue(\"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(\"ciao\") <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(\"ciao\") <=> engine->evaluate(\"'ciao'\")",
"QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")",
"QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
@@ -249,6 +255,7 @@ static QString equals_array [] = {
"QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
"QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")",
"QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")",
"QScriptValue(QString(\"\")) <=> QScriptValue(false)",
"QScriptValue(QString(\"\")) <=> QScriptValue(0)",
@@ -268,6 +275,7 @@ static QString equals_array [] = {
"QScriptValue(QString(\"\")) <=> engine->evaluate(\"[]\")",
"QScriptValue(QString(\"\")) <=> engine->evaluate(\"Array.prototype\")",
"QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Boolean(false)\")",
"QScriptValue(QString(\"\")) <=> engine->evaluate(\"false\")",
"QScriptValue(QString(\"\")) <=> engine->evaluate(\"0\")",
"QScriptValue(QString(\"\")) <=> engine->evaluate(\"0.0\")",
@@ -292,6 +300,7 @@ static QString equals_array [] = {
"QScriptValue(QString()) <=> engine->evaluate(\"[]\")",
"QScriptValue(QString()) <=> engine->evaluate(\"Array.prototype\")",
"QScriptValue(QString()) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"new Boolean(false)\")",
"QScriptValue(QString()) <=> engine->evaluate(\"false\")",
"QScriptValue(QString()) <=> engine->evaluate(\"0\")",
"QScriptValue(QString()) <=> engine->evaluate(\"0.0\")",
@@ -310,6 +319,7 @@ static QString equals_array [] = {
"QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0)",
"QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0.0)",
"QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"new Boolean(false)\")",
"QScriptValue(QString(\"0\")) <=> engine->evaluate(\"false\")",
"QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0\")",
"QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0.0\")",
@@ -321,6 +331,7 @@ static QString equals_array [] = {
"QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))",
"QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 123.0)",
"QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(QString(\"123\")) <=> engine->evaluate(\"123.0\")",
"QScriptValue(QString(\"123\")) <=> engine->evaluate(\"'123'\")",
"QScriptValue(QString(\"123\")) <=> engine->newVariant(QVariant(123))",
@@ -353,6 +364,7 @@ static QString equals_array [] = {
"QScriptValue(0, true) <=> QScriptValue(true)",
"QScriptValue(0, true) <=> QScriptValue(0, true)",
"QScriptValue(0, true) <=> QScriptValue(engine, true)",
+ "QScriptValue(0, true) <=> engine->evaluate(\"new Boolean(true)\")",
"QScriptValue(0, true) <=> engine->evaluate(\"true\")",
"QScriptValue(0, false) <=> QScriptValue(false)",
"QScriptValue(0, false) <=> QScriptValue(0)",
@@ -375,6 +387,7 @@ static QString equals_array [] = {
"QScriptValue(0, false) <=> engine->evaluate(\"[]\")",
"QScriptValue(0, false) <=> engine->evaluate(\"Array.prototype\")",
"QScriptValue(0, false) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(0, false) <=> engine->evaluate(\"new Boolean(false)\")",
"QScriptValue(0, false) <=> engine->evaluate(\"false\")",
"QScriptValue(0, false) <=> engine->evaluate(\"0\")",
"QScriptValue(0, false) <=> engine->evaluate(\"0.0\")",
@@ -411,6 +424,7 @@ static QString equals_array [] = {
"QScriptValue(0, 0) <=> engine->evaluate(\"[]\")",
"QScriptValue(0, 0) <=> engine->evaluate(\"Array.prototype\")",
"QScriptValue(0, 0) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"new Boolean(false)\")",
"QScriptValue(0, 0) <=> engine->evaluate(\"false\")",
"QScriptValue(0, 0) <=> engine->evaluate(\"0\")",
"QScriptValue(0, 0) <=> engine->evaluate(\"0.0\")",
@@ -439,6 +453,7 @@ static QString equals_array [] = {
"QScriptValue(0, 0.0) <=> engine->evaluate(\"[]\")",
"QScriptValue(0, 0.0) <=> engine->evaluate(\"Array.prototype\")",
"QScriptValue(0, 0.0) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"new Boolean(false)\")",
"QScriptValue(0, 0.0) <=> engine->evaluate(\"false\")",
"QScriptValue(0, 0.0) <=> engine->evaluate(\"0\")",
"QScriptValue(0, 0.0) <=> engine->evaluate(\"0.0\")",
@@ -452,6 +467,7 @@ static QString equals_array [] = {
"QScriptValue(0, 123.0) <=> QScriptValue(0, QString(\"123\"))",
"QScriptValue(0, 123.0) <=> QScriptValue(engine, 123.0)",
"QScriptValue(0, 123.0) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0, 123.0) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(0, 123.0) <=> engine->evaluate(\"123.0\")",
"QScriptValue(0, 123.0) <=> engine->evaluate(\"'123'\")",
"QScriptValue(0, 123.0) <=> engine->newVariant(QVariant(123))",
@@ -512,6 +528,7 @@ static QString equals_array [] = {
"QScriptValue(0, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
"QScriptValue(0, \"ciao\") <=> QScriptValue(engine, \"ciao\")",
"QScriptValue(0, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, \"ciao\") <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(0, \"ciao\") <=> engine->evaluate(\"'ciao'\")",
"QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")",
"QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
@@ -519,6 +536,7 @@ static QString equals_array [] = {
"QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
"QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")",
"QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")",
"QScriptValue(0, QString(\"\")) <=> QScriptValue(false)",
"QScriptValue(0, QString(\"\")) <=> QScriptValue(0)",
@@ -538,6 +556,7 @@ static QString equals_array [] = {
"QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"[]\")",
"QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Array.prototype\")",
"QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Boolean(false)\")",
"QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"false\")",
"QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0\")",
"QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0.0\")",
@@ -562,6 +581,7 @@ static QString equals_array [] = {
"QScriptValue(0, QString()) <=> engine->evaluate(\"[]\")",
"QScriptValue(0, QString()) <=> engine->evaluate(\"Array.prototype\")",
"QScriptValue(0, QString()) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"new Boolean(false)\")",
"QScriptValue(0, QString()) <=> engine->evaluate(\"false\")",
"QScriptValue(0, QString()) <=> engine->evaluate(\"0\")",
"QScriptValue(0, QString()) <=> engine->evaluate(\"0.0\")",
@@ -580,6 +600,7 @@ static QString equals_array [] = {
"QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0)",
"QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0.0)",
"QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"new Boolean(false)\")",
"QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"false\")",
"QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0\")",
"QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0.0\")",
@@ -591,6 +612,7 @@ static QString equals_array [] = {
"QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))",
"QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 123.0)",
"QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"123.0\")",
"QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"'123'\")",
"QScriptValue(0, QString(\"123\")) <=> engine->newVariant(QVariant(123))",
@@ -622,6 +644,7 @@ static QString equals_array [] = {
"QScriptValue(engine, true) <=> QScriptValue(true)",
"QScriptValue(engine, true) <=> QScriptValue(0, true)",
"QScriptValue(engine, true) <=> QScriptValue(engine, true)",
+ "QScriptValue(engine, true) <=> engine->evaluate(\"new Boolean(true)\")",
"QScriptValue(engine, true) <=> engine->evaluate(\"true\")",
"QScriptValue(engine, false) <=> QScriptValue(false)",
"QScriptValue(engine, false) <=> QScriptValue(0)",
@@ -644,6 +667,7 @@ static QString equals_array [] = {
"QScriptValue(engine, false) <=> engine->evaluate(\"[]\")",
"QScriptValue(engine, false) <=> engine->evaluate(\"Array.prototype\")",
"QScriptValue(engine, false) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"new Boolean(false)\")",
"QScriptValue(engine, false) <=> engine->evaluate(\"false\")",
"QScriptValue(engine, false) <=> engine->evaluate(\"0\")",
"QScriptValue(engine, false) <=> engine->evaluate(\"0.0\")",
@@ -680,6 +704,7 @@ static QString equals_array [] = {
"QScriptValue(engine, 0) <=> engine->evaluate(\"[]\")",
"QScriptValue(engine, 0) <=> engine->evaluate(\"Array.prototype\")",
"QScriptValue(engine, 0) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"new Boolean(false)\")",
"QScriptValue(engine, 0) <=> engine->evaluate(\"false\")",
"QScriptValue(engine, 0) <=> engine->evaluate(\"0\")",
"QScriptValue(engine, 0) <=> engine->evaluate(\"0.0\")",
@@ -708,6 +733,7 @@ static QString equals_array [] = {
"QScriptValue(engine, 0.0) <=> engine->evaluate(\"[]\")",
"QScriptValue(engine, 0.0) <=> engine->evaluate(\"Array.prototype\")",
"QScriptValue(engine, 0.0) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"new Boolean(false)\")",
"QScriptValue(engine, 0.0) <=> engine->evaluate(\"false\")",
"QScriptValue(engine, 0.0) <=> engine->evaluate(\"0\")",
"QScriptValue(engine, 0.0) <=> engine->evaluate(\"0.0\")",
@@ -721,6 +747,7 @@ static QString equals_array [] = {
"QScriptValue(engine, 123.0) <=> QScriptValue(0, QString(\"123\"))",
"QScriptValue(engine, 123.0) <=> QScriptValue(engine, 123.0)",
"QScriptValue(engine, 123.0) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, 123.0) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(engine, 123.0) <=> engine->evaluate(\"123.0\")",
"QScriptValue(engine, 123.0) <=> engine->evaluate(\"'123'\")",
"QScriptValue(engine, 123.0) <=> engine->newVariant(QVariant(123))",
@@ -781,6 +808,7 @@ static QString equals_array [] = {
"QScriptValue(engine, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
"QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, \"ciao\")",
"QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"'ciao'\")",
"QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")",
"QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
@@ -788,6 +816,7 @@ static QString equals_array [] = {
"QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
"QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")",
"QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")",
"QScriptValue(engine, QString(\"\")) <=> QScriptValue(false)",
"QScriptValue(engine, QString(\"\")) <=> QScriptValue(0)",
@@ -807,6 +836,7 @@ static QString equals_array [] = {
"QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"[]\")",
"QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Array.prototype\")",
"QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Boolean(false)\")",
"QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"false\")",
"QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0\")",
"QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0.0\")",
@@ -831,6 +861,7 @@ static QString equals_array [] = {
"QScriptValue(engine, QString()) <=> engine->evaluate(\"[]\")",
"QScriptValue(engine, QString()) <=> engine->evaluate(\"Array.prototype\")",
"QScriptValue(engine, QString()) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"new Boolean(false)\")",
"QScriptValue(engine, QString()) <=> engine->evaluate(\"false\")",
"QScriptValue(engine, QString()) <=> engine->evaluate(\"0\")",
"QScriptValue(engine, QString()) <=> engine->evaluate(\"0.0\")",
@@ -849,6 +880,7 @@ static QString equals_array [] = {
"QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0)",
"QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0.0)",
"QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"new Boolean(false)\")",
"QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"false\")",
"QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0\")",
"QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0.0\")",
@@ -860,6 +892,7 @@ static QString equals_array [] = {
"QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))",
"QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 123.0)",
"QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"123.0\")",
"QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"'123'\")",
"QScriptValue(engine, QString(\"123\")) <=> engine->newVariant(QVariant(123))",
@@ -950,6 +983,53 @@ static QString equals_array [] = {
"engine->evaluate(\"new Array()\") <=> engine->evaluate(\"0.0\")",
"engine->evaluate(\"new Array()\") <=> engine->evaluate(\"''\")",
"engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(true)",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(0, true)",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(engine, true)",
+ "engine->evaluate(\"new Boolean(true)\") <=> engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"new Boolean(true)\") <=> engine->evaluate(\"true\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(false)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0.0)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(QString(\"\"))",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(QString())",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(QString(\"0\"))",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0, false)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0, 0)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0, 0.0)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0, QString(\"\"))",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0, QString())",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0, QString(\"0\"))",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(engine, false)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(engine, 0)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(engine, 0.0)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(engine, QString(\"\"))",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(engine, QString())",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(engine, QString(\"0\"))",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"new Boolean(false)\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"false\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"0\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"0.0\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"''\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"new Number(123)\") <=> engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"new Number(123)\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"new Number(123)\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"new String('ciao')\") <=> QScriptValue(\"ciao\")",
+ "engine->evaluate(\"new String('ciao')\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"new String('ciao')\") <=> QScriptValue(0, \"ciao\")",
+ "engine->evaluate(\"new String('ciao')\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"new String('ciao')\") <=> QScriptValue(engine, \"ciao\")",
+ "engine->evaluate(\"new String('ciao')\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"new String('ciao')\") <=> engine->evaluate(\"new String('ciao')\")",
+ "engine->evaluate(\"new String('ciao')\") <=> engine->evaluate(\"'ciao'\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Null\") <=> engine->evaluate(\"Null\")",
@@ -982,6 +1062,7 @@ static QString equals_array [] = {
"engine->evaluate(\"true\") <=> QScriptValue(true)",
"engine->evaluate(\"true\") <=> QScriptValue(0, true)",
"engine->evaluate(\"true\") <=> QScriptValue(engine, true)",
+ "engine->evaluate(\"true\") <=> engine->evaluate(\"new Boolean(true)\")",
"engine->evaluate(\"true\") <=> engine->evaluate(\"true\")",
"engine->evaluate(\"false\") <=> QScriptValue(false)",
"engine->evaluate(\"false\") <=> QScriptValue(0)",
@@ -1004,6 +1085,7 @@ static QString equals_array [] = {
"engine->evaluate(\"false\") <=> engine->evaluate(\"[]\")",
"engine->evaluate(\"false\") <=> engine->evaluate(\"Array.prototype\")",
"engine->evaluate(\"false\") <=> engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"new Boolean(false)\")",
"engine->evaluate(\"false\") <=> engine->evaluate(\"false\")",
"engine->evaluate(\"false\") <=> engine->evaluate(\"0\")",
"engine->evaluate(\"false\") <=> engine->evaluate(\"0.0\")",
@@ -1040,6 +1122,7 @@ static QString equals_array [] = {
"engine->evaluate(\"0\") <=> engine->evaluate(\"[]\")",
"engine->evaluate(\"0\") <=> engine->evaluate(\"Array.prototype\")",
"engine->evaluate(\"0\") <=> engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"new Boolean(false)\")",
"engine->evaluate(\"0\") <=> engine->evaluate(\"false\")",
"engine->evaluate(\"0\") <=> engine->evaluate(\"0\")",
"engine->evaluate(\"0\") <=> engine->evaluate(\"0.0\")",
@@ -1068,6 +1151,7 @@ static QString equals_array [] = {
"engine->evaluate(\"0.0\") <=> engine->evaluate(\"[]\")",
"engine->evaluate(\"0.0\") <=> engine->evaluate(\"Array.prototype\")",
"engine->evaluate(\"0.0\") <=> engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"new Boolean(false)\")",
"engine->evaluate(\"0.0\") <=> engine->evaluate(\"false\")",
"engine->evaluate(\"0.0\") <=> engine->evaluate(\"0\")",
"engine->evaluate(\"0.0\") <=> engine->evaluate(\"0.0\")",
@@ -1081,6 +1165,7 @@ static QString equals_array [] = {
"engine->evaluate(\"123.0\") <=> QScriptValue(0, QString(\"123\"))",
"engine->evaluate(\"123.0\") <=> QScriptValue(engine, 123.0)",
"engine->evaluate(\"123.0\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"123.0\") <=> engine->evaluate(\"new Number(123)\")",
"engine->evaluate(\"123.0\") <=> engine->evaluate(\"123.0\")",
"engine->evaluate(\"123.0\") <=> engine->evaluate(\"'123'\")",
"engine->evaluate(\"123.0\") <=> engine->newVariant(QVariant(123))",
@@ -1124,6 +1209,7 @@ static QString equals_array [] = {
"engine->evaluate(\"'ciao'\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
"engine->evaluate(\"'ciao'\") <=> QScriptValue(engine, \"ciao\")",
"engine->evaluate(\"'ciao'\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"'ciao'\")",
"engine->evaluate(\"''\") <=> QScriptValue(false)",
"engine->evaluate(\"''\") <=> QScriptValue(0)",
@@ -1143,6 +1229,7 @@ static QString equals_array [] = {
"engine->evaluate(\"''\") <=> engine->evaluate(\"[]\")",
"engine->evaluate(\"''\") <=> engine->evaluate(\"Array.prototype\")",
"engine->evaluate(\"''\") <=> engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"new Boolean(false)\")",
"engine->evaluate(\"''\") <=> engine->evaluate(\"false\")",
"engine->evaluate(\"''\") <=> engine->evaluate(\"0\")",
"engine->evaluate(\"''\") <=> engine->evaluate(\"0.0\")",
@@ -1161,6 +1248,7 @@ static QString equals_array [] = {
"engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0)",
"engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0.0)",
"engine->evaluate(\"'0'\") <=> QScriptValue(engine, QString(\"0\"))",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"new Boolean(false)\")",
"engine->evaluate(\"'0'\") <=> engine->evaluate(\"false\")",
"engine->evaluate(\"'0'\") <=> engine->evaluate(\"0\")",
"engine->evaluate(\"'0'\") <=> engine->evaluate(\"0.0\")",
@@ -1172,6 +1260,7 @@ static QString equals_array [] = {
"engine->evaluate(\"'123'\") <=> QScriptValue(0, QString(\"123\"))",
"engine->evaluate(\"'123'\") <=> QScriptValue(engine, 123.0)",
"engine->evaluate(\"'123'\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"new Number(123)\")",
"engine->evaluate(\"'123'\") <=> engine->evaluate(\"123.0\")",
"engine->evaluate(\"'123'\") <=> engine->evaluate(\"'123'\")",
"engine->evaluate(\"'123'\") <=> engine->newVariant(QVariant(123))",
@@ -1225,6 +1314,7 @@ static QString equals_array [] = {
"engine->newArray(10) <=> engine->newArray(10)",
"engine->newDate(QDateTime()) <=> engine->newDate(QDateTime())",
"engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->newRegExp(\"foo\", \"gim\")",
"engine->newVariant(QVariant()) <=> engine->newVariant(QVariant())",
"engine->newVariant(QVariant(123)) <=> QScriptValue(123.0)",
"engine->newVariant(QVariant(123)) <=> QScriptValue(QString(\"123\"))",
@@ -1271,14 +1361,14 @@ static QString equals_array [] = {
"engine->newQObject(0) <=> engine->nullValue()",
"engine->newQObject(0) <=> engine->undefinedValue()",
"engine->newQObject(0) <=> engine->newQObject(0)",
- "engine->newQObject(engine) <=> engine->newQObject(engine)",};
+ "engine->newQObject(engine) <=> engine->newQObject(engine)"};
void tst_QScriptValueGenerated::equals_makeData(const char *expr)
{
static QSet<QString> equals;
if (equals.isEmpty()) {
- equals.reserve(1217);
- for (unsigned i = 0; i < 1217; ++i)
+ equals.reserve(1307);
+ for (unsigned i = 0; i < 1307; ++i)
equals.insert(equals_array[i]);
}
QHash<QString, QScriptValue>::const_iterator it;
@@ -1305,7 +1395,7 @@ void tst_QScriptValueGenerated::strictlyEquals_initData()
initScriptValues();
}
-static QString strictlyEquals_array [] = {
+static QString strictlyEquals_array[] = {
"QScriptValue() <=> QScriptValue()",
"QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)",
"QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)",
@@ -1697,6 +1787,11 @@ static QString strictlyEquals_array [] = {
"engine->evaluate(\"new Object()\") <=> engine->evaluate(\"new Object()\")",
"engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Array()\")",
"engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"new Boolean(true)\") <=> engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"new Boolean(false)\")",
+ "engine->evaluate(\"new Number(123)\") <=> engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"new String('ciao')\") <=> engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Null\") <=> engine->evaluate(\"Null\")",
@@ -1819,6 +1914,7 @@ static QString strictlyEquals_array [] = {
"engine->newArray(10) <=> engine->newArray(10)",
"engine->newDate(QDateTime()) <=> engine->newDate(QDateTime())",
"engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->newRegExp(\"foo\", \"gim\")",
"engine->newVariant(QVariant()) <=> engine->newVariant(QVariant())",
"engine->newVariant(QVariant(123)) <=> engine->newVariant(QVariant(123))",
"engine->newVariant(QVariant(false)) <=> engine->newVariant(QVariant(false))",
@@ -1828,14 +1924,14 @@ static QString strictlyEquals_array [] = {
"engine->newQObject(0) <=> engine->evaluate(\"null\")",
"engine->newQObject(0) <=> engine->nullValue()",
"engine->newQObject(0) <=> engine->newQObject(0)",
- "engine->newQObject(engine) <=> engine->newQObject(engine)",};
+ "engine->newQObject(engine) <=> engine->newQObject(engine)"};
void tst_QScriptValueGenerated::strictlyEquals_makeData(const char *expr)
{
static QSet<QString> equals;
if (equals.isEmpty()) {
- equals.reserve(523);
- for (unsigned i = 0; i < 523; ++i)
+ equals.reserve(529);
+ for (unsigned i = 0; i < 529; ++i)
equals.insert(strictlyEquals_array[i]);
}
QHash<QString, QScriptValue>::const_iterator it;
@@ -1862,7 +1958,7 @@ void tst_QScriptValueGenerated::lessThan_initData()
initScriptValues();
}
-static QString lessThan_array [] = {
+static QString lessThan_array[] = {
"QScriptValue(QScriptValue::NullValue) <=> QScriptValue(true)",
"QScriptValue(QScriptValue::NullValue) <=> QScriptValue(int(122))",
"QScriptValue(QScriptValue::NullValue) <=> QScriptValue(uint(124))",
@@ -1899,6 +1995,8 @@ static QString lessThan_array [] = {
"QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")",
"QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))",
"QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"true\")",
"QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"122\")",
@@ -1942,6 +2040,7 @@ static QString lessThan_array [] = {
"QScriptValue(true) <=> QScriptValue(engine, \"Infinity\")",
"QScriptValue(true) <=> QScriptValue(engine, QString(\"123\"))",
"QScriptValue(true) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(true) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(true) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(true) <=> engine->evaluate(\"122\")",
"QScriptValue(true) <=> engine->evaluate(\"124\")",
@@ -1989,6 +2088,8 @@ static QString lessThan_array [] = {
"QScriptValue(false) <=> QScriptValue(engine, \"Infinity\")",
"QScriptValue(false) <=> QScriptValue(engine, QString(\"123\"))",
"QScriptValue(false) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(false) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(false) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(false) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(false) <=> engine->evaluate(\"true\")",
"QScriptValue(false) <=> engine->evaluate(\"122\")",
@@ -2026,6 +2127,7 @@ static QString lessThan_array [] = {
"QScriptValue(int(122)) <=> QScriptValue(engine, qInf())",
"QScriptValue(int(122)) <=> QScriptValue(engine, \"Infinity\")",
"QScriptValue(int(122)) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(int(122)) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(int(122)) <=> engine->evaluate(\"124\")",
"QScriptValue(int(122)) <=> engine->evaluate(\"123.0\")",
"QScriptValue(int(122)) <=> engine->evaluate(\"0x43211234\")",
@@ -2089,6 +2191,8 @@ static QString lessThan_array [] = {
"QScriptValue(0) <=> QScriptValue(engine, \"Infinity\")",
"QScriptValue(0) <=> QScriptValue(engine, QString(\"123\"))",
"QScriptValue(0) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(0) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(0) <=> engine->evaluate(\"true\")",
"QScriptValue(0) <=> engine->evaluate(\"122\")",
@@ -2138,6 +2242,8 @@ static QString lessThan_array [] = {
"QScriptValue(0.0) <=> QScriptValue(engine, \"Infinity\")",
"QScriptValue(0.0) <=> QScriptValue(engine, QString(\"123\"))",
"QScriptValue(0.0) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0.0) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(0.0) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(0.0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(0.0) <=> engine->evaluate(\"true\")",
"QScriptValue(0.0) <=> engine->evaluate(\"122\")",
@@ -2207,6 +2313,8 @@ static QString lessThan_array [] = {
"QScriptValue(6.37e-8) <=> QScriptValue(engine, \"Infinity\")",
"QScriptValue(6.37e-8) <=> QScriptValue(engine, QString(\"123\"))",
"QScriptValue(6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(6.37e-8) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(6.37e-8) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(6.37e-8) <=> engine->evaluate(\"true\")",
"QScriptValue(6.37e-8) <=> engine->evaluate(\"122\")",
@@ -2279,6 +2387,9 @@ static QString lessThan_array [] = {
"QScriptValue(-6.37e-8) <=> engine->evaluate(\"[]\")",
"QScriptValue(-6.37e-8) <=> engine->evaluate(\"Array.prototype\")",
"QScriptValue(-6.37e-8) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"new Boolean(false)\")",
+ "QScriptValue(-6.37e-8) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(-6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(-6.37e-8) <=> engine->evaluate(\"null\")",
"QScriptValue(-6.37e-8) <=> engine->evaluate(\"true\")",
@@ -2398,6 +2509,9 @@ static QString lessThan_array [] = {
"QScriptValue(-qInf()) <=> engine->evaluate(\"[]\")",
"QScriptValue(-qInf()) <=> engine->evaluate(\"Array.prototype\")",
"QScriptValue(-qInf()) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"new Boolean(false)\")",
+ "QScriptValue(-qInf()) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(-qInf()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(-qInf()) <=> engine->evaluate(\"null\")",
"QScriptValue(-qInf()) <=> engine->evaluate(\"true\")",
@@ -2438,6 +2552,7 @@ static QString lessThan_array [] = {
"QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
"QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"QScriptValue(\"NaN\") <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(\"NaN\") <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(\"NaN\") <=> engine->evaluate(\"Undefined\")",
"QScriptValue(\"NaN\") <=> engine->evaluate(\"Null\")",
"QScriptValue(\"NaN\") <=> engine->evaluate(\"True\")",
@@ -2465,6 +2580,7 @@ static QString lessThan_array [] = {
"QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
"QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"QScriptValue(\"Infinity\") <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(\"Infinity\") <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(\"Infinity\") <=> engine->evaluate(\"Undefined\")",
"QScriptValue(\"Infinity\") <=> engine->evaluate(\"Null\")",
"QScriptValue(\"Infinity\") <=> engine->evaluate(\"True\")",
@@ -2549,6 +2665,11 @@ static QString lessThan_array [] = {
"QScriptValue(\"-Infinity\") <=> engine->evaluate(\"/foo/\")",
"QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Object()\")",
"QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Boolean(false)\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Number(123)\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(\"-Infinity\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Undefined\")",
"QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Null\")",
@@ -2575,6 +2696,7 @@ static QString lessThan_array [] = {
"QScriptValue(\"-Infinity\") <=> engine->nullValue()",
"QScriptValue(\"-Infinity\") <=> engine->newObject()",
"QScriptValue(\"-Infinity\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(\"-Infinity\") <=> engine->newRegExp(\"foo\", \"gim\")",
"QScriptValue(\"-Infinity\") <=> engine->newVariant(QVariant(123))",
"QScriptValue(\"-Infinity\") <=> engine->newVariant(QVariant(false))",
"QScriptValue(\"-Infinity\") <=> engine->newQObject(0)",
@@ -2659,6 +2781,10 @@ static QString lessThan_array [] = {
"QScriptValue(QString(\"\")) <=> engine->evaluate(\"/foo/\")",
"QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Object()\")",
"QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Number(123)\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "QScriptValue(QString(\"\")) <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(QString(\"\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(QString(\"\")) <=> engine->evaluate(\"Undefined\")",
"QScriptValue(QString(\"\")) <=> engine->evaluate(\"Null\")",
@@ -2680,6 +2806,7 @@ static QString lessThan_array [] = {
"QScriptValue(QString(\"\")) <=> engine->newObject()",
"QScriptValue(QString(\"\")) <=> engine->newArray(10)",
"QScriptValue(QString(\"\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(QString(\"\")) <=> engine->newRegExp(\"foo\", \"gim\")",
"QScriptValue(QString(\"\")) <=> engine->newVariant(QVariant(123))",
"QScriptValue(QString(\"\")) <=> engine->newQObject(engine)",
"QScriptValue(QString()) <=> QScriptValue(true)",
@@ -2746,6 +2873,10 @@ static QString lessThan_array [] = {
"QScriptValue(QString()) <=> engine->evaluate(\"/foo/\")",
"QScriptValue(QString()) <=> engine->evaluate(\"new Object()\")",
"QScriptValue(QString()) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"new Number(123)\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "QScriptValue(QString()) <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(QString()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(QString()) <=> engine->evaluate(\"Undefined\")",
"QScriptValue(QString()) <=> engine->evaluate(\"Null\")",
@@ -2767,6 +2898,7 @@ static QString lessThan_array [] = {
"QScriptValue(QString()) <=> engine->newObject()",
"QScriptValue(QString()) <=> engine->newArray(10)",
"QScriptValue(QString()) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(QString()) <=> engine->newRegExp(\"foo\", \"gim\")",
"QScriptValue(QString()) <=> engine->newVariant(QVariant(123))",
"QScriptValue(QString()) <=> engine->newQObject(engine)",
"QScriptValue(QString(\"0\")) <=> QScriptValue(true)",
@@ -2826,6 +2958,9 @@ static QString lessThan_array [] = {
"QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"QScriptValue(QString(\"0\")) <=> engine->evaluate(\"new Object()\")",
"QScriptValue(QString(\"0\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"new Number(123)\")",
+ "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(QString(\"0\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Undefined\")",
"QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Null\")",
@@ -2886,6 +3021,7 @@ static QString lessThan_array [] = {
"QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"QScriptValue(QString(\"123\")) <=> engine->evaluate(\"new Object()\")",
"QScriptValue(QString(\"123\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Undefined\")",
"QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Null\")",
"QScriptValue(QString(\"123\")) <=> engine->evaluate(\"True\")",
@@ -2947,6 +3083,8 @@ static QString lessThan_array [] = {
"QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"new Object()\")",
"QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"new Number(123)\")",
+ "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Undefined\")",
"QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Null\")",
@@ -3001,6 +3139,8 @@ static QString lessThan_array [] = {
"QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")",
"QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))",
"QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"true\")",
"QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"122\")",
@@ -3044,6 +3184,7 @@ static QString lessThan_array [] = {
"QScriptValue(0, true) <=> QScriptValue(engine, \"Infinity\")",
"QScriptValue(0, true) <=> QScriptValue(engine, QString(\"123\"))",
"QScriptValue(0, true) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0, true) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(0, true) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(0, true) <=> engine->evaluate(\"122\")",
"QScriptValue(0, true) <=> engine->evaluate(\"124\")",
@@ -3091,6 +3232,8 @@ static QString lessThan_array [] = {
"QScriptValue(0, false) <=> QScriptValue(engine, \"Infinity\")",
"QScriptValue(0, false) <=> QScriptValue(engine, QString(\"123\"))",
"QScriptValue(0, false) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0, false) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(0, false) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(0, false) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(0, false) <=> engine->evaluate(\"true\")",
"QScriptValue(0, false) <=> engine->evaluate(\"122\")",
@@ -3128,6 +3271,7 @@ static QString lessThan_array [] = {
"QScriptValue(0, int(122)) <=> QScriptValue(engine, qInf())",
"QScriptValue(0, int(122)) <=> QScriptValue(engine, \"Infinity\")",
"QScriptValue(0, int(122)) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(0, int(122)) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(0, int(122)) <=> engine->evaluate(\"124\")",
"QScriptValue(0, int(122)) <=> engine->evaluate(\"123.0\")",
"QScriptValue(0, int(122)) <=> engine->evaluate(\"0x43211234\")",
@@ -3191,6 +3335,8 @@ static QString lessThan_array [] = {
"QScriptValue(0, 0) <=> QScriptValue(engine, \"Infinity\")",
"QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"123\"))",
"QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(0, 0) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(0, 0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(0, 0) <=> engine->evaluate(\"true\")",
"QScriptValue(0, 0) <=> engine->evaluate(\"122\")",
@@ -3240,6 +3386,8 @@ static QString lessThan_array [] = {
"QScriptValue(0, 0.0) <=> QScriptValue(engine, \"Infinity\")",
"QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"123\"))",
"QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(0, 0.0) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(0, 0.0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(0, 0.0) <=> engine->evaluate(\"true\")",
"QScriptValue(0, 0.0) <=> engine->evaluate(\"122\")",
@@ -3309,6 +3457,8 @@ static QString lessThan_array [] = {
"QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, \"Infinity\")",
"QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, QString(\"123\"))",
"QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"true\")",
"QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"122\")",
@@ -3381,6 +3531,9 @@ static QString lessThan_array [] = {
"QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"[]\")",
"QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"Array.prototype\")",
"QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"new Boolean(false)\")",
+ "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"null\")",
"QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"true\")",
@@ -3500,6 +3653,9 @@ static QString lessThan_array [] = {
"QScriptValue(0, -qInf()) <=> engine->evaluate(\"[]\")",
"QScriptValue(0, -qInf()) <=> engine->evaluate(\"Array.prototype\")",
"QScriptValue(0, -qInf()) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"new Boolean(false)\")",
+ "QScriptValue(0, -qInf()) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(0, -qInf()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(0, -qInf()) <=> engine->evaluate(\"null\")",
"QScriptValue(0, -qInf()) <=> engine->evaluate(\"true\")",
@@ -3540,6 +3696,7 @@ static QString lessThan_array [] = {
"QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
"QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"QScriptValue(0, \"NaN\") <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Undefined\")",
"QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Null\")",
"QScriptValue(0, \"NaN\") <=> engine->evaluate(\"True\")",
@@ -3567,6 +3724,7 @@ static QString lessThan_array [] = {
"QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
"QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Undefined\")",
"QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Null\")",
"QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"True\")",
@@ -3651,6 +3809,11 @@ static QString lessThan_array [] = {
"QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"/foo/\")",
"QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Object()\")",
"QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Boolean(false)\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Number(123)\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Undefined\")",
"QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Null\")",
@@ -3677,6 +3840,7 @@ static QString lessThan_array [] = {
"QScriptValue(0, \"-Infinity\") <=> engine->nullValue()",
"QScriptValue(0, \"-Infinity\") <=> engine->newObject()",
"QScriptValue(0, \"-Infinity\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(0, \"-Infinity\") <=> engine->newRegExp(\"foo\", \"gim\")",
"QScriptValue(0, \"-Infinity\") <=> engine->newVariant(QVariant(123))",
"QScriptValue(0, \"-Infinity\") <=> engine->newVariant(QVariant(false))",
"QScriptValue(0, \"-Infinity\") <=> engine->newQObject(0)",
@@ -3761,6 +3925,10 @@ static QString lessThan_array [] = {
"QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"/foo/\")",
"QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Object()\")",
"QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Number(123)\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Undefined\")",
"QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Null\")",
@@ -3782,6 +3950,7 @@ static QString lessThan_array [] = {
"QScriptValue(0, QString(\"\")) <=> engine->newObject()",
"QScriptValue(0, QString(\"\")) <=> engine->newArray(10)",
"QScriptValue(0, QString(\"\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(0, QString(\"\")) <=> engine->newRegExp(\"foo\", \"gim\")",
"QScriptValue(0, QString(\"\")) <=> engine->newVariant(QVariant(123))",
"QScriptValue(0, QString(\"\")) <=> engine->newQObject(engine)",
"QScriptValue(0, QString()) <=> QScriptValue(true)",
@@ -3848,6 +4017,10 @@ static QString lessThan_array [] = {
"QScriptValue(0, QString()) <=> engine->evaluate(\"/foo/\")",
"QScriptValue(0, QString()) <=> engine->evaluate(\"new Object()\")",
"QScriptValue(0, QString()) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"new Number(123)\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "QScriptValue(0, QString()) <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(0, QString()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(0, QString()) <=> engine->evaluate(\"Undefined\")",
"QScriptValue(0, QString()) <=> engine->evaluate(\"Null\")",
@@ -3869,6 +4042,7 @@ static QString lessThan_array [] = {
"QScriptValue(0, QString()) <=> engine->newObject()",
"QScriptValue(0, QString()) <=> engine->newArray(10)",
"QScriptValue(0, QString()) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(0, QString()) <=> engine->newRegExp(\"foo\", \"gim\")",
"QScriptValue(0, QString()) <=> engine->newVariant(QVariant(123))",
"QScriptValue(0, QString()) <=> engine->newQObject(engine)",
"QScriptValue(0, QString(\"0\")) <=> QScriptValue(true)",
@@ -3928,6 +4102,9 @@ static QString lessThan_array [] = {
"QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"new Object()\")",
"QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"new Number(123)\")",
+ "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Undefined\")",
"QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Null\")",
@@ -3988,6 +4165,7 @@ static QString lessThan_array [] = {
"QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"new Object()\")",
"QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Undefined\")",
"QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Null\")",
"QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"True\")",
@@ -4050,6 +4228,8 @@ static QString lessThan_array [] = {
"QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"new Object()\")",
"QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"new Number(123)\")",
+ "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Undefined\")",
"QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Null\")",
@@ -4105,6 +4285,8 @@ static QString lessThan_array [] = {
"QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")",
"QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))",
"QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"true\")",
"QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"122\")",
@@ -4148,6 +4330,7 @@ static QString lessThan_array [] = {
"QScriptValue(engine, true) <=> QScriptValue(engine, \"Infinity\")",
"QScriptValue(engine, true) <=> QScriptValue(engine, QString(\"123\"))",
"QScriptValue(engine, true) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(engine, true) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(engine, true) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(engine, true) <=> engine->evaluate(\"122\")",
"QScriptValue(engine, true) <=> engine->evaluate(\"124\")",
@@ -4195,6 +4378,8 @@ static QString lessThan_array [] = {
"QScriptValue(engine, false) <=> QScriptValue(engine, \"Infinity\")",
"QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"123\"))",
"QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(engine, false) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(engine, false) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(engine, false) <=> engine->evaluate(\"true\")",
"QScriptValue(engine, false) <=> engine->evaluate(\"122\")",
@@ -4232,6 +4417,7 @@ static QString lessThan_array [] = {
"QScriptValue(engine, int(122)) <=> QScriptValue(engine, qInf())",
"QScriptValue(engine, int(122)) <=> QScriptValue(engine, \"Infinity\")",
"QScriptValue(engine, int(122)) <=> QScriptValue(engine, QString(\"123\"))",
+ "QScriptValue(engine, int(122)) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(engine, int(122)) <=> engine->evaluate(\"124\")",
"QScriptValue(engine, int(122)) <=> engine->evaluate(\"123.0\")",
"QScriptValue(engine, int(122)) <=> engine->evaluate(\"0x43211234\")",
@@ -4295,6 +4481,8 @@ static QString lessThan_array [] = {
"QScriptValue(engine, 0) <=> QScriptValue(engine, \"Infinity\")",
"QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"123\"))",
"QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(engine, 0) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(engine, 0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(engine, 0) <=> engine->evaluate(\"true\")",
"QScriptValue(engine, 0) <=> engine->evaluate(\"122\")",
@@ -4344,6 +4532,8 @@ static QString lessThan_array [] = {
"QScriptValue(engine, 0.0) <=> QScriptValue(engine, \"Infinity\")",
"QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"123\"))",
"QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(engine, 0.0) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(engine, 0.0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(engine, 0.0) <=> engine->evaluate(\"true\")",
"QScriptValue(engine, 0.0) <=> engine->evaluate(\"122\")",
@@ -4413,6 +4603,8 @@ static QString lessThan_array [] = {
"QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, \"Infinity\")",
"QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, QString(\"123\"))",
"QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"true\")",
"QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"122\")",
@@ -4485,6 +4677,9 @@ static QString lessThan_array [] = {
"QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"[]\")",
"QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"Array.prototype\")",
"QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"new Boolean(false)\")",
+ "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"null\")",
"QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"true\")",
@@ -4604,6 +4799,9 @@ static QString lessThan_array [] = {
"QScriptValue(engine, -qInf()) <=> engine->evaluate(\"[]\")",
"QScriptValue(engine, -qInf()) <=> engine->evaluate(\"Array.prototype\")",
"QScriptValue(engine, -qInf()) <=> engine->evaluate(\"new Array()\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"new Boolean(false)\")",
+ "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"new Number(123)\")",
"QScriptValue(engine, -qInf()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(engine, -qInf()) <=> engine->evaluate(\"null\")",
"QScriptValue(engine, -qInf()) <=> engine->evaluate(\"true\")",
@@ -4644,6 +4842,7 @@ static QString lessThan_array [] = {
"QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
"QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Undefined\")",
"QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Null\")",
"QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"True\")",
@@ -4671,6 +4870,7 @@ static QString lessThan_array [] = {
"QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
"QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"new Object()\")",
+ "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Undefined\")",
"QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Null\")",
"QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"True\")",
@@ -4755,6 +4955,11 @@ static QString lessThan_array [] = {
"QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"/foo/\")",
"QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Object()\")",
"QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Boolean(false)\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Number(123)\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Undefined\")",
"QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Null\")",
@@ -4781,6 +4986,7 @@ static QString lessThan_array [] = {
"QScriptValue(engine, \"-Infinity\") <=> engine->nullValue()",
"QScriptValue(engine, \"-Infinity\") <=> engine->newObject()",
"QScriptValue(engine, \"-Infinity\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(engine, \"-Infinity\") <=> engine->newRegExp(\"foo\", \"gim\")",
"QScriptValue(engine, \"-Infinity\") <=> engine->newVariant(QVariant(123))",
"QScriptValue(engine, \"-Infinity\") <=> engine->newVariant(QVariant(false))",
"QScriptValue(engine, \"-Infinity\") <=> engine->newQObject(0)",
@@ -4865,6 +5071,10 @@ static QString lessThan_array [] = {
"QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"/foo/\")",
"QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Object()\")",
"QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Number(123)\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Undefined\")",
"QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Null\")",
@@ -4886,6 +5096,7 @@ static QString lessThan_array [] = {
"QScriptValue(engine, QString(\"\")) <=> engine->newObject()",
"QScriptValue(engine, QString(\"\")) <=> engine->newArray(10)",
"QScriptValue(engine, QString(\"\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(engine, QString(\"\")) <=> engine->newRegExp(\"foo\", \"gim\")",
"QScriptValue(engine, QString(\"\")) <=> engine->newVariant(QVariant(123))",
"QScriptValue(engine, QString(\"\")) <=> engine->newQObject(engine)",
"QScriptValue(engine, QString()) <=> QScriptValue(true)",
@@ -4952,6 +5163,10 @@ static QString lessThan_array [] = {
"QScriptValue(engine, QString()) <=> engine->evaluate(\"/foo/\")",
"QScriptValue(engine, QString()) <=> engine->evaluate(\"new Object()\")",
"QScriptValue(engine, QString()) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"new Number(123)\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "QScriptValue(engine, QString()) <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(engine, QString()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(engine, QString()) <=> engine->evaluate(\"Undefined\")",
"QScriptValue(engine, QString()) <=> engine->evaluate(\"Null\")",
@@ -4973,6 +5188,7 @@ static QString lessThan_array [] = {
"QScriptValue(engine, QString()) <=> engine->newObject()",
"QScriptValue(engine, QString()) <=> engine->newArray(10)",
"QScriptValue(engine, QString()) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "QScriptValue(engine, QString()) <=> engine->newRegExp(\"foo\", \"gim\")",
"QScriptValue(engine, QString()) <=> engine->newVariant(QVariant(123))",
"QScriptValue(engine, QString()) <=> engine->newQObject(engine)",
"QScriptValue(engine, QString(\"0\")) <=> QScriptValue(true)",
@@ -5032,6 +5248,9 @@ static QString lessThan_array [] = {
"QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"new Object()\")",
"QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"new Boolean(true)\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"new Number(123)\")",
+ "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Undefined\")",
"QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Null\")",
@@ -5092,6 +5311,7 @@ static QString lessThan_array [] = {
"QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"new Object()\")",
"QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Undefined\")",
"QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Null\")",
"QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"True\")",
@@ -5155,6 +5375,8 @@ static QString lessThan_array [] = {
"QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"new Object()\")",
"QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"new Error()\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"new Number(123)\")",
+ "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"new String('ciao')\")",
"QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Undefined\")",
"QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Null\")",
@@ -5238,6 +5460,10 @@ static QString lessThan_array [] = {
"engine->evaluate(\"[]\") <=> engine->evaluate(\"/foo/\")",
"engine->evaluate(\"[]\") <=> engine->evaluate(\"new Object()\")",
"engine->evaluate(\"[]\") <=> engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"[]\") <=> engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"[]\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"[]\") <=> engine->evaluate(\"Undefined\")",
"engine->evaluate(\"[]\") <=> engine->evaluate(\"Null\")",
@@ -5259,6 +5485,7 @@ static QString lessThan_array [] = {
"engine->evaluate(\"[]\") <=> engine->newObject()",
"engine->evaluate(\"[]\") <=> engine->newArray(10)",
"engine->evaluate(\"[]\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"[]\") <=> engine->newRegExp(\"foo\", \"gim\")",
"engine->evaluate(\"[]\") <=> engine->newVariant(QVariant(123))",
"engine->evaluate(\"[]\") <=> engine->newQObject(engine)",
"engine->evaluate(\"Object.prototype\") <=> QScriptValue(\"ciao\")",
@@ -5275,6 +5502,7 @@ static QString lessThan_array [] = {
"engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")",
"engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
"engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"'ciao'\")",
"engine->evaluate(\"Object.prototype\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
"engine->evaluate(\"Array.prototype\") <=> QScriptValue(true)",
@@ -5341,6 +5569,10 @@ static QString lessThan_array [] = {
"engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"/foo/\")",
"engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"new Object()\")",
"engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Null\")",
@@ -5362,6 +5594,7 @@ static QString lessThan_array [] = {
"engine->evaluate(\"Array.prototype\") <=> engine->newObject()",
"engine->evaluate(\"Array.prototype\") <=> engine->newArray(10)",
"engine->evaluate(\"Array.prototype\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"Array.prototype\") <=> engine->newRegExp(\"foo\", \"gim\")",
"engine->evaluate(\"Array.prototype\") <=> engine->newVariant(QVariant(123))",
"engine->evaluate(\"Array.prototype\") <=> engine->newQObject(engine)",
"engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Object\")",
@@ -5393,6 +5626,7 @@ static QString lessThan_array [] = {
"engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
"engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Null\")",
"engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"True\")",
@@ -5455,6 +5689,8 @@ static QString lessThan_array [] = {
"engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"engine->evaluate(\"/foo/\") <=> engine->evaluate(\"new Object()\")",
"engine->evaluate(\"/foo/\") <=> engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Undefined\")",
"engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Null\")",
"engine->evaluate(\"/foo/\") <=> engine->evaluate(\"True\")",
@@ -5465,6 +5701,7 @@ static QString lessThan_array [] = {
"engine->evaluate(\"/foo/\") <=> engine->evaluate(\"'12.4'\")",
"engine->evaluate(\"/foo/\") <=> engine->newObject()",
"engine->evaluate(\"/foo/\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"/foo/\") <=> engine->newRegExp(\"foo\", \"gim\")",
"engine->evaluate(\"/foo/\") <=> engine->newQObject(engine)",
"engine->evaluate(\"new Object()\") <=> QScriptValue(\"ciao\")",
"engine->evaluate(\"new Object()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
@@ -5480,6 +5717,7 @@ static QString lessThan_array [] = {
"engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { return 1; })\")",
"engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
"engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"new Object()\") <=> engine->evaluate(\"'ciao'\")",
"engine->evaluate(\"new Object()\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
"engine->evaluate(\"new Array()\") <=> QScriptValue(true)",
@@ -5546,6 +5784,10 @@ static QString lessThan_array [] = {
"engine->evaluate(\"new Array()\") <=> engine->evaluate(\"/foo/\")",
"engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Object()\")",
"engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"new Array()\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Undefined\")",
"engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Null\")",
@@ -5567,6 +5809,7 @@ static QString lessThan_array [] = {
"engine->evaluate(\"new Array()\") <=> engine->newObject()",
"engine->evaluate(\"new Array()\") <=> engine->newArray(10)",
"engine->evaluate(\"new Array()\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"new Array()\") <=> engine->newRegExp(\"foo\", \"gim\")",
"engine->evaluate(\"new Array()\") <=> engine->newVariant(QVariant(123))",
"engine->evaluate(\"new Array()\") <=> engine->newQObject(engine)",
"engine->evaluate(\"new Error()\") <=> QScriptValue(\"NaN\")",
@@ -5591,6 +5834,7 @@ static QString lessThan_array [] = {
"engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
"engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Undefined\")",
"engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Null\")",
"engine->evaluate(\"new Error()\") <=> engine->evaluate(\"True\")",
@@ -5599,6 +5843,175 @@ static QString lessThan_array [] = {
"engine->evaluate(\"new Error()\") <=> engine->newObject()",
"engine->evaluate(\"new Error()\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
"engine->evaluate(\"new Error()\") <=> engine->newQObject(engine)",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(int(122))",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(QString(\"12.4\"))",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(0, int(122))",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(engine, int(122))",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"new Boolean(true)\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"new Boolean(true)\") <=> engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"new Boolean(true)\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"new Boolean(true)\") <=> engine->evaluate(\"122\")",
+ "engine->evaluate(\"new Boolean(true)\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"new Boolean(true)\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"new Boolean(true)\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"new Boolean(true)\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"new Boolean(true)\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"new Boolean(true)\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"new Boolean(true)\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"new Boolean(true)\") <=> engine->evaluate(\"'12.4'\")",
+ "engine->evaluate(\"new Boolean(true)\") <=> engine->newVariant(QVariant(123))",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(true)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(int(122))",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(123.0)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(6.37e-8)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(QString(\"12.4\"))",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0, true)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0, int(122))",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0, 123.0)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0, 6.37e-8)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(engine, true)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(engine, int(122))",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(engine, 123.0)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(engine, 6.37e-8)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"new Boolean(false)\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"true\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"122\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"123.0\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"6.37e-8\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"'12.4'\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->newVariant(QVariant(123))",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(uint(124))",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(0x43211234)",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(0x10000)",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(0x10001)",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(qInf())",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(0, uint(124))",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(0, 0x43211234)",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(0, 0x10000)",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(0, 0x10001)",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(0, qInf())",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(engine, uint(124))",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(engine, 0x43211234)",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(engine, 0x10000)",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(engine, 0x10001)",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(engine, qInf())",
+ "engine->evaluate(\"new Number(123)\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"new Number(123)\") <=> engine->evaluate(\"124\")",
+ "engine->evaluate(\"new Number(123)\") <=> engine->evaluate(\"0x43211234\")",
+ "engine->evaluate(\"new Number(123)\") <=> engine->evaluate(\"0x10000\")",
+ "engine->evaluate(\"new Number(123)\") <=> engine->evaluate(\"0x10001\")",
+ "engine->evaluate(\"new Number(123)\") <=> engine->evaluate(\"Infinity\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> QScriptValue(\"NaN\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> QScriptValue(\"Infinity\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> QScriptValue(\"ciao\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> QScriptValue(QString(\"0\"))",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> QScriptValue(QString(\"123\"))",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> QScriptValue(QString(\"12.4\"))",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> QScriptValue(0, \"NaN\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> QScriptValue(0, \"ciao\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> QScriptValue(0, QString(\"0\"))",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> QScriptValue(engine, \"NaN\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> QScriptValue(engine, \"ciao\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> QScriptValue(engine, QString(\"0\"))",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"Object.prototype\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"Error.prototype\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"new String('ciao')\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"Undefined\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"Null\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"True\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"False\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"'ciao'\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"'0'\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"'123'\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"'12.4'\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->newObject()",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->newQObject(engine)",
+ "engine->evaluate(\"new String('ciao')\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->evaluate(\"new String('ciao')\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"new String('ciao')\") <=> engine->evaluate(\"Array\")",
+ "engine->evaluate(\"new String('ciao')\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"new String('ciao')\") <=> engine->evaluate(\"Function\")",
+ "engine->evaluate(\"new String('ciao')\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->evaluate(\"new String('ciao')\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->evaluate(\"new String('ciao')\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(int(122))",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(uint(124))",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(123.0)",
@@ -5626,6 +6039,7 @@ static QString lessThan_array [] = {
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, qInf())",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, \"Infinity\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"new Number(123)\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"122\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"124\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"123.0\")",
@@ -5651,6 +6065,7 @@ static QString lessThan_array [] = {
"engine->evaluate(\"Undefined\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
"engine->evaluate(\"Undefined\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"engine->evaluate(\"Undefined\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"Undefined\") <=> engine->evaluate(\"'ciao'\")",
"engine->evaluate(\"Undefined\") <=> engine->newObject()",
"engine->evaluate(\"Undefined\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
@@ -5670,6 +6085,7 @@ static QString lessThan_array [] = {
"engine->evaluate(\"Null\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
"engine->evaluate(\"Null\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"engine->evaluate(\"Null\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"Null\") <=> engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"Null\") <=> engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Null\") <=> engine->evaluate(\"True\")",
"engine->evaluate(\"Null\") <=> engine->evaluate(\"'ciao'\")",
@@ -5691,6 +6107,7 @@ static QString lessThan_array [] = {
"engine->evaluate(\"True\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
"engine->evaluate(\"True\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"engine->evaluate(\"True\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"True\") <=> engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"True\") <=> engine->evaluate(\"Undefined\")",
"engine->evaluate(\"True\") <=> engine->evaluate(\"'ciao'\")",
"engine->evaluate(\"True\") <=> engine->newObject()",
@@ -5711,6 +6128,7 @@ static QString lessThan_array [] = {
"engine->evaluate(\"False\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
"engine->evaluate(\"False\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"engine->evaluate(\"False\") <=> engine->evaluate(\"new Object()\")",
+ "engine->evaluate(\"False\") <=> engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"False\") <=> engine->evaluate(\"Undefined\")",
"engine->evaluate(\"False\") <=> engine->evaluate(\"Null\")",
"engine->evaluate(\"False\") <=> engine->evaluate(\"True\")",
@@ -5753,6 +6171,8 @@ static QString lessThan_array [] = {
"engine->evaluate(\"null\") <=> QScriptValue(engine, \"Infinity\")",
"engine->evaluate(\"null\") <=> QScriptValue(engine, QString(\"123\"))",
"engine->evaluate(\"null\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"null\") <=> engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"null\") <=> engine->evaluate(\"new Number(123)\")",
"engine->evaluate(\"null\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"null\") <=> engine->evaluate(\"true\")",
"engine->evaluate(\"null\") <=> engine->evaluate(\"122\")",
@@ -5796,6 +6216,7 @@ static QString lessThan_array [] = {
"engine->evaluate(\"true\") <=> QScriptValue(engine, \"Infinity\")",
"engine->evaluate(\"true\") <=> QScriptValue(engine, QString(\"123\"))",
"engine->evaluate(\"true\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"true\") <=> engine->evaluate(\"new Number(123)\")",
"engine->evaluate(\"true\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"true\") <=> engine->evaluate(\"122\")",
"engine->evaluate(\"true\") <=> engine->evaluate(\"124\")",
@@ -5843,6 +6264,8 @@ static QString lessThan_array [] = {
"engine->evaluate(\"false\") <=> QScriptValue(engine, \"Infinity\")",
"engine->evaluate(\"false\") <=> QScriptValue(engine, QString(\"123\"))",
"engine->evaluate(\"false\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"false\") <=> engine->evaluate(\"new Number(123)\")",
"engine->evaluate(\"false\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"false\") <=> engine->evaluate(\"true\")",
"engine->evaluate(\"false\") <=> engine->evaluate(\"122\")",
@@ -5880,6 +6303,7 @@ static QString lessThan_array [] = {
"engine->evaluate(\"122\") <=> QScriptValue(engine, qInf())",
"engine->evaluate(\"122\") <=> QScriptValue(engine, \"Infinity\")",
"engine->evaluate(\"122\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->evaluate(\"122\") <=> engine->evaluate(\"new Number(123)\")",
"engine->evaluate(\"122\") <=> engine->evaluate(\"124\")",
"engine->evaluate(\"122\") <=> engine->evaluate(\"123.0\")",
"engine->evaluate(\"122\") <=> engine->evaluate(\"0x43211234\")",
@@ -5943,6 +6367,8 @@ static QString lessThan_array [] = {
"engine->evaluate(\"0\") <=> QScriptValue(engine, \"Infinity\")",
"engine->evaluate(\"0\") <=> QScriptValue(engine, QString(\"123\"))",
"engine->evaluate(\"0\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"0\") <=> engine->evaluate(\"new Number(123)\")",
"engine->evaluate(\"0\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"0\") <=> engine->evaluate(\"true\")",
"engine->evaluate(\"0\") <=> engine->evaluate(\"122\")",
@@ -5992,6 +6418,8 @@ static QString lessThan_array [] = {
"engine->evaluate(\"0.0\") <=> QScriptValue(engine, \"Infinity\")",
"engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString(\"123\"))",
"engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"0.0\") <=> engine->evaluate(\"new Number(123)\")",
"engine->evaluate(\"0.0\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"0.0\") <=> engine->evaluate(\"true\")",
"engine->evaluate(\"0.0\") <=> engine->evaluate(\"122\")",
@@ -6061,6 +6489,8 @@ static QString lessThan_array [] = {
"engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, \"Infinity\")",
"engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, QString(\"123\"))",
"engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"new Number(123)\")",
"engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"true\")",
"engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"122\")",
@@ -6133,6 +6563,9 @@ static QString lessThan_array [] = {
"engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"[]\")",
"engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"Array.prototype\")",
"engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"new Boolean(false)\")",
+ "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"new Number(123)\")",
"engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"null\")",
"engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"true\")",
@@ -6252,6 +6685,9 @@ static QString lessThan_array [] = {
"engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"[]\")",
"engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"Array.prototype\")",
"engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"new Array()\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"new Boolean(false)\")",
+ "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"new Number(123)\")",
"engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"null\")",
"engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"true\")",
@@ -6348,6 +6784,10 @@ static QString lessThan_array [] = {
"engine->evaluate(\"''\") <=> engine->evaluate(\"/foo/\")",
"engine->evaluate(\"''\") <=> engine->evaluate(\"new Object()\")",
"engine->evaluate(\"''\") <=> engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"''\") <=> engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"''\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"''\") <=> engine->evaluate(\"Undefined\")",
"engine->evaluate(\"''\") <=> engine->evaluate(\"Null\")",
@@ -6369,6 +6809,7 @@ static QString lessThan_array [] = {
"engine->evaluate(\"''\") <=> engine->newObject()",
"engine->evaluate(\"''\") <=> engine->newArray(10)",
"engine->evaluate(\"''\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->evaluate(\"''\") <=> engine->newRegExp(\"foo\", \"gim\")",
"engine->evaluate(\"''\") <=> engine->newVariant(QVariant(123))",
"engine->evaluate(\"''\") <=> engine->newQObject(engine)",
"engine->evaluate(\"'0'\") <=> QScriptValue(true)",
@@ -6428,6 +6869,9 @@ static QString lessThan_array [] = {
"engine->evaluate(\"'0'\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"engine->evaluate(\"'0'\") <=> engine->evaluate(\"new Object()\")",
"engine->evaluate(\"'0'\") <=> engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"'0'\") <=> engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"'0'\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"'0'\") <=> engine->evaluate(\"Undefined\")",
"engine->evaluate(\"'0'\") <=> engine->evaluate(\"Null\")",
@@ -6488,6 +6932,7 @@ static QString lessThan_array [] = {
"engine->evaluate(\"'123'\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"engine->evaluate(\"'123'\") <=> engine->evaluate(\"new Object()\")",
"engine->evaluate(\"'123'\") <=> engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"'123'\") <=> engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"'123'\") <=> engine->evaluate(\"Undefined\")",
"engine->evaluate(\"'123'\") <=> engine->evaluate(\"Null\")",
"engine->evaluate(\"'123'\") <=> engine->evaluate(\"True\")",
@@ -6549,6 +6994,8 @@ static QString lessThan_array [] = {
"engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"new Object()\")",
"engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Undefined\")",
"engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Null\")",
@@ -6603,6 +7050,8 @@ static QString lessThan_array [] = {
"engine->nullValue() <=> QScriptValue(engine, \"Infinity\")",
"engine->nullValue() <=> QScriptValue(engine, QString(\"123\"))",
"engine->nullValue() <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->nullValue() <=> engine->evaluate(\"new Boolean(true)\")",
+ "engine->nullValue() <=> engine->evaluate(\"new Number(123)\")",
"engine->nullValue() <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->nullValue() <=> engine->evaluate(\"true\")",
"engine->nullValue() <=> engine->evaluate(\"122\")",
@@ -6630,6 +7079,7 @@ static QString lessThan_array [] = {
"engine->newObject() <=> engine->evaluate(\"(function() { return 1; })\")",
"engine->newObject() <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
"engine->newObject() <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->newObject() <=> engine->evaluate(\"new String('ciao')\")",
"engine->newObject() <=> engine->evaluate(\"'ciao'\")",
"engine->newObject() <=> engine->newQMetaObject(&QObject::staticMetaObject)",
"engine->newArray() <=> QScriptValue(true)",
@@ -6696,6 +7146,10 @@ static QString lessThan_array [] = {
"engine->newArray() <=> engine->evaluate(\"/foo/\")",
"engine->newArray() <=> engine->evaluate(\"new Object()\")",
"engine->newArray() <=> engine->evaluate(\"new Error()\")",
+ "engine->newArray() <=> engine->evaluate(\"new Boolean(true)\")",
+ "engine->newArray() <=> engine->evaluate(\"new Number(123)\")",
+ "engine->newArray() <=> engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->newArray() <=> engine->evaluate(\"new String('ciao')\")",
"engine->newArray() <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->newArray() <=> engine->evaluate(\"Undefined\")",
"engine->newArray() <=> engine->evaluate(\"Null\")",
@@ -6717,6 +7171,7 @@ static QString lessThan_array [] = {
"engine->newArray() <=> engine->newObject()",
"engine->newArray() <=> engine->newArray(10)",
"engine->newArray() <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newArray() <=> engine->newRegExp(\"foo\", \"gim\")",
"engine->newArray() <=> engine->newVariant(QVariant(123))",
"engine->newArray() <=> engine->newQObject(engine)",
"engine->newArray(10) <=> QScriptValue(\"NaN\")",
@@ -6756,6 +7211,8 @@ static QString lessThan_array [] = {
"engine->newArray(10) <=> engine->evaluate(\"/foo/\")",
"engine->newArray(10) <=> engine->evaluate(\"new Object()\")",
"engine->newArray(10) <=> engine->evaluate(\"new Error()\")",
+ "engine->newArray(10) <=> engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->newArray(10) <=> engine->evaluate(\"new String('ciao')\")",
"engine->newArray(10) <=> engine->evaluate(\"Undefined\")",
"engine->newArray(10) <=> engine->evaluate(\"Null\")",
"engine->newArray(10) <=> engine->evaluate(\"True\")",
@@ -6766,6 +7223,7 @@ static QString lessThan_array [] = {
"engine->newArray(10) <=> engine->evaluate(\"'12.4'\")",
"engine->newArray(10) <=> engine->newObject()",
"engine->newArray(10) <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newArray(10) <=> engine->newRegExp(\"foo\", \"gim\")",
"engine->newArray(10) <=> engine->newQObject(engine)",
"engine->newQMetaObject(&QObject::staticMetaObject) <=> QScriptValue(\"ciao\")",
"engine->newQMetaObject(&QObject::staticMetaObject) <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
@@ -6781,7 +7239,53 @@ static QString lessThan_array [] = {
"engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"(function() { return 1; })\")",
"engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
"engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"new String('ciao')\")",
"engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"'ciao'\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> QScriptValue(\"NaN\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> QScriptValue(\"Infinity\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> QScriptValue(\"ciao\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))",
+ "engine->newRegExp(\"foo\", \"gim\") <=> QScriptValue(QString(\"0\"))",
+ "engine->newRegExp(\"foo\", \"gim\") <=> QScriptValue(QString(\"123\"))",
+ "engine->newRegExp(\"foo\", \"gim\") <=> QScriptValue(QString(\"12.4\"))",
+ "engine->newRegExp(\"foo\", \"gim\") <=> QScriptValue(0, \"NaN\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> QScriptValue(0, \"Infinity\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> QScriptValue(0, \"ciao\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))",
+ "engine->newRegExp(\"foo\", \"gim\") <=> QScriptValue(0, QString(\"0\"))",
+ "engine->newRegExp(\"foo\", \"gim\") <=> QScriptValue(0, QString(\"123\"))",
+ "engine->newRegExp(\"foo\", \"gim\") <=> QScriptValue(0, QString(\"12.3\"))",
+ "engine->newRegExp(\"foo\", \"gim\") <=> QScriptValue(engine, \"NaN\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> QScriptValue(engine, \"Infinity\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> QScriptValue(engine, \"ciao\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))",
+ "engine->newRegExp(\"foo\", \"gim\") <=> QScriptValue(engine, QString(\"0\"))",
+ "engine->newRegExp(\"foo\", \"gim\") <=> QScriptValue(engine, QString(\"123\"))",
+ "engine->newRegExp(\"foo\", \"gim\") <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"Object.prototype\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"Function.prototype\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"Error.prototype\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"Object\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"Array\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"Number\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"Function\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"(function() { return 1; })\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"new Object()\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"new Error()\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"new String('ciao')\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"Undefined\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"Null\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"True\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"False\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"'ciao'\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"'0'\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"'123'\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"'12.4'\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->newObject()",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->newQObject(engine)",
"engine->newVariant(QVariant(123)) <=> QScriptValue(uint(124))",
"engine->newVariant(QVariant(123)) <=> QScriptValue(0x43211234)",
"engine->newVariant(QVariant(123)) <=> QScriptValue(0x10000)",
@@ -6841,6 +7345,8 @@ static QString lessThan_array [] = {
"engine->newVariant(QVariant(false)) <=> QScriptValue(engine, \"Infinity\")",
"engine->newVariant(QVariant(false)) <=> QScriptValue(engine, QString(\"123\"))",
"engine->newVariant(QVariant(false)) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"new Boolean(true)\")",
+ "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"new Number(123)\")",
"engine->newVariant(QVariant(false)) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->newVariant(QVariant(false)) <=> engine->evaluate(\"true\")",
"engine->newVariant(QVariant(false)) <=> engine->evaluate(\"122\")",
@@ -6890,6 +7396,8 @@ static QString lessThan_array [] = {
"engine->newQObject(0) <=> QScriptValue(engine, \"Infinity\")",
"engine->newQObject(0) <=> QScriptValue(engine, QString(\"123\"))",
"engine->newQObject(0) <=> QScriptValue(engine, QString(\"1.23\"))",
+ "engine->newQObject(0) <=> engine->evaluate(\"new Boolean(true)\")",
+ "engine->newQObject(0) <=> engine->evaluate(\"new Number(123)\")",
"engine->newQObject(0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->newQObject(0) <=> engine->evaluate(\"true\")",
"engine->newQObject(0) <=> engine->evaluate(\"122\")",
@@ -6919,20 +7427,21 @@ static QString lessThan_array [] = {
"engine->newQObject(engine) <=> engine->evaluate(\"(function() { return 'ciao'; })\")",
"engine->newQObject(engine) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"engine->newQObject(engine) <=> engine->evaluate(\"new Object()\")",
+ "engine->newQObject(engine) <=> engine->evaluate(\"new String('ciao')\")",
"engine->newQObject(engine) <=> engine->evaluate(\"Undefined\")",
"engine->newQObject(engine) <=> engine->evaluate(\"Null\")",
"engine->newQObject(engine) <=> engine->evaluate(\"True\")",
"engine->newQObject(engine) <=> engine->evaluate(\"False\")",
"engine->newQObject(engine) <=> engine->evaluate(\"'ciao'\")",
"engine->newQObject(engine) <=> engine->newObject()",
- "engine->newQObject(engine) <=> engine->newQMetaObject(&QObject::staticMetaObject)",};
+ "engine->newQObject(engine) <=> engine->newQMetaObject(&QObject::staticMetaObject)"};
void tst_QScriptValueGenerated::lessThan_makeData(const char *expr)
{
static QSet<QString> equals;
if (equals.isEmpty()) {
- equals.reserve(5063);
- for (unsigned i = 0; i < 5063; ++i)
+ equals.reserve(5476);
+ for (unsigned i = 0; i < 5476; ++i)
equals.insert(lessThan_array[i]);
}
QHash<QString, QScriptValue>::const_iterator it;
@@ -6959,7 +7468,7 @@ void tst_QScriptValueGenerated::instanceOf_initData()
initScriptValues();
}
-static QString instanceOf_array [] = {
+static QString instanceOf_array[] = {
"engine->evaluate(\"[]\") <=> engine->evaluate(\"Object\")",
"engine->evaluate(\"[]\") <=> engine->evaluate(\"Array\")",
"engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Object\")",
@@ -6985,6 +7494,12 @@ static QString instanceOf_array [] = {
"engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object\")",
"engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Array\")",
"engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"new Boolean(true)\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"new Boolean(false)\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"new Number(123)\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"new Number(123)\") <=> engine->evaluate(\"Number\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\") <=> engine->evaluate(\"Object\")",
+ "engine->evaluate(\"new String('ciao')\") <=> engine->evaluate(\"Object\")",
"engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Object\")",
"engine->evaluate(\"Null\") <=> engine->evaluate(\"Object\")",
"engine->evaluate(\"True\") <=> engine->evaluate(\"Object\")",
@@ -6996,17 +7511,18 @@ static QString instanceOf_array [] = {
"engine->newArray(10) <=> engine->evaluate(\"Array\")",
"engine->newDate(QDateTime()) <=> engine->evaluate(\"Object\")",
"engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"Object\")",
+ "engine->newRegExp(\"foo\", \"gim\") <=> engine->evaluate(\"Object\")",
"engine->newVariant(QVariant()) <=> engine->evaluate(\"Object\")",
"engine->newVariant(QVariant(123)) <=> engine->evaluate(\"Object\")",
"engine->newVariant(QVariant(false)) <=> engine->evaluate(\"Object\")",
- "engine->newQObject(engine) <=> engine->evaluate(\"Object\")",};
+ "engine->newQObject(engine) <=> engine->evaluate(\"Object\")"};
void tst_QScriptValueGenerated::instanceOf_makeData(const char *expr)
{
static QSet<QString> equals;
if (equals.isEmpty()) {
- equals.reserve(40);
- for (unsigned i = 0; i < 40; ++i)
+ equals.reserve(47);
+ for (unsigned i = 0; i < 47; ++i)
equals.insert(instanceOf_array[i]);
}
QHash<QString, QScriptValue>::const_iterator it;
diff --git a/tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_init.cpp b/tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_init.cpp
index 8c8a7d1..ae40684 100644
--- a/tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_init.cpp
+++ b/tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_init.cpp
@@ -49,7 +49,7 @@
void tst_QScriptValueGenerated::initScriptValues()
{
m_values.clear();
- if (engine)
+ if (engine)
delete engine;
engine = new QScriptEngine;
DEFINE_TEST_VALUE(QScriptValue());
@@ -155,6 +155,11 @@ void tst_QScriptValueGenerated::initScriptValues()
DEFINE_TEST_VALUE(engine->evaluate("new Object()"));
DEFINE_TEST_VALUE(engine->evaluate("new Array()"));
DEFINE_TEST_VALUE(engine->evaluate("new Error()"));
+ DEFINE_TEST_VALUE(engine->evaluate("new Boolean(true)"));
+ DEFINE_TEST_VALUE(engine->evaluate("new Boolean(false)"));
+ DEFINE_TEST_VALUE(engine->evaluate("new Number(123)"));
+ DEFINE_TEST_VALUE(engine->evaluate("new RegExp('foo', 'gim')"));
+ DEFINE_TEST_VALUE(engine->evaluate("new String('ciao')"));
DEFINE_TEST_VALUE(engine->evaluate("a = new Object(); a.foo = 22; a.foo"));
DEFINE_TEST_VALUE(engine->evaluate("Undefined"));
DEFINE_TEST_VALUE(engine->evaluate("Null"));
@@ -189,6 +194,7 @@ void tst_QScriptValueGenerated::initScriptValues()
DEFINE_TEST_VALUE(engine->newArray(10));
DEFINE_TEST_VALUE(engine->newDate(QDateTime()));
DEFINE_TEST_VALUE(engine->newQMetaObject(&QObject::staticMetaObject));
+ DEFINE_TEST_VALUE(engine->newRegExp("foo", "gim"));
DEFINE_TEST_VALUE(engine->newVariant(QVariant()));
DEFINE_TEST_VALUE(engine->newVariant(QVariant(123)));
DEFINE_TEST_VALUE(engine->newVariant(QVariant(false)));
diff --git a/tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_isXXX.cpp b/tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_isXXX.cpp
index 71a5c1d..26b8c62 100644
--- a/tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_isXXX.cpp
+++ b/tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_isXXX.cpp
@@ -52,7 +52,7 @@ void tst_QScriptValueGenerated::isValid_initData()
initScriptValues();
}
-static QString isValid_array [] = {
+static QString isValid_array[] = {
"QScriptValue(QScriptValue::UndefinedValue)",
"QScriptValue(QScriptValue::NullValue)",
"QScriptValue(true)",
@@ -155,6 +155,11 @@ static QString isValid_array [] = {
"engine->evaluate(\"new Object()\")",
"engine->evaluate(\"new Array()\")",
"engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"new Boolean(false)\")",
+ "engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Null\")",
@@ -189,18 +194,20 @@ static QString isValid_array [] = {
"engine->newArray(10)",
"engine->newDate(QDateTime())",
"engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newRegExp(\"foo\", \"gim\")",
"engine->newVariant(QVariant())",
"engine->newVariant(QVariant(123))",
"engine->newVariant(QVariant(false))",
"engine->newQObject(0)",
- "engine->newQObject(engine)",};
+ "engine->newQObject(engine)"
+};
void tst_QScriptValueGenerated::isValid_makeData(const char* expr)
{
static QSet<QString> isValid;
if (isValid.isEmpty()) {
- isValid.reserve(141);
- for (unsigned i = 0; i < 141; ++i)
+ isValid.reserve(147);
+ for (unsigned i = 0; i < 147; ++i)
isValid.insert(isValid_array[i]);
}
newRow(expr) << isValid.contains(expr);
@@ -222,7 +229,7 @@ void tst_QScriptValueGenerated::isBool_initData()
initScriptValues();
}
-static QString isBool_array [] = {
+static QString isBool_array[] = {
"QScriptValue(true)",
"QScriptValue(false)",
"QScriptValue(0, true)",
@@ -230,7 +237,8 @@ static QString isBool_array [] = {
"QScriptValue(engine, true)",
"QScriptValue(engine, false)",
"engine->evaluate(\"true\")",
- "engine->evaluate(\"false\")",};
+ "engine->evaluate(\"false\")"
+};
void tst_QScriptValueGenerated::isBool_makeData(const char* expr)
{
@@ -259,7 +267,7 @@ void tst_QScriptValueGenerated::isBoolean_initData()
initScriptValues();
}
-static QString isBoolean_array [] = {
+static QString isBoolean_array[] = {
"QScriptValue(true)",
"QScriptValue(false)",
"QScriptValue(0, true)",
@@ -267,7 +275,8 @@ static QString isBoolean_array [] = {
"QScriptValue(engine, true)",
"QScriptValue(engine, false)",
"engine->evaluate(\"true\")",
- "engine->evaluate(\"false\")",};
+ "engine->evaluate(\"false\")"
+};
void tst_QScriptValueGenerated::isBoolean_makeData(const char* expr)
{
@@ -296,7 +305,7 @@ void tst_QScriptValueGenerated::isNumber_initData()
initScriptValues();
}
-static QString isNumber_array [] = {
+static QString isNumber_array[] = {
"QScriptValue(int(122))",
"QScriptValue(uint(124))",
"QScriptValue(0)",
@@ -352,7 +361,8 @@ static QString isNumber_array [] = {
"engine->evaluate(\"0x10001\")",
"engine->evaluate(\"NaN\")",
"engine->evaluate(\"Infinity\")",
- "engine->evaluate(\"-Infinity\")",};
+ "engine->evaluate(\"-Infinity\")"
+};
void tst_QScriptValueGenerated::isNumber_makeData(const char* expr)
{
@@ -381,7 +391,7 @@ void tst_QScriptValueGenerated::isFunction_initData()
initScriptValues();
}
-static QString isFunction_array [] = {
+static QString isFunction_array[] = {
"engine->evaluate(\"Function.prototype\")",
"engine->evaluate(\"Object\")",
"engine->evaluate(\"Array\")",
@@ -391,14 +401,17 @@ static QString isFunction_array [] = {
"engine->evaluate(\"(function() { return 'ciao'; })\")",
"engine->evaluate(\"(function() { throw new Error('foo'); })\")",
"engine->evaluate(\"/foo/\")",
- "engine->newQMetaObject(&QObject::staticMetaObject)",};
+ "engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newRegExp(\"foo\", \"gim\")"
+};
void tst_QScriptValueGenerated::isFunction_makeData(const char* expr)
{
static QSet<QString> isFunction;
if (isFunction.isEmpty()) {
- isFunction.reserve(10);
- for (unsigned i = 0; i < 10; ++i)
+ isFunction.reserve(12);
+ for (unsigned i = 0; i < 12; ++i)
isFunction.insert(isFunction_array[i]);
}
newRow(expr) << isFunction.contains(expr);
@@ -420,13 +433,14 @@ void tst_QScriptValueGenerated::isNull_initData()
initScriptValues();
}
-static QString isNull_array [] = {
+static QString isNull_array[] = {
"QScriptValue(QScriptValue::NullValue)",
"QScriptValue(0, QScriptValue::NullValue)",
"QScriptValue(engine, QScriptValue::NullValue)",
"engine->evaluate(\"null\")",
"engine->nullValue()",
- "engine->newQObject(0)",};
+ "engine->newQObject(0)"
+};
void tst_QScriptValueGenerated::isNull_makeData(const char* expr)
{
@@ -455,7 +469,7 @@ void tst_QScriptValueGenerated::isString_initData()
initScriptValues();
}
-static QString isString_array [] = {
+static QString isString_array[] = {
"QScriptValue(\"NaN\")",
"QScriptValue(\"Infinity\")",
"QScriptValue(\"-Infinity\")",
@@ -490,7 +504,8 @@ static QString isString_array [] = {
"engine->evaluate(\"''\")",
"engine->evaluate(\"'0'\")",
"engine->evaluate(\"'123'\")",
- "engine->evaluate(\"'12.4'\")",};
+ "engine->evaluate(\"'12.4'\")"
+};
void tst_QScriptValueGenerated::isString_makeData(const char* expr)
{
@@ -519,13 +534,14 @@ void tst_QScriptValueGenerated::isUndefined_initData()
initScriptValues();
}
-static QString isUndefined_array [] = {
+static QString isUndefined_array[] = {
"QScriptValue(QScriptValue::UndefinedValue)",
"QScriptValue(0, QScriptValue::UndefinedValue)",
"QScriptValue(engine, QScriptValue::UndefinedValue)",
"engine->evaluate(\"{}\")",
"engine->evaluate(\"undefined\")",
- "engine->undefinedValue()",};
+ "engine->undefinedValue()"
+};
void tst_QScriptValueGenerated::isUndefined_makeData(const char* expr)
{
@@ -554,10 +570,11 @@ void tst_QScriptValueGenerated::isVariant_initData()
initScriptValues();
}
-static QString isVariant_array [] = {
+static QString isVariant_array[] = {
"engine->newVariant(QVariant())",
"engine->newVariant(QVariant(123))",
- "engine->newVariant(QVariant(false))",};
+ "engine->newVariant(QVariant(false))"
+};
void tst_QScriptValueGenerated::isVariant_makeData(const char* expr)
{
@@ -586,8 +603,9 @@ void tst_QScriptValueGenerated::isQObject_initData()
initScriptValues();
}
-static QString isQObject_array [] = {
- "engine->newQObject(engine)",};
+static QString isQObject_array[] = {
+ "engine->newQObject(engine)"
+};
void tst_QScriptValueGenerated::isQObject_makeData(const char* expr)
{
@@ -616,8 +634,9 @@ void tst_QScriptValueGenerated::isQMetaObject_initData()
initScriptValues();
}
-static QString isQMetaObject_array [] = {
- "engine->newQMetaObject(&QObject::staticMetaObject)",};
+static QString isQMetaObject_array[] = {
+ "engine->newQMetaObject(&QObject::staticMetaObject)"
+};
void tst_QScriptValueGenerated::isQMetaObject_makeData(const char* expr)
{
@@ -646,7 +665,7 @@ void tst_QScriptValueGenerated::isObject_initData()
initScriptValues();
}
-static QString isObject_array [] = {
+static QString isObject_array[] = {
"engine->evaluate(\"[]\")",
"engine->evaluate(\"Object.prototype\")",
"engine->evaluate(\"Date.prototype\")",
@@ -664,6 +683,11 @@ static QString isObject_array [] = {
"engine->evaluate(\"new Object()\")",
"engine->evaluate(\"new Array()\")",
"engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"new Boolean(false)\")",
+ "engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Null\")",
"engine->evaluate(\"True\")",
@@ -673,17 +697,19 @@ static QString isObject_array [] = {
"engine->newArray(10)",
"engine->newDate(QDateTime())",
"engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newRegExp(\"foo\", \"gim\")",
"engine->newVariant(QVariant())",
"engine->newVariant(QVariant(123))",
"engine->newVariant(QVariant(false))",
- "engine->newQObject(engine)",};
+ "engine->newQObject(engine)"
+};
void tst_QScriptValueGenerated::isObject_makeData(const char* expr)
{
static QSet<QString> isObject;
if (isObject.isEmpty()) {
- isObject.reserve(30);
- for (unsigned i = 0; i < 30; ++i)
+ isObject.reserve(36);
+ for (unsigned i = 0; i < 36; ++i)
isObject.insert(isObject_array[i]);
}
newRow(expr) << isObject.contains(expr);
@@ -705,9 +731,10 @@ void tst_QScriptValueGenerated::isDate_initData()
initScriptValues();
}
-static QString isDate_array [] = {
+static QString isDate_array[] = {
"engine->evaluate(\"Date.prototype\")",
- "engine->newDate(QDateTime())",};
+ "engine->newDate(QDateTime())"
+};
void tst_QScriptValueGenerated::isDate_makeData(const char* expr)
{
@@ -736,15 +763,18 @@ void tst_QScriptValueGenerated::isRegExp_initData()
initScriptValues();
}
-static QString isRegExp_array [] = {
- "engine->evaluate(\"/foo/\")",};
+static QString isRegExp_array[] = {
+ "engine->evaluate(\"/foo/\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->newRegExp(\"foo\", \"gim\")"
+};
void tst_QScriptValueGenerated::isRegExp_makeData(const char* expr)
{
static QSet<QString> isRegExp;
if (isRegExp.isEmpty()) {
- isRegExp.reserve(1);
- for (unsigned i = 0; i < 1; ++i)
+ isRegExp.reserve(3);
+ for (unsigned i = 0; i < 3; ++i)
isRegExp.insert(isRegExp_array[i]);
}
newRow(expr) << isRegExp.contains(expr);
@@ -766,12 +796,13 @@ void tst_QScriptValueGenerated::isArray_initData()
initScriptValues();
}
-static QString isArray_array [] = {
+static QString isArray_array[] = {
"engine->evaluate(\"[]\")",
"engine->evaluate(\"Array.prototype\")",
"engine->evaluate(\"new Array()\")",
"engine->newArray()",
- "engine->newArray(10)",};
+ "engine->newArray(10)"
+};
void tst_QScriptValueGenerated::isArray_makeData(const char* expr)
{
@@ -800,13 +831,14 @@ void tst_QScriptValueGenerated::isError_initData()
initScriptValues();
}
-static QString isError_array [] = {
+static QString isError_array[] = {
"engine->evaluate(\"Error.prototype\")",
"engine->evaluate(\"new Error()\")",
"engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Null\")",
"engine->evaluate(\"True\")",
- "engine->evaluate(\"False\")",};
+ "engine->evaluate(\"False\")"
+};
void tst_QScriptValueGenerated::isError_makeData(const char* expr)
{
diff --git a/tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_toXXX.cpp b/tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_toXXX.cpp
index cb75ded..e663645 100644
--- a/tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_toXXX.cpp
+++ b/tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_toXXX.cpp
@@ -53,7 +53,7 @@ void tst_QScriptValueGenerated::toString_initData()
initScriptValues();
}
-static QString toString_tagArray [] = {
+static QString toString_tagArray[] = {
"QScriptValue()",
"QScriptValue(QScriptValue::UndefinedValue)",
"QScriptValue(QScriptValue::NullValue)",
@@ -157,6 +157,11 @@ static QString toString_tagArray [] = {
"engine->evaluate(\"new Object()\")",
"engine->evaluate(\"new Array()\")",
"engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"new Boolean(false)\")",
+ "engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Null\")",
@@ -191,91 +196,95 @@ static QString toString_tagArray [] = {
"engine->newArray(10)",
"engine->newDate(QDateTime())",
"engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newRegExp(\"foo\", \"gim\")",
"engine->newVariant(QVariant())",
"engine->newVariant(QVariant(123))",
"engine->newVariant(QVariant(false))",
"engine->newQObject(0)",
- "engine->newQObject(engine)",};
+ "engine->newQObject(engine)"};
-static QString toString_valueArray [] = {
- "", "undefined",
- "null", "true",
- "false", "122",
- "124", "0",
- "0", "123",
- "6.37e-8", "-6.37e-8",
- "1126240820", "65536",
- "65537", "NaN",
- "NaN", "Infinity",
- "-Infinity", "NaN",
- "Infinity", "-Infinity",
- "ciao", "ciao",
- "", "",
- "0", "123",
- "12.4", "undefined",
- "null", "true",
- "false", "122",
- "124", "0",
- "0", "123",
- "6.37e-8", "-6.37e-8",
- "1126240820", "65536",
- "65537", "NaN",
- "NaN", "Infinity",
- "-Infinity", "NaN",
- "Infinity", "-Infinity",
- "ciao", "ciao",
- "", "",
- "0", "123",
- "12.3", "undefined",
- "null", "true",
- "false", "122",
- "124", "0",
- "0", "123",
- "6.37e-8", "-6.37e-8",
- "1126240820", "65536",
- "65537", "NaN",
- "NaN", "Infinity",
- "-Infinity", "NaN",
- "Infinity", "-Infinity",
- "ciao", "ciao",
- "", "",
- "0", "123",
- "1.23", "",
- "undefined", "[object Object]",
- "Invalid Date", "",
- "function () {\n [native code]\n}", "Error: Unknown error",
- "function Object() {\n [native code]\n}", "function Array() {\n [native code]\n}",
- "function Number() {\n [native code]\n}", "function Function() {\n [native code]\n}",
- "function () { return 1; }", "function () { return 'ciao'; }",
- "function () { throw new Error('foo'); }", "/foo/",
- "[object Object]", "",
- "Error: Unknown error", "22",
- "ReferenceError: Can't find variable: Undefined", "ReferenceError: Can't find variable: Null",
- "ReferenceError: Can't find variable: True", "ReferenceError: Can't find variable: False",
- "undefined", "null",
- "true", "false",
- "122", "124",
- "0", "0",
- "123", "6.37e-8",
- "-6.37e-8", "1126240820",
- "65536", "65537",
- "NaN", "Infinity",
- "-Infinity", "ciao",
- "", "0",
- "123", "12.4",
- "null", "undefined",
- "[object Object]", "",
- ",,,,,,,,,", "Invalid Date",
- "[object QMetaObject]", "undefined",
- "123", "false",
- "null", "QScriptEngine(name = \"\")", };
+static QString toString_valueArray[] = {
+ "", "undefined",
+ "null", "true",
+ "false", "122",
+ "124", "0",
+ "0", "123",
+ "6.37e-8", "-6.37e-8",
+ "1126240820", "65536",
+ "65537", "NaN",
+ "NaN", "Infinity",
+ "-Infinity", "NaN",
+ "Infinity", "-Infinity",
+ "ciao", "ciao",
+ "", "",
+ "0", "123",
+ "12.4", "undefined",
+ "null", "true",
+ "false", "122",
+ "124", "0",
+ "0", "123",
+ "6.37e-8", "-6.37e-8",
+ "1126240820", "65536",
+ "65537", "NaN",
+ "NaN", "Infinity",
+ "-Infinity", "NaN",
+ "Infinity", "-Infinity",
+ "ciao", "ciao",
+ "", "",
+ "0", "123",
+ "12.3", "undefined",
+ "null", "true",
+ "false", "122",
+ "124", "0",
+ "0", "123",
+ "6.37e-8", "-6.37e-8",
+ "1126240820", "65536",
+ "65537", "NaN",
+ "NaN", "Infinity",
+ "-Infinity", "NaN",
+ "Infinity", "-Infinity",
+ "ciao", "ciao",
+ "", "",
+ "0", "123",
+ "1.23", "",
+ "undefined", "[object Object]",
+ "Invalid Date", "",
+ "function () {\n [native code]\n}", "Error: Unknown error",
+ "function Object() {\n [native code]\n}", "function Array() {\n [native code]\n}",
+ "function Number() {\n [native code]\n}", "function Function() {\n [native code]\n}",
+ "function () { return 1; }", "function () { return 'ciao'; }",
+ "function () { throw new Error('foo'); }", "/foo/",
+ "[object Object]", "",
+ "Error: Unknown error", "true",
+ "false", "123",
+ "/foo/gim", "ciao",
+ "22", "ReferenceError: Can't find variable: Undefined",
+ "ReferenceError: Can't find variable: Null", "ReferenceError: Can't find variable: True",
+ "ReferenceError: Can't find variable: False", "undefined",
+ "null", "true",
+ "false", "122",
+ "124", "0",
+ "0", "123",
+ "6.37e-8", "-6.37e-8",
+ "1126240820", "65536",
+ "65537", "NaN",
+ "Infinity", "-Infinity",
+ "ciao", "",
+ "0", "123",
+ "12.4", "null",
+ "undefined", "[object Object]",
+ "", ",,,,,,,,,",
+ "Invalid Date", "[object QMetaObject]",
+ "/foo/gim", "undefined",
+ "123", "false",
+ "null", "QScriptEngine(name = \"\")"};
void tst_QScriptValueGenerated::toString_makeData(const char* expr)
{
static QHash<QString, QString> toString;
if (toString.isEmpty()) {
- toString.reserve(142);
- for (unsigned i = 0; i < 142; ++i)
+ toString.reserve(148);
+ for (unsigned i = 0; i < 148; ++i)
toString.insert(toString_tagArray[i], toString_valueArray[i]);
}
newRow(expr) << toString.value(expr);
@@ -297,7 +306,7 @@ void tst_QScriptValueGenerated::toNumber_initData()
initScriptValues();
}
-static QString toNumber_tagArray [] = {
+static QString toNumber_tagArray[] = {
"QScriptValue()",
"QScriptValue(QScriptValue::UndefinedValue)",
"QScriptValue(QScriptValue::NullValue)",
@@ -401,6 +410,11 @@ static QString toNumber_tagArray [] = {
"engine->evaluate(\"new Object()\")",
"engine->evaluate(\"new Array()\")",
"engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"new Boolean(false)\")",
+ "engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Null\")",
@@ -435,33 +449,34 @@ static QString toNumber_tagArray [] = {
"engine->newArray(10)",
"engine->newDate(QDateTime())",
"engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newRegExp(\"foo\", \"gim\")",
"engine->newVariant(QVariant())",
"engine->newVariant(QVariant(123))",
"engine->newVariant(QVariant(false))",
"engine->newQObject(0)",
- "engine->newQObject(engine)",};
-static qsreal toNumber_valueArray [] = {
- 0, qQNaN(), 0, 1, 0, 122, 124, 0, 0, 123,
- 6.369999999999999e-08, -6.369999999999999e-08, 1126240820, 65536, 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(),
- qInf(), qInf(), qQNaN(), qQNaN(), 0, 0, 0, 123, 12.4, qQNaN(),
- 0, 1, 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08,
- 1126240820, 65536, 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(), qInf(), qInf(),
- qQNaN(), qQNaN(), 0, 0, 0, 123, 12.3, qQNaN(), 0, 1,
- 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08, 1126240820, 65536,
- 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(), qInf(), qInf(), qQNaN(), qQNaN(),
- 0, 0, 0, 123, 1.23, 0, qQNaN(), qQNaN(), qQNaN(), 0,
- qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(),
- qQNaN(), 0, qQNaN(), 22, qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), 0,
- 1, 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08, 1126240820,
- 65536, 65537, qQNaN(), qInf(), qInf(), qQNaN(), 0, 0, 123, 12.4,
- 0, qQNaN(), qQNaN(), 0, qQNaN(), qQNaN(), qQNaN(), qQNaN(), 123, 0,
- 0, qQNaN(), };
+ "engine->newQObject(engine)"};
+static qsreal toNumber_valueArray[] = {
+ 0, qQNaN(), 0, 1, 0, 122, 124, 0, 0, 123,
+ 6.369999999999999e-08, -6.369999999999999e-08, 1126240820, 65536, 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(),
+ qInf(), qInf(), qQNaN(), qQNaN(), 0, 0, 0, 123, 12.4, qQNaN(),
+ 0, 1, 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08,
+ 1126240820, 65536, 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(), qInf(), qInf(),
+ qQNaN(), qQNaN(), 0, 0, 0, 123, 12.3, qQNaN(), 0, 1,
+ 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08, 1126240820, 65536,
+ 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(), qInf(), qInf(), qQNaN(), qQNaN(),
+ 0, 0, 0, 123, 1.23, 0, qQNaN(), qQNaN(), qQNaN(), 0,
+ qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(),
+ qQNaN(), 0, qQNaN(), 1, 0, 123, qQNaN(), qQNaN(), 22, qQNaN(),
+ qQNaN(), qQNaN(), qQNaN(), qQNaN(), 0, 1, 0, 122, 124, 0,
+ 0, 123, 6.369999999999999e-08, -6.369999999999999e-08, 1126240820, 65536, 65537, qQNaN(), qInf(), qInf(),
+ qQNaN(), 0, 0, 123, 12.4, 0, qQNaN(), qQNaN(), 0, qQNaN(),
+ qQNaN(), qQNaN(), qQNaN(), qQNaN(), 123, 0, 0, qQNaN()};
void tst_QScriptValueGenerated::toNumber_makeData(const char* expr)
{
static QHash<QString, qsreal> toNumber;
if (toNumber.isEmpty()) {
- toNumber.reserve(142);
- for (unsigned i = 0; i < 142; ++i)
+ toNumber.reserve(148);
+ for (unsigned i = 0; i < 148; ++i)
toNumber.insert(toNumber_tagArray[i], toNumber_valueArray[i]);
}
newRow(expr) << toNumber.value(expr);
@@ -492,7 +507,7 @@ void tst_QScriptValueGenerated::toBool_initData()
initScriptValues();
}
-static QString toBool_tagArray [] = {
+static QString toBool_tagArray[] = {
"QScriptValue()",
"QScriptValue(QScriptValue::UndefinedValue)",
"QScriptValue(QScriptValue::NullValue)",
@@ -596,6 +611,11 @@ static QString toBool_tagArray [] = {
"engine->evaluate(\"new Object()\")",
"engine->evaluate(\"new Array()\")",
"engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"new Boolean(false)\")",
+ "engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Null\")",
@@ -630,91 +650,95 @@ static QString toBool_tagArray [] = {
"engine->newArray(10)",
"engine->newDate(QDateTime())",
"engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newRegExp(\"foo\", \"gim\")",
"engine->newVariant(QVariant())",
"engine->newVariant(QVariant(123))",
"engine->newVariant(QVariant(false))",
"engine->newQObject(0)",
- "engine->newQObject(engine)",};
+ "engine->newQObject(engine)"};
-static bool toBool_valueArray [] = {
- false, false,
- false, true,
- false, true,
- true, false,
- false, true,
- true, true,
- true, true,
- true, false,
- false, true,
- true, true,
- true, true,
- true, true,
- false, false,
- true, true,
- true, false,
- false, true,
- false, true,
- true, false,
- false, true,
- true, true,
- true, true,
- true, false,
- false, true,
- true, true,
- true, true,
- true, true,
- false, false,
- true, true,
- true, false,
- false, true,
- false, true,
- true, false,
- false, true,
- true, true,
- true, true,
- true, false,
- false, true,
- true, true,
- true, true,
- true, true,
- false, false,
- true, true,
- true, true,
- false, true,
- true, true,
- true, true,
- true, true,
- true, true,
- true, true,
- true, true,
- true, true,
- true, true,
- true, true,
- true, true,
- false, false,
- true, false,
- true, true,
- false, false,
- true, true,
- true, true,
- true, true,
- false, true,
- true, true,
- false, true,
- true, true,
- false, false,
- true, true,
- true, true,
- true, true,
- true, true,
- false, true, };
+static bool toBool_valueArray[] = {
+ false, false,
+ false, true,
+ false, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ false, false,
+ true, true,
+ true, false,
+ false, true,
+ false, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ false, false,
+ true, true,
+ true, false,
+ false, true,
+ false, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ false, false,
+ true, true,
+ true, true,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, false,
+ false, true,
+ false, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, false,
+ true, true,
+ true, false,
+ true, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ false, true};
void tst_QScriptValueGenerated::toBool_makeData(const char* expr)
{
static QHash<QString, bool> toBool;
if (toBool.isEmpty()) {
- toBool.reserve(142);
- for (unsigned i = 0; i < 142; ++i)
+ toBool.reserve(148);
+ for (unsigned i = 0; i < 148; ++i)
toBool.insert(toBool_tagArray[i], toBool_valueArray[i]);
}
newRow(expr) << toBool.value(expr);
@@ -736,7 +760,7 @@ void tst_QScriptValueGenerated::toBoolean_initData()
initScriptValues();
}
-static QString toBoolean_tagArray [] = {
+static QString toBoolean_tagArray[] = {
"QScriptValue()",
"QScriptValue(QScriptValue::UndefinedValue)",
"QScriptValue(QScriptValue::NullValue)",
@@ -840,6 +864,11 @@ static QString toBoolean_tagArray [] = {
"engine->evaluate(\"new Object()\")",
"engine->evaluate(\"new Array()\")",
"engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"new Boolean(false)\")",
+ "engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Null\")",
@@ -874,91 +903,95 @@ static QString toBoolean_tagArray [] = {
"engine->newArray(10)",
"engine->newDate(QDateTime())",
"engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newRegExp(\"foo\", \"gim\")",
"engine->newVariant(QVariant())",
"engine->newVariant(QVariant(123))",
"engine->newVariant(QVariant(false))",
"engine->newQObject(0)",
- "engine->newQObject(engine)",};
+ "engine->newQObject(engine)"};
-static bool toBoolean_valueArray [] = {
- false, false,
- false, true,
- false, true,
- true, false,
- false, true,
- true, true,
- true, true,
- true, false,
- false, true,
- true, true,
- true, true,
- true, true,
- false, false,
- true, true,
- true, false,
- false, true,
- false, true,
- true, false,
- false, true,
- true, true,
- true, true,
- true, false,
- false, true,
- true, true,
- true, true,
- true, true,
- false, false,
- true, true,
- true, false,
- false, true,
- false, true,
- true, false,
- false, true,
- true, true,
- true, true,
- true, false,
- false, true,
- true, true,
- true, true,
- true, true,
- false, false,
- true, true,
- true, true,
- false, true,
- true, true,
- true, true,
- true, true,
- true, true,
- true, true,
- true, true,
- true, true,
- true, true,
- true, true,
- true, true,
- false, false,
- true, false,
- true, true,
- false, false,
- true, true,
- true, true,
- true, true,
- false, true,
- true, true,
- false, true,
- true, true,
- false, false,
- true, true,
- true, true,
- true, true,
- true, true,
- false, true, };
+static bool toBoolean_valueArray[] = {
+ false, false,
+ false, true,
+ false, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ false, false,
+ true, true,
+ true, false,
+ false, true,
+ false, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ false, false,
+ true, true,
+ true, false,
+ false, true,
+ false, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ false, false,
+ true, true,
+ true, true,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ true, false,
+ false, true,
+ false, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, false,
+ true, true,
+ true, false,
+ true, true,
+ true, false,
+ false, true,
+ true, true,
+ true, true,
+ true, true,
+ true, true,
+ false, true};
void tst_QScriptValueGenerated::toBoolean_makeData(const char* expr)
{
static QHash<QString, bool> toBoolean;
if (toBoolean.isEmpty()) {
- toBoolean.reserve(142);
- for (unsigned i = 0; i < 142; ++i)
+ toBoolean.reserve(148);
+ for (unsigned i = 0; i < 148; ++i)
toBoolean.insert(toBoolean_tagArray[i], toBoolean_valueArray[i]);
}
newRow(expr) << toBoolean.value(expr);
@@ -980,7 +1013,7 @@ void tst_QScriptValueGenerated::toInteger_initData()
initScriptValues();
}
-static QString toInteger_tagArray [] = {
+static QString toInteger_tagArray[] = {
"QScriptValue()",
"QScriptValue(QScriptValue::UndefinedValue)",
"QScriptValue(QScriptValue::NullValue)",
@@ -1084,6 +1117,11 @@ static QString toInteger_tagArray [] = {
"engine->evaluate(\"new Object()\")",
"engine->evaluate(\"new Array()\")",
"engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"new Boolean(false)\")",
+ "engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Null\")",
@@ -1118,33 +1156,34 @@ static QString toInteger_tagArray [] = {
"engine->newArray(10)",
"engine->newDate(QDateTime())",
"engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newRegExp(\"foo\", \"gim\")",
"engine->newVariant(QVariant())",
"engine->newVariant(QVariant(123))",
"engine->newVariant(QVariant(false))",
"engine->newQObject(0)",
- "engine->newQObject(engine)",};
-static qsreal toInteger_valueArray [] = {
- 0, 0, 0, 1, 0, 122, 124, 0, 0, 123,
- 0, 0, 1126240820, 65536, 65537, 0, 0, qInf(), qInf(), 0,
- qInf(), qInf(), 0, 0, 0, 0, 0, 123, 12, 0,
- 0, 1, 0, 122, 124, 0, 0, 123, 0, 0,
- 1126240820, 65536, 65537, 0, 0, qInf(), qInf(), 0, qInf(), qInf(),
- 0, 0, 0, 0, 0, 123, 12, 0, 0, 1,
- 0, 122, 124, 0, 0, 123, 0, 0, 1126240820, 65536,
- 65537, 0, 0, qInf(), qInf(), 0, qInf(), qInf(), 0, 0,
- 0, 0, 0, 123, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 22, 0, 0, 0, 0, 0, 0,
- 1, 0, 122, 124, 0, 0, 123, 0, 0, 1126240820,
- 65536, 65537, 0, qInf(), qInf(), 0, 0, 0, 123, 12,
- 0, 0, 0, 0, 0, 0, 0, 0, 123, 0,
- 0, 0, };
+ "engine->newQObject(engine)"};
+static qsreal toInteger_valueArray[] = {
+ 0, 0, 0, 1, 0, 122, 124, 0, 0, 123,
+ 0, 0, 1126240820, 65536, 65537, 0, 0, qInf(), qInf(), 0,
+ qInf(), qInf(), 0, 0, 0, 0, 0, 123, 12, 0,
+ 0, 1, 0, 122, 124, 0, 0, 123, 0, 0,
+ 1126240820, 65536, 65537, 0, 0, qInf(), qInf(), 0, qInf(), qInf(),
+ 0, 0, 0, 0, 0, 123, 12, 0, 0, 1,
+ 0, 122, 124, 0, 0, 123, 0, 0, 1126240820, 65536,
+ 65537, 0, 0, qInf(), qInf(), 0, qInf(), qInf(), 0, 0,
+ 0, 0, 0, 123, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1, 0, 123, 0, 0, 22, 0,
+ 0, 0, 0, 0, 0, 1, 0, 122, 124, 0,
+ 0, 123, 0, 0, 1126240820, 65536, 65537, 0, qInf(), qInf(),
+ 0, 0, 0, 123, 12, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 123, 0, 0, 0};
void tst_QScriptValueGenerated::toInteger_makeData(const char* expr)
{
static QHash<QString, qsreal> toInteger;
if (toInteger.isEmpty()) {
- toInteger.reserve(142);
- for (unsigned i = 0; i < 142; ++i)
+ toInteger.reserve(148);
+ for (unsigned i = 0; i < 148; ++i)
toInteger.insert(toInteger_tagArray[i], toInteger_valueArray[i]);
}
newRow(expr) << toInteger.value(expr);
@@ -1171,7 +1210,7 @@ void tst_QScriptValueGenerated::toInt32_initData()
initScriptValues();
}
-static QString toInt32_tagArray [] = {
+static QString toInt32_tagArray[] = {
"QScriptValue()",
"QScriptValue(QScriptValue::UndefinedValue)",
"QScriptValue(QScriptValue::NullValue)",
@@ -1275,6 +1314,11 @@ static QString toInt32_tagArray [] = {
"engine->evaluate(\"new Object()\")",
"engine->evaluate(\"new Array()\")",
"engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"new Boolean(false)\")",
+ "engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Null\")",
@@ -1309,91 +1353,95 @@ static QString toInt32_tagArray [] = {
"engine->newArray(10)",
"engine->newDate(QDateTime())",
"engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newRegExp(\"foo\", \"gim\")",
"engine->newVariant(QVariant())",
"engine->newVariant(QVariant(123))",
"engine->newVariant(QVariant(false))",
"engine->newQObject(0)",
- "engine->newQObject(engine)",};
+ "engine->newQObject(engine)"};
-static qint32 toInt32_valueArray [] = {
- 0, 0,
- 0, 1,
- 0, 122,
- 124, 0,
- 0, 123,
- 0, 0,
- 1126240820, 65536,
- 65537, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 123,
- 12, 0,
- 0, 1,
- 0, 122,
- 124, 0,
- 0, 123,
- 0, 0,
- 1126240820, 65536,
- 65537, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 123,
- 12, 0,
- 0, 1,
- 0, 122,
- 124, 0,
- 0, 123,
- 0, 0,
- 1126240820, 65536,
- 65537, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 123,
- 1, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 22,
- 0, 0,
- 0, 0,
- 0, 0,
- 1, 0,
- 122, 124,
- 0, 0,
- 123, 0,
- 0, 1126240820,
- 65536, 65537,
- 0, 0,
- 0, 0,
- 0, 0,
- 123, 12,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 123, 0,
- 0, 0, };
+static qint32 toInt32_valueArray[] = {
+ 0, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 1,
+ 0, 123,
+ 0, 0,
+ 22, 0,
+ 0, 0,
+ 0, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 123, 0,
+ 0, 0};
void tst_QScriptValueGenerated::toInt32_makeData(const char* expr)
{
static QHash<QString, qint32> toInt32;
if (toInt32.isEmpty()) {
- toInt32.reserve(142);
- for (unsigned i = 0; i < 142; ++i)
+ toInt32.reserve(148);
+ for (unsigned i = 0; i < 148; ++i)
toInt32.insert(toInt32_tagArray[i], toInt32_valueArray[i]);
}
newRow(expr) << toInt32.value(expr);
@@ -1415,7 +1463,7 @@ void tst_QScriptValueGenerated::toUInt32_initData()
initScriptValues();
}
-static QString toUInt32_tagArray [] = {
+static QString toUInt32_tagArray[] = {
"QScriptValue()",
"QScriptValue(QScriptValue::UndefinedValue)",
"QScriptValue(QScriptValue::NullValue)",
@@ -1519,6 +1567,11 @@ static QString toUInt32_tagArray [] = {
"engine->evaluate(\"new Object()\")",
"engine->evaluate(\"new Array()\")",
"engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"new Boolean(false)\")",
+ "engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Null\")",
@@ -1553,91 +1606,95 @@ static QString toUInt32_tagArray [] = {
"engine->newArray(10)",
"engine->newDate(QDateTime())",
"engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newRegExp(\"foo\", \"gim\")",
"engine->newVariant(QVariant())",
"engine->newVariant(QVariant(123))",
"engine->newVariant(QVariant(false))",
"engine->newQObject(0)",
- "engine->newQObject(engine)",};
+ "engine->newQObject(engine)"};
-static quint32 toUInt32_valueArray [] = {
- 0, 0,
- 0, 1,
- 0, 122,
- 124, 0,
- 0, 123,
- 0, 0,
- 1126240820, 65536,
- 65537, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 123,
- 12, 0,
- 0, 1,
- 0, 122,
- 124, 0,
- 0, 123,
- 0, 0,
- 1126240820, 65536,
- 65537, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 123,
- 12, 0,
- 0, 1,
- 0, 122,
- 124, 0,
- 0, 123,
- 0, 0,
- 1126240820, 65536,
- 65537, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 123,
- 1, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 22,
- 0, 0,
- 0, 0,
- 0, 0,
- 1, 0,
- 122, 124,
- 0, 0,
- 123, 0,
- 0, 1126240820,
- 65536, 65537,
- 0, 0,
- 0, 0,
- 0, 0,
- 123, 12,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 123, 0,
- 0, 0, };
+static quint32 toUInt32_valueArray[] = {
+ 0, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 1,
+ 0, 123,
+ 0, 0,
+ 22, 0,
+ 0, 0,
+ 0, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 1126240820, 65536,
+ 65537, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 123, 0,
+ 0, 0};
void tst_QScriptValueGenerated::toUInt32_makeData(const char* expr)
{
static QHash<QString, quint32> toUInt32;
if (toUInt32.isEmpty()) {
- toUInt32.reserve(142);
- for (unsigned i = 0; i < 142; ++i)
+ toUInt32.reserve(148);
+ for (unsigned i = 0; i < 148; ++i)
toUInt32.insert(toUInt32_tagArray[i], toUInt32_valueArray[i]);
}
newRow(expr) << toUInt32.value(expr);
@@ -1659,7 +1716,7 @@ void tst_QScriptValueGenerated::toUInt16_initData()
initScriptValues();
}
-static QString toUInt16_tagArray [] = {
+static QString toUInt16_tagArray[] = {
"QScriptValue()",
"QScriptValue(QScriptValue::UndefinedValue)",
"QScriptValue(QScriptValue::NullValue)",
@@ -1763,6 +1820,11 @@ static QString toUInt16_tagArray [] = {
"engine->evaluate(\"new Object()\")",
"engine->evaluate(\"new Array()\")",
"engine->evaluate(\"new Error()\")",
+ "engine->evaluate(\"new Boolean(true)\")",
+ "engine->evaluate(\"new Boolean(false)\")",
+ "engine->evaluate(\"new Number(123)\")",
+ "engine->evaluate(\"new RegExp('foo', 'gim')\")",
+ "engine->evaluate(\"new String('ciao')\")",
"engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")",
"engine->evaluate(\"Undefined\")",
"engine->evaluate(\"Null\")",
@@ -1797,91 +1859,95 @@ static QString toUInt16_tagArray [] = {
"engine->newArray(10)",
"engine->newDate(QDateTime())",
"engine->newQMetaObject(&QObject::staticMetaObject)",
+ "engine->newRegExp(\"foo\", \"gim\")",
"engine->newVariant(QVariant())",
"engine->newVariant(QVariant(123))",
"engine->newVariant(QVariant(false))",
"engine->newQObject(0)",
- "engine->newQObject(engine)",};
+ "engine->newQObject(engine)"};
-static quint16 toUInt16_valueArray [] = {
- 0, 0,
- 0, 1,
- 0, 122,
- 124, 0,
- 0, 123,
- 0, 0,
- 4660, 0,
- 1, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 123,
- 12, 0,
- 0, 1,
- 0, 122,
- 124, 0,
- 0, 123,
- 0, 0,
- 4660, 0,
- 1, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 123,
- 12, 0,
- 0, 1,
- 0, 122,
- 124, 0,
- 0, 123,
- 0, 0,
- 4660, 0,
- 1, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 123,
- 1, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 22,
- 0, 0,
- 0, 0,
- 0, 0,
- 1, 0,
- 122, 124,
- 0, 0,
- 123, 0,
- 0, 4660,
- 0, 1,
- 0, 0,
- 0, 0,
- 0, 0,
- 123, 12,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 123, 0,
- 0, 0, };
+static quint16 toUInt16_valueArray[] = {
+ 0, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 4660, 0,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 4660, 0,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 4660, 0,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 1,
+ 0, 123,
+ 0, 0,
+ 22, 0,
+ 0, 0,
+ 0, 0,
+ 0, 1,
+ 0, 122,
+ 124, 0,
+ 0, 123,
+ 0, 0,
+ 4660, 0,
+ 1, 0,
+ 0, 0,
+ 0, 0,
+ 0, 123,
+ 12, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 123, 0,
+ 0, 0};
void tst_QScriptValueGenerated::toUInt16_makeData(const char* expr)
{
static QHash<QString, quint16> toUInt16;
if (toUInt16.isEmpty()) {
- toUInt16.reserve(142);
- for (unsigned i = 0; i < 142; ++i)
+ toUInt16.reserve(148);
+ for (unsigned i = 0; i < 148; ++i)
toUInt16.insert(toUInt16_tagArray[i], toUInt16_valueArray[i]);
}
newRow(expr) << toUInt16.value(expr);
diff --git a/tests/auto/qsemaphore/qsemaphore.pro b/tests/auto/qsemaphore/qsemaphore.pro
index f720c0b..5978215 100644
--- a/tests/auto/qsemaphore/qsemaphore.pro
+++ b/tests/auto/qsemaphore/qsemaphore.pro
@@ -3,3 +3,4 @@ SOURCES += tst_qsemaphore.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qsequentialanimationgroup/qsequentialanimationgroup.pro b/tests/auto/qsequentialanimationgroup/qsequentialanimationgroup.pro
index 01ef68a..c0c10c0 100644
--- a/tests/auto/qsequentialanimationgroup/qsequentialanimationgroup.pro
+++ b/tests/auto/qsequentialanimationgroup/qsequentialanimationgroup.pro
@@ -3,3 +3,4 @@ QT = core
SOURCES += tst_qsequentialanimationgroup.cpp
+CONFIG += parallel_test
diff --git a/tests/auto/qset/qset.pro b/tests/auto/qset/qset.pro
index b45a015..ebdf0d6 100644
--- a/tests/auto/qset/qset.pro
+++ b/tests/auto/qset/qset.pro
@@ -6,3 +6,4 @@ symbian: {
TARGET.EPOCSTACKSIZE =0x5000
TARGET.EPOCHEAPSIZE="0x100000 0x1000000" # // Min 1Mb, max 16Mb
}
+CONFIG += parallel_test
diff --git a/tests/auto/qsharedpointer/qsharedpointer.pro b/tests/auto/qsharedpointer/qsharedpointer.pro
index bbd31d7..014006e 100644
--- a/tests/auto/qsharedpointer/qsharedpointer.pro
+++ b/tests/auto/qsharedpointer/qsharedpointer.pro
@@ -12,3 +12,4 @@ QT = core
!symbian:DEFINES += SRCDIR=\\\"$$PWD/\\\"
include(externaltests.pri)
+CONFIG += parallel_test
diff --git a/tests/auto/qsignalspy/qsignalspy.pro b/tests/auto/qsignalspy/qsignalspy.pro
index 4bc4a7b..d3ae63b 100644
--- a/tests/auto/qsignalspy/qsignalspy.pro
+++ b/tests/auto/qsignalspy/qsignalspy.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qsignalspy.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qsize/qsize.pro b/tests/auto/qsize/qsize.pro
index 14786b8..a1814ac 100644
--- a/tests/auto/qsize/qsize.pro
+++ b/tests/auto/qsize/qsize.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qsize.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qsizef/qsizef.pro b/tests/auto/qsizef/qsizef.pro
index 703d721..5aa07d7 100644
--- a/tests/auto/qsizef/qsizef.pro
+++ b/tests/auto/qsizef/qsizef.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qsizef.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qstate/qstate.pro b/tests/auto/qstate/qstate.pro
index 9131fa8..6ee7e0c 100644
--- a/tests/auto/qstate/qstate.pro
+++ b/tests/auto/qstate/qstate.pro
@@ -3,3 +3,4 @@ QT = core
SOURCES += tst_qstate.cpp
+CONFIG += parallel_test
diff --git a/tests/auto/qstl/qstl.pro b/tests/auto/qstl/qstl.pro
index 5c99874..a0c9db1 100644
--- a/tests/auto/qstl/qstl.pro
+++ b/tests/auto/qstl/qstl.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qstl.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qstring/qstring.pro b/tests/auto/qstring/qstring.pro
index ed758c6..e980042 100644
--- a/tests/auto/qstring/qstring.pro
+++ b/tests/auto/qstring/qstring.pro
@@ -6,3 +6,4 @@ symbian:LIBS += -llibm
QT = core
DEFINES += QT_NO_CAST_TO_ASCII
+CONFIG += parallel_test
diff --git a/tests/auto/qstringbuilder1/qstringbuilder1.pro b/tests/auto/qstringbuilder1/qstringbuilder1.pro
index 5bb14d4..dc9062f 100644
--- a/tests/auto/qstringbuilder1/qstringbuilder1.pro
+++ b/tests/auto/qstringbuilder1/qstringbuilder1.pro
@@ -4,3 +4,4 @@ QT = core
SOURCES += tst_qstringbuilder1.cpp
+CONFIG += parallel_test
diff --git a/tests/auto/qstringbuilder2/qstringbuilder2.pro b/tests/auto/qstringbuilder2/qstringbuilder2.pro
index 4152dc3..a57c6f1 100644
--- a/tests/auto/qstringbuilder2/qstringbuilder2.pro
+++ b/tests/auto/qstringbuilder2/qstringbuilder2.pro
@@ -3,3 +3,4 @@ load(qttest_p4)
QT = core
SOURCES += tst_qstringbuilder2.cpp
+CONFIG += parallel_test
diff --git a/tests/auto/qstringbuilder3/qstringbuilder3.pro b/tests/auto/qstringbuilder3/qstringbuilder3.pro
index b4d2225..5aced7c 100644
--- a/tests/auto/qstringbuilder3/qstringbuilder3.pro
+++ b/tests/auto/qstringbuilder3/qstringbuilder3.pro
@@ -3,3 +3,4 @@ load(qttest_p4)
QT = core
SOURCES += tst_qstringbuilder3.cpp
+CONFIG += parallel_test
diff --git a/tests/auto/qstringbuilder4/qstringbuilder4.pro b/tests/auto/qstringbuilder4/qstringbuilder4.pro
index 6ec5228..0532a9b 100644
--- a/tests/auto/qstringbuilder4/qstringbuilder4.pro
+++ b/tests/auto/qstringbuilder4/qstringbuilder4.pro
@@ -3,3 +3,4 @@ load(qttest_p4)
QT = core
SOURCES += tst_qstringbuilder4.cpp
+CONFIG += parallel_test
diff --git a/tests/auto/qstringlist/qstringlist.pro b/tests/auto/qstringlist/qstringlist.pro
index aee074b..d82a348 100644
--- a/tests/auto/qstringlist/qstringlist.pro
+++ b/tests/auto/qstringlist/qstringlist.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qstringlist.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qstringmatcher/qstringmatcher.pro b/tests/auto/qstringmatcher/qstringmatcher.pro
index 2c15097..c5249ec 100644
--- a/tests/auto/qstringmatcher/qstringmatcher.pro
+++ b/tests/auto/qstringmatcher/qstringmatcher.pro
@@ -3,3 +3,4 @@ SOURCES += tst_qstringmatcher.cpp
QT = core
DEFINES += QT_NO_CAST_TO_ASCII
+CONFIG += parallel_test
diff --git a/tests/auto/qstringref/qstringref.pro b/tests/auto/qstringref/qstringref.pro
index 48e7ddf..34f2de4 100644
--- a/tests/auto/qstringref/qstringref.pro
+++ b/tests/auto/qstringref/qstringref.pro
@@ -2,3 +2,4 @@ load(qttest_p4)
SOURCES += tst_qstringref.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qtconcurrentfilter/qtconcurrentfilter.pro b/tests/auto/qtconcurrentfilter/qtconcurrentfilter.pro
index e93c5d2..ee2b77d 100644
--- a/tests/auto/qtconcurrentfilter/qtconcurrentfilter.pro
+++ b/tests/auto/qtconcurrentfilter/qtconcurrentfilter.pro
@@ -2,3 +2,5 @@ load(qttest_p4)
DEFINES += QT_STRICT_ITERATORS
SOURCES += tst_qtconcurrentfilter.cpp
QT = core
+CONFIG += parallel_test
+CONFIG += parallel_test
diff --git a/tests/auto/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro b/tests/auto/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro
index 4fdcc22..a61d275 100644
--- a/tests/auto/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro
+++ b/tests/auto/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro
@@ -1,3 +1,5 @@
load(qttest_p4)
SOURCES += tst_qtconcurrentiteratekernel.cpp
QT = core
+CONFIG += parallel_test
+CONFIG += parallel_test
diff --git a/tests/auto/qtconcurrentmap/qtconcurrentmap.pro b/tests/auto/qtconcurrentmap/qtconcurrentmap.pro
index 8cae714..6fc3585 100644
--- a/tests/auto/qtconcurrentmap/qtconcurrentmap.pro
+++ b/tests/auto/qtconcurrentmap/qtconcurrentmap.pro
@@ -2,3 +2,5 @@ load(qttest_p4)
DEFINES += QT_STRICT_ITERATORS
SOURCES += tst_qtconcurrentmap.cpp
QT = core
+CONFIG += parallel_test
+CONFIG += parallel_test
diff --git a/tests/auto/qtconcurrentrun/qtconcurrentrun.pro b/tests/auto/qtconcurrentrun/qtconcurrentrun.pro
index ac29dd4..2457604 100644
--- a/tests/auto/qtconcurrentrun/qtconcurrentrun.pro
+++ b/tests/auto/qtconcurrentrun/qtconcurrentrun.pro
@@ -1,3 +1,5 @@
load(qttest_p4)
SOURCES += tst_qtconcurrentrun.cpp
QT = core
+CONFIG += parallel_test
+CONFIG += parallel_test
diff --git a/tests/auto/qtconcurrentthreadengine/qtconcurrentthreadengine.pro b/tests/auto/qtconcurrentthreadengine/qtconcurrentthreadengine.pro
index cd8d74e..bbfcf5e 100644
--- a/tests/auto/qtconcurrentthreadengine/qtconcurrentthreadengine.pro
+++ b/tests/auto/qtconcurrentthreadengine/qtconcurrentthreadengine.pro
@@ -1,3 +1,5 @@
load(qttest_p4)
SOURCES += tst_qtconcurrentthreadengine.cpp
QT = core
+CONFIG += parallel_test
+CONFIG += parallel_test
diff --git a/tests/auto/qtextboundaryfinder/qtextboundaryfinder.pro b/tests/auto/qtextboundaryfinder/qtextboundaryfinder.pro
index e8fb9cb..5f3cb11 100644
--- a/tests/auto/qtextboundaryfinder/qtextboundaryfinder.pro
+++ b/tests/auto/qtextboundaryfinder/qtextboundaryfinder.pro
@@ -9,3 +9,4 @@ wince*|symbian:{
addFiles.path = .
DEPLOYMENT += addFiles
}
+CONFIG += parallel_test
diff --git a/tests/auto/qthread/qthread.pro b/tests/auto/qthread/qthread.pro
index 0b042ab..d3b1028 100644
--- a/tests/auto/qthread/qthread.pro
+++ b/tests/auto/qthread/qthread.pro
@@ -2,3 +2,4 @@ load(qttest_p4)
SOURCES += tst_qthread.cpp
QT = core
symbian:LIBS += -llibpthread
+CONFIG += parallel_test
diff --git a/tests/auto/qthreadonce/qthreadonce.pro b/tests/auto/qthreadonce/qthreadonce.pro
index a672a03..d7ef4d4 100644
--- a/tests/auto/qthreadonce/qthreadonce.pro
+++ b/tests/auto/qthreadonce/qthreadonce.pro
@@ -10,3 +10,4 @@ QT = core
# Temporary:
SOURCES += qthreadonce.cpp
+CONFIG += parallel_test
diff --git a/tests/auto/qthreadpool/qthreadpool.pro b/tests/auto/qthreadpool/qthreadpool.pro
index 3f6ea64..dbaeb20 100644
--- a/tests/auto/qthreadpool/qthreadpool.pro
+++ b/tests/auto/qthreadpool/qthreadpool.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qthreadpool.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qthreadstorage/qthreadstorage.pro b/tests/auto/qthreadstorage/qthreadstorage.pro
index a06f89c..0dc8d08 100644
--- a/tests/auto/qthreadstorage/qthreadstorage.pro
+++ b/tests/auto/qthreadstorage/qthreadstorage.pro
@@ -2,3 +2,4 @@ TEMPLATE = subdirs
SUBDIRS = \
tst_qthreadstorage.pro \
crashOnExit.pro
+CONFIG += parallel_test
diff --git a/tests/auto/qtime/qtime.pro b/tests/auto/qtime/qtime.pro
index 88277a0..ce4f7ae 100644
--- a/tests/auto/qtime/qtime.pro
+++ b/tests/auto/qtime/qtime.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qtime.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qtimeline/qtimeline.pro b/tests/auto/qtimeline/qtimeline.pro
index 7820455..9be717d 100644
--- a/tests/auto/qtimeline/qtimeline.pro
+++ b/tests/auto/qtimeline/qtimeline.pro
@@ -2,3 +2,4 @@ load(qttest_p4)
QT = core
SOURCES += tst_qtimeline.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qtimer/qtimer.pro b/tests/auto/qtimer/qtimer.pro
index 79ae7db..086df1d 100644
--- a/tests/auto/qtimer/qtimer.pro
+++ b/tests/auto/qtimer/qtimer.pro
@@ -2,3 +2,4 @@ load(qttest_p4)
QT = core
SOURCES += tst_qtimer.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qtmd5/qtmd5.pro b/tests/auto/qtmd5/qtmd5.pro
index cb4a539..0afc6b1 100644
--- a/tests/auto/qtmd5/qtmd5.pro
+++ b/tests/auto/qtmd5/qtmd5.pro
@@ -12,3 +12,4 @@ SOURCES += tst_qtmd5.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qtokenautomaton/qtokenautomaton.pro b/tests/auto/qtokenautomaton/qtokenautomaton.pro
index 6ebf7c4..5e2e590 100644
--- a/tests/auto/qtokenautomaton/qtokenautomaton.pro
+++ b/tests/auto/qtokenautomaton/qtokenautomaton.pro
@@ -15,3 +15,4 @@ HEADERS += tokenizers/basic/basic.h \
tokenizers/withNamespace/withNamespace.h
QT -= gui
+CONFIG += parallel_test
diff --git a/tests/auto/qurl/qurl.pro b/tests/auto/qurl/qurl.pro
index 018bb38..a5c39a5 100644
--- a/tests/auto/qurl/qurl.pro
+++ b/tests/auto/qurl/qurl.pro
@@ -2,3 +2,4 @@ load(qttest_p4)
SOURCES += tst_qurl.cpp
QT = core
symbian: TARGET.CAPABILITY = NetworkServices
+CONFIG += parallel_test
diff --git a/tests/auto/quuid/quuid.pro b/tests/auto/quuid/quuid.pro
index 25e2456..461956f 100644
--- a/tests/auto/quuid/quuid.pro
+++ b/tests/auto/quuid/quuid.pro
@@ -4,3 +4,4 @@ SUBDIRS = testProcessUniqueness
SUBDIRS += test
+CONFIG += parallel_test
diff --git a/tests/auto/qvarlengtharray/qvarlengtharray.pro b/tests/auto/qvarlengtharray/qvarlengtharray.pro
index 7a02790..183da1b 100644
--- a/tests/auto/qvarlengtharray/qvarlengtharray.pro
+++ b/tests/auto/qvarlengtharray/qvarlengtharray.pro
@@ -2,3 +2,4 @@ load(qttest_p4)
QT = core
SOURCES += tst_qvarlengtharray.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qvector/qvector.pro b/tests/auto/qvector/qvector.pro
index 80311b4..a7c3957 100644
--- a/tests/auto/qvector/qvector.pro
+++ b/tests/auto/qvector/qvector.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qvector.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qwaitcondition/qwaitcondition.pro b/tests/auto/qwaitcondition/qwaitcondition.pro
index 4d9a082..9af0c71 100644
--- a/tests/auto/qwaitcondition/qwaitcondition.pro
+++ b/tests/auto/qwaitcondition/qwaitcondition.pro
@@ -3,3 +3,4 @@ SOURCES += tst_qwaitcondition.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qwineventnotifier/qwineventnotifier.pro b/tests/auto/qwineventnotifier/qwineventnotifier.pro
index 0c8bd2b..62da3a3 100644
--- a/tests/auto/qwineventnotifier/qwineventnotifier.pro
+++ b/tests/auto/qwineventnotifier/qwineventnotifier.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qwineventnotifier.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qwritelocker/qwritelocker.pro b/tests/auto/qwritelocker/qwritelocker.pro
index acae4ef..39a98aa 100644
--- a/tests/auto/qwritelocker/qwritelocker.pro
+++ b/tests/auto/qwritelocker/qwritelocker.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qwritelocker.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/selftests/selftests.pro b/tests/auto/selftests/selftests.pro
index d854b5e..2f1c327 100644
--- a/tests/auto/selftests/selftests.pro
+++ b/tests/auto/selftests/selftests.pro
@@ -12,3 +12,4 @@ INSTALLS =
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/utf8/utf8.pro b/tests/auto/utf8/utf8.pro
index 4ec6851..aa133fe 100644
--- a/tests/auto/utf8/utf8.pro
+++ b/tests/auto/utf8/utf8.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
QT -= gui
SOURCES += tst_utf8.cpp
+CONFIG += parallel_test
diff --git a/tests/benchmarks/script/qscriptqobject/tst_qscriptqobject.cpp b/tests/benchmarks/script/qscriptqobject/tst_qscriptqobject.cpp
index e68db06..62f3c2a 100644
--- a/tests/benchmarks/script/qscriptqobject/tst_qscriptqobject.cpp
+++ b/tests/benchmarks/script/qscriptqobject/tst_qscriptqobject.cpp
@@ -309,6 +309,9 @@ private slots:
void qobjectSignalHandler();
void customTypeSignalHandler();
+ void emitSignal_data();
+ void emitSignal();
+
void readButtonMetaProperty_data();
void readButtonMetaProperty();
@@ -948,6 +951,31 @@ void tst_QScriptQObject::customTypeSignalHandler()
}
}
+void tst_QScriptQObject::emitSignal_data()
+{
+ QTest::addColumn<QString>("propertyName");
+ QTest::addColumn<QString>("arguments");
+
+ QTest::newRow("voidSignal()") << "voidSignal" << "";
+
+ QTest::newRow("boolSignal(true)") << "boolSignal" << "true";
+ QTest::newRow("intSignal(123)") << "intSignal" << "123";
+ QTest::newRow("doubleSignal(123)") << "doubleSignal" << "123";
+ QTest::newRow("stringSignal('hello')") << "stringSignal" << "'hello'";
+ QTest::newRow("variantSignal(123)") << "variantSignal" << "123";
+ QTest::newRow("qobjectSignal(this)") << "qobjectSignal" << "this"; // assumes 'this' is a QObject
+}
+
+void tst_QScriptQObject::emitSignal()
+{
+ QFETCH(QString, propertyName);
+ QFETCH(QString, arguments);
+
+ QScriptEngine engine;
+ SignalTestObject testObject;
+ callMethodHelper(engine, &testObject, propertyName, arguments);
+}
+
void tst_QScriptQObject::readButtonMetaProperty_data()
{
readMetaProperty_dataHelper(&QPushButton::staticMetaObject);
diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp
index 540ffa9..d1e2c60 100644
--- a/tools/qdoc3/tree.cpp
+++ b/tools/qdoc3/tree.cpp
@@ -1543,8 +1543,72 @@ bool Tree::generateIndexSection(QXmlStreamWriter &writer,
return true;
}
+
/*!
- */
+ Returns true if the node \a n1 is less than node \a n2.
+ The comparison is performed by comparing properties of the nodes in order
+ of increasing complexity.
+*/
+bool compareNodes(const Node *n1, const Node *n2)
+{
+ // Private nodes can occur in any order since they won't normally be
+ // written to the index.
+ if (n1->access() == Node::Private && n2->access() == Node::Private)
+ return true;
+
+ if (n1->location().filePath() < n2->location().filePath())
+ return true;
+ else if (n1->location().filePath() > n2->location().filePath())
+ return false;
+
+ if (n1->type() < n2->type())
+ return true;
+ else if (n1->type() > n2->type())
+ return false;
+
+ if (n1->name() < n2->name())
+ return true;
+ else if (n1->name() > n2->name())
+ return false;
+
+ if (n1->access() < n2->access())
+ return true;
+ else if (n1->access() > n2->access())
+ return false;
+
+ if (n1->type() == Node::Function && n2->type() == Node::Function) {
+ const FunctionNode *f1 = static_cast<const FunctionNode *>(n1);
+ const FunctionNode *f2 = static_cast<const FunctionNode *>(n2);
+
+ if (f1->isConst() < f2->isConst())
+ return true;
+ else if (f1->isConst() > f2->isConst())
+ return false;
+
+ if (f1->signature() < f2->signature())
+ return true;
+ else if (f1->signature() > f2->signature())
+ return false;
+ }
+
+ if (n1->type() == Node::Fake && n2->type() == Node::Fake) {
+ const FakeNode *f1 = static_cast<const FakeNode *>(n1);
+ const FakeNode *f2 = static_cast<const FakeNode *>(n2);
+ if (f1->fullTitle() < f2->fullTitle())
+ return true;
+ else if (f1->fullTitle() > f2->fullTitle())
+ return false;
+ }
+
+ return false;
+}
+
+/*!
+ Generate index sections for the child nodes of the given \a node
+ using the \a writer specified. If \a generateInternalNodes is true,
+ nodes marked as internal will be included in the index; otherwise,
+ they will be omitted.
+*/
void Tree::generateIndexSections(QXmlStreamWriter &writer,
const Node *node,
bool generateInternalNodes) const
@@ -1554,7 +1618,10 @@ void Tree::generateIndexSections(QXmlStreamWriter &writer,
if (node->isInnerNode()) {
const InnerNode *inner = static_cast<const InnerNode *>(node);
- foreach (const Node *child, inner->childNodes()) {
+ NodeList cnodes = inner->childNodes();
+ qSort(cnodes.begin(), cnodes.end(), compareNodes);
+
+ foreach (const Node *child, cnodes) {
/*
Don't generate anything for a QML property group node.
It is just a place holder for a collection of QML property