summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptvaluegenerated
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qscriptvaluegenerated')
-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
7 files changed, 1652 insertions, 974 deletions
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);