summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJustin McPherson <justin.mcpherson@nokia.com>2010-02-05 05:24:23 (GMT)
committerJustin McPherson <justin.mcpherson@nokia.com>2010-02-05 05:24:23 (GMT)
commit9f43d4aafeb16c81bc1a161c99dee2df19772e42 (patch)
tree081f5c2323f6fadf49f2d1fada8a7c0cb4bc953c /tests/auto
parentf14e3b86e6b7b496017ddd462821325bdb40c779 (diff)
parent7474ad656269aec1352d166bb5a4435086d48482 (diff)
downloadQt-9f43d4aafeb16c81bc1a161c99dee2df19772e42.zip
Qt-9f43d4aafeb16c81bc1a161c99dee2df19772e42.tar.gz
Qt-9f43d4aafeb16c81bc1a161c99dee2df19772e42.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/auto.pro2
-rw-r--r--tests/auto/linguist/lupdate/.gitignore6
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/lupdatecmd2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/project.ts.result (renamed from tests/auto/linguist/lupdate/testdata/recursivescan/bar.ts.result)0
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/lupdatecmd2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/project.ts.result (renamed from tests/auto/linguist/lupdate/testdata/recursivescan/foo.ts.result)0
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr3/expectedoutput.txt1
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr3/main.cpp45
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.pro4
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.before13
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.result12
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr4/expectedoutput.txt0
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr4/main.cpp45
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.pro4
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.before13
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.result13
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/from_subdir/lupdatecmd1
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/from_subdir/project.ts.result17
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/from_subdir/src/main.cpp50
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/from_subdir/src/main.h45
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/from_subdir/translations/translations.pro7
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_full/expectedoutput.txt0
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_full/lupdatecmd2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_full/project.ts.result20
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_full/project_sub.ts.result13
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/expectedoutput.txt2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/lupdatecmd3
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project.ts.result20
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project_sub.ts.before0
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project_sub.ts.result0
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/expectedoutput.txt0
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/lupdatecmd2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/project.ts.result20
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_part/expectedoutput.txt1
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_part/lupdatecmd2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_part/project.ts.before0
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_part/project.ts.result0
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_part/project_sub.ts.result13
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/expectedoutput.txt1
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/lupdatecmd3
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project.ts.result20
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project_sub.ts.before0
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project_sub.ts.result0
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/reloutput/lupdatecmd1
-rw-r--r--tests/auto/linguist/lupdate/testdata/subdirs_full/project.pro4
-rw-r--r--tests/auto/linguist/lupdate/testdata/subdirs_full/subdir1/main.cpp46
-rw-r--r--tests/auto/linguist/lupdate/testdata/subdirs_full/subdir1/subdir1.pro1
-rw-r--r--tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subdir2.pro2
-rw-r--r--tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub1/main.cpp46
-rw-r--r--tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub1/subsub1.pro1
-rw-r--r--tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub2/main.cpp46
-rw-r--r--tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub2/subsub2.pro4
-rw-r--r--tests/auto/linguist/lupdate/testdata/subdirs_part/project.pro2
-rw-r--r--tests/auto/linguist/lupdate/testdata/subdirs_part/subdir1/main.cpp46
-rw-r--r--tests/auto/linguist/lupdate/testdata/subdirs_part/subdir1/subdir1.pro1
-rw-r--r--tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subdir2.pro2
-rw-r--r--tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub1/main.cpp46
-rw-r--r--tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub1/subsub1.pro1
-rw-r--r--tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub2/main.cpp46
-rw-r--r--tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub2/subsub2.pro4
-rw-r--r--tests/auto/linguist/lupdate/tst_lupdate.cpp75
-rw-r--r--tests/auto/maketestselftest/tst_maketestselftest.cpp3
-rw-r--r--tests/auto/qbytearray/tst_qbytearray.cpp9
-rw-r--r--tests/auto/qdatetime/tst_qdatetime.cpp7
-rw-r--r--tests/auto/qdir/tst_qdir.cpp99
-rw-r--r--tests/auto/qgl/tst_qgl.cpp2
-rw-r--r--tests/auto/qglbuffer/qglbuffer.pro9
-rw-r--r--tests/auto/qglbuffer/tst_qglbuffer.cpp261
-rw-r--r--tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp34
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp86
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp43
-rw-r--r--tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp25
-rw-r--r--tests/auto/qheaderview/tst_qheaderview.cpp64
-rw-r--r--tests/auto/qimagereader/baseline/35floppy.icobin4286 -> 0 bytes
-rw-r--r--tests/auto/qimagereader/baseline/35floppy.pngbin0 -> 329 bytes
-rw-r--r--tests/auto/qimagereader/baseline/connect.pngbin0 -> 12943 bytes
-rw-r--r--tests/auto/qimagereader/baseline/kde_favicon.icobin1150 -> 0 bytes
-rw-r--r--tests/auto/qimagereader/baseline/kde_favicon.pngbin0 -> 514 bytes
-rw-r--r--tests/auto/qimagereader/baseline/semitransparent.icobin9662 -> 0 bytes
-rw-r--r--tests/auto/qimagereader/baseline/semitransparent.pngbin0 -> 545 bytes
-rw-r--r--tests/auto/qimagereader/tst_qimagereader.cpp13
-rw-r--r--tests/auto/qlabel/tst_qlabel.cpp22
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp45
-rw-r--r--tests/auto/qscriptvalue/qscriptvalue.pro4
-rw-r--r--tests/auto/qscriptvalue/testgen/data.txt116
-rwxr-xr-xtests/auto/qscriptvalue/testgen/gen.py242
-rw-r--r--tests/auto/qscriptvalue/testgen/main.cpp62
-rw-r--r--tests/auto/qscriptvalue/testgen/testgen.pro18
-rw-r--r--tests/auto/qscriptvalue/testgen/testgenerator.cpp688
-rw-r--r--tests/auto/qscriptvalue/testgen/testgenerator.h77
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue.cpp174
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue.h410
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp6369
-rw-r--r--tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp69
-rw-r--r--tests/auto/qsslcertificate/more-certificates/malformed-just-begin-no-newline.pem1
-rw-r--r--tests/auto/qsslcertificate/more-certificates/malformed-just-begin.pem1
-rw-r--r--tests/auto/qsslcertificate/more-certificates/no-ending-newline.pem13
-rw-r--r--tests/auto/qsslcertificate/tst_qsslcertificate.cpp3
-rw-r--r--tests/auto/qstyle/tst_qstyle.cpp17
-rw-r--r--tests/auto/qtableview/tst_qtableview.cpp8
-rw-r--r--tests/auto/qurl/tst_qurl.cpp42
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp50
-rw-r--r--tests/auto/selftests/expected_xunit.txt4
-rw-r--r--tests/auto/selftests/tst_selftests.cpp2
-rw-r--r--tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro1
105 files changed, 9668 insertions, 203 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 809b523..960cc43 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -474,7 +474,7 @@ SUBDIRS += \
rcc \
windowsmobile
-contains(QT_CONFIG,opengl):SUBDIRS += qgl
+contains(QT_CONFIG,opengl):SUBDIRS += qgl qglbuffer
contains(QT_CONFIG,qt3support):!wince*:SUBDIRS += $$Q3SUBDIRS
diff --git a/tests/auto/linguist/lupdate/.gitignore b/tests/auto/linguist/lupdate/.gitignore
index 389f2dc..a11e8d1 100644
--- a/tests/auto/linguist/lupdate/.gitignore
+++ b/tests/auto/linguist/lupdate/.gitignore
@@ -1,4 +1,4 @@
tst_lupdate
-testdata/good/*/project.ts
-testdata/good/*/*/project.ts
-testdata/recursivescan/*.ts
+testdata/*/*.ts
+testdata/*/*/*.ts
+testdata/*/*/*/*.ts
diff --git a/tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/lupdatecmd
new file mode 100644
index 0000000..301d839
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/lupdatecmd
@@ -0,0 +1,2 @@
+cd ../../recursivescan
+lupdate sub/finddialog.cpp -ts project.ts
diff --git a/tests/auto/linguist/lupdate/testdata/recursivescan/bar.ts.result b/tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/project.ts.result
index 5c3c21c..5c3c21c 100644
--- a/tests/auto/linguist/lupdate/testdata/recursivescan/bar.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/project.ts.result
diff --git a/tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/lupdatecmd
new file mode 100644
index 0000000..1814e67
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/lupdatecmd
@@ -0,0 +1,2 @@
+cd ../../recursivescan
+lupdate . -ts project.ts
diff --git a/tests/auto/linguist/lupdate/testdata/recursivescan/foo.ts.result b/tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/project.ts.result
index 95a34fa..95a34fa 100644
--- a/tests/auto/linguist/lupdate/testdata/recursivescan/foo.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/project.ts.result
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/expectedoutput.txt
new file mode 100644
index 0000000..feecdda
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/expectedoutput.txt
@@ -0,0 +1 @@
+lupdate warning: Codec for tr\(\) 'ISO-8859-1' disagrees with existing file's codec 'UTF-8'\. Expect trouble\.
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/main.cpp
new file mode 100644
index 0000000..e4210c5
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/main.cpp
@@ -0,0 +1,45 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+int main(int argc, char **argv)
+{
+ QObject::tr("hi");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.pro b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.pro
new file mode 100644
index 0000000..00a4dc4
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.pro
@@ -0,0 +1,4 @@
+SOURCES += main.cpp
+
+TRANSLATIONS = project.ts
+CODECFORTR = latin1
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.before
new file mode 100644
index 0000000..07ad79b
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.before
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<defaultcodec>UTF-8</defaultcodec>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="main.cpp" line="44"/>
+ <source>hi</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.result
new file mode 100644
index 0000000..b6899c1
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.result
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="main.cpp" line="44"/>
+ <source>hi</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/expectedoutput.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/expectedoutput.txt
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/main.cpp
new file mode 100644
index 0000000..e4210c5
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/main.cpp
@@ -0,0 +1,45 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+int main(int argc, char **argv)
+{
+ QObject::tr("hi");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.pro b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.pro
new file mode 100644
index 0000000..4fddb02
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.pro
@@ -0,0 +1,4 @@
+SOURCES += main.cpp
+
+TRANSLATIONS = project.ts
+CODECFORTR = latin2
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.before
new file mode 100644
index 0000000..e18e34e
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.before
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<defaultcodec>ISO-8859-2</defaultcodec>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="main.cpp" line="44"/>
+ <source>hi</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.result
new file mode 100644
index 0000000..e18e34e
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.result
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<defaultcodec>ISO-8859-2</defaultcodec>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="main.cpp" line="44"/>
+ <source>hi</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/from_subdir/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/from_subdir/lupdatecmd
new file mode 100644
index 0000000..8a5b4ad
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/from_subdir/lupdatecmd
@@ -0,0 +1 @@
+lupdate translations/translations.pro
diff --git a/tests/auto/linguist/lupdate/testdata/good/from_subdir/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/from_subdir/project.ts.result
new file mode 100644
index 0000000..7167cf3
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/from_subdir/project.ts.result
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<context>
+ <name>QApplication</name>
+ <message>
+ <location filename="src/main.cpp" line="49"/>
+ <source>string in main.cpp</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="src/main.h" line="45"/>
+ <source>string in main.h</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/from_subdir/src/main.cpp b/tests/auto/linguist/lupdate/testdata/good/from_subdir/src/main.cpp
new file mode 100644
index 0000000..1a24ab2
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/from_subdir/src/main.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// IMPORTANT!!!! If you want to add testdata to this file,
+// always add it to the end in order to not change the linenumbers of translations!!!
+
+#include "main.h"
+
+int main(char **argv, int argc)
+{
+ return QApplication::tr("string in main.cpp");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/from_subdir/src/main.h b/tests/auto/linguist/lupdate/testdata/good/from_subdir/src/main.h
new file mode 100644
index 0000000..cc07d7c
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/from_subdir/src/main.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// IMPORTANT!!!! If you want to add testdata to this file,
+// always add it to the end in order to not change the linenumbers of translations!!!
+
+QT_TRANSLATE_NOOP("QApplication", "string in main.h")
diff --git a/tests/auto/linguist/lupdate/testdata/good/from_subdir/translations/translations.pro b/tests/auto/linguist/lupdate/testdata/good/from_subdir/translations/translations.pro
new file mode 100644
index 0000000..1815c37
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/from_subdir/translations/translations.pro
@@ -0,0 +1,7 @@
+VPATH = ../src
+INCLUDEPATH = ../src
+
+SOURCES += main.cpp
+HEADERS += main.h
+
+TRANSLATIONS += ../project.ts
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/recurse_full/expectedoutput.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_full/expectedoutput.txt
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/recurse_full/lupdatecmd
new file mode 100644
index 0000000..40987e2
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_full/lupdatecmd
@@ -0,0 +1,2 @@
+TRANSLATION: project.ts project_sub.ts
+cd ../../subdirs_full
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/recurse_full/project.ts.result
new file mode 100644
index 0000000..7d9a6f4
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_full/project.ts.result
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<context>
+ <name>subdir1</name>
+ <message>
+ <location filename="subdir1/main.cpp" line="45"/>
+ <source>minimal test</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>subsub1</name>
+ <message>
+ <location filename="subdir2/subsub1/main.cpp" line="45"/>
+ <source>minimal test</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full/project_sub.ts.result b/tests/auto/linguist/lupdate/testdata/good/recurse_full/project_sub.ts.result
new file mode 100644
index 0000000..cddb963
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_full/project_sub.ts.result
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<defaultcodec>ISO-8859-2</defaultcodec>
+<context>
+ <name>subsub2</name>
+ <message>
+ <location filename="subdir2/subsub2/main.cpp" line="45"/>
+ <source>minimal test</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/expectedoutput.txt
new file mode 100644
index 0000000..fd7a158
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/expectedoutput.txt
@@ -0,0 +1,2 @@
+lupdate warning: TS files from command line will override TRANSLATIONS in project\.pro\.
+lupdate warning: TS files from command line prevent recursing into .*/subdir2/subsub2/subsub2\.pro\.
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/lupdatecmd
new file mode 100644
index 0000000..33296c3
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/lupdatecmd
@@ -0,0 +1,3 @@
+TRANSLATION: project.ts project_sub.ts
+cd ../../subdirs_full
+lupdate project.pro -ts project.ts
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project.ts.result
new file mode 100644
index 0000000..7d9a6f4
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project.ts.result
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<context>
+ <name>subdir1</name>
+ <message>
+ <location filename="subdir1/main.cpp" line="45"/>
+ <source>minimal test</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>subsub1</name>
+ <message>
+ <location filename="subdir2/subsub1/main.cpp" line="45"/>
+ <source>minimal test</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project_sub.ts.before b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project_sub.ts.before
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project_sub.ts.before
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project_sub.ts.result b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project_sub.ts.result
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts/project_sub.ts.result
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/expectedoutput.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/expectedoutput.txt
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/lupdatecmd
new file mode 100644
index 0000000..628acc0
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/lupdatecmd
@@ -0,0 +1,2 @@
+cd ../../subdirs_full
+lupdate subdir1/subdir1.pro subdir2/subsub1/subsub1.pro -ts project.ts
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/project.ts.result
new file mode 100644
index 0000000..7d9a6f4
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_full_ts_join/project.ts.result
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<context>
+ <name>subdir1</name>
+ <message>
+ <location filename="subdir1/main.cpp" line="45"/>
+ <source>minimal test</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>subsub1</name>
+ <message>
+ <location filename="subdir2/subsub1/main.cpp" line="45"/>
+ <source>minimal test</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_part/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/recurse_part/expectedoutput.txt
new file mode 100644
index 0000000..808db18
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_part/expectedoutput.txt
@@ -0,0 +1 @@
+lupdate warning: no TS files specified\. Only diagnostics will be produced for 'project\.pro'\.
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_part/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/recurse_part/lupdatecmd
new file mode 100644
index 0000000..3e15bc7
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_part/lupdatecmd
@@ -0,0 +1,2 @@
+TRANSLATION: project.ts project_sub.ts
+cd ../../subdirs_part
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_part/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/recurse_part/project.ts.before
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_part/project.ts.before
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_part/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/recurse_part/project.ts.result
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_part/project.ts.result
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_part/project_sub.ts.result b/tests/auto/linguist/lupdate/testdata/good/recurse_part/project_sub.ts.result
new file mode 100644
index 0000000..cddb963
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_part/project_sub.ts.result
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<defaultcodec>ISO-8859-2</defaultcodec>
+<context>
+ <name>subsub2</name>
+ <message>
+ <location filename="subdir2/subsub2/main.cpp" line="45"/>
+ <source>minimal test</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/expectedoutput.txt
new file mode 100644
index 0000000..b904390
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/expectedoutput.txt
@@ -0,0 +1 @@
+lupdate warning: TS files from command line prevent recursing into .*/subdir2/subsub2/subsub2\.pro\.
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/lupdatecmd
new file mode 100644
index 0000000..41bfcec
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/lupdatecmd
@@ -0,0 +1,3 @@
+TRANSLATION: project.ts project_sub.ts
+cd ../../subdirs_part
+lupdate project.pro -ts project.ts
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project.ts.result
new file mode 100644
index 0000000..7d9a6f4
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project.ts.result
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<context>
+ <name>subdir1</name>
+ <message>
+ <location filename="subdir1/main.cpp" line="45"/>
+ <source>minimal test</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>subsub1</name>
+ <message>
+ <location filename="subdir2/subsub1/main.cpp" line="45"/>
+ <source>minimal test</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project_sub.ts.before b/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project_sub.ts.before
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project_sub.ts.before
diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project_sub.ts.result b/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project_sub.ts.result
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/recurse_part_ts/project_sub.ts.result
diff --git a/tests/auto/linguist/lupdate/testdata/good/reloutput/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/reloutput/lupdatecmd
index da6103f..90f609b 100644
--- a/tests/auto/linguist/lupdate/testdata/good/reloutput/lupdatecmd
+++ b/tests/auto/linguist/lupdate/testdata/good/reloutput/lupdatecmd
@@ -1,2 +1 @@
TRANSLATION: translations/project.ts
-lupdate project.pro -ts translations/project.ts
diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_full/project.pro b/tests/auto/linguist/lupdate/testdata/subdirs_full/project.pro
new file mode 100644
index 0000000..1f744a7
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/subdirs_full/project.pro
@@ -0,0 +1,4 @@
+TEMPLATE = subdirs
+SUBDIRS = subdir1 subdir2/subdir2.pro
+
+TRANSLATIONS = project.ts
diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir1/main.cpp b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir1/main.cpp
new file mode 100644
index 0000000..0f1dc70
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir1/main.cpp
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+QString foo()
+{
+ QCoreApplication::translate("subdir1","minimal test");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir1/subdir1.pro b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir1/subdir1.pro
new file mode 100644
index 0000000..28dcadc
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir1/subdir1.pro
@@ -0,0 +1 @@
+SOURCES += main.cpp
diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subdir2.pro b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subdir2.pro
new file mode 100644
index 0000000..f8d03df
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subdir2.pro
@@ -0,0 +1,2 @@
+TEMPLATE = subdirs
+SUBDIRS = subsub1 subsub2
diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub1/main.cpp b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub1/main.cpp
new file mode 100644
index 0000000..8c82c80
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub1/main.cpp
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+QString foo()
+{
+ QCoreApplication::translate("subsub1","minimal test");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub1/subsub1.pro b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub1/subsub1.pro
new file mode 100644
index 0000000..28dcadc
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub1/subsub1.pro
@@ -0,0 +1 @@
+SOURCES += main.cpp
diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub2/main.cpp b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub2/main.cpp
new file mode 100644
index 0000000..ff85936
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub2/main.cpp
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+QString foo()
+{
+ QCoreApplication::translate("subsub2","minimal test");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub2/subsub2.pro b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub2/subsub2.pro
new file mode 100644
index 0000000..3499222
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub2/subsub2.pro
@@ -0,0 +1,4 @@
+SOURCES += main.cpp
+
+TRANSLATIONS = ../../project_sub.ts
+CODECFORTR = ISO-8859-2
diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_part/project.pro b/tests/auto/linguist/lupdate/testdata/subdirs_part/project.pro
new file mode 100644
index 0000000..d803c37
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/subdirs_part/project.pro
@@ -0,0 +1,2 @@
+TEMPLATE = subdirs
+SUBDIRS = subdir1 subdir2/subdir2.pro
diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir1/main.cpp b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir1/main.cpp
new file mode 100644
index 0000000..0f1dc70
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir1/main.cpp
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+QString foo()
+{
+ QCoreApplication::translate("subdir1","minimal test");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir1/subdir1.pro b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir1/subdir1.pro
new file mode 100644
index 0000000..28dcadc
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir1/subdir1.pro
@@ -0,0 +1 @@
+SOURCES += main.cpp
diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subdir2.pro b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subdir2.pro
new file mode 100644
index 0000000..f8d03df
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subdir2.pro
@@ -0,0 +1,2 @@
+TEMPLATE = subdirs
+SUBDIRS = subsub1 subsub2
diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub1/main.cpp b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub1/main.cpp
new file mode 100644
index 0000000..8c82c80
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub1/main.cpp
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+QString foo()
+{
+ QCoreApplication::translate("subsub1","minimal test");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub1/subsub1.pro b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub1/subsub1.pro
new file mode 100644
index 0000000..28dcadc
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub1/subsub1.pro
@@ -0,0 +1 @@
+SOURCES += main.cpp
diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub2/main.cpp b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub2/main.cpp
new file mode 100644
index 0000000..ff85936
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub2/main.cpp
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+QString foo()
+{
+ QCoreApplication::translate("subsub2","minimal test");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub2/subsub2.pro b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub2/subsub2.pro
new file mode 100644
index 0000000..3499222
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub2/subsub2.pro
@@ -0,0 +1,4 @@
+SOURCES += main.cpp
+
+TRANSLATIONS = ../../project_sub.ts
+CODECFORTR = ISO-8859-2
diff --git a/tests/auto/linguist/lupdate/tst_lupdate.cpp b/tests/auto/linguist/lupdate/tst_lupdate.cpp
index 568be37..c179462 100644
--- a/tests/auto/linguist/lupdate/tst_lupdate.cpp
+++ b/tests/auto/linguist/lupdate/tst_lupdate.cpp
@@ -59,8 +59,6 @@ public:
private slots:
void good_data();
void good();
- void commandline_data();
- void commandline();
#if CHECK_SIMTEXTH
void simtexth();
void simtexth_data();
@@ -245,10 +243,10 @@ void tst_lupdate::good()
qDebug() << "Checking...";
- QString generatedtsfile(dir + QLatin1String("/project.ts"));
-
- // look for a command
+ QString workDir = dir;
+ QStringList generatedtsfiles(QLatin1String("project.ts"));
QString lupdatecmd;
+
QFile file(dir + "/lupdatecmd");
if (file.exists()) {
QVERIFY2(file.open(QIODevice::ReadOnly | QIODevice::Text), qPrintable(file.fileName()));
@@ -262,23 +260,32 @@ void tst_lupdate::good()
break;
} else if (cmdstring.startsWith("TRANSLATION:")) {
cmdstring.remove(0, 12);
- generatedtsfile = dir + QLatin1Char('/') + cmdstring.trimmed();
+ generatedtsfiles.clear();
+ foreach (const QByteArray &s, cmdstring.split(' '))
+ if (!s.isEmpty())
+ generatedtsfiles << s;
+ } else if (cmdstring.startsWith("cd ")) {
+ cmdstring.remove(0, 3);
+ workDir = QDir::cleanPath(dir + QLatin1Char('/') + cmdstring);
}
}
file.close();
}
- QFile::remove(generatedtsfile);
- QString beforetsfile = generatedtsfile + QLatin1String(".before");
- if (QFile::exists(beforetsfile))
- QVERIFY2(QFile::copy(beforetsfile, generatedtsfile), qPrintable(beforetsfile));
+ foreach (const QString &ts, generatedtsfiles) {
+ QString genTs = workDir + QLatin1Char('/') + ts;
+ QFile::remove(genTs);
+ QString beforetsfile = dir + QLatin1Char('/') + ts + QLatin1String(".before");
+ if (QFile::exists(beforetsfile))
+ QVERIFY2(QFile::copy(beforetsfile, genTs), qPrintable(beforetsfile));
+ }
if (lupdatecmd.isEmpty())
lupdatecmd = QLatin1String("project.pro");
lupdatecmd.prepend("-silent ");
QProcess proc;
- proc.setWorkingDirectory(dir);
+ proc.setWorkingDirectory(workDir);
proc.setProcessChannelMode(QProcess::MergedChannels);
proc.start(m_cmdLupdate + ' ' + lupdatecmd, QIODevice::ReadWrite | QIODevice::Text);
QVERIFY2(proc.waitForFinished(5000), qPrintable(lupdatecmd));
@@ -287,7 +294,7 @@ void tst_lupdate::good()
"\"lupdate " + lupdatecmd.toLatin1() + "\" crashed\n" + output);
QVERIFY2(!proc.exitCode(),
"\"lupdate " + lupdatecmd.toLatin1() + "\" exited with code " +
- QByteArray::number(proc.exitCode()) + "\n" + proc.readAll());
+ QByteArray::number(proc.exitCode()) + "\n" + output);
// If the file expectedoutput.txt exists, compare the
// console output with the content of that file
@@ -299,47 +306,9 @@ void tst_lupdate::good()
return;
}
- QString expectedFile = generatedtsfile + QLatin1String(".result");
- doCompare(generatedtsfile, expectedFile, false);
-}
-
-void tst_lupdate::commandline_data()
-{
- QTest::addColumn<QString>("currentPath");
- QTest::addColumn<QString>("commandline");
- QTest::addColumn<QString>("generatedtsfile");
- QTest::addColumn<QString>("expectedtsfile");
-
- QTest::newRow("Recursive scan") << QString("recursivescan")
- << QString(". -ts foo.ts") << QString("foo.ts") << QString("foo.ts.result");
- QTest::newRow("Deep path argument") << QString("recursivescan")
- << QString("sub/finddialog.cpp -ts bar.ts") << QString("bar.ts") << QString("bar.ts.result");
-}
-
-void tst_lupdate::commandline()
-{
- QFETCH(QString, currentPath);
- QFETCH(QString, commandline);
- QFETCH(QString, generatedtsfile);
- QFETCH(QString, expectedtsfile);
-
- QString generated =
- m_basePath + currentPath + QLatin1Char('/') + generatedtsfile;
- QFile gen(generated);
- if (gen.exists())
- QVERIFY(gen.remove());
- QProcess proc;
- proc.setWorkingDirectory(m_basePath + currentPath);
- proc.setProcessChannelMode(QProcess::MergedChannels);
- proc.start(m_cmdLupdate + " -silent " + commandline, QIODevice::ReadWrite | QIODevice::Text);
- QVERIFY2(proc.waitForFinished(5000), qPrintable(commandline));
- QVERIFY2(proc.exitStatus() == QProcess::NormalExit,
- "\"lupdate -silent " + commandline.toLatin1() + "\" crashed\n" + proc.readAll());
- QVERIFY2(!proc.exitCode(),
- "\"lupdate -silent " + commandline.toLatin1() + "\" exited with code " +
- QByteArray::number(proc.exitCode()) + "\n" + proc.readAll());
-
- doCompare(generated, m_basePath + currentPath + QLatin1Char('/') + expectedtsfile, false);
+ foreach (const QString &ts, generatedtsfiles)
+ doCompare(workDir + QLatin1Char('/') + ts,
+ dir + QLatin1Char('/') + ts + QLatin1String(".result"), false);
}
#if CHECK_SIMTEXTH
diff --git a/tests/auto/maketestselftest/tst_maketestselftest.cpp b/tests/auto/maketestselftest/tst_maketestselftest.cpp
index c674202..ef92c56 100644
--- a/tests/auto/maketestselftest/tst_maketestselftest.cpp
+++ b/tests/auto/maketestselftest/tst_maketestselftest.cpp
@@ -92,6 +92,9 @@ void tst_MakeTestSelfTest::auto_dot_pro_data()
QStringList subdirs = dir.entryList(QDir::AllDirs|QDir::NoDotAndDotDot);
foreach (const QString& subdir, subdirs) {
+ if (subdir == QString::fromLatin1("tmp")) {
+ continue;
+ }
QTest::newRow(qPrintable(subdir)) << subdir;
}
}
diff --git a/tests/auto/qbytearray/tst_qbytearray.cpp b/tests/auto/qbytearray/tst_qbytearray.cpp
index 35e4463..5c72c7a 100644
--- a/tests/auto/qbytearray/tst_qbytearray.cpp
+++ b/tests/auto/qbytearray/tst_qbytearray.cpp
@@ -76,6 +76,7 @@ private slots:
void qCompress();
void qUncompress_data();
void qUncompress();
+ void qCompressionZeroTermination();
#endif
void constByteArray();
void leftJustified();
@@ -261,6 +262,14 @@ void tst_QByteArray::qUncompress()
}
QCOMPARE(res, out);
}
+
+void tst_QByteArray::qCompressionZeroTermination()
+{
+ QString s = "Hello, I'm a string.";
+ QByteArray ba = ::qUncompress(::qCompress(s.toLocal8Bit()));
+ QVERIFY((int) *(ba.data() + ba.size()) == 0);
+}
+
#endif
void tst_QByteArray::constByteArray()
diff --git a/tests/auto/qdatetime/tst_qdatetime.cpp b/tests/auto/qdatetime/tst_qdatetime.cpp
index 86a4c80..b9d1d7c 100644
--- a/tests/auto/qdatetime/tst_qdatetime.cpp
+++ b/tests/auto/qdatetime/tst_qdatetime.cpp
@@ -147,9 +147,16 @@ Q_DECLARE_METATYPE(QTime)
tst_QDateTime::tst_QDateTime()
{
+#ifdef Q_OS_SYMBIAN
+ // Symbian's timezone server cannot handle DST correctly for dates before year 1997
+ uint x1 = QDateTime(QDate(2000, 1, 1), QTime()).toTime_t();
+ uint x2 = QDateTime(QDate(2000, 6, 1), QTime()).toTime_t();
+ europeanTimeZone = (x1 == 946681200 && x2 == 959810400);
+#else
uint x1 = QDateTime(QDate(1990, 1, 1), QTime()).toTime_t();
uint x2 = QDateTime(QDate(1990, 6, 1), QTime()).toTime_t();
europeanTimeZone = (x1 == 631148400 && x2 == 644191200);
+#endif
}
tst_QDateTime::~tst_QDateTime()
diff --git a/tests/auto/qdir/tst_qdir.cpp b/tests/auto/qdir/tst_qdir.cpp
index c7f9b6b..ba18bbb 100644
--- a/tests/auto/qdir/tst_qdir.cpp
+++ b/tests/auto/qdir/tst_qdir.cpp
@@ -49,6 +49,7 @@
#include <qregexp.h>
#include <qstringlist.h>
#include "../network-settings.h"
+#include "../../shared/filesystem.h"
#if defined(Q_OS_SYMBIAN)
# define STRINGIFY(x) #x
@@ -164,6 +165,8 @@ private slots:
void longFileName_data();
void longFileName();
+
+ void updateFileLists();
};
// Testing get/set functions
@@ -982,6 +985,13 @@ tst_QDir::cleanPath_data()
QTest::newRow("data7") << ".//file1.txt" << "file1.txt";
QTest::newRow("data8") << "/foo/bar/..//file1.txt" << "/foo/file1.txt";
QTest::newRow("data9") << "//" << "/";
+#if !defined(Q_OS_WINCE)
+#if defined Q_OS_WIN
+ QTest::newRow("data10") << "c:\\" << "c:/";
+#else
+ QTest::newRow("data10") << "/:/" << "/:";
+#endif
+#endif
}
@@ -1435,6 +1445,95 @@ void tst_QDir::longFileName()
QFile::remove(fileName);
}
+void tst_QDir::updateFileLists()
+{
+ // Test setup
+
+ FileSystem fs;
+
+ QVERIFY( fs.createDirectory("update-file-lists") );
+ QVERIFY( fs.createFile("update-file-lists/file1.txt") );
+ QVERIFY( fs.createFile("update-file-lists/file2.doc") );
+
+ QVERIFY( fs.createDirectory("update-file-lists/sub-dir1") );
+ QVERIFY( fs.createFile("update-file-lists/sub-dir1/file3.txt") );
+ QVERIFY( fs.createFile("update-file-lists/sub-dir1/file4.doc") );
+ QVERIFY( fs.createFile("update-file-lists/sub-dir1/file5.txt") );
+
+ QVERIFY( fs.createDirectory("update-file-lists/sub-dir2") );
+ QVERIFY( fs.createFile("update-file-lists/sub-dir2/file6.txt") );
+ QVERIFY( fs.createFile("update-file-lists/sub-dir2/file7.txt") );
+ QVERIFY( fs.createFile("update-file-lists/sub-dir2/file8.doc") );
+ QVERIFY( fs.createFile("update-file-lists/sub-dir2/file9.doc") );
+
+ // Actual test
+
+ QDir dir("update-file-lists");
+
+ QCOMPARE(dir.count(), uint(6));
+ QCOMPARE(dir.entryList().size(), 6);
+ QCOMPARE(dir.entryInfoList().size(), 6);
+
+ dir.setFilter(QDir::AllEntries | QDir::NoDotAndDotDot);
+
+ QCOMPARE(dir.entryList().size(), 4);
+ QCOMPARE(dir.count(), uint(4));
+ QCOMPARE(dir.entryInfoList().size(), 4);
+
+ dir.setPath("update-file-lists/sub-dir1");
+
+ QCOMPARE(dir.entryInfoList().size(), 3);
+ QCOMPARE(dir.count(), uint(3));
+ QCOMPARE(dir.entryList().size(), 3);
+
+ dir.setNameFilters(QStringList("*.txt"));
+
+ QCOMPARE(dir.entryInfoList().size(), 2);
+ QCOMPARE(dir.entryList().size(), 2);
+ QCOMPARE(dir.count(), uint(2));
+
+ dir.setPath("update-file-lists");
+ dir = QDir(dir.path(),
+ "*.txt",
+ QDir::Name | QDir::DirsLast,
+ QDir::AllEntries | QDir::AllDirs | QDir::NoDotAndDotDot);
+
+ QCOMPARE(dir.count(), uint(3));
+ QCOMPARE(dir.entryList().size(), 3);
+ QCOMPARE(dir.entryInfoList().size(), 3);
+ QCOMPARE(dir.entryList(), QStringList() << "file1.txt" << "sub-dir1" << "sub-dir2");
+
+ dir.setSorting(QDir::Name | QDir::DirsFirst);
+
+ QCOMPARE(dir.count(), uint(3));
+ QCOMPARE(dir.entryList().size(), 3);
+ QCOMPARE(dir.entryInfoList().size(), 3);
+ QCOMPARE(dir.entryList(), QStringList() << "sub-dir1" << "sub-dir2" << "file1.txt");
+
+ {
+ QVERIFY( fs.createFile("update-file-lists/extra-file.txt") );
+
+ QDir dir2(dir);
+
+ QCOMPARE(dir2.count(), uint(3));
+ QCOMPARE(dir2.entryList().size(), 3);
+ QCOMPARE(dir2.entryInfoList().size(), 3);
+ QCOMPARE(dir2.entryList(), QStringList() << "sub-dir1" << "sub-dir2" << "file1.txt");
+
+ dir2.refresh();
+
+ QCOMPARE(dir2.count(), uint(4));
+ QCOMPARE(dir2.entryList().size(), 4);
+ QCOMPARE(dir2.entryInfoList().size(), 4);
+ QCOMPARE(dir2.entryList(), QStringList() << "sub-dir1" << "sub-dir2" << "extra-file.txt" << "file1.txt");
+ }
+
+ QCOMPARE(dir.count(), uint(3));
+ QCOMPARE(dir.entryList().size(), 3);
+ QCOMPARE(dir.entryInfoList().size(), 3);
+ QCOMPARE(dir.entryList(), QStringList() << "sub-dir1" << "sub-dir2" << "file1.txt");
+}
+
QTEST_MAIN(tst_QDir)
#include "tst_qdir.moc"
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp
index d0d69ae..972a0ae 100644
--- a/tests/auto/qgl/tst_qgl.cpp
+++ b/tests/auto/qgl/tst_qgl.cpp
@@ -739,8 +739,6 @@ void tst_QGL::openGLVersionCheck()
#if defined(QT_OPENGL_ES_1)
QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Common_Version_1_0);
-#elif defined(QT_OPENGL_ES_1_CL)
- QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_CommonLite_Version_1_0);
#elif defined(QT_OPENGL_ES_2)
QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0);
#else
diff --git a/tests/auto/qglbuffer/qglbuffer.pro b/tests/auto/qglbuffer/qglbuffer.pro
new file mode 100644
index 0000000..07d05bb
--- /dev/null
+++ b/tests/auto/qglbuffer/qglbuffer.pro
@@ -0,0 +1,9 @@
+############################################################
+# Project file for autotest for file qglbuffer.h
+############################################################
+
+load(qttest_p4)
+requires(contains(QT_CONFIG,opengl))
+QT += opengl
+
+SOURCES += tst_qglbuffer.cpp
diff --git a/tests/auto/qglbuffer/tst_qglbuffer.cpp b/tests/auto/qglbuffer/tst_qglbuffer.cpp
new file mode 100644
index 0000000..b7d5821
--- /dev/null
+++ b/tests/auto/qglbuffer/tst_qglbuffer.cpp
@@ -0,0 +1,261 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtOpenGL module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QtOpenGL/qgl.h>
+#include <QtOpenGL/qglbuffer.h>
+
+class tst_QGLBuffer : public QObject
+{
+ Q_OBJECT
+public:
+ tst_QGLBuffer() {}
+ ~tst_QGLBuffer() {}
+
+private slots:
+ void vertexBuffer_data();
+ void vertexBuffer();
+ void indexBuffer_data();
+ void indexBuffer();
+ void bufferSharing();
+
+private:
+ void testBuffer(QGLBuffer::Type type);
+};
+
+void tst_QGLBuffer::vertexBuffer_data()
+{
+ QTest::addColumn<int>("usagePattern");
+
+ QTest::newRow("StreamDraw") << int(QGLBuffer::StreamDraw);
+ QTest::newRow("StaticDraw") << int(QGLBuffer::StaticDraw);
+ QTest::newRow("DynamicDraw") << int(QGLBuffer::DynamicDraw);
+}
+
+void tst_QGLBuffer::vertexBuffer()
+{
+ testBuffer(QGLBuffer::VertexBuffer);
+}
+
+void tst_QGLBuffer::indexBuffer_data()
+{
+ vertexBuffer_data();
+}
+
+void tst_QGLBuffer::indexBuffer()
+{
+ testBuffer(QGLBuffer::IndexBuffer);
+}
+
+void tst_QGLBuffer::testBuffer(QGLBuffer::Type type)
+{
+ QFETCH(int, usagePattern);
+
+ QGLWidget w;
+ w.makeCurrent();
+
+ // Create the local object, but not the buffer in the server.
+ QGLBuffer buffer(type);
+ QVERIFY(buffer.usagePattern() == QGLBuffer::StaticDraw);
+ buffer.setUsagePattern(QGLBuffer::UsagePattern(usagePattern));
+
+ // Check the initial state.
+ QVERIFY(buffer.type() == type);
+ QVERIFY(!buffer.isCreated());
+ QVERIFY(buffer.bufferId() == 0);
+ QVERIFY(buffer.usagePattern() == QGLBuffer::UsagePattern(usagePattern));
+ QCOMPARE(buffer.size(), -1);
+
+ // Should not be able to bind it yet because it isn't created.
+ QVERIFY(!buffer.bind());
+
+ // Create the buffer - if this fails, then assume that the
+ // GL implementation does not support buffers at all.
+ if (!buffer.create())
+ QSKIP("Buffers are not supported on this platform", SkipAll);
+
+ // Should now have a buffer id.
+ QVERIFY(buffer.bufferId() != 0);
+
+ // Bind the buffer and upload some data.
+ QVERIFY(buffer.bind());
+ static GLfloat const data[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
+ buffer.allocate(data, sizeof(data));
+
+ // Check the buffer size.
+ QCOMPARE(buffer.size(), int(sizeof(data)));
+
+ // Map the buffer and read back its contents.
+ bool haveMap = false;
+ GLfloat *mapped = reinterpret_cast<GLfloat *>
+ (buffer.map(QGLBuffer::ReadOnly));
+ if (mapped) {
+ for (int index = 0; index < 9; ++index)
+ QCOMPARE(mapped[index], data[index]);
+ buffer.unmap();
+ haveMap = true;
+ } else {
+ qWarning("QGLBuffer::map() is not supported on this platform");
+ }
+
+ // Read back the buffer contents using read().
+ bool haveRead = false;
+ GLfloat readdata[9];
+ if (buffer.read(0, readdata, sizeof(readdata))) {
+ for (int index = 0; index < 9; ++index)
+ QCOMPARE(readdata[index], data[index]);
+ haveRead = true;
+ } else {
+ qWarning("QGLBuffer::read() is not supported on this platform");
+ }
+
+ // Write some different data to a specific location and check it.
+ static GLfloat const diffdata[] = {11, 12, 13};
+ buffer.write(sizeof(GLfloat) * 3, diffdata, sizeof(diffdata));
+ if (haveMap) {
+ mapped = reinterpret_cast<GLfloat *>(buffer.map(QGLBuffer::ReadOnly));
+ QVERIFY(mapped != 0);
+ for (int index = 0; index < 9; ++index) {
+ if (index >= 3 && index <= 5)
+ QCOMPARE(mapped[index], diffdata[index - 3]);
+ else
+ QCOMPARE(mapped[index], data[index]);
+ }
+ buffer.unmap();
+ }
+ if (haveRead) {
+ QVERIFY(buffer.read(0, readdata, sizeof(readdata)));
+ for (int index = 0; index < 9; ++index) {
+ if (index >= 3 && index <= 5)
+ QCOMPARE(readdata[index], diffdata[index - 3]);
+ else
+ QCOMPARE(readdata[index], data[index]);
+ }
+ }
+
+ // Write to the buffer using the return value from map.
+ if (haveMap) {
+ mapped = reinterpret_cast<GLfloat *>(buffer.map(QGLBuffer::WriteOnly));
+ QVERIFY(mapped != 0);
+ mapped[6] = 14;
+ buffer.unmap();
+
+ mapped = reinterpret_cast<GLfloat *>(buffer.map(QGLBuffer::ReadOnly));
+ QVERIFY(mapped != 0);
+ static GLfloat const diff2data[] = {11, 12, 13, 14};
+ for (int index = 0; index < 9; ++index) {
+ if (index >= 3 && index <= 6)
+ QCOMPARE(mapped[index], diff2data[index - 3]);
+ else
+ QCOMPARE(mapped[index], data[index]);
+ }
+ buffer.unmap();
+ }
+
+ // Resize the buffer.
+ buffer.allocate(sizeof(GLfloat) * 20);
+ QCOMPARE(buffer.size(), int(sizeof(GLfloat) * 20));
+ buffer.allocate(0, sizeof(GLfloat) * 32);
+ QCOMPARE(buffer.size(), int(sizeof(GLfloat) * 32));
+
+ // Release the buffer.
+ buffer.release();
+}
+
+void tst_QGLBuffer::bufferSharing()
+{
+ QGLWidget *w1 = new QGLWidget();
+ w1->makeCurrent();
+
+ QGLWidget *w2 = new QGLWidget(0, w1);
+ if (!w2->isSharing()) {
+ delete w2;
+ delete w1;
+ QSKIP("Context sharing is not supported on this platform", SkipSingle);
+ }
+
+ // Bind the buffer in the first context and write some data to it.
+ QGLBuffer buffer(QGLBuffer::VertexBuffer);
+ if (!buffer.create())
+ QSKIP("Buffers are not supported on this platform", SkipSingle);
+ QVERIFY(buffer.isCreated());
+ QVERIFY(buffer.bind());
+ static GLfloat const data[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
+ buffer.allocate(data, sizeof(data));
+ QCOMPARE(buffer.size(), int(sizeof(data)));
+ buffer.release();
+
+ // Bind the buffer in the second context and read back the data.
+ w2->makeCurrent();
+ QVERIFY(buffer.bind());
+ QCOMPARE(buffer.size(), int(sizeof(data)));
+ GLfloat readdata[9];
+ if (buffer.read(0, readdata, sizeof(readdata))) {
+ for (int index = 0; index < 9; ++index)
+ QCOMPARE(readdata[index], data[index]);
+ }
+ buffer.release();
+
+ // Delete the first context.
+ delete w1;
+
+ // Make the second context current again because deleting the first
+ // one will call doneCurrent() even though it wasn't current!
+ w2->makeCurrent();
+
+ // The buffer should still be valid in the second context.
+ QVERIFY(buffer.bufferId() != 0);
+ QVERIFY(buffer.isCreated());
+ QVERIFY(buffer.bind());
+ QCOMPARE(buffer.size(), int(sizeof(data)));
+ buffer.release();
+
+ // Delete the second context.
+ delete w2;
+
+ // The buffer should now be invalid.
+ QVERIFY(buffer.bufferId() == 0);
+ QVERIFY(!buffer.isCreated());
+}
+
+QTEST_MAIN(tst_QGLBuffer)
+
+#include "tst_qglbuffer.moc"
diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
index 51e2a57..795431b 100644
--- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
+++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
@@ -71,6 +71,7 @@ private slots:
void colorize();
void drawPixmapItem();
void deviceCoordinateTranslateCaching();
+ void inheritOpacity();
};
void tst_QGraphicsEffect::initTestCase()
@@ -79,8 +80,8 @@ void tst_QGraphicsEffect::initTestCase()
class CustomItem : public QGraphicsRectItem
{
public:
- CustomItem(qreal x, qreal y, qreal width, qreal height)
- : QGraphicsRectItem(x, y, width, height), numRepaints(0),
+ CustomItem(qreal x, qreal y, qreal width, qreal height, QGraphicsItem *parent = 0)
+ : QGraphicsRectItem(x, y, width, height, parent), numRepaints(0),
m_painter(0), m_styleOption(0)
{}
@@ -560,6 +561,35 @@ void tst_QGraphicsEffect::deviceCoordinateTranslateCaching()
QVERIFY(item->numRepaints == numRepaints);
}
+void tst_QGraphicsEffect::inheritOpacity()
+{
+ QGraphicsScene scene;
+ QGraphicsRectItem *rectItem = new QGraphicsRectItem(0, 0, 10, 10);
+ CustomItem *item = new CustomItem(0, 0, 10, 10, rectItem);
+
+ scene.addItem(rectItem);
+
+ item->setGraphicsEffect(new DeviceEffect);
+ item->setPen(Qt::NoPen);
+ item->setBrush(Qt::red);
+
+ rectItem->setOpacity(0.5);
+
+ QGraphicsView view(&scene);
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+
+ QTRY_VERIFY(item->numRepaints >= 1);
+
+ int numRepaints = item->numRepaints;
+
+ rectItem->setOpacity(1);
+ QTest::qWait(50);
+
+ // item should have been rerendered due to opacity changing
+ QTRY_VERIFY(item->numRepaints > numRepaints);
+}
+
QTEST_MAIN(tst_QGraphicsEffect)
#include "tst_qgraphicseffect.moc"
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index 8e43bce..14b9ef0 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -316,6 +316,7 @@ private slots:
void childrenBoundingRectTransformed();
void childrenBoundingRect2();
void childrenBoundingRect3();
+ void childrenBoundingRect4();
void group();
void setGroup();
void setGroup2();
@@ -417,6 +418,7 @@ private slots:
void task197802_childrenVisibility();
void QTBUG_4233_updateCachedWithSceneRect();
void QTBUG_5418_textItemSetDefaultColor();
+ void QTBUG_6738_missingUpdateWithSetParent();
private:
QList<QGraphicsItem *> paintedItems;
@@ -3257,6 +3259,32 @@ void tst_QGraphicsItem::childrenBoundingRect3()
QCOMPARE(subTreeRect.height(), qreal(251.7766952966369));
}
+void tst_QGraphicsItem::childrenBoundingRect4()
+{
+ QGraphicsScene scene;
+
+ QGraphicsRectItem *rect = scene.addRect(QRectF(0, 0, 10, 10));
+ QGraphicsRectItem *rect2 = scene.addRect(QRectF(0, 0, 20, 20));
+ QGraphicsRectItem *rect3 = scene.addRect(QRectF(0, 0, 30, 30));
+ rect2->setParentItem(rect);
+ rect3->setParentItem(rect);
+
+ QGraphicsView view(&scene);
+ view.show();
+
+ QTest::qWaitForWindowShown(&view);
+
+ // Try to mess up the cached bounding rect.
+ rect->childrenBoundingRect();
+ rect2->childrenBoundingRect();
+
+ rect3->setOpacity(0.0);
+ rect3->setParentItem(rect2);
+
+ QCOMPARE(rect->childrenBoundingRect(), rect3->boundingRect());
+ QCOMPARE(rect2->childrenBoundingRect(), rect3->boundingRect());
+}
+
void tst_QGraphicsItem::group()
{
QGraphicsScene scene;
@@ -9869,5 +9897,63 @@ void tst_QGraphicsItem::QTBUG_5418_textItemSetDefaultColor()
QCOMPARE(i->painted, 0); //same color as before should not trigger an update (QTBUG-6242)
}
+void tst_QGraphicsItem::QTBUG_6738_missingUpdateWithSetParent()
+{
+ // In all 3 test cases below the reparented item should disappear
+ EventTester *parent = new EventTester;
+ EventTester *child = new EventTester(parent);
+ EventTester *child2 = new EventTester(parent);
+ EventTester *child3 = new EventTester(parent);
+ EventTester *child4 = new EventTester(parent);
+
+ child->setPos(10, 10);
+ child2->setPos(20, 20);
+ child3->setPos(30, 30);
+ child4->setPos(40, 40);
+
+ QGraphicsScene scene;
+ scene.addItem(parent);
+
+ class MyGraphicsView : public QGraphicsView
+ { public:
+ int repaints;
+ QRegion paintedRegion;
+ MyGraphicsView(QGraphicsScene *scene) : QGraphicsView(scene), repaints(0) {}
+ void paintEvent(QPaintEvent *e)
+ {
+ ++repaints;
+ paintedRegion += e->region();
+ QGraphicsView::paintEvent(e);
+ }
+ void reset() { repaints = 0; paintedRegion = QRegion(); }
+ };
+
+ MyGraphicsView view(&scene);
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+ QTRY_VERIFY(view.repaints > 0);
+
+ // test case #1
+ view.reset();
+ child2->setVisible(false);
+ child2->setParentItem(child);
+
+ QTRY_VERIFY(view.repaints == 1);
+
+ // test case #2
+ view.reset();
+ child3->setOpacity(0.0);
+ child3->setParentItem(child);
+
+ QTRY_VERIFY(view.repaints == 1);
+
+ // test case #3
+ view.reset();
+ child4->setParentItem(child);
+ child4->setVisible(false);
+
+ QTRY_VERIFY(view.repaints == 1);
+}
+
QTEST_MAIN(tst_QGraphicsItem)
#include "tst_qgraphicsitem.moc"
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
index c08a628e..6743fbe 100644
--- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -270,6 +270,7 @@ private slots:
void initialFocus_data();
void initialFocus();
void polishItems();
+ void polishItems2();
void isActive();
void siblingIndexAlwaysValid();
@@ -3942,14 +3943,23 @@ void tst_QGraphicsScene::initialFocus()
class PolishItem : public QGraphicsTextItem
{
public:
- PolishItem(QGraphicsItem *parent = 0) : QGraphicsTextItem(parent) { }
+ PolishItem(QGraphicsItem *parent = 0)
+ : QGraphicsTextItem(parent), polished(false), deleteChildrenInPolish(true), addChildrenInPolish(false) { }
+ bool polished;
+ bool deleteChildrenInPolish;
+ bool addChildrenInPolish;
protected:
QVariant itemChange(GraphicsItemChange change, const QVariant& value)
{
if (change == ItemVisibleChange) {
- if (value.toBool())
+ polished = true;
+ if (deleteChildrenInPolish)
qDeleteAll(childItems());
+ if (addChildrenInPolish) {
+ for (int i = 0; i < 10; ++i)
+ new PolishItem(this);
+ }
}
return QGraphicsItem::itemChange(change, value);
}
@@ -3966,6 +3976,35 @@ void tst_QGraphicsScene::polishItems()
QMetaObject::invokeMethod(&scene,"_q_polishItems");
}
+void tst_QGraphicsScene::polishItems2()
+{
+ QGraphicsScene scene;
+ PolishItem *item = new PolishItem;
+ item->addChildrenInPolish = true;
+ item->deleteChildrenInPolish = true;
+ // These children should be deleted in the polish.
+ for (int i = 0; i < 20; ++i)
+ new PolishItem(item);
+ scene.addItem(item);
+
+ // Wait for the polish event to be delivered.
+ QVERIFY(!item->polished);
+ QApplication::sendPostedEvents(&scene, QEvent::MetaCall);
+ QVERIFY(item->polished);
+
+ // We deleted the children we added above, but we also
+ // added 10 new children. These should be polished in the next
+ // event loop iteration.
+ QList<QGraphicsItem *> children = item->childItems();
+ QCOMPARE(children.count(), 10);
+ foreach (QGraphicsItem *child, children)
+ QVERIFY(!static_cast<PolishItem *>(child)->polished);
+
+ QApplication::sendPostedEvents(&scene, QEvent::MetaCall);
+ foreach (QGraphicsItem *child, children)
+ QVERIFY(static_cast<PolishItem *>(child)->polished);
+}
+
void tst_QGraphicsScene::isActive()
{
QGraphicsScene scene1;
diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
index ac68224..79ce68e 100644
--- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
+++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
@@ -164,6 +164,7 @@ private slots:
void polishEvent();
void polishEvent2();
void autoFillBackground();
+ void initialShow();
// Task fixes
void task236127_bspTreeIndexFails();
@@ -2883,6 +2884,30 @@ void tst_QGraphicsWidget::autoFillBackground()
QCOMPARE(image.pixel(0, 0), color.rgb());
}
+void tst_QGraphicsWidget::initialShow()
+{
+ class MyGraphicsWidget : public QGraphicsWidget
+ { public:
+ MyGraphicsWidget() : repaints(0) {}
+ int repaints;
+ void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget*) { ++repaints; }
+ void polishEvent() { update(); }
+ };
+
+ QGraphicsScene scene;
+ MyGraphicsWidget *widget = new MyGraphicsWidget;
+
+ QGraphicsView view(&scene);
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+
+ QTest::qWait(100);
+ scene.addItem(widget);
+ QTest::qWait(100);
+
+ QCOMPARE(widget->repaints, 1);
+}
+
void tst_QGraphicsWidget::QT_BUG_6544_tabFocusFirstUnsetWhenRemovingItems()
{
QGraphicsScene scene;
diff --git a/tests/auto/qheaderview/tst_qheaderview.cpp b/tests/auto/qheaderview/tst_qheaderview.cpp
index 857e7e3..4642830 100644
--- a/tests/auto/qheaderview/tst_qheaderview.cpp
+++ b/tests/auto/qheaderview/tst_qheaderview.cpp
@@ -44,6 +44,7 @@
#include <QStandardItemModel>
#include <QStringListModel>
#include <QSortFilterProxyModel>
+#include <QTableView>
#include <qabstractitemmodel.h>
#include <qapplication.h>
@@ -190,6 +191,7 @@ private slots:
void task236450_hidden();
void task248050_hideRow();
void QTBUG6058_reset();
+ void QTBUG7833_sectionClicked();
protected:
QHeaderView *view;
@@ -1992,6 +1994,68 @@ void tst_QHeaderView::QTBUG6058_reset()
QCOMPARE(checkHeaderViewOrder(&view, QVector<int>() << 2 << 0 << 1 << 3 << 4 << 5 ) , 0);
}
+void tst_QHeaderView::QTBUG7833_sectionClicked()
+{
+
+
+
+
+ QTableView tv;
+ QStandardItemModel *sim = new QStandardItemModel(&tv);
+ QSortFilterProxyModel *proxyModel = new QSortFilterProxyModel(&tv);
+ proxyModel->setSourceModel(sim);
+ proxyModel->setDynamicSortFilter(true);
+ proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
+
+ QList<QStandardItem *> row;
+ for (int i = 0; i < 12; i++)
+ row.append(new QStandardItem(QString(QLatin1Char('A' + i))));
+ sim->appendRow(row);
+ row.clear();
+ for (int i = 12; i > 0; i--)
+ row.append(new QStandardItem(QString(QLatin1Char('A' + i))));
+ sim->appendRow(row);
+
+ tv.setSortingEnabled(true);
+ tv.horizontalHeader()->setSortIndicatorShown(true);
+ tv.horizontalHeader()->setClickable(true);
+ tv.horizontalHeader()->setStretchLastSection(true);
+ tv.horizontalHeader()->setResizeMode(QHeaderView::Interactive);
+
+ tv.setModel(proxyModel);
+ tv.setColumnHidden(5, true);
+ tv.setColumnHidden(6, true);
+ tv.horizontalHeader()->swapSections(8, 10);
+ tv.sortByColumn(1, Qt::AscendingOrder);
+
+ QSignalSpy clickedSpy(tv.horizontalHeader(), SIGNAL(sectionClicked(int)));
+ QSignalSpy pressedSpy(tv.horizontalHeader(), SIGNAL(sectionPressed(int)));
+
+
+ QTest::mouseClick(tv.horizontalHeader()->viewport(), Qt::LeftButton, Qt::NoModifier,
+ QPoint(tv.horizontalHeader()->sectionViewportPosition(11) + 5, 5));
+ QCOMPARE(clickedSpy.count(), 1);
+ QCOMPARE(pressedSpy.count(), 1);
+ QCOMPARE(clickedSpy.at(0).at(0).toInt(), 11);
+ QCOMPARE(pressedSpy.at(0).at(0).toInt(), 11);
+
+ QTest::mouseClick(tv.horizontalHeader()->viewport(), Qt::LeftButton, Qt::NoModifier,
+ QPoint(tv.horizontalHeader()->sectionViewportPosition(8) + 5, 5));
+
+ QCOMPARE(clickedSpy.count(), 2);
+ QCOMPARE(pressedSpy.count(), 2);
+ QCOMPARE(clickedSpy.at(1).at(0).toInt(), 8);
+ QCOMPARE(pressedSpy.at(1).at(0).toInt(), 8);
+
+ QTest::mouseClick(tv.horizontalHeader()->viewport(), Qt::LeftButton, Qt::NoModifier,
+ QPoint(tv.horizontalHeader()->sectionViewportPosition(0) + 5, 5));
+
+ QCOMPARE(clickedSpy.count(), 3);
+ QCOMPARE(pressedSpy.count(), 3);
+ QCOMPARE(clickedSpy.at(2).at(0).toInt(), 0);
+ QCOMPARE(pressedSpy.at(2).at(0).toInt(), 0);
+}
+
QTEST_MAIN(tst_QHeaderView)
#include "tst_qheaderview.moc"
diff --git a/tests/auto/qimagereader/baseline/35floppy.ico b/tests/auto/qimagereader/baseline/35floppy.ico
deleted file mode 100644
index 59fd37e..0000000
--- a/tests/auto/qimagereader/baseline/35floppy.ico
+++ /dev/null
Binary files differ
diff --git a/tests/auto/qimagereader/baseline/35floppy.png b/tests/auto/qimagereader/baseline/35floppy.png
new file mode 100644
index 0000000..56b9b44
--- /dev/null
+++ b/tests/auto/qimagereader/baseline/35floppy.png
Binary files differ
diff --git a/tests/auto/qimagereader/baseline/connect.png b/tests/auto/qimagereader/baseline/connect.png
new file mode 100644
index 0000000..9544bb9
--- /dev/null
+++ b/tests/auto/qimagereader/baseline/connect.png
Binary files differ
diff --git a/tests/auto/qimagereader/baseline/kde_favicon.ico b/tests/auto/qimagereader/baseline/kde_favicon.ico
deleted file mode 100644
index 15bcdbb..0000000
--- a/tests/auto/qimagereader/baseline/kde_favicon.ico
+++ /dev/null
Binary files differ
diff --git a/tests/auto/qimagereader/baseline/kde_favicon.png b/tests/auto/qimagereader/baseline/kde_favicon.png
new file mode 100644
index 0000000..e19287b
--- /dev/null
+++ b/tests/auto/qimagereader/baseline/kde_favicon.png
Binary files differ
diff --git a/tests/auto/qimagereader/baseline/semitransparent.ico b/tests/auto/qimagereader/baseline/semitransparent.ico
deleted file mode 100644
index dd23de9..0000000
--- a/tests/auto/qimagereader/baseline/semitransparent.ico
+++ /dev/null
Binary files differ
diff --git a/tests/auto/qimagereader/baseline/semitransparent.png b/tests/auto/qimagereader/baseline/semitransparent.png
new file mode 100644
index 0000000..a3ad780
--- /dev/null
+++ b/tests/auto/qimagereader/baseline/semitransparent.png
Binary files differ
diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp
index 72c5c8b..e7cfe68 100644
--- a/tests/auto/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/qimagereader/tst_qimagereader.cpp
@@ -1633,7 +1633,8 @@ void tst_QImageReader::pixelCompareWithBaseline_data()
QTest::newRow("floppy (16px,32px - 16 colors)") << "35floppy.ico";
QTest::newRow("semitransparent") << "semitransparent.ico";
- QTest::newRow("slightlybroken") << "kde_favicon.ico";
+ QTest::newRow("slightlybrokenBMPHeader") << "kde_favicon.ico";
+ QTest::newRow("sightlybrokenIconHeader") << "connect.ico";
}
void tst_QImageReader::pixelCompareWithBaseline()
@@ -1641,14 +1642,20 @@ void tst_QImageReader::pixelCompareWithBaseline()
QFETCH(QString, fileName);
QImage icoImg;
+ const QString inputFileName(QString::fromAscii("images/%1").arg(fileName));
+ QFileInfo fi(inputFileName);
+
// might fail if the plugin does not exist, which is ok.
- if (icoImg.load(QString::fromAscii("images/%1").arg(fileName))) {
- QString baselineFileName = QString::fromAscii("baseline/%1").arg(fileName);
+ if (icoImg.load(inputFileName)) {
+ icoImg = icoImg.convertToFormat(QImage::Format_ARGB32_Premultiplied);
+ const QString baselineFileName(QString::fromAscii("baseline/%1.png").arg(fi.baseName()));
#if 0
icoImg.save(baselineFileName);
#else
QImage baseImg;
QVERIFY(baseImg.load(baselineFileName));
+ baseImg = baseImg.convertToFormat(QImage::Format_ARGB32_Premultiplied);
+ QCOMPARE(int(baseImg.format()), int(icoImg.format()));
QCOMPARE(baseImg, icoImg);
#endif
}
diff --git a/tests/auto/qlabel/tst_qlabel.cpp b/tests/auto/qlabel/tst_qlabel.cpp
index c3af495..7099917 100644
--- a/tests/auto/qlabel/tst_qlabel.cpp
+++ b/tests/auto/qlabel/tst_qlabel.cpp
@@ -119,6 +119,7 @@ private slots:
void mnemonic_data();
void mnemonic();
+ void selection();
private:
QLabel *testWidget;
@@ -559,6 +560,27 @@ void tst_QLabel::mnemonic()
QCOMPARE(d->shortcutCursor.selectedText(), expectedShortcutCursor);
}
+void tst_QLabel::selection()
+{
+ QLabel label;
+ label.setText("Hello world");
+
+ label.setTextInteractionFlags(Qt::TextSelectableByMouse);
+
+ QVERIFY(!label.hasSelectedText());
+ QCOMPARE(label.selectedText(), QString());
+ QCOMPARE(label.selectionStart(), -1);
+
+ label.setSelection(0, 4);
+ QVERIFY(label.hasSelectedText());
+ QCOMPARE(label.selectedText(), QString::fromLatin1("Hell"));
+ QCOMPARE(label.selectionStart(), 0);
+
+ label.setSelection(6, 5);
+ QVERIFY(label.hasSelectedText());
+ QCOMPARE(label.selectedText(), QString::fromLatin1("world"));
+ QCOMPARE(label.selectionStart(), 6);
+}
QTEST_MAIN(tst_QLabel)
#include "tst_qlabel.moc"
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index d6bf900..49b1e52 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -146,9 +146,11 @@ private slots:
void fromWinHICON();
#endif
-#if defined(Q_WS_S60)
+#if defined(Q_OS_SYMBIAN)
void fromSymbianCFbsBitmap_data();
void fromSymbianCFbsBitmap();
+ void toSymbianCFbsBitmap_data();
+ void toSymbianCFbsBitmap();
#endif
void onlyNullPixmapsOutsideGuiThread();
@@ -1129,7 +1131,7 @@ void tst_QPixmap::fromWinHICON()
#endif // Q_WS_WIN
-#if defined(Q_WS_S60)
+#if defined(Q_OS_SYMBIAN)
Q_DECLARE_METATYPE(TDisplayMode)
void tst_QPixmap::fromSymbianCFbsBitmap_data()
@@ -1225,6 +1227,45 @@ void tst_QPixmap::fromSymbianCFbsBitmap()
CleanupStack::PopAndDestroy(3);
}
+
+void tst_QPixmap::toSymbianCFbsBitmap_data()
+{
+ QTest::addColumn<int>("red");
+ QTest::addColumn<int>("green");
+ QTest::addColumn<int>("blue");
+
+ QTest::newRow("red") << 255 << 0 << 0;
+ QTest::newRow("green") << 0 << 255 << 0;
+ QTest::newRow("blue") << 0 << 0 << 255;
+}
+
+void tst_QPixmap::toSymbianCFbsBitmap()
+{
+ QFETCH(int, red);
+ QFETCH(int, green);
+ QFETCH(int, blue);
+
+ QPixmap pm(100, 100);
+ pm.fill(QColor(red, green, blue));
+
+ CFbsBitmap *bitmap = pm.toSymbianCFbsBitmap();
+
+ QVERIFY(bitmap != 0);
+
+ // Verify size
+ QCOMPARE(100, (int) bitmap->SizeInPixels().iWidth);
+ QCOMPARE(100, (int) bitmap->SizeInPixels().iHeight);
+
+ // Verify pixel color
+ TRgb pixel;
+ bitmap->GetPixel(pixel, TPoint(0,0));
+ QCOMPARE((int)pixel.Red(), red);
+ QCOMPARE((int)pixel.Green(), green);
+ QCOMPARE((int)pixel.Blue(), blue);
+
+ // Clean up
+ delete bitmap;
+}
#endif
void tst_QPixmap::onlyNullPixmapsOutsideGuiThread()
diff --git a/tests/auto/qscriptvalue/qscriptvalue.pro b/tests/auto/qscriptvalue/qscriptvalue.pro
index 9efde80..1588cc5 100644
--- a/tests/auto/qscriptvalue/qscriptvalue.pro
+++ b/tests/auto/qscriptvalue/qscriptvalue.pro
@@ -1,5 +1,7 @@
load(qttest_p4)
QT = core gui script
SOURCES += tst_qscriptvalue.cpp
+HEADERS += tst_qscriptvalue.h
-
+# Generated by testgen
+SOURCES += tst_qscriptvalue_generated.cpp
diff --git a/tests/auto/qscriptvalue/testgen/data.txt b/tests/auto/qscriptvalue/testgen/data.txt
new file mode 100644
index 0000000..8e7026e
--- /dev/null
+++ b/tests/auto/qscriptvalue/testgen/data.txt
@@ -0,0 +1,116 @@
+# Data set for QScriptValue autotest.
+
+# Each line is a c++ code that should return a QScriptValue object.
+# Lines that are empty or start with '#' will be ignored
+
+QScriptValue()
+
+#Unbound values
+QScriptValue(QScriptValue::UndefinedValue)
+QScriptValue(QScriptValue::NullValue)
+QScriptValue(true)
+QScriptValue(false)
+QScriptValue(int(122))
+QScriptValue(uint(124))
+QScriptValue(0)
+QScriptValue(0.0)
+QScriptValue(123.0)
+QScriptValue(6.37e-8)
+QScriptValue(-6.37e-8)
+QScriptValue(0x43211234)
+QScriptValue(0x10000)
+QScriptValue(0x10001)
+QScriptValue(qSNaN())
+QScriptValue(qQNaN())
+QScriptValue(qInf())
+QScriptValue(-qInf())
+QScriptValue("NaN")
+QScriptValue("Infinity")
+QScriptValue("-Infinity")
+QScriptValue("ciao")
+QScriptValue(QString::fromLatin1("ciao"))
+QScriptValue(QString(""))
+QScriptValue(QString())
+QScriptValue(QString("0"))
+QScriptValue(QString("123"))
+QScriptValue(QString("12.4"))
+
+#Unbound values (bound to a null engine)
+QScriptValue(0, QScriptValue::UndefinedValue)
+QScriptValue(0, QScriptValue::NullValue)
+QScriptValue(0, true)
+QScriptValue(0, false)
+QScriptValue(0, int(122))
+QScriptValue(0, uint(124))
+QScriptValue(0, 0)
+QScriptValue(0, 0.0)
+QScriptValue(0, 123.0)
+QScriptValue(0, 6.37e-8)
+QScriptValue(0, -6.37e-8)
+QScriptValue(0, 0x43211234)
+QScriptValue(0, 0x10000)
+QScriptValue(0, 0x10001)
+QScriptValue(0, qSNaN())
+QScriptValue(0, qQNaN())
+QScriptValue(0, qInf())
+QScriptValue(0, -qInf())
+QScriptValue(0, "NaN")
+QScriptValue(0, "Infinity")
+QScriptValue(0, "-Infinity")
+QScriptValue(0, "ciao")
+QScriptValue(0, QString::fromLatin1("ciao"))
+QScriptValue(0, QString(""))
+QScriptValue(0, QString())
+QScriptValue(0, QString("0"))
+QScriptValue(0, QString("123"))
+QScriptValue(0, QString("12.3"))
+
+#Bound values
+QScriptValue(engine, QScriptValue::UndefinedValue)
+QScriptValue(engine, QScriptValue::NullValue)
+QScriptValue(engine, true)
+QScriptValue(engine, false)
+QScriptValue(engine, int(122))
+QScriptValue(engine, uint(124))
+QScriptValue(engine, 0)
+QScriptValue(engine, 0.0)
+QScriptValue(engine, 123.0)
+QScriptValue(engine, 6.37e-8)
+QScriptValue(engine, -6.37e-8)
+QScriptValue(engine, 0x43211234)
+QScriptValue(engine, 0x10000)
+QScriptValue(engine, 0x10001)
+QScriptValue(engine, qSNaN())
+QScriptValue(engine, qQNaN())
+QScriptValue(engine, qInf())
+QScriptValue(engine, -qInf())
+QScriptValue(engine, "NaN")
+QScriptValue(engine, "Infinity")
+QScriptValue(engine, "-Infinity")
+QScriptValue(engine, "ciao")
+QScriptValue(engine, QString::fromLatin1("ciao"))
+QScriptValue(engine, QString(""))
+QScriptValue(engine, QString())
+QScriptValue(engine, QString("0"))
+QScriptValue(engine, QString("123"))
+QScriptValue(engine, QString("1.23"))
+
+# evaluate
+engine->evaluate("[]")
+engine->evaluate("{}")
+engine->evaluate("Object.prototype")
+engine->evaluate("Date.prototype")
+engine->evaluate("Array.prototype")
+engine->evaluate("Function.prototype")
+engine->evaluate("Error.prototype")
+engine->evaluate("Object")
+engine->evaluate("Array")
+engine->evaluate("Number")
+engine->evaluate("Function")
+engine->evaluate("(function() { return 1; })")
+engine->evaluate("(function() { return 'ciao'; })")
+engine->evaluate("(function() { throw new Error('foo'); })")
+engine->evaluate("/foo/")
+engine->evaluate("new Object()")
+engine->evaluate("new Array()")
+engine->evaluate("new Error()")
diff --git a/tests/auto/qscriptvalue/testgen/gen.py b/tests/auto/qscriptvalue/testgen/gen.py
new file mode 100755
index 0000000..7161e6b
--- /dev/null
+++ b/tests/auto/qscriptvalue/testgen/gen.py
@@ -0,0 +1,242 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+#Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+
+## $QT_BEGIN_LICENSE:LGPL$
+## No Commercial Usage
+## This file contains pre-release code and may not be distributed.
+## You may use this file in accordance with the terms and conditions
+## contained in the Technology Preview License Agreement accompanying
+## this package.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 2.1 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 2.1 requirements
+## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+##
+## In addition, as a special exception, Nokia gives you certain additional
+## rights. These rights are described in the Nokia Qt LGPL Exception
+## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+##
+## If you have questions regarding the use of this file, please contact
+## Nokia at qt-info@nokia.com.
+##
+##
+##
+##
+##
+##
+##
+##
+## $QT_END_LICENSE$
+
+from __future__ import with_statement
+from string import Template
+
+class Options():
+ """Option manager. It parse and check all paramteres, set internal variables."""
+ def __init__(self, args):
+ import logging as log
+ log.basicConfig()
+ #comand line options parser
+ from optparse import OptionParser
+ #load some directory searching stuff
+ import os.path, sys
+
+ opt = OptionParser("%prog [options] path_to_input_file path_to_output_file.")
+
+ self._o, self._a = opt.parse_args(args)
+
+ try:
+ if not (os.path.exists(self._a[0])):
+ raise Exception("Path doesn't exist")
+ if len(self._a) != 2:
+ raise IndexError("Only two files!")
+ self._o.ipath = self._a[0]
+ self._o.opath = self._a[1]
+ except IndexError:
+ log.error("Bad usage. Please try -h or --help")
+ sys.exit(1)
+ except Exception:
+ log.error("Path '" + self._a[0] + " or " + self._a[1] + "' don't exist")
+ sys.exit(2)
+
+ def __getattr__(self, attr):
+ """map all options properties into this object (remove one level of indirection)"""
+ return getattr(self._o, attr)
+
+
+mainTempl = Template("""/*
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+////////////////////////////////////////////////////////////////
+// THIS FILE IS AUTOGENERATED, ALL MODIFICATIONS WILL BE LAST //
+////////////////////////////////////////////////////////////////
+
+#include "testgenerator.h"
+
+#include <QtCore/qdatastream.h>
+#include <QtCore/qdatetime.h>
+#include <QtCore/qdebug.h>
+#include <QtCore/qfile.h>
+#include <QtCore/qnumeric.h>
+#include <QtCore/qvariant.h>
+#include <QtCore/qvector.h>
+#include <QtScript/qscriptvalue.h>
+#include <QtScript/qscriptengine.h>
+
+
+
+typedef bool (QScriptValue::*ComparisionType) (const QScriptValue&) const;
+static QVector<bool> compare(ComparisionType compare, QScriptValue value, const QScriptValueList& values) {
+ QVector<bool> result;
+ result.reserve(${count});
+
+ QScriptValueList::const_iterator i = values.constBegin();
+ for (; i != values.constEnd(); ++i) {
+ result << (value.*compare)(*i);
+ }
+ return result;
+}
+
+static void dump(QDataStream& out, QScriptValue& value, const QString& expression, const QScriptValueList& allValues)
+{
+ out << QString(expression);
+
+ out << value.isValid();
+ out << value.isBool();
+ out << value.isBoolean();
+ out << value.isNumber();
+ out << value.isFunction();
+ out << value.isNull();
+ out << value.isString();
+ out << value.isUndefined();
+ out << value.isVariant();
+ out << value.isQObject();
+ out << value.isQMetaObject();
+ out << value.isObject();
+ out << value.isDate();
+ out << value.isRegExp();
+ out << value.isArray();
+ out << value.isError();
+
+ out << value.toString();
+ out << value.toNumber();
+ out << value.toBool();
+ out << value.toBoolean();
+ out << value.toInteger();
+ out << value.toInt32();
+ out << value.toUInt32();
+ out << value.toUInt16();
+
+ out << compare(&QScriptValue::equals, value, allValues);
+ out << compare(&QScriptValue::strictlyEquals, value, allValues);
+ out << compare(&QScriptValue::lessThan, value, allValues);
+ out << compare(&QScriptValue::instanceOf, value, allValues);
+
+ out << qscriptvalue_cast<QString>(value);
+ out << qscriptvalue_cast<qsreal>(value);
+ out << qscriptvalue_cast<bool>(value);
+ out << qscriptvalue_cast<qint32>(value);
+ out << qscriptvalue_cast<quint32>(value);
+ out << qscriptvalue_cast<quint16>(value);
+}
+
+void TestGenerator::prepareData()
+{
+ QScriptEngine* engine = new QScriptEngine;
+
+ QScriptValueList allValues;
+ allValues << ${values};
+ QVector<QString> allDataTags;
+ allDataTags.reserve(${count});
+ allDataTags << ${dataTags};
+ QDataStream out(&m_tempFile);
+ out << allDataTags;
+
+ for(unsigned i = 0; i < ${count}; ++i)
+ dump(out, allValues[i], allDataTags[i], allValues);
+
+ delete engine;
+}
+""")
+qsvTempl = Template("""
+ {
+ QScriptValue value = ${expr};
+ dump(out, value, "${expr_esc}", allValues);
+ }""")
+
+
+
+if __name__ == '__main__':
+ import sys
+ o = Options(sys.argv[1:])
+ out = []
+ qsv = []
+ # load input file
+ with open(o.ipath) as f:
+ for row in f.readlines():
+ qsv.append(row)
+
+ #skip comments and empty lines
+ qsv = filter(lambda w: len(w.strip()) and not w.startswith('#'), qsv)
+
+ escape = lambda w: w.replace('\\','\\\\').replace('"','\\"')
+
+ for row in qsv:
+ row = row.replace('\n','')
+ row_esc = escape(row)
+ out.append(qsvTempl.substitute(expr = row, expr_esc = row_esc))
+
+ result = mainTempl.substitute(dump= "".join(out) \
+ , values = (11 * ' ' + '<< ').join(qsv) \
+ , count = len(qsv) \
+ , dataTags = (11 * ' ' + '<< ').join(map(lambda w: '"' + escape(w.replace('\n','')) + '"\n', qsv)))
+
+ with open(o.opath, 'w') as f:
+ f.write(result)
+
+
diff --git a/tests/auto/qscriptvalue/testgen/main.cpp b/tests/auto/qscriptvalue/testgen/main.cpp
new file mode 100644
index 0000000..fe35de9
--- /dev/null
+++ b/tests/auto/qscriptvalue/testgen/main.cpp
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "testgenerator.h"
+#include <QtCore/qdebug.h>
+#include <QtCore/qfile.h>
+#include <QtCore/qstringlist.h>
+#include <QtCore/QCoreApplication>
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication a(argc, argv);
+
+ if (argc != 2) {
+ qWarning() << "./prog outputfile";
+ exit(1);
+ }
+
+ //Procced
+ TestGenerator gen(a.arguments()[1]);
+ gen.run();
+
+ return 0;
+}
diff --git a/tests/auto/qscriptvalue/testgen/testgen.pro b/tests/auto/qscriptvalue/testgen/testgen.pro
new file mode 100644
index 0000000..47709a8
--- /dev/null
+++ b/tests/auto/qscriptvalue/testgen/testgen.pro
@@ -0,0 +1,18 @@
+QT += core script
+TARGET = testgen
+CONFIG += console
+CONFIG -= app_bundle
+TEMPLATE = app
+
+SOURCES += main.cpp \
+ testgenerator.cpp
+HEADERS += testgenerator.h
+
+
+INPUT_DATASET = data.txt
+dataset.name = Generating QScraiptValue autotest's dataset
+dataset.output = autogenerated.cpp
+dataset.commands = python gen.py data.txt autogenerated.cpp
+dataset.input = INPUT_DATASET
+dataset.variable_out = SOURCES
+QMAKE_EXTRA_COMPILERS += dataset
diff --git a/tests/auto/qscriptvalue/testgen/testgenerator.cpp b/tests/auto/qscriptvalue/testgen/testgenerator.cpp
new file mode 100644
index 0000000..d852ea5
--- /dev/null
+++ b/tests/auto/qscriptvalue/testgen/testgenerator.cpp
@@ -0,0 +1,688 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "testgenerator.h"
+
+#include <QtCore/qdatastream.h>
+#include <QtCore/qdatetime.h>
+#include <QtCore/qdebug.h>
+#include <QtCore/qnumeric.h>
+#include <QtCore/qstringlist.h>
+#include <QtCore/qtextstream.h>
+#include <QtCore/qvariant.h>
+#include <QtScript/qscriptvalue.h>
+
+void TestGenerator::save(const QString& data)
+{
+ QTextStream out(&m_ofile);
+ out << data;
+}
+
+static QString escape(QString txt)
+{
+ return txt.replace("\\","\\\\").replace("\"","\\\"").replace("\n","\\n");
+}
+
+template<typename T>
+QString prepareToInsert(T value) {return QString::fromAscii("\"") + escape(value) + "\"";}
+template<>
+QString prepareToInsert<qsreal>(qsreal value)
+{
+ if (qIsNaN(value))
+ return "qQNaN()";
+ if (qIsInf(value))
+ return "qInf()";
+ return QString::number(value, 'g', 16);
+}
+template<>
+QString prepareToInsert<qint32>(qint32 value) {return QString::number(value);}
+template<>
+QString prepareToInsert<quint32>(quint32 value) {return QString::number(value);}
+template<>
+QString prepareToInsert<quint16>(quint16 value) {return QString::number(value);}
+template<>
+QString prepareToInsert<bool>(bool value) {return value ? "true" : "false";}
+template<>
+QString prepareToInsert<QString>(QString value) {return QString::fromAscii("\"") + escape(value) + "\"";}
+
+template<typename T>
+QString typeName() {return QString();}
+template<>
+QString typeName<qsreal>() {return "qsreal";}
+template<>
+QString typeName<qint32>() {return "qint32";}
+template<>
+QString typeName<quint32>() {return "quint32";}
+template<>
+QString typeName<quint16>() {return "quint16";}
+template<>
+QString typeName<bool>() {return "bool";}
+template<>
+QString typeName<QString>() {return "QString";}
+
+static QString generateIsXXXDef(const QString& name, const QList<QString>& list)
+{
+ static const QString templ("void tst_QScriptValue::%1_initData()\n"\
+ "{\n"\
+ " QTest::addColumn<bool>(\"expected\");\n"\
+ " initScriptValues();\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::%1_makeData(const char* expr)\n"\
+ "{\n"\
+ " static QSet<QString> %1;\n"\
+ " if (%1.isEmpty()) {\n"\
+ " %1%2\n"\
+ " }\n"\
+ " newRow(expr) << %1.contains(expr);\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::%1_test(const char*, const QScriptValue& value)\n"\
+ "{\n"\
+ " QFETCH(bool, expected);\n"\
+ " QCOMPARE(value.%1(), expected);\n"\
+ "}\n"\
+ "\n"\
+ "DEFINE_TEST_FUNCTION(%1)\n"\
+ "\n");
+
+ if (!list.size()) {
+ qWarning() << name << ": nothing to add!" ;
+ return QString();
+ }
+
+ QString result = templ;
+ QStringList set;
+ foreach(QString t, list) {
+ t = escape(t);
+ t.append('\"');
+ t.prepend('\"');
+ set.append(QString(" << "));
+ set.append(t);
+ set.append("\n ");
+ }
+ set.append(";");
+ return result.arg(name, set.join(QString()));
+}
+
+template<typename T>
+static QString generateToXXXDef(const QString& name, const QList<QPair<QString, T> >& list)
+{
+ static const QString templ = "\n"\
+ "void tst_QScriptValue::%1_initData()\n"\
+ "{\n"\
+ " QTest::addColumn<%2>(\"expected\");\n"\
+ " initScriptValues();\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::%1_makeData(const char* expr)\n"\
+ "{\n"\
+ " static QHash<QString, %2> %1;\n"\
+ " if (%1.isEmpty()) {\n"\
+ "%3"\
+ " }\n"\
+ " newRow(expr) << %1.value(expr);\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::%1_test(const char*, const QScriptValue& value)\n"\
+ "{\n"\
+ " QFETCH(%2, expected);\n"\
+ " QCOMPARE(value.%1(), expected);\n"\
+ "}\n"\
+ "\n"\
+ "DEFINE_TEST_FUNCTION(%1)\n";
+ QString result = templ;
+
+ typename QList<QPair<QString, T> >::const_iterator i = list.constBegin();
+ QStringList set;
+ for(; i != list.constEnd(); ++i) {
+ QPair<QString, T> t = *i;
+ t.first = escape(t.first);
+ set.append(QString(" "));
+ set.append(name);
+ set.append(".insert(\"");
+ set.append(t.first);
+ set.append(QString::fromAscii("\", "));
+ set.append(prepareToInsert<T>(t.second));
+ set.append(QString::fromAscii(");\n"));
+ }
+ return result.arg(name, typeName<T>(), set.join(QString()));
+}
+
+
+template<>
+QString generateToXXXDef<qsreal>(const QString& name, const QList<QPair<QString, qsreal> >& list)
+{
+ static const QString templ = "\n"\
+ "void tst_QScriptValue::%1_initData()\n"\
+ "{\n"\
+ " QTest::addColumn<%2>(\"expected\");\n"\
+ " initScriptValues();\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::%1_makeData(const char* expr)\n"\
+ "{\n"\
+ " static QHash<QString, %2> %1;\n"\
+ " if (%1.isEmpty()) {\n"\
+ "%3"\
+ " }\n"\
+ " newRow(expr) << %1.value(expr);\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::%1_test(const char*, const QScriptValue& value)\n"\
+ "{\n"\
+ " QFETCH(%2, expected);\n"\
+ "%666"
+ " if (qIsInf(expected)) {\n"\
+ " QVERIFY(qIsInf(value.%1()));\n"\
+ " return;\n"\
+ " }\n"\
+ " QCOMPARE(value.%1(), expected);\n"\
+ "}\n"\
+ "\n"\
+ "DEFINE_TEST_FUNCTION(%1)\n";
+ QString result = templ;
+
+ QList<QPair<QString, qsreal> >::const_iterator i = list.constBegin();
+ QStringList set;
+ for(; i != list.constEnd(); ++i) {
+ QPair<QString, qsreal> t = *i;
+ t.first = escape(t.first);
+ set.append(QString(" "));
+ set.append(name);
+ set.append(".insert(\"");
+ set.append(t.first);
+ set.append(QString::fromAscii("\", "));
+ set.append(prepareToInsert<qsreal>(t.second));
+ set.append(QString::fromAscii(");\n"));
+ }
+ // toInteger shouldn't return NaN, so it would be nice to catch the case.
+ QString hook;
+ if (name == "toNumber") {
+ hook =
+ " if (qIsNaN(expected)) {\n"\
+ " QVERIFY(qIsNaN(value.toNumber()));\n"\
+ " return;\n"\
+ " }\n";
+ }
+ return result.arg(name, typeName<qsreal>(), set.join(QString()), hook);
+}
+
+template<typename T>
+static QString generateCastDef(const QList<QPair<QString, T> >& list)
+{
+ static const QString templ = "\n"\
+ "void tst_QScriptValue::qscriptvalue_cast%2_initData()\n"\
+ "{\n"\
+ " QTest::addColumn<%2>(\"expected\");\n"\
+ " initScriptValues();\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::qscriptvalue_cast%2_makeData(const char* expr)\n"\
+ "{\n"\
+ " static QHash<QString, %2> value;\n"\
+ " if (value.isEmpty()) {\n"\
+ "%3"\
+ " }\n"\
+ " newRow(expr) << value.value(expr);\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::qscriptvalue_cast%2_test(const char*, const QScriptValue& value)\n"\
+ "{\n"\
+ " QFETCH(%2, expected);\n"\
+ " QCOMPARE(qscriptvalue_cast<%2>(value), expected);\n"\
+ "}\n"\
+ "\n"\
+ "DEFINE_TEST_FUNCTION(qscriptvalue_cast%2)\n";
+ QString result = templ;
+
+ typename QList<QPair<QString, T> >::const_iterator i = list.constBegin();
+ QStringList set;
+ for(; i != list.constEnd(); ++i) {
+ QPair<QString, T> t = *i;
+ t.first = escape(t.first);
+ set.append(QString(" "));
+ set.append("value.insert(\"");
+ set.append(t.first);
+ set.append(QString::fromAscii("\", "));
+ set.append(prepareToInsert<T>(t.second));
+ set.append(QString::fromAscii(");\n"));
+ }
+ return result.arg(typeName<T>(), set.join(QString()));
+}
+
+template<>
+QString generateCastDef<qsreal>(const QList<QPair<QString, qsreal> >& list)
+{
+ static const QString templ = "\n"\
+ "void tst_QScriptValue::qscriptvalue_cast%2_initData()\n"\
+ "{\n"\
+ " QTest::addColumn<%2>(\"expected\");\n"\
+ " initScriptValues();\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::qscriptvalue_cast%2_makeData(const char* expr)\n"\
+ "{\n"\
+ " static QHash<QString, %2> value;\n"\
+ " if (value.isEmpty()) {\n"\
+ "%3"\
+ " }\n"\
+ " newRow(expr) << value.value(expr);\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::qscriptvalue_cast%2_test(const char*, const QScriptValue& value)\n"\
+ "{\n"\
+ " QFETCH(%2, expected);\n"\
+ " if (qIsNaN(expected)) {\n"
+ " QVERIFY(qIsNaN(qscriptvalue_cast<%2>(value)));\n"
+ " return;\n"
+ " }\n"\
+ " if (qIsInf(expected)) {\n"
+ " QVERIFY(qIsInf(qscriptvalue_cast<%2>(value)));\n"
+ " return;\n"
+ " }\n"
+ " QCOMPARE(qscriptvalue_cast<%2>(value), expected);\n"\
+ "}\n"\
+ "\n"\
+ "DEFINE_TEST_FUNCTION(qscriptvalue_cast%2)\n";
+ QString result = templ;
+
+ QList<QPair<QString, qsreal> >::const_iterator i = list.constBegin();
+ QStringList set;
+ for(; i != list.constEnd(); ++i) {
+ QPair<QString, qsreal> t = *i;
+ t.first = escape(t.first);
+ set.append(QString(" "));
+ set.append("value.insert(\"");
+ set.append(t.first);
+ set.append(QString::fromAscii("\", "));
+ set.append(prepareToInsert<qsreal>(t.second));
+ set.append(QString::fromAscii(");\n"));
+ }
+ return result.arg(typeName<qsreal>(), set.join(QString()));
+}
+
+static QString generateCompareDef(const QString& comparisionType, const QList<QString> tags)
+{
+ static const QString templ = "\n"\
+ "void tst_QScriptValue::%1_initData()\n"\
+ "{\n"\
+ " QTest::addColumn<QScriptValue>(\"other\");\n"\
+ " QTest::addColumn<bool>(\"expected\");\n"\
+ " initScriptValues();\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::%1_makeData(const char *expr)\n"\
+ "{\n"\
+ " static QSet<QString> equals;\n"\
+ " if (equals.isEmpty()) {\n"\
+ "%2\n"\
+ " }\n"\
+ " QHash<QString, QScriptValue>::const_iterator it;\n"\
+ " for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {\n"\
+ " QString tag = QString::fromLatin1(\"%20 <=> %21\").arg(expr).arg(it.key());\n"\
+ " newRow(tag.toLatin1()) << it.value() << equals.contains(tag);\n"\
+ " }\n"\
+ "}\n"\
+ "\n"\
+ "void tst_QScriptValue::%1_test(const char *, const QScriptValue& value)\n"\
+ "{\n"\
+ " QFETCH(QScriptValue, other);\n"\
+ " QFETCH(bool, expected);\n"\
+ " QCOMPARE(value.%1(other), expected);\n"\
+ "}\n"\
+ "\n"\
+ "DEFINE_TEST_FUNCTION(%1)\n";
+ Q_ASSERT(comparisionType == "strictlyEquals"
+ || comparisionType == "equals"
+ || comparisionType == "lessThan"
+ || comparisionType == "instanceOf");
+ QString result = templ;
+
+ QStringList set;
+ foreach(const QString& tmp, tags) {
+ set.append(" equals.insert(\"" + escape(tmp) + "\");");
+ }
+ return result.arg(comparisionType, set.join("\n"));
+}
+
+static QString generateInitDef(const QVector<QString>& allDataTags)
+{
+ static const QString templ = "/****************************************************************************\n"
+ "**\n"
+ "** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).\n"
+ "** All rights reserved.\n"
+ "** Contact: Nokia Corporation (qt-info@nokia.com)\n"
+ "**\n"
+ "** This file is part of the test suite of the Qt Toolkit.\n"
+ "**\n"
+ "** $QT_BEGIN_LICENSE:LGPL$\n"
+ "** No Commercial Usage\n"
+ "** This file contains pre-release code and may not be distributed.\n"
+ "** You may use this file in accordance with the terms and conditions\n"
+ "** contained in the Technology Preview License Agreement accompanying\n"
+ "** this package.\n"
+ "**\n"
+ "** GNU Lesser General Public License Usage\n"
+ "** Alternatively, this file may be used under the terms of the GNU Lesser\n"
+ "** General Public License version 2.1 as published by the Free Software\n"
+ "** Foundation and appearing in the file LICENSE.LGPL included in the\n"
+ "** packaging of this file. Please review the following information to\n"
+ "** ensure the GNU Lesser General Public License version 2.1 requirements\n"
+ "** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n"
+ "**\n"
+ "** In addition, as a special exception, Nokia gives you certain additional\n"
+ "** rights. These rights are described in the Nokia Qt LGPL Exception\n"
+ "** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n"
+ "**\n"
+ "** If you have questions regarding the use of this file, please contact\n"
+ "** Nokia at qt-info@nokia.com.\n"
+ "**\n"
+ "**\n"
+ "**\n"
+ "**\n"
+ "**\n"
+ "**\n"
+ "**\n"
+ "**\n"
+ "** $QT_END_LICENSE$\n"
+ "**\n"
+ "****************************************************************************/\n"
+ "\n"\
+ "#include \"tst_qscriptvalue.h\"\n\n"\
+ "#define DEFINE_TEST_VALUE(expr) m_values.insert(QString::fromLatin1(#expr), expr)\n"\
+ "\n"\
+ "void tst_QScriptValue::initScriptValues()\n"\
+ "{\n"\
+ " m_values.clear();\n"\
+ " if (engine) \n"\
+ " delete engine;\n"\
+ " engine = new QScriptEngine;\n"\
+ "%1\n}\n\n";
+ QString result = templ;
+ QStringList set;
+ foreach(const QString tag, allDataTags) {
+ set.append(" DEFINE_TEST_VALUE(" + tag + ");");
+ }
+
+ return result.arg(set.join("\n"));
+}
+
+static void squashTags(QString dataTag, const QVector<bool>& results, QList<QString>& tags, QVector<QString> dataTags)
+{
+ for(int i = 0; i < results.count(); ++i) {
+ if (results.at(i))
+ tags.append(dataTag + " <=> " + dataTags[i]);
+ }
+}
+
+
+QString TestGenerator::generateTest()
+{
+ // All data tags keept in one place.
+ QVector<QString> dataTags;
+
+ // Data tags for values that return true in isXXX call
+ QList<QString> isValidList;
+ QList<QString> isBoolList;
+ QList<QString> isBooleanList;
+ QList<QString> isNumberList;
+ QList<QString> isFunctionList;
+ QList<QString> isNullList;
+ QList<QString> isStringList;
+ QList<QString> isUndefinedList;
+ QList<QString> isVariantList;
+ QList<QString> isQObjectList;
+ QList<QString> isQMetaObjectList;
+ QList<QString> isObjectList;
+ QList<QString> isDateList;
+ QList<QString> isRegExpList;
+ QList<QString> isArrayList;
+ QList<QString> isErrorList;
+
+ // List of pairs data tag and value returned from toXXX call
+ QList<QPair<QString, QString> > toStringList;
+ QList<QPair<QString, qsreal> > toNumberList;
+ QList<QPair<QString, bool> > toBoolList;
+ QList<QPair<QString, bool> > toBooleanList;
+ QList<QPair<QString, qsreal> > toIntegerList;
+ QList<QPair<QString, qint32> > toInt32List;
+ QList<QPair<QString, quint32> > toUInt32List;
+ QList<QPair<QString, quint16> > toUInt16List;
+
+ // List of complex tags returning true
+ QList<QString> equalsList;
+ QList<QString> strictlyEqualsList;
+ QList<QString> lessThanList;
+ QList<QString> instanceOfList;
+
+ QList<QPair<QString, QString> > castStringList;
+ QList<QPair<QString, qsreal> > castSRealList;
+ QList<QPair<QString, bool> > castBoolList;
+ QList<QPair<QString, qint32> > castInt32List;
+ QList<QPair<QString, quint32> > castUInt32List;
+ QList<QPair<QString, quint16> > castUInt16List;
+
+ // Load.
+ m_tempFile.seek(0);
+ QDataStream in(&m_tempFile);
+ in >> dataTags;
+ Q_ASSERT(in.status() == in.Ok);
+
+ while(!in.atEnd())
+ {
+ bool isValidRes;
+ bool isBoolRes;
+ bool isBooleanRes;
+ bool isNumberRes;
+ bool isFunctionRes;
+ bool isNullRes;
+ bool isStringRes;
+ bool isUndefinedRes;
+ bool isVariantRes;
+ bool isQObjectRes;
+ bool isQMetaObjectRes;
+ bool isObjectRes;
+ bool isDateRes;
+ bool isRegExpRes;
+ bool isArrayRes;
+ bool isErrorRes;
+
+ QString toStringRes;
+ qsreal toNumberRes;
+ bool toBoolRes;
+ bool toBooleanRes;
+ qsreal toIntegerRes;
+ qint32 toInt32Res;
+ quint32 toUInt32Res;
+ quint16 toUInt16Res;
+ //toVariantRes;
+ //toDateTimeRes;
+
+ QVector<bool> equalsRes;
+ QVector<bool> strictlyEqualsRes;
+ QVector<bool> lessThanRes;
+ QVector<bool> instanceOfRes;
+
+ QString castStringRes;
+ qsreal castSRealRes;
+ bool castBoolRes;
+ qint32 castInt32Res;
+ quint32 castUInt32Res;
+ quint16 castUInt16Res;
+
+ QString dataTag;
+ in >> dataTag;
+ in >> isValidRes;
+ in >> isBoolRes;
+ in >> isBooleanRes;
+ in >> isNumberRes;
+ in >> isFunctionRes;
+ in >> isNullRes;
+ in >> isStringRes;
+ in >> isUndefinedRes;
+ in >> isVariantRes;
+ in >> isQObjectRes;
+ in >> isQMetaObjectRes;
+ in >> isObjectRes;
+ in >> isDateRes;
+ in >> isRegExpRes;
+ in >> isArrayRes;
+ in >> isErrorRes;
+
+ if (isValidRes) isValidList.append(dataTag);
+ if (isBoolRes) isBoolList.append(dataTag);
+ if (isBooleanRes) isBooleanList.append(dataTag);
+ if (isNumberRes) isNumberList.append(dataTag);
+ if (isFunctionRes) isFunctionList.append(dataTag);
+ if (isNullRes) isNullList.append(dataTag);
+ if (isStringRes) isStringList.append(dataTag);
+ if (isUndefinedRes) isUndefinedList.append(dataTag);
+ if (isVariantRes) isVariantList.append(dataTag);
+ if (isQObjectRes) isQObjectList.append(dataTag);
+ if (isQMetaObjectRes) isQMetaObjectList.append(dataTag);
+ if (isObjectRes) isObjectList.append(dataTag);
+ if (isDateRes) isDateList.append(dataTag);
+ if (isRegExpRes) isRegExpList.append(dataTag);
+ if (isArrayRes) isArrayList.append(dataTag);
+ if (isErrorRes) isErrorList.append(dataTag);
+
+ in >> toStringRes;
+ in >> toNumberRes;
+ in >> toBoolRes;
+ in >> toBooleanRes;
+ in >> toIntegerRes;
+ in >> toInt32Res;
+ in >> toUInt32Res;
+ in >> toUInt16Res;
+ //in >> toVariantRes;
+ //in >> toDateTimeRes;
+
+ toStringList.append(QPair<QString, QString>(dataTag, toStringRes));
+ toNumberList.append(QPair<QString, qsreal>(dataTag, toNumberRes));
+ toBoolList.append(QPair<QString, bool>(dataTag, toBoolRes));
+ toBooleanList.append(QPair<QString, bool>(dataTag, toBooleanRes));
+ toIntegerList.append(QPair<QString, qsreal>(dataTag, toIntegerRes));
+ toInt32List.append(QPair<QString, qint32>(dataTag, toInt32Res));
+ toUInt32List.append(QPair<QString, quint32>(dataTag, toUInt32Res));
+ toUInt16List.append(QPair<QString, quint16>(dataTag, toUInt16Res));
+
+ in >> equalsRes;
+ in >> strictlyEqualsRes;
+ in >> lessThanRes;
+ in >> instanceOfRes;
+
+ squashTags(dataTag, equalsRes, equalsList, dataTags);
+ squashTags(dataTag, strictlyEqualsRes, strictlyEqualsList, dataTags);
+ squashTags(dataTag, lessThanRes, lessThanList, dataTags);
+ squashTags(dataTag, instanceOfRes, instanceOfList, dataTags);
+
+ in >> castStringRes;
+ in >> castSRealRes;
+ in >> castBoolRes;
+ in >> castInt32Res;
+ in >> castUInt32Res;
+ in >> castUInt16Res;
+
+ castStringList.append(QPair<QString, QString>(dataTag, castStringRes));
+ castSRealList.append(QPair<QString, qsreal>(dataTag, castSRealRes));
+ castBoolList.append(QPair<QString, bool>(dataTag, castBoolRes));
+ castInt32List.append(QPair<QString, qint32>(dataTag, castInt32Res));
+ castUInt32List.append(QPair<QString, quint32>(dataTag, castUInt32Res));
+ castUInt16List.append(QPair<QString, quint16>(dataTag, castUInt16Res));
+
+ Q_ASSERT(in.status() == in.Ok);
+ }
+
+ Q_ASSERT(in.atEnd());
+
+ // Generate.
+ QStringList result;
+ result.append(generateInitDef(dataTags));
+ result.append(generateIsXXXDef("isValid", isValidList));
+ result.append(generateIsXXXDef("isBool", isBoolList));
+ result.append(generateIsXXXDef("isBoolean", isBooleanList));
+ result.append(generateIsXXXDef("isNumber", isNumberList));
+ result.append(generateIsXXXDef("isFunction", isFunctionList));
+ result.append(generateIsXXXDef("isNull", isNullList));
+ result.append(generateIsXXXDef("isString", isStringList));
+ result.append(generateIsXXXDef("isUndefined", isUndefinedList));
+ result.append(generateIsXXXDef("isVariant", isVariantList));
+ result.append(generateIsXXXDef("isQObject", isQObjectList));
+ result.append(generateIsXXXDef("isQMetaObject", isQMetaObjectList));
+ result.append(generateIsXXXDef("isObject", isObjectList));
+ result.append(generateIsXXXDef("isDate", isDateList));
+ result.append(generateIsXXXDef("isRegExp", isRegExpList));
+ result.append(generateIsXXXDef("isArray", isArrayList));
+ result.append(generateIsXXXDef("isError", isErrorList));
+
+ result.append(generateToXXXDef<QString>("toString", toStringList));
+ result.append(generateToXXXDef<qsreal>("toNumber", toNumberList));
+ result.append(generateToXXXDef<bool>("toBool", toBoolList));
+ result.append(generateToXXXDef<bool>("toBoolean", toBooleanList));
+ result.append(generateToXXXDef<qsreal>("toInteger", toIntegerList));
+ result.append(generateToXXXDef<qint32>("toInt32", toInt32List));
+ result.append(generateToXXXDef<quint32>("toUInt32", toUInt32List));
+ result.append(generateToXXXDef<quint16>("toUInt16", toUInt16List));
+
+ result.append(generateCompareDef("equals", equalsList));
+ result.append(generateCompareDef("strictlyEquals", strictlyEqualsList));
+ result.append(generateCompareDef("lessThan", lessThanList));
+ result.append(generateCompareDef("instanceOf", instanceOfList));
+
+ result.append(generateCastDef(castStringList));
+ result.append(generateCastDef(castSRealList));
+ result.append(generateCastDef(castBoolList));
+ result.append(generateCastDef(castInt32List));
+ result.append(generateCastDef(castUInt32List));
+ result.append(generateCastDef(castUInt16List));
+
+ return result.join("\n");
+}
+
+
+
+
+
+
+
+
+
diff --git a/tests/auto/qscriptvalue/testgen/testgenerator.h b/tests/auto/qscriptvalue/testgen/testgenerator.h
new file mode 100644
index 0000000..8f4a357
--- /dev/null
+++ b/tests/auto/qscriptvalue/testgen/testgenerator.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TESTGENERATOR_H
+#define TESTGENERATOR_H
+
+#include <QtCore/qdebug.h>
+#include <QtCore/qfile.h>
+#include <QtCore/qtemporaryfile.h>
+
+class TestGenerator {
+public:
+ TestGenerator(QString& outputpath)
+ : m_ofile(outputpath)
+ {
+ // Open output file
+ if (!m_ofile.open(QIODevice::WriteOnly | QIODevice::Text)) {
+ qWarning() << "Can't open output file: " << outputpath;
+ exit(2);
+ }
+ m_tempFile.open();
+ }
+
+ void run()
+ {
+ prepareData();
+ Q_ASSERT(m_tempFile.size());
+ save(generateTest());
+ }
+
+ void prepareData();
+ QString generateTest();
+ void save(const QString& data);
+private:
+ QFile m_ofile;
+ QTemporaryFile m_tempFile;
+};
+
+#endif // TESTGENERATOR_H
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
index b384a55..f83cf58 100644
--- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
@@ -39,14 +39,8 @@
**
****************************************************************************/
-
-#include <QtTest/QtTest>
+#include "tst_qscriptvalue.h"
#include <QtGui/QPushButton>
-#include <QtCore/qnumeric.h>
-
-#include <QtScript/qscriptclass.h>
-#include <QtScript/qscriptvalue.h>
-#include <QtScript/qscriptengine.h>
//TESTED_CLASS=
//TESTED_FILES=
@@ -55,62 +49,70 @@ QT_BEGIN_NAMESPACE
extern bool qt_script_isJITEnabled();
QT_END_NAMESPACE
-class tst_QScriptValue : public QObject
+tst_QScriptValue::tst_QScriptValue()
+ : engine(0)
{
- Q_OBJECT
+}
-public:
- tst_QScriptValue();
- virtual ~tst_QScriptValue();
-
-private slots:
- void ctor();
- void engine();
- void toString();
- void toNumber();
- void toBoolean();
- void toBool();
- void toInteger();
- void toInt32();
- void toUInt32();
- void toUInt16();
- void toVariant();
- void toQObject();
- void toObject();
- void toDateTime();
- void toRegExp();
- void instanceOf();
- void isArray();
- void isDate();
- void isError();
- void isRegExp();
- void getSetPrototype();
- void getSetScope();
- void getSetProperty();
- void arrayElementGetterSetter();
- void getSetData();
- void getSetScriptClass();
- void call();
- void construct();
- void lessThan();
- void equals();
- void strictlyEquals();
- void castToPointer();
- void prettyPrinter_data();
- void prettyPrinter();
- void engineDeleted();
- void valueOfWithClosure();
- void objectId();
-};
+tst_QScriptValue::~tst_QScriptValue()
+{
+ delete engine;
+}
-tst_QScriptValue::tst_QScriptValue()
+void tst_QScriptValue::dataHelper(InitDataFunction init, DefineDataFunction define)
{
+ QTest::addColumn<QString>("__expression__");
+ (this->*init)();
+ QHash<QString,QScriptValue>::const_iterator it;
+ for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {
+ m_currentExpression = it.key();
+ (this->*define)(it.key().toLatin1());
+ }
+ m_currentExpression = QString();
}
-tst_QScriptValue::~tst_QScriptValue()
+QTestData &tst_QScriptValue::newRow(const char *tag)
+{
+ return QTest::newRow(tag) << m_currentExpression;
+}
+
+void tst_QScriptValue::testHelper(TestFunction fun)
+{
+ QFETCH(QString, __expression__);
+ QScriptValue value = m_values.value(__expression__);
+ (this->*fun)(__expression__.toLatin1(), value);
+}
+
+void tst_QScriptValue::assignAndCopyConstruct_initData()
+{
+ QTest::addColumn<int>("dummy");
+ initScriptValues();
+}
+
+void tst_QScriptValue::assignAndCopyConstruct_makeData(const char *expr)
+{
+ newRow(expr) << 0;
+}
+
+void tst_QScriptValue::assignAndCopyConstruct_test(const char *, const QScriptValue &value)
{
+ QScriptValue copy(value);
+ QCOMPARE(copy.strictlyEquals(value), !value.isNumber() || !qIsNaN(value.toNumber()));
+ QCOMPARE(copy.engine(), value.engine());
+
+ QScriptValue assigned = copy;
+ QCOMPARE(assigned.strictlyEquals(value), !copy.isNumber() || !qIsNaN(copy.toNumber()));
+ QCOMPARE(assigned.engine(), assigned.engine());
+
+ QScriptValue other(!value.toBool());
+ assigned = other;
+ QVERIFY(!assigned.strictlyEquals(copy));
+ QVERIFY(assigned.strictlyEquals(other));
+ QCOMPARE(assigned.engine(), other.engine());
}
+DEFINE_TEST_FUNCTION(assignAndCopyConstruct)
+
void tst_QScriptValue::ctor()
{
QScriptEngine eng;
@@ -330,19 +332,12 @@ void tst_QScriptValue::ctor()
QVERIFY(QScriptValue(0, QString("ciao")).isString());
}
-void tst_QScriptValue::engine()
-{
- QScriptEngine eng;
- QScriptValue object = eng.newObject();
- QCOMPARE(object.engine(), &eng);
-}
-
static QScriptValue myFunction(QScriptContext *, QScriptEngine *eng)
{
return eng->undefinedValue();
}
-void tst_QScriptValue::toString()
+void tst_QScriptValue::toString_old()
{
QScriptEngine eng;
@@ -456,7 +451,7 @@ void tst_QScriptValue::toString()
QVERIFY(variant.toString().isEmpty());
}
-void tst_QScriptValue::toNumber()
+void tst_QScriptValue::toNumber_old()
{
QScriptEngine eng;
@@ -529,7 +524,7 @@ void tst_QScriptValue::toNumber()
}
}
-void tst_QScriptValue::toBoolean() // deprecated
+void tst_QScriptValue::toBoolean_old() // deprecated
{
QScriptEngine eng;
@@ -626,7 +621,7 @@ void tst_QScriptValue::toBoolean() // deprecated
}
}
-void tst_QScriptValue::toBool()
+void tst_QScriptValue::toBool_old()
{
QScriptEngine eng;
@@ -723,7 +718,7 @@ void tst_QScriptValue::toBool()
}
}
-void tst_QScriptValue::toInteger()
+void tst_QScriptValue::toInteger_old()
{
QScriptEngine eng;
@@ -810,7 +805,7 @@ void tst_QScriptValue::toInteger()
QCOMPARE(inv.toInteger(), 0.0);
}
-void tst_QScriptValue::toInt32()
+void tst_QScriptValue::toInt32_old()
{
QScriptEngine eng;
@@ -946,7 +941,7 @@ void tst_QScriptValue::toInt32()
QCOMPARE(qscriptvalue_cast<qint32>(inv), 0);
}
-void tst_QScriptValue::toUInt32()
+void tst_QScriptValue::toUInt32_old()
{
QScriptEngine eng;
@@ -1078,7 +1073,7 @@ void tst_QScriptValue::toUInt32()
QCOMPARE(qscriptvalue_cast<quint32>(inv), quint32(0));
}
-void tst_QScriptValue::toUInt16()
+void tst_QScriptValue::toUInt16_old()
{
QScriptEngine eng;
@@ -1239,7 +1234,7 @@ void tst_QScriptValue::toUInt16()
Q_DECLARE_METATYPE(QVariant)
#endif
-void tst_QScriptValue::toVariant()
+void tst_QScriptValue::toVariant_old()
{
QScriptEngine eng;
@@ -1346,7 +1341,7 @@ void tst_QScriptValue::toVariant()
// unfortunately, this is necessary in order to do qscriptvalue_cast<QPushButton*>(...)
Q_DECLARE_METATYPE(QPushButton*)
-void tst_QScriptValue::toQObject()
+void tst_QScriptValue::toQObject_old()
{
QScriptEngine eng;
@@ -1541,7 +1536,7 @@ void tst_QScriptValue::toObject()
}
}
-void tst_QScriptValue::toDateTime()
+void tst_QScriptValue::toDateTime_old()
{
QScriptEngine eng;
QDateTime dt = eng.evaluate("new Date(0)").toDateTime();
@@ -1559,7 +1554,7 @@ void tst_QScriptValue::toDateTime()
QVERIFY(!eng.undefinedValue().toDateTime().isValid());
}
-void tst_QScriptValue::toRegExp()
+void tst_QScriptValue::toRegExp_old()
{
QScriptEngine eng;
{
@@ -1589,7 +1584,7 @@ void tst_QScriptValue::toRegExp()
QVERIFY(eng.undefinedValue().toRegExp().isEmpty());
}
-void tst_QScriptValue::instanceOf()
+void tst_QScriptValue::instanceOf_old()
{
QScriptEngine eng;
QScriptValue obj = eng.newObject();
@@ -1625,7 +1620,7 @@ void tst_QScriptValue::instanceOf()
QCOMPARE(obj.instanceOf(otherEngine.globalObject().property("Object")), false);
}
-void tst_QScriptValue::isArray()
+void tst_QScriptValue::isArray_old()
{
QScriptEngine eng;
QVERIFY(eng.evaluate("[]").isArray());
@@ -1638,7 +1633,7 @@ void tst_QScriptValue::isArray()
QVERIFY(!eng.undefinedValue().isArray());
}
-void tst_QScriptValue::isDate()
+void tst_QScriptValue::isDate_old()
{
QScriptEngine eng;
QVERIFY(eng.evaluate("new Date()").isDate());
@@ -1652,7 +1647,7 @@ void tst_QScriptValue::isDate()
QVERIFY(!eng.undefinedValue().isDate());
}
-void tst_QScriptValue::isError()
+void tst_QScriptValue::isError_old()
{
QStringList errors;
errors << "Error"
@@ -1677,7 +1672,7 @@ void tst_QScriptValue::isError()
QVERIFY(!eng.evaluate("new Object()").isError());
}
-void tst_QScriptValue::isRegExp()
+void tst_QScriptValue::isRegExp_old()
{
QScriptEngine eng;
QVERIFY(eng.evaluate("/foo/").isRegExp());
@@ -2718,7 +2713,7 @@ void tst_QScriptValue::construct()
QVERIFY(!QScriptValue(QScriptValue::NullValue).construct().isValid());
}
-void tst_QScriptValue::lessThan()
+void tst_QScriptValue::lessThan_old()
{
QScriptEngine eng;
@@ -2812,7 +2807,7 @@ void tst_QScriptValue::lessThan()
QCOMPARE(date1.lessThan(QScriptValue(&otherEngine, 123)), false);
}
-void tst_QScriptValue::equals()
+void tst_QScriptValue::equals_old()
{
QScriptEngine eng;
@@ -2907,7 +2902,7 @@ void tst_QScriptValue::equals()
QScriptValue qobj1 = eng.newQObject(this);
QScriptValue qobj2 = eng.newQObject(this);
QScriptValue qobj3 = eng.newQObject(0);
- QScriptValue qobj4 = eng.newQObject(new QObject());
+ QScriptValue qobj4 = eng.newQObject(new QObject(), QScriptEngine::ScriptOwnership);
QVERIFY(qobj1.equals(qobj2)); // compares the QObject pointers
QVERIFY(!qobj2.equals(qobj4)); // compares the QObject pointers
QVERIFY(!qobj2.equals(obj2)); // compares the QObject pointers
@@ -3005,7 +3000,7 @@ void tst_QScriptValue::equals()
QCOMPARE(date1.equals(QScriptValue(&otherEngine, 123)), false);
}
-void tst_QScriptValue::strictlyEquals()
+void tst_QScriptValue::strictlyEquals_old()
{
QScriptEngine eng;
@@ -3091,6 +3086,20 @@ void tst_QScriptValue::strictlyEquals()
QVERIFY(!falskt.strictlyEquals(null));
QVERIFY(!falskt.strictlyEquals(QScriptValue()));
+ QVERIFY(!QScriptValue(false).strictlyEquals(123));
+ QVERIFY(!QScriptValue(QScriptValue::UndefinedValue).strictlyEquals(123));
+ QVERIFY(!QScriptValue(QScriptValue::NullValue).strictlyEquals(123));
+ QVERIFY(!QScriptValue(false).strictlyEquals("ciao"));
+ QVERIFY(!QScriptValue(QScriptValue::UndefinedValue).strictlyEquals("ciao"));
+ QVERIFY(!QScriptValue(QScriptValue::NullValue).strictlyEquals("ciao"));
+ QVERIFY(QScriptValue(&eng, "ciao").strictlyEquals("ciao"));
+ QVERIFY(QScriptValue("ciao").strictlyEquals(QScriptValue(&eng, "ciao")));
+ QVERIFY(!QScriptValue("ciao").strictlyEquals(123));
+ QVERIFY(!QScriptValue("ciao").strictlyEquals(QScriptValue(&eng, 123)));
+ QVERIFY(!QScriptValue(123).strictlyEquals("ciao"));
+ QVERIFY(!QScriptValue(123).strictlyEquals(QScriptValue(&eng, "ciao")));
+ QVERIFY(!QScriptValue(&eng, 123).strictlyEquals("ciao"));
+
QScriptValue obj1 = eng.newObject();
QScriptValue obj2 = eng.newObject();
QCOMPARE(obj1.strictlyEquals(obj2), false);
@@ -3442,4 +3451,3 @@ void tst_QScriptValue::objectId()
}
QTEST_MAIN(tst_QScriptValue)
-#include "tst_qscriptvalue.moc"
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.h b/tests/auto/qscriptvalue/tst_qscriptvalue.h
new file mode 100644
index 0000000..6215506
--- /dev/null
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue.h
@@ -0,0 +1,410 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TST_QSCRIPTVALUE_H
+#define TST_QSCRIPTVALUE_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/qnumeric.h>
+#include <QtScript/qscriptclass.h>
+#include <QtScript/qscriptengine.h>
+#include <QtScript/qscriptvalue.h>
+#include <QtTest/QtTest>
+
+Q_DECLARE_METATYPE(QVariant)
+Q_DECLARE_METATYPE(QScriptValue)
+
+class tst_QScriptValue : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_QScriptValue();
+ virtual ~tst_QScriptValue();
+
+private slots:
+ // Generated test functions
+ void isArray_data();
+ void isArray();
+
+ void isBool_data();
+ void isBool();
+
+ void isBoolean_data();
+ void isBoolean();
+
+ void isDate_data();
+ void isDate();
+
+ void isError_data();
+ void isError();
+
+ void isFunction_data();
+ void isFunction();
+
+ void isNull_data();
+ void isNull();
+
+ void isNumber_data();
+ void isNumber();
+
+ void isObject_data();
+ void isObject();
+
+// void isQMetaObject_data();
+// void isQMetaObject();
+
+// void isQObject_data();
+// void isQObject();
+
+ void isRegExp_data();
+ void isRegExp();
+
+ void isString_data();
+ void isString();
+
+ void isUndefined_data();
+ void isUndefined();
+
+ void isValid_data();
+ void isValid();
+
+// void isVariant_data();
+// void isVariant();
+
+ void toBool_data();
+ void toBool();
+
+ void toBoolean_data();
+ void toBoolean();
+
+// void toDateTime_data();
+// void toDateTime();
+
+ void toInt32_data();
+ void toInt32();
+
+ void toInteger_data();
+ void toInteger();
+
+ void toNumber_data();
+ void toNumber();
+
+// void toQMetaObject_data();
+// void toQMetaObject();
+
+// void toQObject_data();
+// void toQObject();
+
+// void toRegExp_data();
+// void toRegExp();
+
+ void toString_data();
+ void toString();
+
+ void toUInt16_data();
+ void toUInt16();
+
+ void toUInt32_data();
+ void toUInt32();
+
+// void toVariant_data();
+// void toVariant();
+
+ void equals_data();
+ void equals();
+
+ void strictlyEquals_data();
+ void strictlyEquals();
+
+ void lessThan_data();
+ void lessThan();
+
+ void instanceOf_data();
+ void instanceOf();
+
+ void assignAndCopyConstruct_data();
+ void assignAndCopyConstruct();
+
+ void qscriptvalue_castQString_data();
+ void qscriptvalue_castQString();
+
+ void qscriptvalue_castqsreal_data();
+ void qscriptvalue_castqsreal();
+
+ void qscriptvalue_castbool_data();
+ void qscriptvalue_castbool();
+
+ void qscriptvalue_castqint32_data();
+ void qscriptvalue_castqint32();
+
+ void qscriptvalue_castquint32_data();
+ void qscriptvalue_castquint32();
+
+ void qscriptvalue_castquint16_data();
+ void qscriptvalue_castquint16();
+
+ // Non-generated test functions
+
+ void toObject();
+ void ctor();
+
+ void toString_old();
+ void toNumber_old();
+ void toBoolean_old();
+ void toBool_old();
+ void toInteger_old();
+ void toInt32_old();
+ void toUInt32_old();
+ void toUInt16_old();
+ void toVariant_old();
+ void toQObject_old();
+ void toDateTime_old();
+ void toRegExp_old();
+ void instanceOf_old();
+ void isArray_old();
+ void isDate_old();
+ void isError_old();
+ void isRegExp_old();
+
+ void lessThan_old();
+ void equals_old();
+ void strictlyEquals_old();
+
+ void getSetPrototype();
+ void getSetScope();
+ void getSetProperty();
+ void arrayElementGetterSetter();
+ void getSetData();
+ void getSetScriptClass();
+ void call();
+ void construct();
+ void castToPointer();
+ void prettyPrinter_data();
+ void prettyPrinter();
+ void engineDeleted();
+ void valueOfWithClosure();
+ void objectId();
+
+private:
+ typedef void (tst_QScriptValue::*InitDataFunction)();
+ typedef void (tst_QScriptValue::*DefineDataFunction)(const char *);
+ void dataHelper(InitDataFunction init, DefineDataFunction define);
+ QTestData &newRow(const char *tag);
+
+ typedef void (tst_QScriptValue::*TestFunction)(const char *, const QScriptValue &);
+ void testHelper(TestFunction fun);
+
+ // Generated functions
+
+ void initScriptValues();
+
+ void isArray_initData();
+ void isArray_makeData(const char *expr);
+ void isArray_test(const char *expr, const QScriptValue &value);
+
+ void isBool_initData();
+ void isBool_makeData(const char *expr);
+ void isBool_test(const char *expr, const QScriptValue &value);
+
+ void isBoolean_initData();
+ void isBoolean_makeData(const char *expr);
+ void isBoolean_test(const char *expr, const QScriptValue &value);
+
+ void isDate_initData();
+ void isDate_makeData(const char *expr);
+ void isDate_test(const char *expr, const QScriptValue &value);
+
+ void isError_initData();
+ void isError_makeData(const char *expr);
+ void isError_test(const char *expr, const QScriptValue &value);
+
+ void isFunction_initData();
+ void isFunction_makeData(const char *expr);
+ void isFunction_test(const char *expr, const QScriptValue &value);
+
+ void isNull_initData();
+ void isNull_makeData(const char *expr);
+ void isNull_test(const char *expr, const QScriptValue &value);
+
+ void isNumber_initData();
+ void isNumber_makeData(const char *expr);
+ void isNumber_test(const char *expr, const QScriptValue &value);
+
+ void isObject_initData();
+ void isObject_makeData(const char *expr);
+ void isObject_test(const char *expr, const QScriptValue &value);
+
+ void isQMetaObject_initData();
+ void isQMetaObject_makeData(const char *expr);
+ void isQMetaObject_test(const char *expr, const QScriptValue &value);
+
+ void isQObject_initData();
+ void isQObject_makeData(const char *expr);
+ void isQObject_test(const char *expr, const QScriptValue &value);
+
+ void isRegExp_initData();
+ void isRegExp_makeData(const char *expr);
+ void isRegExp_test(const char *expr, const QScriptValue &value);
+
+ void isString_initData();
+ void isString_makeData(const char *expr);
+ void isString_test(const char *expr, const QScriptValue &value);
+
+ void isUndefined_initData();
+ void isUndefined_makeData(const char *expr);
+ void isUndefined_test(const char *expr, const QScriptValue &value);
+
+ void isValid_initData();
+ void isValid_makeData(const char *expr);
+ void isValid_test(const char *expr, const QScriptValue &value);
+
+ void isVariant_initData();
+ void isVariant_makeData(const char *expr);
+ void isVariant_test(const char *expr, const QScriptValue &value);
+
+ void toBool_initData();
+ void toBool_makeData(const char *);
+ void toBool_test(const char *, const QScriptValue &value);
+
+ void toBoolean_initData();
+ void toBoolean_makeData(const char *);
+ void toBoolean_test(const char *, const QScriptValue &value);
+
+ void toDateTime_initData();
+ void toDateTime_makeData(const char *);
+ void toDateTime_test(const char *, const QScriptValue &value);
+
+ void toInt32_initData();
+ void toInt32_makeData(const char *);
+ void toInt32_test(const char *, const QScriptValue &value);
+
+ void toInteger_initData();
+ void toInteger_makeData(const char *);
+ void toInteger_test(const char *, const QScriptValue &value);
+
+ void toNumber_initData();
+ void toNumber_makeData(const char *);
+ void toNumber_test(const char *, const QScriptValue &value);
+
+ void toQMetaObject_initData();
+ void toQMetaObject_makeData(const char *);
+ void toQMetaObject_test(const char *, const QScriptValue &value);
+
+ void toQObject_initData();
+ void toQObject_makeData(const char *);
+ void toQObject_test(const char *, const QScriptValue &value);
+
+ void toRegExp_initData();
+ void toRegExp_makeData(const char *);
+ void toRegExp_test(const char *, const QScriptValue &value);
+
+ void toString_initData();
+ void toString_makeData(const char *);
+ void toString_test(const char *, const QScriptValue &value);
+
+ void toUInt16_initData();
+ void toUInt16_makeData(const char *);
+ void toUInt16_test(const char *, const QScriptValue &value);
+
+ void toUInt32_initData();
+ void toUInt32_makeData(const char *);
+ void toUInt32_test(const char *, const QScriptValue &value);
+
+ void toVariant_initData();
+ void toVariant_makeData(const char *);
+ void toVariant_test(const char *, const QScriptValue &value);
+
+ void equals_initData();
+ void equals_makeData(const char *);
+ void equals_test(const char *, const QScriptValue &value);
+
+ void strictlyEquals_initData();
+ void strictlyEquals_makeData(const char *);
+ void strictlyEquals_test(const char *, const QScriptValue &value);
+
+ void lessThan_initData();
+ void lessThan_makeData(const char *);
+ void lessThan_test(const char *, const QScriptValue &value);
+
+ void instanceOf_initData();
+ void instanceOf_makeData(const char *);
+ void instanceOf_test(const char *, const QScriptValue &value);
+
+ void assignAndCopyConstruct_initData();
+ void assignAndCopyConstruct_makeData(const char *);
+ void assignAndCopyConstruct_test(const char *, const QScriptValue &value);
+
+ void qscriptvalue_castQString_initData();
+ void qscriptvalue_castQString_makeData(const char *);
+ void qscriptvalue_castQString_test(const char *, const QScriptValue &value);
+
+ void qscriptvalue_castqsreal_initData();
+ void qscriptvalue_castqsreal_makeData(const char *);
+ void qscriptvalue_castqsreal_test(const char *, const QScriptValue &value);
+
+ void qscriptvalue_castbool_initData();
+ void qscriptvalue_castbool_makeData(const char *);
+ void qscriptvalue_castbool_test(const char *, const QScriptValue &value);
+
+ void qscriptvalue_castqint32_initData();
+ void qscriptvalue_castqint32_makeData(const char *);
+ void qscriptvalue_castqint32_test(const char *, const QScriptValue &value);
+
+ void qscriptvalue_castquint32_initData();
+ void qscriptvalue_castquint32_makeData(const char *);
+ void qscriptvalue_castquint32_test(const char *, const QScriptValue &value);
+
+ void qscriptvalue_castquint16_initData();
+ void qscriptvalue_castquint16_makeData(const char *);
+ void qscriptvalue_castquint16_test(const char *, const QScriptValue &value);
+
+private:
+ QScriptEngine *engine;
+ QHash<QString, QScriptValue> m_values;
+ QString m_currentExpression;
+};
+
+#define DEFINE_TEST_FUNCTION(name) \
+void tst_QScriptValue::name##_data() { dataHelper(&tst_QScriptValue::name##_initData, &tst_QScriptValue::name##_makeData); } \
+void tst_QScriptValue::name() { testHelper(&tst_QScriptValue::name##_test); }
+
+#endif
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp
new file mode 100644
index 0000000..1d105b4
--- /dev/null
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp
@@ -0,0 +1,6369 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "tst_qscriptvalue.h"
+
+#define DEFINE_TEST_VALUE(expr) m_values.insert(QString::fromLatin1(#expr), expr)
+
+void tst_QScriptValue::initScriptValues()
+{
+ m_values.clear();
+ if (engine)
+ delete engine;
+ engine = new QScriptEngine;
+ DEFINE_TEST_VALUE(QScriptValue());
+ DEFINE_TEST_VALUE(QScriptValue(QScriptValue::UndefinedValue));
+ DEFINE_TEST_VALUE(QScriptValue(QScriptValue::NullValue));
+ DEFINE_TEST_VALUE(QScriptValue(true));
+ DEFINE_TEST_VALUE(QScriptValue(false));
+ DEFINE_TEST_VALUE(QScriptValue(int(122)));
+ DEFINE_TEST_VALUE(QScriptValue(uint(124)));
+ DEFINE_TEST_VALUE(QScriptValue(0));
+ DEFINE_TEST_VALUE(QScriptValue(0.0));
+ DEFINE_TEST_VALUE(QScriptValue(123.0));
+ DEFINE_TEST_VALUE(QScriptValue(6.37e-8));
+ DEFINE_TEST_VALUE(QScriptValue(-6.37e-8));
+ DEFINE_TEST_VALUE(QScriptValue(0x43211234));
+ DEFINE_TEST_VALUE(QScriptValue(0x10000));
+ DEFINE_TEST_VALUE(QScriptValue(0x10001));
+ DEFINE_TEST_VALUE(QScriptValue(qSNaN()));
+ DEFINE_TEST_VALUE(QScriptValue(qQNaN()));
+ DEFINE_TEST_VALUE(QScriptValue(qInf()));
+ DEFINE_TEST_VALUE(QScriptValue(-qInf()));
+ DEFINE_TEST_VALUE(QScriptValue("NaN"));
+ DEFINE_TEST_VALUE(QScriptValue("Infinity"));
+ DEFINE_TEST_VALUE(QScriptValue("-Infinity"));
+ DEFINE_TEST_VALUE(QScriptValue("ciao"));
+ DEFINE_TEST_VALUE(QScriptValue(QString::fromLatin1("ciao")));
+ DEFINE_TEST_VALUE(QScriptValue(QString("")));
+ DEFINE_TEST_VALUE(QScriptValue(QString()));
+ DEFINE_TEST_VALUE(QScriptValue(QString("0")));
+ DEFINE_TEST_VALUE(QScriptValue(QString("123")));
+ DEFINE_TEST_VALUE(QScriptValue(QString("12.4")));
+ DEFINE_TEST_VALUE(QScriptValue(0, QScriptValue::UndefinedValue));
+ DEFINE_TEST_VALUE(QScriptValue(0, QScriptValue::NullValue));
+ DEFINE_TEST_VALUE(QScriptValue(0, true));
+ DEFINE_TEST_VALUE(QScriptValue(0, false));
+ DEFINE_TEST_VALUE(QScriptValue(0, int(122)));
+ DEFINE_TEST_VALUE(QScriptValue(0, uint(124)));
+ DEFINE_TEST_VALUE(QScriptValue(0, 0));
+ DEFINE_TEST_VALUE(QScriptValue(0, 0.0));
+ DEFINE_TEST_VALUE(QScriptValue(0, 123.0));
+ DEFINE_TEST_VALUE(QScriptValue(0, 6.37e-8));
+ DEFINE_TEST_VALUE(QScriptValue(0, -6.37e-8));
+ DEFINE_TEST_VALUE(QScriptValue(0, 0x43211234));
+ DEFINE_TEST_VALUE(QScriptValue(0, 0x10000));
+ DEFINE_TEST_VALUE(QScriptValue(0, 0x10001));
+ DEFINE_TEST_VALUE(QScriptValue(0, qSNaN()));
+ DEFINE_TEST_VALUE(QScriptValue(0, qQNaN()));
+ DEFINE_TEST_VALUE(QScriptValue(0, qInf()));
+ DEFINE_TEST_VALUE(QScriptValue(0, -qInf()));
+ DEFINE_TEST_VALUE(QScriptValue(0, "NaN"));
+ DEFINE_TEST_VALUE(QScriptValue(0, "Infinity"));
+ DEFINE_TEST_VALUE(QScriptValue(0, "-Infinity"));
+ DEFINE_TEST_VALUE(QScriptValue(0, "ciao"));
+ DEFINE_TEST_VALUE(QScriptValue(0, QString::fromLatin1("ciao")));
+ DEFINE_TEST_VALUE(QScriptValue(0, QString("")));
+ DEFINE_TEST_VALUE(QScriptValue(0, QString()));
+ DEFINE_TEST_VALUE(QScriptValue(0, QString("0")));
+ DEFINE_TEST_VALUE(QScriptValue(0, QString("123")));
+ DEFINE_TEST_VALUE(QScriptValue(0, QString("12.3")));
+ DEFINE_TEST_VALUE(QScriptValue(engine, QScriptValue::UndefinedValue));
+ DEFINE_TEST_VALUE(QScriptValue(engine, QScriptValue::NullValue));
+ DEFINE_TEST_VALUE(QScriptValue(engine, true));
+ DEFINE_TEST_VALUE(QScriptValue(engine, false));
+ DEFINE_TEST_VALUE(QScriptValue(engine, int(122)));
+ DEFINE_TEST_VALUE(QScriptValue(engine, uint(124)));
+ DEFINE_TEST_VALUE(QScriptValue(engine, 0));
+ DEFINE_TEST_VALUE(QScriptValue(engine, 0.0));
+ DEFINE_TEST_VALUE(QScriptValue(engine, 123.0));
+ DEFINE_TEST_VALUE(QScriptValue(engine, 6.37e-8));
+ DEFINE_TEST_VALUE(QScriptValue(engine, -6.37e-8));
+ DEFINE_TEST_VALUE(QScriptValue(engine, 0x43211234));
+ DEFINE_TEST_VALUE(QScriptValue(engine, 0x10000));
+ DEFINE_TEST_VALUE(QScriptValue(engine, 0x10001));
+ DEFINE_TEST_VALUE(QScriptValue(engine, qSNaN()));
+ DEFINE_TEST_VALUE(QScriptValue(engine, qQNaN()));
+ DEFINE_TEST_VALUE(QScriptValue(engine, qInf()));
+ DEFINE_TEST_VALUE(QScriptValue(engine, -qInf()));
+ DEFINE_TEST_VALUE(QScriptValue(engine, "NaN"));
+ DEFINE_TEST_VALUE(QScriptValue(engine, "Infinity"));
+ DEFINE_TEST_VALUE(QScriptValue(engine, "-Infinity"));
+ DEFINE_TEST_VALUE(QScriptValue(engine, "ciao"));
+ DEFINE_TEST_VALUE(QScriptValue(engine, QString::fromLatin1("ciao")));
+ DEFINE_TEST_VALUE(QScriptValue(engine, QString("")));
+ DEFINE_TEST_VALUE(QScriptValue(engine, QString()));
+ DEFINE_TEST_VALUE(QScriptValue(engine, QString("0")));
+ DEFINE_TEST_VALUE(QScriptValue(engine, QString("123")));
+ DEFINE_TEST_VALUE(QScriptValue(engine, QString("1.23")));
+ DEFINE_TEST_VALUE(engine->evaluate("[]"));
+ DEFINE_TEST_VALUE(engine->evaluate("{}"));
+ DEFINE_TEST_VALUE(engine->evaluate("Object.prototype"));
+ DEFINE_TEST_VALUE(engine->evaluate("Date.prototype"));
+ DEFINE_TEST_VALUE(engine->evaluate("Array.prototype"));
+ DEFINE_TEST_VALUE(engine->evaluate("Function.prototype"));
+ DEFINE_TEST_VALUE(engine->evaluate("Error.prototype"));
+ DEFINE_TEST_VALUE(engine->evaluate("Object"));
+ DEFINE_TEST_VALUE(engine->evaluate("Array"));
+ DEFINE_TEST_VALUE(engine->evaluate("Number"));
+ DEFINE_TEST_VALUE(engine->evaluate("Function"));
+ DEFINE_TEST_VALUE(engine->evaluate("(function() { return 1; })"));
+ DEFINE_TEST_VALUE(engine->evaluate("(function() { return 'ciao'; })"));
+ DEFINE_TEST_VALUE(engine->evaluate("(function() { throw new Error('foo'); })"));
+ DEFINE_TEST_VALUE(engine->evaluate("/foo/"));
+ DEFINE_TEST_VALUE(engine->evaluate("new Object()"));
+ DEFINE_TEST_VALUE(engine->evaluate("new Array()"));
+ DEFINE_TEST_VALUE(engine->evaluate("new Error()"));
+}
+
+
+void tst_QScriptValue::isValid_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::isValid_makeData(const char* expr)
+{
+ static QSet<QString> isValid;
+ if (isValid.isEmpty()) {
+ isValid << "QScriptValue(QScriptValue::UndefinedValue)"
+ << "QScriptValue(QScriptValue::NullValue)"
+ << "QScriptValue(true)"
+ << "QScriptValue(false)"
+ << "QScriptValue(int(122))"
+ << "QScriptValue(uint(124))"
+ << "QScriptValue(0)"
+ << "QScriptValue(0.0)"
+ << "QScriptValue(123.0)"
+ << "QScriptValue(6.37e-8)"
+ << "QScriptValue(-6.37e-8)"
+ << "QScriptValue(0x43211234)"
+ << "QScriptValue(0x10000)"
+ << "QScriptValue(0x10001)"
+ << "QScriptValue(qSNaN())"
+ << "QScriptValue(qQNaN())"
+ << "QScriptValue(qInf())"
+ << "QScriptValue(-qInf())"
+ << "QScriptValue(\"NaN\")"
+ << "QScriptValue(\"Infinity\")"
+ << "QScriptValue(\"-Infinity\")"
+ << "QScriptValue(\"ciao\")"
+ << "QScriptValue(QString::fromLatin1(\"ciao\"))"
+ << "QScriptValue(QString(\"\"))"
+ << "QScriptValue(QString())"
+ << "QScriptValue(QString(\"0\"))"
+ << "QScriptValue(QString(\"123\"))"
+ << "QScriptValue(QString(\"12.4\"))"
+ << "QScriptValue(0, QScriptValue::UndefinedValue)"
+ << "QScriptValue(0, QScriptValue::NullValue)"
+ << "QScriptValue(0, true)"
+ << "QScriptValue(0, false)"
+ << "QScriptValue(0, int(122))"
+ << "QScriptValue(0, uint(124))"
+ << "QScriptValue(0, 0)"
+ << "QScriptValue(0, 0.0)"
+ << "QScriptValue(0, 123.0)"
+ << "QScriptValue(0, 6.37e-8)"
+ << "QScriptValue(0, -6.37e-8)"
+ << "QScriptValue(0, 0x43211234)"
+ << "QScriptValue(0, 0x10000)"
+ << "QScriptValue(0, 0x10001)"
+ << "QScriptValue(0, qSNaN())"
+ << "QScriptValue(0, qQNaN())"
+ << "QScriptValue(0, qInf())"
+ << "QScriptValue(0, -qInf())"
+ << "QScriptValue(0, \"NaN\")"
+ << "QScriptValue(0, \"Infinity\")"
+ << "QScriptValue(0, \"-Infinity\")"
+ << "QScriptValue(0, \"ciao\")"
+ << "QScriptValue(0, QString::fromLatin1(\"ciao\"))"
+ << "QScriptValue(0, QString(\"\"))"
+ << "QScriptValue(0, QString())"
+ << "QScriptValue(0, QString(\"0\"))"
+ << "QScriptValue(0, QString(\"123\"))"
+ << "QScriptValue(0, QString(\"12.3\"))"
+ << "QScriptValue(engine, QScriptValue::UndefinedValue)"
+ << "QScriptValue(engine, QScriptValue::NullValue)"
+ << "QScriptValue(engine, true)"
+ << "QScriptValue(engine, false)"
+ << "QScriptValue(engine, int(122))"
+ << "QScriptValue(engine, uint(124))"
+ << "QScriptValue(engine, 0)"
+ << "QScriptValue(engine, 0.0)"
+ << "QScriptValue(engine, 123.0)"
+ << "QScriptValue(engine, 6.37e-8)"
+ << "QScriptValue(engine, -6.37e-8)"
+ << "QScriptValue(engine, 0x43211234)"
+ << "QScriptValue(engine, 0x10000)"
+ << "QScriptValue(engine, 0x10001)"
+ << "QScriptValue(engine, qSNaN())"
+ << "QScriptValue(engine, qQNaN())"
+ << "QScriptValue(engine, qInf())"
+ << "QScriptValue(engine, -qInf())"
+ << "QScriptValue(engine, \"NaN\")"
+ << "QScriptValue(engine, \"Infinity\")"
+ << "QScriptValue(engine, \"-Infinity\")"
+ << "QScriptValue(engine, \"ciao\")"
+ << "QScriptValue(engine, QString::fromLatin1(\"ciao\"))"
+ << "QScriptValue(engine, QString(\"\"))"
+ << "QScriptValue(engine, QString())"
+ << "QScriptValue(engine, QString(\"0\"))"
+ << "QScriptValue(engine, QString(\"123\"))"
+ << "QScriptValue(engine, QString(\"1.23\"))"
+ << "engine->evaluate(\"[]\")"
+ << "engine->evaluate(\"{}\")"
+ << "engine->evaluate(\"Object.prototype\")"
+ << "engine->evaluate(\"Date.prototype\")"
+ << "engine->evaluate(\"Array.prototype\")"
+ << "engine->evaluate(\"Function.prototype\")"
+ << "engine->evaluate(\"Error.prototype\")"
+ << "engine->evaluate(\"Object\")"
+ << "engine->evaluate(\"Array\")"
+ << "engine->evaluate(\"Number\")"
+ << "engine->evaluate(\"Function\")"
+ << "engine->evaluate(\"(function() { return 1; })\")"
+ << "engine->evaluate(\"(function() { return 'ciao'; })\")"
+ << "engine->evaluate(\"(function() { throw new Error('foo'); })\")"
+ << "engine->evaluate(\"/foo/\")"
+ << "engine->evaluate(\"new Object()\")"
+ << "engine->evaluate(\"new Array()\")"
+ << "engine->evaluate(\"new Error()\")"
+ ;
+ }
+ newRow(expr) << isValid.contains(expr);
+}
+
+void tst_QScriptValue::isValid_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isValid(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isValid)
+
+
+void tst_QScriptValue::isBool_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::isBool_makeData(const char* expr)
+{
+ static QSet<QString> isBool;
+ if (isBool.isEmpty()) {
+ isBool << "QScriptValue(true)"
+ << "QScriptValue(false)"
+ << "QScriptValue(0, true)"
+ << "QScriptValue(0, false)"
+ << "QScriptValue(engine, true)"
+ << "QScriptValue(engine, false)"
+ ;
+ }
+ newRow(expr) << isBool.contains(expr);
+}
+
+void tst_QScriptValue::isBool_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isBool(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isBool)
+
+
+void tst_QScriptValue::isBoolean_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::isBoolean_makeData(const char* expr)
+{
+ static QSet<QString> isBoolean;
+ if (isBoolean.isEmpty()) {
+ isBoolean << "QScriptValue(true)"
+ << "QScriptValue(false)"
+ << "QScriptValue(0, true)"
+ << "QScriptValue(0, false)"
+ << "QScriptValue(engine, true)"
+ << "QScriptValue(engine, false)"
+ ;
+ }
+ newRow(expr) << isBoolean.contains(expr);
+}
+
+void tst_QScriptValue::isBoolean_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isBoolean(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isBoolean)
+
+
+void tst_QScriptValue::isNumber_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::isNumber_makeData(const char* expr)
+{
+ static QSet<QString> isNumber;
+ if (isNumber.isEmpty()) {
+ isNumber << "QScriptValue(int(122))"
+ << "QScriptValue(uint(124))"
+ << "QScriptValue(0)"
+ << "QScriptValue(0.0)"
+ << "QScriptValue(123.0)"
+ << "QScriptValue(6.37e-8)"
+ << "QScriptValue(-6.37e-8)"
+ << "QScriptValue(0x43211234)"
+ << "QScriptValue(0x10000)"
+ << "QScriptValue(0x10001)"
+ << "QScriptValue(qSNaN())"
+ << "QScriptValue(qQNaN())"
+ << "QScriptValue(qInf())"
+ << "QScriptValue(-qInf())"
+ << "QScriptValue(0, int(122))"
+ << "QScriptValue(0, uint(124))"
+ << "QScriptValue(0, 0)"
+ << "QScriptValue(0, 0.0)"
+ << "QScriptValue(0, 123.0)"
+ << "QScriptValue(0, 6.37e-8)"
+ << "QScriptValue(0, -6.37e-8)"
+ << "QScriptValue(0, 0x43211234)"
+ << "QScriptValue(0, 0x10000)"
+ << "QScriptValue(0, 0x10001)"
+ << "QScriptValue(0, qSNaN())"
+ << "QScriptValue(0, qQNaN())"
+ << "QScriptValue(0, qInf())"
+ << "QScriptValue(0, -qInf())"
+ << "QScriptValue(engine, int(122))"
+ << "QScriptValue(engine, uint(124))"
+ << "QScriptValue(engine, 0)"
+ << "QScriptValue(engine, 0.0)"
+ << "QScriptValue(engine, 123.0)"
+ << "QScriptValue(engine, 6.37e-8)"
+ << "QScriptValue(engine, -6.37e-8)"
+ << "QScriptValue(engine, 0x43211234)"
+ << "QScriptValue(engine, 0x10000)"
+ << "QScriptValue(engine, 0x10001)"
+ << "QScriptValue(engine, qSNaN())"
+ << "QScriptValue(engine, qQNaN())"
+ << "QScriptValue(engine, qInf())"
+ << "QScriptValue(engine, -qInf())"
+ ;
+ }
+ newRow(expr) << isNumber.contains(expr);
+}
+
+void tst_QScriptValue::isNumber_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isNumber(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isNumber)
+
+
+void tst_QScriptValue::isFunction_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::isFunction_makeData(const char* expr)
+{
+ static QSet<QString> isFunction;
+ if (isFunction.isEmpty()) {
+ isFunction << "engine->evaluate(\"Function.prototype\")"
+ << "engine->evaluate(\"Object\")"
+ << "engine->evaluate(\"Array\")"
+ << "engine->evaluate(\"Number\")"
+ << "engine->evaluate(\"Function\")"
+ << "engine->evaluate(\"(function() { return 1; })\")"
+ << "engine->evaluate(\"(function() { return 'ciao'; })\")"
+ << "engine->evaluate(\"(function() { throw new Error('foo'); })\")"
+ << "engine->evaluate(\"/foo/\")"
+ ;
+ }
+ newRow(expr) << isFunction.contains(expr);
+}
+
+void tst_QScriptValue::isFunction_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isFunction(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isFunction)
+
+
+void tst_QScriptValue::isNull_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::isNull_makeData(const char* expr)
+{
+ static QSet<QString> isNull;
+ if (isNull.isEmpty()) {
+ isNull << "QScriptValue(QScriptValue::NullValue)"
+ << "QScriptValue(0, QScriptValue::NullValue)"
+ << "QScriptValue(engine, QScriptValue::NullValue)"
+ ;
+ }
+ newRow(expr) << isNull.contains(expr);
+}
+
+void tst_QScriptValue::isNull_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isNull(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isNull)
+
+
+void tst_QScriptValue::isString_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::isString_makeData(const char* expr)
+{
+ static QSet<QString> isString;
+ if (isString.isEmpty()) {
+ isString << "QScriptValue(\"NaN\")"
+ << "QScriptValue(\"Infinity\")"
+ << "QScriptValue(\"-Infinity\")"
+ << "QScriptValue(\"ciao\")"
+ << "QScriptValue(QString::fromLatin1(\"ciao\"))"
+ << "QScriptValue(QString(\"\"))"
+ << "QScriptValue(QString())"
+ << "QScriptValue(QString(\"0\"))"
+ << "QScriptValue(QString(\"123\"))"
+ << "QScriptValue(QString(\"12.4\"))"
+ << "QScriptValue(0, \"NaN\")"
+ << "QScriptValue(0, \"Infinity\")"
+ << "QScriptValue(0, \"-Infinity\")"
+ << "QScriptValue(0, \"ciao\")"
+ << "QScriptValue(0, QString::fromLatin1(\"ciao\"))"
+ << "QScriptValue(0, QString(\"\"))"
+ << "QScriptValue(0, QString())"
+ << "QScriptValue(0, QString(\"0\"))"
+ << "QScriptValue(0, QString(\"123\"))"
+ << "QScriptValue(0, QString(\"12.3\"))"
+ << "QScriptValue(engine, \"NaN\")"
+ << "QScriptValue(engine, \"Infinity\")"
+ << "QScriptValue(engine, \"-Infinity\")"
+ << "QScriptValue(engine, \"ciao\")"
+ << "QScriptValue(engine, QString::fromLatin1(\"ciao\"))"
+ << "QScriptValue(engine, QString(\"\"))"
+ << "QScriptValue(engine, QString())"
+ << "QScriptValue(engine, QString(\"0\"))"
+ << "QScriptValue(engine, QString(\"123\"))"
+ << "QScriptValue(engine, QString(\"1.23\"))"
+ ;
+ }
+ newRow(expr) << isString.contains(expr);
+}
+
+void tst_QScriptValue::isString_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isString(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isString)
+
+
+void tst_QScriptValue::isUndefined_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::isUndefined_makeData(const char* expr)
+{
+ static QSet<QString> isUndefined;
+ if (isUndefined.isEmpty()) {
+ isUndefined << "QScriptValue(QScriptValue::UndefinedValue)"
+ << "QScriptValue(0, QScriptValue::UndefinedValue)"
+ << "QScriptValue(engine, QScriptValue::UndefinedValue)"
+ << "engine->evaluate(\"{}\")"
+ ;
+ }
+ newRow(expr) << isUndefined.contains(expr);
+}
+
+void tst_QScriptValue::isUndefined_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isUndefined(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isUndefined)
+
+
+
+
+
+void tst_QScriptValue::isObject_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::isObject_makeData(const char* expr)
+{
+ static QSet<QString> isObject;
+ if (isObject.isEmpty()) {
+ isObject << "engine->evaluate(\"[]\")"
+ << "engine->evaluate(\"Object.prototype\")"
+ << "engine->evaluate(\"Date.prototype\")"
+ << "engine->evaluate(\"Array.prototype\")"
+ << "engine->evaluate(\"Function.prototype\")"
+ << "engine->evaluate(\"Error.prototype\")"
+ << "engine->evaluate(\"Object\")"
+ << "engine->evaluate(\"Array\")"
+ << "engine->evaluate(\"Number\")"
+ << "engine->evaluate(\"Function\")"
+ << "engine->evaluate(\"(function() { return 1; })\")"
+ << "engine->evaluate(\"(function() { return 'ciao'; })\")"
+ << "engine->evaluate(\"(function() { throw new Error('foo'); })\")"
+ << "engine->evaluate(\"/foo/\")"
+ << "engine->evaluate(\"new Object()\")"
+ << "engine->evaluate(\"new Array()\")"
+ << "engine->evaluate(\"new Error()\")"
+ ;
+ }
+ newRow(expr) << isObject.contains(expr);
+}
+
+void tst_QScriptValue::isObject_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isObject(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isObject)
+
+
+void tst_QScriptValue::isDate_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::isDate_makeData(const char* expr)
+{
+ static QSet<QString> isDate;
+ if (isDate.isEmpty()) {
+ isDate << "engine->evaluate(\"Date.prototype\")"
+ ;
+ }
+ newRow(expr) << isDate.contains(expr);
+}
+
+void tst_QScriptValue::isDate_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isDate(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isDate)
+
+
+void tst_QScriptValue::isRegExp_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::isRegExp_makeData(const char* expr)
+{
+ static QSet<QString> isRegExp;
+ if (isRegExp.isEmpty()) {
+ isRegExp << "engine->evaluate(\"/foo/\")"
+ ;
+ }
+ newRow(expr) << isRegExp.contains(expr);
+}
+
+void tst_QScriptValue::isRegExp_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isRegExp(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isRegExp)
+
+
+void tst_QScriptValue::isArray_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::isArray_makeData(const char* expr)
+{
+ static QSet<QString> isArray;
+ if (isArray.isEmpty()) {
+ isArray << "engine->evaluate(\"[]\")"
+ << "engine->evaluate(\"Array.prototype\")"
+ << "engine->evaluate(\"new Array()\")"
+ ;
+ }
+ newRow(expr) << isArray.contains(expr);
+}
+
+void tst_QScriptValue::isArray_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isArray(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isArray)
+
+
+void tst_QScriptValue::isError_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::isError_makeData(const char* expr)
+{
+ static QSet<QString> isError;
+ if (isError.isEmpty()) {
+ isError << "engine->evaluate(\"Error.prototype\")"
+ << "engine->evaluate(\"new Error()\")"
+ ;
+ }
+ newRow(expr) << isError.contains(expr);
+}
+
+void tst_QScriptValue::isError_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.isError(), expected);
+}
+
+DEFINE_TEST_FUNCTION(isError)
+
+
+
+void tst_QScriptValue::toString_initData()
+{
+ QTest::addColumn<QString>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::toString_makeData(const char* expr)
+{
+ static QHash<QString, QString> toString;
+ if (toString.isEmpty()) {
+ toString.insert("QScriptValue()", "");
+ toString.insert("QScriptValue(QScriptValue::UndefinedValue)", "undefined");
+ toString.insert("QScriptValue(QScriptValue::NullValue)", "null");
+ toString.insert("QScriptValue(true)", "true");
+ toString.insert("QScriptValue(false)", "false");
+ toString.insert("QScriptValue(int(122))", "122");
+ toString.insert("QScriptValue(uint(124))", "124");
+ toString.insert("QScriptValue(0)", "0");
+ toString.insert("QScriptValue(0.0)", "0");
+ toString.insert("QScriptValue(123.0)", "123");
+ toString.insert("QScriptValue(6.37e-8)", "6.37e-8");
+ toString.insert("QScriptValue(-6.37e-8)", "-6.37e-8");
+ toString.insert("QScriptValue(0x43211234)", "1126240820");
+ toString.insert("QScriptValue(0x10000)", "65536");
+ toString.insert("QScriptValue(0x10001)", "65537");
+ toString.insert("QScriptValue(qSNaN())", "NaN");
+ toString.insert("QScriptValue(qQNaN())", "NaN");
+ toString.insert("QScriptValue(qInf())", "Infinity");
+ toString.insert("QScriptValue(-qInf())", "-Infinity");
+ toString.insert("QScriptValue(\"NaN\")", "NaN");
+ toString.insert("QScriptValue(\"Infinity\")", "Infinity");
+ toString.insert("QScriptValue(\"-Infinity\")", "-Infinity");
+ toString.insert("QScriptValue(\"ciao\")", "ciao");
+ toString.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", "ciao");
+ toString.insert("QScriptValue(QString(\"\"))", "");
+ toString.insert("QScriptValue(QString())", "");
+ toString.insert("QScriptValue(QString(\"0\"))", "0");
+ toString.insert("QScriptValue(QString(\"123\"))", "123");
+ toString.insert("QScriptValue(QString(\"12.4\"))", "12.4");
+ toString.insert("QScriptValue(0, QScriptValue::UndefinedValue)", "undefined");
+ toString.insert("QScriptValue(0, QScriptValue::NullValue)", "null");
+ toString.insert("QScriptValue(0, true)", "true");
+ toString.insert("QScriptValue(0, false)", "false");
+ toString.insert("QScriptValue(0, int(122))", "122");
+ toString.insert("QScriptValue(0, uint(124))", "124");
+ toString.insert("QScriptValue(0, 0)", "0");
+ toString.insert("QScriptValue(0, 0.0)", "0");
+ toString.insert("QScriptValue(0, 123.0)", "123");
+ toString.insert("QScriptValue(0, 6.37e-8)", "6.37e-8");
+ toString.insert("QScriptValue(0, -6.37e-8)", "-6.37e-8");
+ toString.insert("QScriptValue(0, 0x43211234)", "1126240820");
+ toString.insert("QScriptValue(0, 0x10000)", "65536");
+ toString.insert("QScriptValue(0, 0x10001)", "65537");
+ toString.insert("QScriptValue(0, qSNaN())", "NaN");
+ toString.insert("QScriptValue(0, qQNaN())", "NaN");
+ toString.insert("QScriptValue(0, qInf())", "Infinity");
+ toString.insert("QScriptValue(0, -qInf())", "-Infinity");
+ toString.insert("QScriptValue(0, \"NaN\")", "NaN");
+ toString.insert("QScriptValue(0, \"Infinity\")", "Infinity");
+ toString.insert("QScriptValue(0, \"-Infinity\")", "-Infinity");
+ toString.insert("QScriptValue(0, \"ciao\")", "ciao");
+ toString.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", "ciao");
+ toString.insert("QScriptValue(0, QString(\"\"))", "");
+ toString.insert("QScriptValue(0, QString())", "");
+ toString.insert("QScriptValue(0, QString(\"0\"))", "0");
+ toString.insert("QScriptValue(0, QString(\"123\"))", "123");
+ toString.insert("QScriptValue(0, QString(\"12.3\"))", "12.3");
+ toString.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", "undefined");
+ toString.insert("QScriptValue(engine, QScriptValue::NullValue)", "null");
+ toString.insert("QScriptValue(engine, true)", "true");
+ toString.insert("QScriptValue(engine, false)", "false");
+ toString.insert("QScriptValue(engine, int(122))", "122");
+ toString.insert("QScriptValue(engine, uint(124))", "124");
+ toString.insert("QScriptValue(engine, 0)", "0");
+ toString.insert("QScriptValue(engine, 0.0)", "0");
+ toString.insert("QScriptValue(engine, 123.0)", "123");
+ toString.insert("QScriptValue(engine, 6.37e-8)", "6.37e-8");
+ toString.insert("QScriptValue(engine, -6.37e-8)", "-6.37e-8");
+ toString.insert("QScriptValue(engine, 0x43211234)", "1126240820");
+ toString.insert("QScriptValue(engine, 0x10000)", "65536");
+ toString.insert("QScriptValue(engine, 0x10001)", "65537");
+ toString.insert("QScriptValue(engine, qSNaN())", "NaN");
+ toString.insert("QScriptValue(engine, qQNaN())", "NaN");
+ toString.insert("QScriptValue(engine, qInf())", "Infinity");
+ toString.insert("QScriptValue(engine, -qInf())", "-Infinity");
+ toString.insert("QScriptValue(engine, \"NaN\")", "NaN");
+ toString.insert("QScriptValue(engine, \"Infinity\")", "Infinity");
+ toString.insert("QScriptValue(engine, \"-Infinity\")", "-Infinity");
+ toString.insert("QScriptValue(engine, \"ciao\")", "ciao");
+ toString.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", "ciao");
+ toString.insert("QScriptValue(engine, QString(\"\"))", "");
+ toString.insert("QScriptValue(engine, QString())", "");
+ toString.insert("QScriptValue(engine, QString(\"0\"))", "0");
+ toString.insert("QScriptValue(engine, QString(\"123\"))", "123");
+ toString.insert("QScriptValue(engine, QString(\"1.23\"))", "1.23");
+ toString.insert("engine->evaluate(\"[]\")", "");
+ toString.insert("engine->evaluate(\"{}\")", "undefined");
+ toString.insert("engine->evaluate(\"Object.prototype\")", "[object Object]");
+ toString.insert("engine->evaluate(\"Date.prototype\")", "Invalid Date");
+ toString.insert("engine->evaluate(\"Array.prototype\")", "");
+ toString.insert("engine->evaluate(\"Function.prototype\")", "function () {\n [native code]\n}");
+ toString.insert("engine->evaluate(\"Error.prototype\")", "Error: Unknown error");
+ toString.insert("engine->evaluate(\"Object\")", "function Object() {\n [native code]\n}");
+ toString.insert("engine->evaluate(\"Array\")", "function Array() {\n [native code]\n}");
+ toString.insert("engine->evaluate(\"Number\")", "function Number() {\n [native code]\n}");
+ toString.insert("engine->evaluate(\"Function\")", "function Function() {\n [native code]\n}");
+ toString.insert("engine->evaluate(\"(function() { return 1; })\")", "function () { return 1; }");
+ toString.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", "function () { return 'ciao'; }");
+ toString.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", "function () { throw new Error('foo'); }");
+ toString.insert("engine->evaluate(\"/foo/\")", "/foo/");
+ toString.insert("engine->evaluate(\"new Object()\")", "[object Object]");
+ toString.insert("engine->evaluate(\"new Array()\")", "");
+ toString.insert("engine->evaluate(\"new Error()\")", "Error: Unknown error");
+ }
+ newRow(expr) << toString.value(expr);
+}
+
+void tst_QScriptValue::toString_test(const char*, const QScriptValue& value)
+{
+ QFETCH(QString, expected);
+ QCOMPARE(value.toString(), expected);
+}
+
+DEFINE_TEST_FUNCTION(toString)
+
+
+void tst_QScriptValue::toNumber_initData()
+{
+ QTest::addColumn<qsreal>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::toNumber_makeData(const char* expr)
+{
+ static QHash<QString, qsreal> toNumber;
+ if (toNumber.isEmpty()) {
+ toNumber.insert("QScriptValue()", 0);
+ toNumber.insert("QScriptValue(QScriptValue::UndefinedValue)", qQNaN());
+ toNumber.insert("QScriptValue(QScriptValue::NullValue)", 0);
+ toNumber.insert("QScriptValue(true)", 1);
+ toNumber.insert("QScriptValue(false)", 0);
+ toNumber.insert("QScriptValue(int(122))", 122);
+ toNumber.insert("QScriptValue(uint(124))", 124);
+ toNumber.insert("QScriptValue(0)", 0);
+ toNumber.insert("QScriptValue(0.0)", 0);
+ toNumber.insert("QScriptValue(123.0)", 123);
+ toNumber.insert("QScriptValue(6.37e-8)", 6.369999999999999e-08);
+ toNumber.insert("QScriptValue(-6.37e-8)", -6.369999999999999e-08);
+ toNumber.insert("QScriptValue(0x43211234)", 1126240820);
+ toNumber.insert("QScriptValue(0x10000)", 65536);
+ toNumber.insert("QScriptValue(0x10001)", 65537);
+ toNumber.insert("QScriptValue(qSNaN())", qQNaN());
+ toNumber.insert("QScriptValue(qQNaN())", qQNaN());
+ toNumber.insert("QScriptValue(qInf())", qInf());
+ toNumber.insert("QScriptValue(-qInf())", qInf());
+ toNumber.insert("QScriptValue(\"NaN\")", qQNaN());
+ toNumber.insert("QScriptValue(\"Infinity\")", qInf());
+ toNumber.insert("QScriptValue(\"-Infinity\")", qInf());
+ toNumber.insert("QScriptValue(\"ciao\")", qQNaN());
+ toNumber.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", qQNaN());
+ toNumber.insert("QScriptValue(QString(\"\"))", 0);
+ toNumber.insert("QScriptValue(QString())", 0);
+ toNumber.insert("QScriptValue(QString(\"0\"))", 0);
+ toNumber.insert("QScriptValue(QString(\"123\"))", 123);
+ toNumber.insert("QScriptValue(QString(\"12.4\"))", 12.4);
+ toNumber.insert("QScriptValue(0, QScriptValue::UndefinedValue)", qQNaN());
+ toNumber.insert("QScriptValue(0, QScriptValue::NullValue)", 0);
+ toNumber.insert("QScriptValue(0, true)", 1);
+ toNumber.insert("QScriptValue(0, false)", 0);
+ toNumber.insert("QScriptValue(0, int(122))", 122);
+ toNumber.insert("QScriptValue(0, uint(124))", 124);
+ toNumber.insert("QScriptValue(0, 0)", 0);
+ toNumber.insert("QScriptValue(0, 0.0)", 0);
+ toNumber.insert("QScriptValue(0, 123.0)", 123);
+ toNumber.insert("QScriptValue(0, 6.37e-8)", 6.369999999999999e-08);
+ toNumber.insert("QScriptValue(0, -6.37e-8)", -6.369999999999999e-08);
+ toNumber.insert("QScriptValue(0, 0x43211234)", 1126240820);
+ toNumber.insert("QScriptValue(0, 0x10000)", 65536);
+ toNumber.insert("QScriptValue(0, 0x10001)", 65537);
+ toNumber.insert("QScriptValue(0, qSNaN())", qQNaN());
+ toNumber.insert("QScriptValue(0, qQNaN())", qQNaN());
+ toNumber.insert("QScriptValue(0, qInf())", qInf());
+ toNumber.insert("QScriptValue(0, -qInf())", qInf());
+ toNumber.insert("QScriptValue(0, \"NaN\")", qQNaN());
+ toNumber.insert("QScriptValue(0, \"Infinity\")", qInf());
+ toNumber.insert("QScriptValue(0, \"-Infinity\")", qInf());
+ toNumber.insert("QScriptValue(0, \"ciao\")", qQNaN());
+ toNumber.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", qQNaN());
+ toNumber.insert("QScriptValue(0, QString(\"\"))", 0);
+ toNumber.insert("QScriptValue(0, QString())", 0);
+ toNumber.insert("QScriptValue(0, QString(\"0\"))", 0);
+ toNumber.insert("QScriptValue(0, QString(\"123\"))", 123);
+ toNumber.insert("QScriptValue(0, QString(\"12.3\"))", 12.3);
+ toNumber.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", qQNaN());
+ toNumber.insert("QScriptValue(engine, QScriptValue::NullValue)", 0);
+ toNumber.insert("QScriptValue(engine, true)", 1);
+ toNumber.insert("QScriptValue(engine, false)", 0);
+ toNumber.insert("QScriptValue(engine, int(122))", 122);
+ toNumber.insert("QScriptValue(engine, uint(124))", 124);
+ toNumber.insert("QScriptValue(engine, 0)", 0);
+ toNumber.insert("QScriptValue(engine, 0.0)", 0);
+ toNumber.insert("QScriptValue(engine, 123.0)", 123);
+ toNumber.insert("QScriptValue(engine, 6.37e-8)", 6.369999999999999e-08);
+ toNumber.insert("QScriptValue(engine, -6.37e-8)", -6.369999999999999e-08);
+ toNumber.insert("QScriptValue(engine, 0x43211234)", 1126240820);
+ toNumber.insert("QScriptValue(engine, 0x10000)", 65536);
+ toNumber.insert("QScriptValue(engine, 0x10001)", 65537);
+ toNumber.insert("QScriptValue(engine, qSNaN())", qQNaN());
+ toNumber.insert("QScriptValue(engine, qQNaN())", qQNaN());
+ toNumber.insert("QScriptValue(engine, qInf())", qInf());
+ toNumber.insert("QScriptValue(engine, -qInf())", qInf());
+ toNumber.insert("QScriptValue(engine, \"NaN\")", qQNaN());
+ toNumber.insert("QScriptValue(engine, \"Infinity\")", qInf());
+ toNumber.insert("QScriptValue(engine, \"-Infinity\")", qInf());
+ toNumber.insert("QScriptValue(engine, \"ciao\")", qQNaN());
+ toNumber.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", qQNaN());
+ toNumber.insert("QScriptValue(engine, QString(\"\"))", 0);
+ toNumber.insert("QScriptValue(engine, QString())", 0);
+ toNumber.insert("QScriptValue(engine, QString(\"0\"))", 0);
+ toNumber.insert("QScriptValue(engine, QString(\"123\"))", 123);
+ toNumber.insert("QScriptValue(engine, QString(\"1.23\"))", 1.23);
+ toNumber.insert("engine->evaluate(\"[]\")", 0);
+ toNumber.insert("engine->evaluate(\"{}\")", qQNaN());
+ toNumber.insert("engine->evaluate(\"Object.prototype\")", qQNaN());
+ toNumber.insert("engine->evaluate(\"Date.prototype\")", qQNaN());
+ toNumber.insert("engine->evaluate(\"Array.prototype\")", 0);
+ toNumber.insert("engine->evaluate(\"Function.prototype\")", qQNaN());
+ toNumber.insert("engine->evaluate(\"Error.prototype\")", qQNaN());
+ toNumber.insert("engine->evaluate(\"Object\")", qQNaN());
+ toNumber.insert("engine->evaluate(\"Array\")", qQNaN());
+ toNumber.insert("engine->evaluate(\"Number\")", qQNaN());
+ toNumber.insert("engine->evaluate(\"Function\")", qQNaN());
+ toNumber.insert("engine->evaluate(\"(function() { return 1; })\")", qQNaN());
+ toNumber.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", qQNaN());
+ toNumber.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", qQNaN());
+ toNumber.insert("engine->evaluate(\"/foo/\")", qQNaN());
+ toNumber.insert("engine->evaluate(\"new Object()\")", qQNaN());
+ toNumber.insert("engine->evaluate(\"new Array()\")", 0);
+ toNumber.insert("engine->evaluate(\"new Error()\")", qQNaN());
+ }
+ newRow(expr) << toNumber.value(expr);
+}
+
+void tst_QScriptValue::toNumber_test(const char*, const QScriptValue& value)
+{
+ QFETCH(qsreal, expected);
+ if (qIsNaN(expected)) {
+ QVERIFY(qIsNaN(value.toNumber()));
+ return;
+ }
+ if (qIsInf(expected)) {
+ QVERIFY(qIsInf(value.toNumber()));
+ return;
+ }
+ QCOMPARE(value.toNumber(), expected);
+}
+
+DEFINE_TEST_FUNCTION(toNumber)
+
+
+void tst_QScriptValue::toBool_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::toBool_makeData(const char* expr)
+{
+ static QHash<QString, bool> toBool;
+ if (toBool.isEmpty()) {
+ toBool.insert("QScriptValue()", false);
+ toBool.insert("QScriptValue(QScriptValue::UndefinedValue)", false);
+ toBool.insert("QScriptValue(QScriptValue::NullValue)", false);
+ toBool.insert("QScriptValue(true)", true);
+ toBool.insert("QScriptValue(false)", false);
+ toBool.insert("QScriptValue(int(122))", true);
+ toBool.insert("QScriptValue(uint(124))", true);
+ toBool.insert("QScriptValue(0)", false);
+ toBool.insert("QScriptValue(0.0)", false);
+ toBool.insert("QScriptValue(123.0)", true);
+ toBool.insert("QScriptValue(6.37e-8)", true);
+ toBool.insert("QScriptValue(-6.37e-8)", true);
+ toBool.insert("QScriptValue(0x43211234)", true);
+ toBool.insert("QScriptValue(0x10000)", true);
+ toBool.insert("QScriptValue(0x10001)", true);
+ toBool.insert("QScriptValue(qSNaN())", false);
+ toBool.insert("QScriptValue(qQNaN())", false);
+ toBool.insert("QScriptValue(qInf())", true);
+ toBool.insert("QScriptValue(-qInf())", true);
+ toBool.insert("QScriptValue(\"NaN\")", true);
+ toBool.insert("QScriptValue(\"Infinity\")", true);
+ toBool.insert("QScriptValue(\"-Infinity\")", true);
+ toBool.insert("QScriptValue(\"ciao\")", true);
+ toBool.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", true);
+ toBool.insert("QScriptValue(QString(\"\"))", false);
+ toBool.insert("QScriptValue(QString())", false);
+ toBool.insert("QScriptValue(QString(\"0\"))", true);
+ toBool.insert("QScriptValue(QString(\"123\"))", true);
+ toBool.insert("QScriptValue(QString(\"12.4\"))", true);
+ toBool.insert("QScriptValue(0, QScriptValue::UndefinedValue)", false);
+ toBool.insert("QScriptValue(0, QScriptValue::NullValue)", false);
+ toBool.insert("QScriptValue(0, true)", true);
+ toBool.insert("QScriptValue(0, false)", false);
+ toBool.insert("QScriptValue(0, int(122))", true);
+ toBool.insert("QScriptValue(0, uint(124))", true);
+ toBool.insert("QScriptValue(0, 0)", false);
+ toBool.insert("QScriptValue(0, 0.0)", false);
+ toBool.insert("QScriptValue(0, 123.0)", true);
+ toBool.insert("QScriptValue(0, 6.37e-8)", true);
+ toBool.insert("QScriptValue(0, -6.37e-8)", true);
+ toBool.insert("QScriptValue(0, 0x43211234)", true);
+ toBool.insert("QScriptValue(0, 0x10000)", true);
+ toBool.insert("QScriptValue(0, 0x10001)", true);
+ toBool.insert("QScriptValue(0, qSNaN())", false);
+ toBool.insert("QScriptValue(0, qQNaN())", false);
+ toBool.insert("QScriptValue(0, qInf())", true);
+ toBool.insert("QScriptValue(0, -qInf())", true);
+ toBool.insert("QScriptValue(0, \"NaN\")", true);
+ toBool.insert("QScriptValue(0, \"Infinity\")", true);
+ toBool.insert("QScriptValue(0, \"-Infinity\")", true);
+ toBool.insert("QScriptValue(0, \"ciao\")", true);
+ toBool.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", true);
+ toBool.insert("QScriptValue(0, QString(\"\"))", false);
+ toBool.insert("QScriptValue(0, QString())", false);
+ toBool.insert("QScriptValue(0, QString(\"0\"))", true);
+ toBool.insert("QScriptValue(0, QString(\"123\"))", true);
+ toBool.insert("QScriptValue(0, QString(\"12.3\"))", true);
+ toBool.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", false);
+ toBool.insert("QScriptValue(engine, QScriptValue::NullValue)", false);
+ toBool.insert("QScriptValue(engine, true)", true);
+ toBool.insert("QScriptValue(engine, false)", false);
+ toBool.insert("QScriptValue(engine, int(122))", true);
+ toBool.insert("QScriptValue(engine, uint(124))", true);
+ toBool.insert("QScriptValue(engine, 0)", false);
+ toBool.insert("QScriptValue(engine, 0.0)", false);
+ toBool.insert("QScriptValue(engine, 123.0)", true);
+ toBool.insert("QScriptValue(engine, 6.37e-8)", true);
+ toBool.insert("QScriptValue(engine, -6.37e-8)", true);
+ toBool.insert("QScriptValue(engine, 0x43211234)", true);
+ toBool.insert("QScriptValue(engine, 0x10000)", true);
+ toBool.insert("QScriptValue(engine, 0x10001)", true);
+ toBool.insert("QScriptValue(engine, qSNaN())", false);
+ toBool.insert("QScriptValue(engine, qQNaN())", false);
+ toBool.insert("QScriptValue(engine, qInf())", true);
+ toBool.insert("QScriptValue(engine, -qInf())", true);
+ toBool.insert("QScriptValue(engine, \"NaN\")", true);
+ toBool.insert("QScriptValue(engine, \"Infinity\")", true);
+ toBool.insert("QScriptValue(engine, \"-Infinity\")", true);
+ toBool.insert("QScriptValue(engine, \"ciao\")", true);
+ toBool.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", true);
+ toBool.insert("QScriptValue(engine, QString(\"\"))", false);
+ toBool.insert("QScriptValue(engine, QString())", false);
+ toBool.insert("QScriptValue(engine, QString(\"0\"))", true);
+ toBool.insert("QScriptValue(engine, QString(\"123\"))", true);
+ toBool.insert("QScriptValue(engine, QString(\"1.23\"))", true);
+ toBool.insert("engine->evaluate(\"[]\")", true);
+ toBool.insert("engine->evaluate(\"{}\")", false);
+ toBool.insert("engine->evaluate(\"Object.prototype\")", true);
+ toBool.insert("engine->evaluate(\"Date.prototype\")", true);
+ toBool.insert("engine->evaluate(\"Array.prototype\")", true);
+ toBool.insert("engine->evaluate(\"Function.prototype\")", true);
+ toBool.insert("engine->evaluate(\"Error.prototype\")", true);
+ toBool.insert("engine->evaluate(\"Object\")", true);
+ toBool.insert("engine->evaluate(\"Array\")", true);
+ toBool.insert("engine->evaluate(\"Number\")", true);
+ toBool.insert("engine->evaluate(\"Function\")", true);
+ toBool.insert("engine->evaluate(\"(function() { return 1; })\")", true);
+ toBool.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", true);
+ toBool.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", true);
+ toBool.insert("engine->evaluate(\"/foo/\")", true);
+ toBool.insert("engine->evaluate(\"new Object()\")", true);
+ toBool.insert("engine->evaluate(\"new Array()\")", true);
+ toBool.insert("engine->evaluate(\"new Error()\")", true);
+ }
+ newRow(expr) << toBool.value(expr);
+}
+
+void tst_QScriptValue::toBool_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.toBool(), expected);
+}
+
+DEFINE_TEST_FUNCTION(toBool)
+
+
+void tst_QScriptValue::toBoolean_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::toBoolean_makeData(const char* expr)
+{
+ static QHash<QString, bool> toBoolean;
+ if (toBoolean.isEmpty()) {
+ toBoolean.insert("QScriptValue()", false);
+ toBoolean.insert("QScriptValue(QScriptValue::UndefinedValue)", false);
+ toBoolean.insert("QScriptValue(QScriptValue::NullValue)", false);
+ toBoolean.insert("QScriptValue(true)", true);
+ toBoolean.insert("QScriptValue(false)", false);
+ toBoolean.insert("QScriptValue(int(122))", true);
+ toBoolean.insert("QScriptValue(uint(124))", true);
+ toBoolean.insert("QScriptValue(0)", false);
+ toBoolean.insert("QScriptValue(0.0)", false);
+ toBoolean.insert("QScriptValue(123.0)", true);
+ toBoolean.insert("QScriptValue(6.37e-8)", true);
+ toBoolean.insert("QScriptValue(-6.37e-8)", true);
+ toBoolean.insert("QScriptValue(0x43211234)", true);
+ toBoolean.insert("QScriptValue(0x10000)", true);
+ toBoolean.insert("QScriptValue(0x10001)", true);
+ toBoolean.insert("QScriptValue(qSNaN())", false);
+ toBoolean.insert("QScriptValue(qQNaN())", false);
+ toBoolean.insert("QScriptValue(qInf())", true);
+ toBoolean.insert("QScriptValue(-qInf())", true);
+ toBoolean.insert("QScriptValue(\"NaN\")", true);
+ toBoolean.insert("QScriptValue(\"Infinity\")", true);
+ toBoolean.insert("QScriptValue(\"-Infinity\")", true);
+ toBoolean.insert("QScriptValue(\"ciao\")", true);
+ toBoolean.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", true);
+ toBoolean.insert("QScriptValue(QString(\"\"))", false);
+ toBoolean.insert("QScriptValue(QString())", false);
+ toBoolean.insert("QScriptValue(QString(\"0\"))", true);
+ toBoolean.insert("QScriptValue(QString(\"123\"))", true);
+ toBoolean.insert("QScriptValue(QString(\"12.4\"))", true);
+ toBoolean.insert("QScriptValue(0, QScriptValue::UndefinedValue)", false);
+ toBoolean.insert("QScriptValue(0, QScriptValue::NullValue)", false);
+ toBoolean.insert("QScriptValue(0, true)", true);
+ toBoolean.insert("QScriptValue(0, false)", false);
+ toBoolean.insert("QScriptValue(0, int(122))", true);
+ toBoolean.insert("QScriptValue(0, uint(124))", true);
+ toBoolean.insert("QScriptValue(0, 0)", false);
+ toBoolean.insert("QScriptValue(0, 0.0)", false);
+ toBoolean.insert("QScriptValue(0, 123.0)", true);
+ toBoolean.insert("QScriptValue(0, 6.37e-8)", true);
+ toBoolean.insert("QScriptValue(0, -6.37e-8)", true);
+ toBoolean.insert("QScriptValue(0, 0x43211234)", true);
+ toBoolean.insert("QScriptValue(0, 0x10000)", true);
+ toBoolean.insert("QScriptValue(0, 0x10001)", true);
+ toBoolean.insert("QScriptValue(0, qSNaN())", false);
+ toBoolean.insert("QScriptValue(0, qQNaN())", false);
+ toBoolean.insert("QScriptValue(0, qInf())", true);
+ toBoolean.insert("QScriptValue(0, -qInf())", true);
+ toBoolean.insert("QScriptValue(0, \"NaN\")", true);
+ toBoolean.insert("QScriptValue(0, \"Infinity\")", true);
+ toBoolean.insert("QScriptValue(0, \"-Infinity\")", true);
+ toBoolean.insert("QScriptValue(0, \"ciao\")", true);
+ toBoolean.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", true);
+ toBoolean.insert("QScriptValue(0, QString(\"\"))", false);
+ toBoolean.insert("QScriptValue(0, QString())", false);
+ toBoolean.insert("QScriptValue(0, QString(\"0\"))", true);
+ toBoolean.insert("QScriptValue(0, QString(\"123\"))", true);
+ toBoolean.insert("QScriptValue(0, QString(\"12.3\"))", true);
+ toBoolean.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", false);
+ toBoolean.insert("QScriptValue(engine, QScriptValue::NullValue)", false);
+ toBoolean.insert("QScriptValue(engine, true)", true);
+ toBoolean.insert("QScriptValue(engine, false)", false);
+ toBoolean.insert("QScriptValue(engine, int(122))", true);
+ toBoolean.insert("QScriptValue(engine, uint(124))", true);
+ toBoolean.insert("QScriptValue(engine, 0)", false);
+ toBoolean.insert("QScriptValue(engine, 0.0)", false);
+ toBoolean.insert("QScriptValue(engine, 123.0)", true);
+ toBoolean.insert("QScriptValue(engine, 6.37e-8)", true);
+ toBoolean.insert("QScriptValue(engine, -6.37e-8)", true);
+ toBoolean.insert("QScriptValue(engine, 0x43211234)", true);
+ toBoolean.insert("QScriptValue(engine, 0x10000)", true);
+ toBoolean.insert("QScriptValue(engine, 0x10001)", true);
+ toBoolean.insert("QScriptValue(engine, qSNaN())", false);
+ toBoolean.insert("QScriptValue(engine, qQNaN())", false);
+ toBoolean.insert("QScriptValue(engine, qInf())", true);
+ toBoolean.insert("QScriptValue(engine, -qInf())", true);
+ toBoolean.insert("QScriptValue(engine, \"NaN\")", true);
+ toBoolean.insert("QScriptValue(engine, \"Infinity\")", true);
+ toBoolean.insert("QScriptValue(engine, \"-Infinity\")", true);
+ toBoolean.insert("QScriptValue(engine, \"ciao\")", true);
+ toBoolean.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", true);
+ toBoolean.insert("QScriptValue(engine, QString(\"\"))", false);
+ toBoolean.insert("QScriptValue(engine, QString())", false);
+ toBoolean.insert("QScriptValue(engine, QString(\"0\"))", true);
+ toBoolean.insert("QScriptValue(engine, QString(\"123\"))", true);
+ toBoolean.insert("QScriptValue(engine, QString(\"1.23\"))", true);
+ toBoolean.insert("engine->evaluate(\"[]\")", true);
+ toBoolean.insert("engine->evaluate(\"{}\")", false);
+ toBoolean.insert("engine->evaluate(\"Object.prototype\")", true);
+ toBoolean.insert("engine->evaluate(\"Date.prototype\")", true);
+ toBoolean.insert("engine->evaluate(\"Array.prototype\")", true);
+ toBoolean.insert("engine->evaluate(\"Function.prototype\")", true);
+ toBoolean.insert("engine->evaluate(\"Error.prototype\")", true);
+ toBoolean.insert("engine->evaluate(\"Object\")", true);
+ toBoolean.insert("engine->evaluate(\"Array\")", true);
+ toBoolean.insert("engine->evaluate(\"Number\")", true);
+ toBoolean.insert("engine->evaluate(\"Function\")", true);
+ toBoolean.insert("engine->evaluate(\"(function() { return 1; })\")", true);
+ toBoolean.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", true);
+ toBoolean.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", true);
+ toBoolean.insert("engine->evaluate(\"/foo/\")", true);
+ toBoolean.insert("engine->evaluate(\"new Object()\")", true);
+ toBoolean.insert("engine->evaluate(\"new Array()\")", true);
+ toBoolean.insert("engine->evaluate(\"new Error()\")", true);
+ }
+ newRow(expr) << toBoolean.value(expr);
+}
+
+void tst_QScriptValue::toBoolean_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(value.toBoolean(), expected);
+}
+
+DEFINE_TEST_FUNCTION(toBoolean)
+
+
+void tst_QScriptValue::toInteger_initData()
+{
+ QTest::addColumn<qsreal>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::toInteger_makeData(const char* expr)
+{
+ static QHash<QString, qsreal> toInteger;
+ if (toInteger.isEmpty()) {
+ toInteger.insert("QScriptValue()", 0);
+ toInteger.insert("QScriptValue(QScriptValue::UndefinedValue)", 0);
+ toInteger.insert("QScriptValue(QScriptValue::NullValue)", 0);
+ toInteger.insert("QScriptValue(true)", 1);
+ toInteger.insert("QScriptValue(false)", 0);
+ toInteger.insert("QScriptValue(int(122))", 122);
+ toInteger.insert("QScriptValue(uint(124))", 124);
+ toInteger.insert("QScriptValue(0)", 0);
+ toInteger.insert("QScriptValue(0.0)", 0);
+ toInteger.insert("QScriptValue(123.0)", 123);
+ toInteger.insert("QScriptValue(6.37e-8)", 0);
+ toInteger.insert("QScriptValue(-6.37e-8)", 0);
+ toInteger.insert("QScriptValue(0x43211234)", 1126240820);
+ toInteger.insert("QScriptValue(0x10000)", 65536);
+ toInteger.insert("QScriptValue(0x10001)", 65537);
+ toInteger.insert("QScriptValue(qSNaN())", 0);
+ toInteger.insert("QScriptValue(qQNaN())", 0);
+ toInteger.insert("QScriptValue(qInf())", qInf());
+ toInteger.insert("QScriptValue(-qInf())", qInf());
+ toInteger.insert("QScriptValue(\"NaN\")", 0);
+ toInteger.insert("QScriptValue(\"Infinity\")", qInf());
+ toInteger.insert("QScriptValue(\"-Infinity\")", qInf());
+ toInteger.insert("QScriptValue(\"ciao\")", 0);
+ toInteger.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0);
+ toInteger.insert("QScriptValue(QString(\"\"))", 0);
+ toInteger.insert("QScriptValue(QString())", 0);
+ toInteger.insert("QScriptValue(QString(\"0\"))", 0);
+ toInteger.insert("QScriptValue(QString(\"123\"))", 123);
+ toInteger.insert("QScriptValue(QString(\"12.4\"))", 12);
+ toInteger.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0);
+ toInteger.insert("QScriptValue(0, QScriptValue::NullValue)", 0);
+ toInteger.insert("QScriptValue(0, true)", 1);
+ toInteger.insert("QScriptValue(0, false)", 0);
+ toInteger.insert("QScriptValue(0, int(122))", 122);
+ toInteger.insert("QScriptValue(0, uint(124))", 124);
+ toInteger.insert("QScriptValue(0, 0)", 0);
+ toInteger.insert("QScriptValue(0, 0.0)", 0);
+ toInteger.insert("QScriptValue(0, 123.0)", 123);
+ toInteger.insert("QScriptValue(0, 6.37e-8)", 0);
+ toInteger.insert("QScriptValue(0, -6.37e-8)", 0);
+ toInteger.insert("QScriptValue(0, 0x43211234)", 1126240820);
+ toInteger.insert("QScriptValue(0, 0x10000)", 65536);
+ toInteger.insert("QScriptValue(0, 0x10001)", 65537);
+ toInteger.insert("QScriptValue(0, qSNaN())", 0);
+ toInteger.insert("QScriptValue(0, qQNaN())", 0);
+ toInteger.insert("QScriptValue(0, qInf())", qInf());
+ toInteger.insert("QScriptValue(0, -qInf())", qInf());
+ toInteger.insert("QScriptValue(0, \"NaN\")", 0);
+ toInteger.insert("QScriptValue(0, \"Infinity\")", qInf());
+ toInteger.insert("QScriptValue(0, \"-Infinity\")", qInf());
+ toInteger.insert("QScriptValue(0, \"ciao\")", 0);
+ toInteger.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0);
+ toInteger.insert("QScriptValue(0, QString(\"\"))", 0);
+ toInteger.insert("QScriptValue(0, QString())", 0);
+ toInteger.insert("QScriptValue(0, QString(\"0\"))", 0);
+ toInteger.insert("QScriptValue(0, QString(\"123\"))", 123);
+ toInteger.insert("QScriptValue(0, QString(\"12.3\"))", 12);
+ toInteger.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0);
+ toInteger.insert("QScriptValue(engine, QScriptValue::NullValue)", 0);
+ toInteger.insert("QScriptValue(engine, true)", 1);
+ toInteger.insert("QScriptValue(engine, false)", 0);
+ toInteger.insert("QScriptValue(engine, int(122))", 122);
+ toInteger.insert("QScriptValue(engine, uint(124))", 124);
+ toInteger.insert("QScriptValue(engine, 0)", 0);
+ toInteger.insert("QScriptValue(engine, 0.0)", 0);
+ toInteger.insert("QScriptValue(engine, 123.0)", 123);
+ toInteger.insert("QScriptValue(engine, 6.37e-8)", 0);
+ toInteger.insert("QScriptValue(engine, -6.37e-8)", 0);
+ toInteger.insert("QScriptValue(engine, 0x43211234)", 1126240820);
+ toInteger.insert("QScriptValue(engine, 0x10000)", 65536);
+ toInteger.insert("QScriptValue(engine, 0x10001)", 65537);
+ toInteger.insert("QScriptValue(engine, qSNaN())", 0);
+ toInteger.insert("QScriptValue(engine, qQNaN())", 0);
+ toInteger.insert("QScriptValue(engine, qInf())", qInf());
+ toInteger.insert("QScriptValue(engine, -qInf())", qInf());
+ toInteger.insert("QScriptValue(engine, \"NaN\")", 0);
+ toInteger.insert("QScriptValue(engine, \"Infinity\")", qInf());
+ toInteger.insert("QScriptValue(engine, \"-Infinity\")", qInf());
+ toInteger.insert("QScriptValue(engine, \"ciao\")", 0);
+ toInteger.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0);
+ toInteger.insert("QScriptValue(engine, QString(\"\"))", 0);
+ toInteger.insert("QScriptValue(engine, QString())", 0);
+ toInteger.insert("QScriptValue(engine, QString(\"0\"))", 0);
+ toInteger.insert("QScriptValue(engine, QString(\"123\"))", 123);
+ toInteger.insert("QScriptValue(engine, QString(\"1.23\"))", 1);
+ toInteger.insert("engine->evaluate(\"[]\")", 0);
+ toInteger.insert("engine->evaluate(\"{}\")", 0);
+ toInteger.insert("engine->evaluate(\"Object.prototype\")", 0);
+ toInteger.insert("engine->evaluate(\"Date.prototype\")", 0);
+ toInteger.insert("engine->evaluate(\"Array.prototype\")", 0);
+ toInteger.insert("engine->evaluate(\"Function.prototype\")", 0);
+ toInteger.insert("engine->evaluate(\"Error.prototype\")", 0);
+ toInteger.insert("engine->evaluate(\"Object\")", 0);
+ toInteger.insert("engine->evaluate(\"Array\")", 0);
+ toInteger.insert("engine->evaluate(\"Number\")", 0);
+ toInteger.insert("engine->evaluate(\"Function\")", 0);
+ toInteger.insert("engine->evaluate(\"(function() { return 1; })\")", 0);
+ toInteger.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0);
+ toInteger.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0);
+ toInteger.insert("engine->evaluate(\"/foo/\")", 0);
+ toInteger.insert("engine->evaluate(\"new Object()\")", 0);
+ toInteger.insert("engine->evaluate(\"new Array()\")", 0);
+ toInteger.insert("engine->evaluate(\"new Error()\")", 0);
+ }
+ newRow(expr) << toInteger.value(expr);
+}
+
+void tst_QScriptValue::toInteger_test(const char*, const QScriptValue& value)
+{
+ QFETCH(qsreal, expected);
+ if (qIsInf(expected)) {
+ QVERIFY(qIsInf(value.toInteger()));
+ return;
+ }
+ QCOMPARE(value.toInteger(), expected);
+}
+
+DEFINE_TEST_FUNCTION(toInteger)
+
+
+void tst_QScriptValue::toInt32_initData()
+{
+ QTest::addColumn<qint32>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::toInt32_makeData(const char* expr)
+{
+ static QHash<QString, qint32> toInt32;
+ if (toInt32.isEmpty()) {
+ toInt32.insert("QScriptValue()", 0);
+ toInt32.insert("QScriptValue(QScriptValue::UndefinedValue)", 0);
+ toInt32.insert("QScriptValue(QScriptValue::NullValue)", 0);
+ toInt32.insert("QScriptValue(true)", 1);
+ toInt32.insert("QScriptValue(false)", 0);
+ toInt32.insert("QScriptValue(int(122))", 122);
+ toInt32.insert("QScriptValue(uint(124))", 124);
+ toInt32.insert("QScriptValue(0)", 0);
+ toInt32.insert("QScriptValue(0.0)", 0);
+ toInt32.insert("QScriptValue(123.0)", 123);
+ toInt32.insert("QScriptValue(6.37e-8)", 0);
+ toInt32.insert("QScriptValue(-6.37e-8)", 0);
+ toInt32.insert("QScriptValue(0x43211234)", 1126240820);
+ toInt32.insert("QScriptValue(0x10000)", 65536);
+ toInt32.insert("QScriptValue(0x10001)", 65537);
+ toInt32.insert("QScriptValue(qSNaN())", 0);
+ toInt32.insert("QScriptValue(qQNaN())", 0);
+ toInt32.insert("QScriptValue(qInf())", 0);
+ toInt32.insert("QScriptValue(-qInf())", 0);
+ toInt32.insert("QScriptValue(\"NaN\")", 0);
+ toInt32.insert("QScriptValue(\"Infinity\")", 0);
+ toInt32.insert("QScriptValue(\"-Infinity\")", 0);
+ toInt32.insert("QScriptValue(\"ciao\")", 0);
+ toInt32.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0);
+ toInt32.insert("QScriptValue(QString(\"\"))", 0);
+ toInt32.insert("QScriptValue(QString())", 0);
+ toInt32.insert("QScriptValue(QString(\"0\"))", 0);
+ toInt32.insert("QScriptValue(QString(\"123\"))", 123);
+ toInt32.insert("QScriptValue(QString(\"12.4\"))", 12);
+ toInt32.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0);
+ toInt32.insert("QScriptValue(0, QScriptValue::NullValue)", 0);
+ toInt32.insert("QScriptValue(0, true)", 1);
+ toInt32.insert("QScriptValue(0, false)", 0);
+ toInt32.insert("QScriptValue(0, int(122))", 122);
+ toInt32.insert("QScriptValue(0, uint(124))", 124);
+ toInt32.insert("QScriptValue(0, 0)", 0);
+ toInt32.insert("QScriptValue(0, 0.0)", 0);
+ toInt32.insert("QScriptValue(0, 123.0)", 123);
+ toInt32.insert("QScriptValue(0, 6.37e-8)", 0);
+ toInt32.insert("QScriptValue(0, -6.37e-8)", 0);
+ toInt32.insert("QScriptValue(0, 0x43211234)", 1126240820);
+ toInt32.insert("QScriptValue(0, 0x10000)", 65536);
+ toInt32.insert("QScriptValue(0, 0x10001)", 65537);
+ toInt32.insert("QScriptValue(0, qSNaN())", 0);
+ toInt32.insert("QScriptValue(0, qQNaN())", 0);
+ toInt32.insert("QScriptValue(0, qInf())", 0);
+ toInt32.insert("QScriptValue(0, -qInf())", 0);
+ toInt32.insert("QScriptValue(0, \"NaN\")", 0);
+ toInt32.insert("QScriptValue(0, \"Infinity\")", 0);
+ toInt32.insert("QScriptValue(0, \"-Infinity\")", 0);
+ toInt32.insert("QScriptValue(0, \"ciao\")", 0);
+ toInt32.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0);
+ toInt32.insert("QScriptValue(0, QString(\"\"))", 0);
+ toInt32.insert("QScriptValue(0, QString())", 0);
+ toInt32.insert("QScriptValue(0, QString(\"0\"))", 0);
+ toInt32.insert("QScriptValue(0, QString(\"123\"))", 123);
+ toInt32.insert("QScriptValue(0, QString(\"12.3\"))", 12);
+ toInt32.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0);
+ toInt32.insert("QScriptValue(engine, QScriptValue::NullValue)", 0);
+ toInt32.insert("QScriptValue(engine, true)", 1);
+ toInt32.insert("QScriptValue(engine, false)", 0);
+ toInt32.insert("QScriptValue(engine, int(122))", 122);
+ toInt32.insert("QScriptValue(engine, uint(124))", 124);
+ toInt32.insert("QScriptValue(engine, 0)", 0);
+ toInt32.insert("QScriptValue(engine, 0.0)", 0);
+ toInt32.insert("QScriptValue(engine, 123.0)", 123);
+ toInt32.insert("QScriptValue(engine, 6.37e-8)", 0);
+ toInt32.insert("QScriptValue(engine, -6.37e-8)", 0);
+ toInt32.insert("QScriptValue(engine, 0x43211234)", 1126240820);
+ toInt32.insert("QScriptValue(engine, 0x10000)", 65536);
+ toInt32.insert("QScriptValue(engine, 0x10001)", 65537);
+ toInt32.insert("QScriptValue(engine, qSNaN())", 0);
+ toInt32.insert("QScriptValue(engine, qQNaN())", 0);
+ toInt32.insert("QScriptValue(engine, qInf())", 0);
+ toInt32.insert("QScriptValue(engine, -qInf())", 0);
+ toInt32.insert("QScriptValue(engine, \"NaN\")", 0);
+ toInt32.insert("QScriptValue(engine, \"Infinity\")", 0);
+ toInt32.insert("QScriptValue(engine, \"-Infinity\")", 0);
+ toInt32.insert("QScriptValue(engine, \"ciao\")", 0);
+ toInt32.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0);
+ toInt32.insert("QScriptValue(engine, QString(\"\"))", 0);
+ toInt32.insert("QScriptValue(engine, QString())", 0);
+ toInt32.insert("QScriptValue(engine, QString(\"0\"))", 0);
+ toInt32.insert("QScriptValue(engine, QString(\"123\"))", 123);
+ toInt32.insert("QScriptValue(engine, QString(\"1.23\"))", 1);
+ toInt32.insert("engine->evaluate(\"[]\")", 0);
+ toInt32.insert("engine->evaluate(\"{}\")", 0);
+ toInt32.insert("engine->evaluate(\"Object.prototype\")", 0);
+ toInt32.insert("engine->evaluate(\"Date.prototype\")", 0);
+ toInt32.insert("engine->evaluate(\"Array.prototype\")", 0);
+ toInt32.insert("engine->evaluate(\"Function.prototype\")", 0);
+ toInt32.insert("engine->evaluate(\"Error.prototype\")", 0);
+ toInt32.insert("engine->evaluate(\"Object\")", 0);
+ toInt32.insert("engine->evaluate(\"Array\")", 0);
+ toInt32.insert("engine->evaluate(\"Number\")", 0);
+ toInt32.insert("engine->evaluate(\"Function\")", 0);
+ toInt32.insert("engine->evaluate(\"(function() { return 1; })\")", 0);
+ toInt32.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0);
+ toInt32.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0);
+ toInt32.insert("engine->evaluate(\"/foo/\")", 0);
+ toInt32.insert("engine->evaluate(\"new Object()\")", 0);
+ toInt32.insert("engine->evaluate(\"new Array()\")", 0);
+ toInt32.insert("engine->evaluate(\"new Error()\")", 0);
+ }
+ newRow(expr) << toInt32.value(expr);
+}
+
+void tst_QScriptValue::toInt32_test(const char*, const QScriptValue& value)
+{
+ QFETCH(qint32, expected);
+ QCOMPARE(value.toInt32(), expected);
+}
+
+DEFINE_TEST_FUNCTION(toInt32)
+
+
+void tst_QScriptValue::toUInt32_initData()
+{
+ QTest::addColumn<quint32>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::toUInt32_makeData(const char* expr)
+{
+ static QHash<QString, quint32> toUInt32;
+ if (toUInt32.isEmpty()) {
+ toUInt32.insert("QScriptValue()", 0);
+ toUInt32.insert("QScriptValue(QScriptValue::UndefinedValue)", 0);
+ toUInt32.insert("QScriptValue(QScriptValue::NullValue)", 0);
+ toUInt32.insert("QScriptValue(true)", 1);
+ toUInt32.insert("QScriptValue(false)", 0);
+ toUInt32.insert("QScriptValue(int(122))", 122);
+ toUInt32.insert("QScriptValue(uint(124))", 124);
+ toUInt32.insert("QScriptValue(0)", 0);
+ toUInt32.insert("QScriptValue(0.0)", 0);
+ toUInt32.insert("QScriptValue(123.0)", 123);
+ toUInt32.insert("QScriptValue(6.37e-8)", 0);
+ toUInt32.insert("QScriptValue(-6.37e-8)", 0);
+ toUInt32.insert("QScriptValue(0x43211234)", 1126240820);
+ toUInt32.insert("QScriptValue(0x10000)", 65536);
+ toUInt32.insert("QScriptValue(0x10001)", 65537);
+ toUInt32.insert("QScriptValue(qSNaN())", 0);
+ toUInt32.insert("QScriptValue(qQNaN())", 0);
+ toUInt32.insert("QScriptValue(qInf())", 0);
+ toUInt32.insert("QScriptValue(-qInf())", 0);
+ toUInt32.insert("QScriptValue(\"NaN\")", 0);
+ toUInt32.insert("QScriptValue(\"Infinity\")", 0);
+ toUInt32.insert("QScriptValue(\"-Infinity\")", 0);
+ toUInt32.insert("QScriptValue(\"ciao\")", 0);
+ toUInt32.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0);
+ toUInt32.insert("QScriptValue(QString(\"\"))", 0);
+ toUInt32.insert("QScriptValue(QString())", 0);
+ toUInt32.insert("QScriptValue(QString(\"0\"))", 0);
+ toUInt32.insert("QScriptValue(QString(\"123\"))", 123);
+ toUInt32.insert("QScriptValue(QString(\"12.4\"))", 12);
+ toUInt32.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0);
+ toUInt32.insert("QScriptValue(0, QScriptValue::NullValue)", 0);
+ toUInt32.insert("QScriptValue(0, true)", 1);
+ toUInt32.insert("QScriptValue(0, false)", 0);
+ toUInt32.insert("QScriptValue(0, int(122))", 122);
+ toUInt32.insert("QScriptValue(0, uint(124))", 124);
+ toUInt32.insert("QScriptValue(0, 0)", 0);
+ toUInt32.insert("QScriptValue(0, 0.0)", 0);
+ toUInt32.insert("QScriptValue(0, 123.0)", 123);
+ toUInt32.insert("QScriptValue(0, 6.37e-8)", 0);
+ toUInt32.insert("QScriptValue(0, -6.37e-8)", 0);
+ toUInt32.insert("QScriptValue(0, 0x43211234)", 1126240820);
+ toUInt32.insert("QScriptValue(0, 0x10000)", 65536);
+ toUInt32.insert("QScriptValue(0, 0x10001)", 65537);
+ toUInt32.insert("QScriptValue(0, qSNaN())", 0);
+ toUInt32.insert("QScriptValue(0, qQNaN())", 0);
+ toUInt32.insert("QScriptValue(0, qInf())", 0);
+ toUInt32.insert("QScriptValue(0, -qInf())", 0);
+ toUInt32.insert("QScriptValue(0, \"NaN\")", 0);
+ toUInt32.insert("QScriptValue(0, \"Infinity\")", 0);
+ toUInt32.insert("QScriptValue(0, \"-Infinity\")", 0);
+ toUInt32.insert("QScriptValue(0, \"ciao\")", 0);
+ toUInt32.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0);
+ toUInt32.insert("QScriptValue(0, QString(\"\"))", 0);
+ toUInt32.insert("QScriptValue(0, QString())", 0);
+ toUInt32.insert("QScriptValue(0, QString(\"0\"))", 0);
+ toUInt32.insert("QScriptValue(0, QString(\"123\"))", 123);
+ toUInt32.insert("QScriptValue(0, QString(\"12.3\"))", 12);
+ toUInt32.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0);
+ toUInt32.insert("QScriptValue(engine, QScriptValue::NullValue)", 0);
+ toUInt32.insert("QScriptValue(engine, true)", 1);
+ toUInt32.insert("QScriptValue(engine, false)", 0);
+ toUInt32.insert("QScriptValue(engine, int(122))", 122);
+ toUInt32.insert("QScriptValue(engine, uint(124))", 124);
+ toUInt32.insert("QScriptValue(engine, 0)", 0);
+ toUInt32.insert("QScriptValue(engine, 0.0)", 0);
+ toUInt32.insert("QScriptValue(engine, 123.0)", 123);
+ toUInt32.insert("QScriptValue(engine, 6.37e-8)", 0);
+ toUInt32.insert("QScriptValue(engine, -6.37e-8)", 0);
+ toUInt32.insert("QScriptValue(engine, 0x43211234)", 1126240820);
+ toUInt32.insert("QScriptValue(engine, 0x10000)", 65536);
+ toUInt32.insert("QScriptValue(engine, 0x10001)", 65537);
+ toUInt32.insert("QScriptValue(engine, qSNaN())", 0);
+ toUInt32.insert("QScriptValue(engine, qQNaN())", 0);
+ toUInt32.insert("QScriptValue(engine, qInf())", 0);
+ toUInt32.insert("QScriptValue(engine, -qInf())", 0);
+ toUInt32.insert("QScriptValue(engine, \"NaN\")", 0);
+ toUInt32.insert("QScriptValue(engine, \"Infinity\")", 0);
+ toUInt32.insert("QScriptValue(engine, \"-Infinity\")", 0);
+ toUInt32.insert("QScriptValue(engine, \"ciao\")", 0);
+ toUInt32.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0);
+ toUInt32.insert("QScriptValue(engine, QString(\"\"))", 0);
+ toUInt32.insert("QScriptValue(engine, QString())", 0);
+ toUInt32.insert("QScriptValue(engine, QString(\"0\"))", 0);
+ toUInt32.insert("QScriptValue(engine, QString(\"123\"))", 123);
+ toUInt32.insert("QScriptValue(engine, QString(\"1.23\"))", 1);
+ toUInt32.insert("engine->evaluate(\"[]\")", 0);
+ toUInt32.insert("engine->evaluate(\"{}\")", 0);
+ toUInt32.insert("engine->evaluate(\"Object.prototype\")", 0);
+ toUInt32.insert("engine->evaluate(\"Date.prototype\")", 0);
+ toUInt32.insert("engine->evaluate(\"Array.prototype\")", 0);
+ toUInt32.insert("engine->evaluate(\"Function.prototype\")", 0);
+ toUInt32.insert("engine->evaluate(\"Error.prototype\")", 0);
+ toUInt32.insert("engine->evaluate(\"Object\")", 0);
+ toUInt32.insert("engine->evaluate(\"Array\")", 0);
+ toUInt32.insert("engine->evaluate(\"Number\")", 0);
+ toUInt32.insert("engine->evaluate(\"Function\")", 0);
+ toUInt32.insert("engine->evaluate(\"(function() { return 1; })\")", 0);
+ toUInt32.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0);
+ toUInt32.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0);
+ toUInt32.insert("engine->evaluate(\"/foo/\")", 0);
+ toUInt32.insert("engine->evaluate(\"new Object()\")", 0);
+ toUInt32.insert("engine->evaluate(\"new Array()\")", 0);
+ toUInt32.insert("engine->evaluate(\"new Error()\")", 0);
+ }
+ newRow(expr) << toUInt32.value(expr);
+}
+
+void tst_QScriptValue::toUInt32_test(const char*, const QScriptValue& value)
+{
+ QFETCH(quint32, expected);
+ QCOMPARE(value.toUInt32(), expected);
+}
+
+DEFINE_TEST_FUNCTION(toUInt32)
+
+
+void tst_QScriptValue::toUInt16_initData()
+{
+ QTest::addColumn<quint16>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::toUInt16_makeData(const char* expr)
+{
+ static QHash<QString, quint16> toUInt16;
+ if (toUInt16.isEmpty()) {
+ toUInt16.insert("QScriptValue()", 0);
+ toUInt16.insert("QScriptValue(QScriptValue::UndefinedValue)", 0);
+ toUInt16.insert("QScriptValue(QScriptValue::NullValue)", 0);
+ toUInt16.insert("QScriptValue(true)", 1);
+ toUInt16.insert("QScriptValue(false)", 0);
+ toUInt16.insert("QScriptValue(int(122))", 122);
+ toUInt16.insert("QScriptValue(uint(124))", 124);
+ toUInt16.insert("QScriptValue(0)", 0);
+ toUInt16.insert("QScriptValue(0.0)", 0);
+ toUInt16.insert("QScriptValue(123.0)", 123);
+ toUInt16.insert("QScriptValue(6.37e-8)", 0);
+ toUInt16.insert("QScriptValue(-6.37e-8)", 0);
+ toUInt16.insert("QScriptValue(0x43211234)", 4660);
+ toUInt16.insert("QScriptValue(0x10000)", 0);
+ toUInt16.insert("QScriptValue(0x10001)", 1);
+ toUInt16.insert("QScriptValue(qSNaN())", 0);
+ toUInt16.insert("QScriptValue(qQNaN())", 0);
+ toUInt16.insert("QScriptValue(qInf())", 0);
+ toUInt16.insert("QScriptValue(-qInf())", 0);
+ toUInt16.insert("QScriptValue(\"NaN\")", 0);
+ toUInt16.insert("QScriptValue(\"Infinity\")", 0);
+ toUInt16.insert("QScriptValue(\"-Infinity\")", 0);
+ toUInt16.insert("QScriptValue(\"ciao\")", 0);
+ toUInt16.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0);
+ toUInt16.insert("QScriptValue(QString(\"\"))", 0);
+ toUInt16.insert("QScriptValue(QString())", 0);
+ toUInt16.insert("QScriptValue(QString(\"0\"))", 0);
+ toUInt16.insert("QScriptValue(QString(\"123\"))", 123);
+ toUInt16.insert("QScriptValue(QString(\"12.4\"))", 12);
+ toUInt16.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0);
+ toUInt16.insert("QScriptValue(0, QScriptValue::NullValue)", 0);
+ toUInt16.insert("QScriptValue(0, true)", 1);
+ toUInt16.insert("QScriptValue(0, false)", 0);
+ toUInt16.insert("QScriptValue(0, int(122))", 122);
+ toUInt16.insert("QScriptValue(0, uint(124))", 124);
+ toUInt16.insert("QScriptValue(0, 0)", 0);
+ toUInt16.insert("QScriptValue(0, 0.0)", 0);
+ toUInt16.insert("QScriptValue(0, 123.0)", 123);
+ toUInt16.insert("QScriptValue(0, 6.37e-8)", 0);
+ toUInt16.insert("QScriptValue(0, -6.37e-8)", 0);
+ toUInt16.insert("QScriptValue(0, 0x43211234)", 4660);
+ toUInt16.insert("QScriptValue(0, 0x10000)", 0);
+ toUInt16.insert("QScriptValue(0, 0x10001)", 1);
+ toUInt16.insert("QScriptValue(0, qSNaN())", 0);
+ toUInt16.insert("QScriptValue(0, qQNaN())", 0);
+ toUInt16.insert("QScriptValue(0, qInf())", 0);
+ toUInt16.insert("QScriptValue(0, -qInf())", 0);
+ toUInt16.insert("QScriptValue(0, \"NaN\")", 0);
+ toUInt16.insert("QScriptValue(0, \"Infinity\")", 0);
+ toUInt16.insert("QScriptValue(0, \"-Infinity\")", 0);
+ toUInt16.insert("QScriptValue(0, \"ciao\")", 0);
+ toUInt16.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0);
+ toUInt16.insert("QScriptValue(0, QString(\"\"))", 0);
+ toUInt16.insert("QScriptValue(0, QString())", 0);
+ toUInt16.insert("QScriptValue(0, QString(\"0\"))", 0);
+ toUInt16.insert("QScriptValue(0, QString(\"123\"))", 123);
+ toUInt16.insert("QScriptValue(0, QString(\"12.3\"))", 12);
+ toUInt16.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0);
+ toUInt16.insert("QScriptValue(engine, QScriptValue::NullValue)", 0);
+ toUInt16.insert("QScriptValue(engine, true)", 1);
+ toUInt16.insert("QScriptValue(engine, false)", 0);
+ toUInt16.insert("QScriptValue(engine, int(122))", 122);
+ toUInt16.insert("QScriptValue(engine, uint(124))", 124);
+ toUInt16.insert("QScriptValue(engine, 0)", 0);
+ toUInt16.insert("QScriptValue(engine, 0.0)", 0);
+ toUInt16.insert("QScriptValue(engine, 123.0)", 123);
+ toUInt16.insert("QScriptValue(engine, 6.37e-8)", 0);
+ toUInt16.insert("QScriptValue(engine, -6.37e-8)", 0);
+ toUInt16.insert("QScriptValue(engine, 0x43211234)", 4660);
+ toUInt16.insert("QScriptValue(engine, 0x10000)", 0);
+ toUInt16.insert("QScriptValue(engine, 0x10001)", 1);
+ toUInt16.insert("QScriptValue(engine, qSNaN())", 0);
+ toUInt16.insert("QScriptValue(engine, qQNaN())", 0);
+ toUInt16.insert("QScriptValue(engine, qInf())", 0);
+ toUInt16.insert("QScriptValue(engine, -qInf())", 0);
+ toUInt16.insert("QScriptValue(engine, \"NaN\")", 0);
+ toUInt16.insert("QScriptValue(engine, \"Infinity\")", 0);
+ toUInt16.insert("QScriptValue(engine, \"-Infinity\")", 0);
+ toUInt16.insert("QScriptValue(engine, \"ciao\")", 0);
+ toUInt16.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0);
+ toUInt16.insert("QScriptValue(engine, QString(\"\"))", 0);
+ toUInt16.insert("QScriptValue(engine, QString())", 0);
+ toUInt16.insert("QScriptValue(engine, QString(\"0\"))", 0);
+ toUInt16.insert("QScriptValue(engine, QString(\"123\"))", 123);
+ toUInt16.insert("QScriptValue(engine, QString(\"1.23\"))", 1);
+ toUInt16.insert("engine->evaluate(\"[]\")", 0);
+ toUInt16.insert("engine->evaluate(\"{}\")", 0);
+ toUInt16.insert("engine->evaluate(\"Object.prototype\")", 0);
+ toUInt16.insert("engine->evaluate(\"Date.prototype\")", 0);
+ toUInt16.insert("engine->evaluate(\"Array.prototype\")", 0);
+ toUInt16.insert("engine->evaluate(\"Function.prototype\")", 0);
+ toUInt16.insert("engine->evaluate(\"Error.prototype\")", 0);
+ toUInt16.insert("engine->evaluate(\"Object\")", 0);
+ toUInt16.insert("engine->evaluate(\"Array\")", 0);
+ toUInt16.insert("engine->evaluate(\"Number\")", 0);
+ toUInt16.insert("engine->evaluate(\"Function\")", 0);
+ toUInt16.insert("engine->evaluate(\"(function() { return 1; })\")", 0);
+ toUInt16.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0);
+ toUInt16.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0);
+ toUInt16.insert("engine->evaluate(\"/foo/\")", 0);
+ toUInt16.insert("engine->evaluate(\"new Object()\")", 0);
+ toUInt16.insert("engine->evaluate(\"new Array()\")", 0);
+ toUInt16.insert("engine->evaluate(\"new Error()\")", 0);
+ }
+ newRow(expr) << toUInt16.value(expr);
+}
+
+void tst_QScriptValue::toUInt16_test(const char*, const QScriptValue& value)
+{
+ QFETCH(quint16, expected);
+ QCOMPARE(value.toUInt16(), expected);
+}
+
+DEFINE_TEST_FUNCTION(toUInt16)
+
+
+void tst_QScriptValue::equals_initData()
+{
+ QTest::addColumn<QScriptValue>("other");
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::equals_makeData(const char *expr)
+{
+ static QSet<QString> equals;
+ if (equals.isEmpty()) {
+ equals.insert("QScriptValue() <=> QScriptValue()");
+ equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"{}\")");
+ equals.insert("QScriptValue(true) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(true) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(true) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(false) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(false) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(false) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(false) <=> engine->evaluate(\"[]\")");
+ equals.insert("QScriptValue(false) <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("QScriptValue(false) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(uint(124)) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(0) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(0) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(0) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(0) <=> engine->evaluate(\"[]\")");
+ equals.insert("QScriptValue(0) <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("QScriptValue(0) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"[]\")");
+ equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(-6.37e-8)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, -6.37e-8)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, -6.37e-8)");
+ equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0x10001) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(qInf()) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(qInf()) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(qInf()) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(qInf()) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(qInf()) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(qInf()) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(-qInf())");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(\"-Infinity\")");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, -qInf())");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, \"-Infinity\")");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, -qInf())");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, \"-Infinity\")");
+ equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(-qInf())");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"-Infinity\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, -qInf())");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"-Infinity\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, -qInf())");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")");
+ equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"[]\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"[]\")");
+ equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"{}\")");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"[]\")");
+ equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"[]\")");
+ equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"[]\")");
+ equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(-6.37e-8)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, -6.37e-8)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)");
+ equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(-qInf())");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(\"-Infinity\")");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, -qInf())");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, \"-Infinity\")");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, -qInf())");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, \"-Infinity\")");
+ equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(-qInf())");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"-Infinity\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, -qInf())");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, -qInf())");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")");
+ equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"[]\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"[]\")");
+ equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"{}\")");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"[]\")");
+ equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"[]\")");
+ equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"[]\")");
+ equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(-6.37e-8)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, -6.37e-8)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)");
+ equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(-qInf())");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(\"-Infinity\")");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, -qInf())");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, \"-Infinity\")");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -qInf())");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, \"-Infinity\")");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(-qInf())");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"-Infinity\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, -qInf())");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, -qInf())");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")");
+ equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"[]\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"[]\")");
+ equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(false)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0.0)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString(\"\"))");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString())");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, false)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 0)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 0.0)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString())");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, false)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 0)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 0.0)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString())");
+ equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"[]\")");
+ equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::UndefinedValue)");
+ equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::UndefinedValue)");
+ equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
+ equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("engine->evaluate(\"{}\") <=> engine->evaluate(\"{}\")");
+ equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Date.prototype\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(false)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0.0)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"\"))");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString())");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, false)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0.0)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString())");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, false)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0.0)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString())");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("engine->evaluate(\"Object\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Array\")");
+ equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Number\")");
+ equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"/foo/\")");
+ equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"new Object()\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(false)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0.0)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"\"))");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString())");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, false)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0.0)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString())");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, false)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0.0)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString())");
+ equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Array()\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Error()\")");
+ }
+ QHash<QString, QScriptValue>::const_iterator it;
+ for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {
+ QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key());
+ newRow(tag.toLatin1()) << it.value() << equals.contains(tag);
+ }
+}
+
+void tst_QScriptValue::equals_test(const char *, const QScriptValue& value)
+{
+ QFETCH(QScriptValue, other);
+ QFETCH(bool, expected);
+ QCOMPARE(value.equals(other), expected);
+}
+
+DEFINE_TEST_FUNCTION(equals)
+
+
+void tst_QScriptValue::strictlyEquals_initData()
+{
+ QTest::addColumn<QScriptValue>("other");
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::strictlyEquals_makeData(const char *expr)
+{
+ static QSet<QString> equals;
+ if (equals.isEmpty()) {
+ equals.insert("QScriptValue() <=> QScriptValue()");
+ equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(true) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(true) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(true) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(uint(124)) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(-6.37e-8)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, -6.37e-8)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, -6.37e-8)");
+ equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0x10001) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(qInf()) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(qInf()) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(qInf()) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(-qInf())");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, -qInf())");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, -qInf())");
+ equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"-Infinity\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"-Infinity\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")");
+ equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(-6.37e-8)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, -6.37e-8)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)");
+ equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(-qInf())");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, -qInf())");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, -qInf())");
+ equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"-Infinity\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")");
+ equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
+ equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(-6.37e-8)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, -6.37e-8)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)");
+ equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(-qInf())");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, -qInf())");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -qInf())");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"-Infinity\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")");
+ equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"[]\")");
+ equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::UndefinedValue)");
+ equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::UndefinedValue)");
+ equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)");
+ equals.insert("engine->evaluate(\"{}\") <=> engine->evaluate(\"{}\")");
+ equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Date.prototype\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("engine->evaluate(\"Object\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Array\")");
+ equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Number\")");
+ equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"/foo/\")");
+ equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"new Object()\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Array()\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Error()\")");
+ }
+ QHash<QString, QScriptValue>::const_iterator it;
+ for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {
+ QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key());
+ newRow(tag.toLatin1()) << it.value() << equals.contains(tag);
+ }
+}
+
+void tst_QScriptValue::strictlyEquals_test(const char *, const QScriptValue& value)
+{
+ QFETCH(QScriptValue, other);
+ QFETCH(bool, expected);
+ QCOMPARE(value.strictlyEquals(other), expected);
+}
+
+DEFINE_TEST_FUNCTION(strictlyEquals)
+
+
+void tst_QScriptValue::lessThan_initData()
+{
+ QTest::addColumn<QScriptValue>("other");
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::lessThan_makeData(const char *expr)
+{
+ static QSet<QString> equals;
+ if (equals.isEmpty()) {
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(true) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(true) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(true) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(true) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(true) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(true) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(true) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(true) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(true) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(true) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(true) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(true) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(true) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(true) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(true) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(true) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(true) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(true) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(true) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(true) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(true) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(true) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(true) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(true) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(true) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(true) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(true) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(true) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(true) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(true) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(false) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(false) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(false) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(false) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(false) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(false) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(false) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(false) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(false) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(false) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(false) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(false) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(uint(124)) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(uint(124)) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(0) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(0) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(0) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(0) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(0) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(0) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"[]\")");
+ equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(0x43211234) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0x43211234) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0x10001) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0x10001) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0x10001) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(-6.37e-8)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, -6.37e-8)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, -6.37e-8)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"[]\")");
+ equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(true)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(false)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(-6.37e-8)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, -6.37e-8)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, -6.37e-8)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"/foo/\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Error()\")");
+ equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(\"-Infinity\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, \"-Infinity\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"-Infinity\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"/foo/\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Error()\")");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(\"-Infinity\")");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, \"-Infinity\")");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, \"-Infinity\")");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"/foo/\")");
+ equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"new Error()\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"new Error()\")");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"new Error()\")");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"new Error()\")");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"[]\")");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(-6.37e-8)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, -6.37e-8)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, -6.37e-8)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"[]\")");
+ equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(true)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(false)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(-6.37e-8)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, -6.37e-8)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, -6.37e-8)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"/foo/\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Error()\")");
+ equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(\"-Infinity\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"-Infinity\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"-Infinity\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"/foo/\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Error()\")");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(\"-Infinity\")");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, \"-Infinity\")");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, \"-Infinity\")");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"/foo/\")");
+ equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"new Error()\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"new Error()\")");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"new Error()\")");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"new Error()\")");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"[]\")");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(false)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(-6.37e-8)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"\"))");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString())");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, -6.37e-8)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"\"))");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString())");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -6.37e-8)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"\"))");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString())");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"[]\")");
+ equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"Array.prototype\")");
+ equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"new Array()\")");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(true)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(false)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0.0)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(-6.37e-8)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, false)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0.0)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, -6.37e-8)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, false)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0.0)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, -6.37e-8)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"/foo/\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Error()\")");
+ equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"-Infinity\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"-Infinity\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"-Infinity\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"/foo/\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Error()\")");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(\"-Infinity\")");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"0\"))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, \"-Infinity\")");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, \"-Infinity\")");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"/foo/\")");
+ equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"new Error()\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(true)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(6.37e-8)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, true)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, true)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"new Error()\")");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"new Error()\")");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(int(122))");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(uint(124))");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(123.0)");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0x43211234)");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0x10000)");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0x10001)");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(qInf())");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(\"NaN\")");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(\"Infinity\")");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(\"ciao\")");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(QString(\"123\"))");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, int(122))");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, uint(124))");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 123.0)");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 0x43211234)");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 0x10000)");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 0x10001)");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, qInf())");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, \"NaN\")");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, \"ciao\")");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, int(122))");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, uint(124))");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 123.0)");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 0x10000)");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 0x10001)");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, qInf())");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Object\")");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Array\")");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Number\")");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Function\")");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"new Object()\")");
+ equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"new Error()\")");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(true)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(int(122))");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(uint(124))");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(123.0)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(6.37e-8)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0x43211234)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0x10000)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0x10001)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(qInf())");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(\"NaN\")");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(\"Infinity\")");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(\"-Infinity\")");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(\"ciao\")");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString(\"0\"))");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString(\"123\"))");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, true)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, int(122))");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, uint(124))");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 123.0)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 0x43211234)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 0x10000)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 0x10001)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, qInf())");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, \"NaN\")");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, \"-Infinity\")");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, true)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, int(122))");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, uint(124))");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 123.0)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 0x10000)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 0x10001)");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, qInf())");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, \"-Infinity\")");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Array\")");
+ equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Number\")");
+ equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"/foo/\")");
+ equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"new Object()\")");
+ equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"new Error()\")");
+ equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(\"ciao\")");
+ equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Array\")");
+ equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Number\")");
+ equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(true)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(int(122))");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(uint(124))");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(123.0)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(6.37e-8)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0x43211234)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0x10000)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0x10001)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(qInf())");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"NaN\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"Infinity\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"-Infinity\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"ciao\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"0\"))");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"123\"))");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, true)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, int(122))");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, uint(124))");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 123.0)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0x43211234)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0x10000)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0x10001)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, qInf())");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"NaN\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"-Infinity\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, true)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, int(122))");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, uint(124))");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 123.0)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0x10000)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0x10001)");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, qInf())");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"-Infinity\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Number\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"/foo/\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"new Object()\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"new Error()\")");
+ equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Array\")");
+ equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Number\")");
+ equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(\"NaN\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(\"Infinity\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(\"ciao\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, \"NaN\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Array\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Number\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"new Object()\")");
+ equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Number\")");
+ equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Number\")");
+ equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Array\")");
+ equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Number\")");
+ equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Array\")");
+ equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Number\")");
+ equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Array\")");
+ equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Number\")");
+ equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(\"NaN\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(\"Infinity\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(\"ciao\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(QString(\"0\"))");
+ equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(QString(\"123\"))");
+ equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, \"NaN\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Array\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Number\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"new Object()\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"new Error()\")");
+ equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(\"ciao\")");
+ equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Array\")");
+ equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Number\")");
+ equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(true)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(int(122))");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(uint(124))");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(123.0)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(6.37e-8)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0x43211234)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0x10000)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0x10001)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(qInf())");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(\"NaN\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(\"Infinity\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(\"-Infinity\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(\"ciao\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"0\"))");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"123\"))");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"12.4\"))");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, true)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, int(122))");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, uint(124))");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 123.0)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 6.37e-8)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0x43211234)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0x10000)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0x10001)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, qInf())");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"NaN\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"-Infinity\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"0\"))");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"123\"))");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"12.3\"))");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, true)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, int(122))");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, uint(124))");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 123.0)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 6.37e-8)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0x43211234)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0x10000)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0x10001)");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, qInf())");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"-Infinity\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"0\"))");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"123\"))");
+ equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"1.23\"))");
+ equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Error.prototype\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Array\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Number\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"/foo/\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Object()\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Error()\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(\"NaN\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(\"Infinity\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(\"ciao\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(0, \"NaN\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(0, \"Infinity\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(0, \"ciao\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(engine, \"NaN\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(engine, \"Infinity\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(engine, \"ciao\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))");
+ equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object.prototype\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Function.prototype\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Array\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Number\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { return 1; })\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Object()\")");
+ }
+ QHash<QString, QScriptValue>::const_iterator it;
+ for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {
+ QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key());
+ newRow(tag.toLatin1()) << it.value() << equals.contains(tag);
+ }
+}
+
+void tst_QScriptValue::lessThan_test(const char *, const QScriptValue& value)
+{
+ QFETCH(QScriptValue, other);
+ QFETCH(bool, expected);
+ QCOMPARE(value.lessThan(other), expected);
+}
+
+DEFINE_TEST_FUNCTION(lessThan)
+
+
+void tst_QScriptValue::instanceOf_initData()
+{
+ QTest::addColumn<QScriptValue>("other");
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::instanceOf_makeData(const char *expr)
+{
+ static QSet<QString> equals;
+ if (equals.isEmpty()) {
+ equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Array\")");
+ equals.insert("engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"Object\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"Object\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Function\")");
+ equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object\")");
+ equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Array\")");
+ equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object\")");
+ }
+ QHash<QString, QScriptValue>::const_iterator it;
+ for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {
+ QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key());
+ newRow(tag.toLatin1()) << it.value() << equals.contains(tag);
+ }
+}
+
+void tst_QScriptValue::instanceOf_test(const char *, const QScriptValue& value)
+{
+ QFETCH(QScriptValue, other);
+ QFETCH(bool, expected);
+ QCOMPARE(value.instanceOf(other), expected);
+}
+
+DEFINE_TEST_FUNCTION(instanceOf)
+
+
+void tst_QScriptValue::qscriptvalue_castQString_initData()
+{
+ QTest::addColumn<QString>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::qscriptvalue_castQString_makeData(const char* expr)
+{
+ static QHash<QString, QString> value;
+ if (value.isEmpty()) {
+ value.insert("QScriptValue()", "");
+ value.insert("QScriptValue(QScriptValue::UndefinedValue)", "");
+ value.insert("QScriptValue(QScriptValue::NullValue)", "");
+ value.insert("QScriptValue(true)", "true");
+ value.insert("QScriptValue(false)", "false");
+ value.insert("QScriptValue(int(122))", "122");
+ value.insert("QScriptValue(uint(124))", "124");
+ value.insert("QScriptValue(0)", "0");
+ value.insert("QScriptValue(0.0)", "0");
+ value.insert("QScriptValue(123.0)", "123");
+ value.insert("QScriptValue(6.37e-8)", "6.37e-8");
+ value.insert("QScriptValue(-6.37e-8)", "-6.37e-8");
+ value.insert("QScriptValue(0x43211234)", "1126240820");
+ value.insert("QScriptValue(0x10000)", "65536");
+ value.insert("QScriptValue(0x10001)", "65537");
+ value.insert("QScriptValue(qSNaN())", "NaN");
+ value.insert("QScriptValue(qQNaN())", "NaN");
+ value.insert("QScriptValue(qInf())", "Infinity");
+ value.insert("QScriptValue(-qInf())", "-Infinity");
+ value.insert("QScriptValue(\"NaN\")", "NaN");
+ value.insert("QScriptValue(\"Infinity\")", "Infinity");
+ value.insert("QScriptValue(\"-Infinity\")", "-Infinity");
+ value.insert("QScriptValue(\"ciao\")", "ciao");
+ value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", "ciao");
+ value.insert("QScriptValue(QString(\"\"))", "");
+ value.insert("QScriptValue(QString())", "");
+ value.insert("QScriptValue(QString(\"0\"))", "0");
+ value.insert("QScriptValue(QString(\"123\"))", "123");
+ value.insert("QScriptValue(QString(\"12.4\"))", "12.4");
+ value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", "");
+ value.insert("QScriptValue(0, QScriptValue::NullValue)", "");
+ value.insert("QScriptValue(0, true)", "true");
+ value.insert("QScriptValue(0, false)", "false");
+ value.insert("QScriptValue(0, int(122))", "122");
+ value.insert("QScriptValue(0, uint(124))", "124");
+ value.insert("QScriptValue(0, 0)", "0");
+ value.insert("QScriptValue(0, 0.0)", "0");
+ value.insert("QScriptValue(0, 123.0)", "123");
+ value.insert("QScriptValue(0, 6.37e-8)", "6.37e-8");
+ value.insert("QScriptValue(0, -6.37e-8)", "-6.37e-8");
+ value.insert("QScriptValue(0, 0x43211234)", "1126240820");
+ value.insert("QScriptValue(0, 0x10000)", "65536");
+ value.insert("QScriptValue(0, 0x10001)", "65537");
+ value.insert("QScriptValue(0, qSNaN())", "NaN");
+ value.insert("QScriptValue(0, qQNaN())", "NaN");
+ value.insert("QScriptValue(0, qInf())", "Infinity");
+ value.insert("QScriptValue(0, -qInf())", "-Infinity");
+ value.insert("QScriptValue(0, \"NaN\")", "NaN");
+ value.insert("QScriptValue(0, \"Infinity\")", "Infinity");
+ value.insert("QScriptValue(0, \"-Infinity\")", "-Infinity");
+ value.insert("QScriptValue(0, \"ciao\")", "ciao");
+ value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", "ciao");
+ value.insert("QScriptValue(0, QString(\"\"))", "");
+ value.insert("QScriptValue(0, QString())", "");
+ value.insert("QScriptValue(0, QString(\"0\"))", "0");
+ value.insert("QScriptValue(0, QString(\"123\"))", "123");
+ value.insert("QScriptValue(0, QString(\"12.3\"))", "12.3");
+ value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", "");
+ value.insert("QScriptValue(engine, QScriptValue::NullValue)", "");
+ value.insert("QScriptValue(engine, true)", "true");
+ value.insert("QScriptValue(engine, false)", "false");
+ value.insert("QScriptValue(engine, int(122))", "122");
+ value.insert("QScriptValue(engine, uint(124))", "124");
+ value.insert("QScriptValue(engine, 0)", "0");
+ value.insert("QScriptValue(engine, 0.0)", "0");
+ value.insert("QScriptValue(engine, 123.0)", "123");
+ value.insert("QScriptValue(engine, 6.37e-8)", "6.37e-8");
+ value.insert("QScriptValue(engine, -6.37e-8)", "-6.37e-8");
+ value.insert("QScriptValue(engine, 0x43211234)", "1126240820");
+ value.insert("QScriptValue(engine, 0x10000)", "65536");
+ value.insert("QScriptValue(engine, 0x10001)", "65537");
+ value.insert("QScriptValue(engine, qSNaN())", "NaN");
+ value.insert("QScriptValue(engine, qQNaN())", "NaN");
+ value.insert("QScriptValue(engine, qInf())", "Infinity");
+ value.insert("QScriptValue(engine, -qInf())", "-Infinity");
+ value.insert("QScriptValue(engine, \"NaN\")", "NaN");
+ value.insert("QScriptValue(engine, \"Infinity\")", "Infinity");
+ value.insert("QScriptValue(engine, \"-Infinity\")", "-Infinity");
+ value.insert("QScriptValue(engine, \"ciao\")", "ciao");
+ value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", "ciao");
+ value.insert("QScriptValue(engine, QString(\"\"))", "");
+ value.insert("QScriptValue(engine, QString())", "");
+ value.insert("QScriptValue(engine, QString(\"0\"))", "0");
+ value.insert("QScriptValue(engine, QString(\"123\"))", "123");
+ value.insert("QScriptValue(engine, QString(\"1.23\"))", "1.23");
+ value.insert("engine->evaluate(\"[]\")", "");
+ value.insert("engine->evaluate(\"{}\")", "");
+ value.insert("engine->evaluate(\"Object.prototype\")", "[object Object]");
+ value.insert("engine->evaluate(\"Date.prototype\")", "Invalid Date");
+ value.insert("engine->evaluate(\"Array.prototype\")", "");
+ value.insert("engine->evaluate(\"Function.prototype\")", "function () {\n [native code]\n}");
+ value.insert("engine->evaluate(\"Error.prototype\")", "Error: Unknown error");
+ value.insert("engine->evaluate(\"Object\")", "function Object() {\n [native code]\n}");
+ value.insert("engine->evaluate(\"Array\")", "function Array() {\n [native code]\n}");
+ value.insert("engine->evaluate(\"Number\")", "function Number() {\n [native code]\n}");
+ value.insert("engine->evaluate(\"Function\")", "function Function() {\n [native code]\n}");
+ value.insert("engine->evaluate(\"(function() { return 1; })\")", "function () { return 1; }");
+ value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", "function () { return 'ciao'; }");
+ value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", "function () { throw new Error('foo'); }");
+ value.insert("engine->evaluate(\"/foo/\")", "/foo/");
+ value.insert("engine->evaluate(\"new Object()\")", "[object Object]");
+ value.insert("engine->evaluate(\"new Array()\")", "");
+ value.insert("engine->evaluate(\"new Error()\")", "Error: Unknown error");
+ }
+ newRow(expr) << value.value(expr);
+}
+
+void tst_QScriptValue::qscriptvalue_castQString_test(const char*, const QScriptValue& value)
+{
+ QFETCH(QString, expected);
+ QCOMPARE(qscriptvalue_cast<QString>(value), expected);
+}
+
+DEFINE_TEST_FUNCTION(qscriptvalue_castQString)
+
+
+void tst_QScriptValue::qscriptvalue_castqsreal_initData()
+{
+ QTest::addColumn<qsreal>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::qscriptvalue_castqsreal_makeData(const char* expr)
+{
+ static QHash<QString, qsreal> value;
+ if (value.isEmpty()) {
+ value.insert("QScriptValue()", 0);
+ value.insert("QScriptValue(QScriptValue::UndefinedValue)", qQNaN());
+ value.insert("QScriptValue(QScriptValue::NullValue)", 0);
+ value.insert("QScriptValue(true)", 1);
+ value.insert("QScriptValue(false)", 0);
+ value.insert("QScriptValue(int(122))", 122);
+ value.insert("QScriptValue(uint(124))", 124);
+ value.insert("QScriptValue(0)", 0);
+ value.insert("QScriptValue(0.0)", 0);
+ value.insert("QScriptValue(123.0)", 123);
+ value.insert("QScriptValue(6.37e-8)", 6.369999999999999e-08);
+ value.insert("QScriptValue(-6.37e-8)", -6.369999999999999e-08);
+ value.insert("QScriptValue(0x43211234)", 1126240820);
+ value.insert("QScriptValue(0x10000)", 65536);
+ value.insert("QScriptValue(0x10001)", 65537);
+ value.insert("QScriptValue(qSNaN())", qQNaN());
+ value.insert("QScriptValue(qQNaN())", qQNaN());
+ value.insert("QScriptValue(qInf())", qInf());
+ value.insert("QScriptValue(-qInf())", qInf());
+ value.insert("QScriptValue(\"NaN\")", qQNaN());
+ value.insert("QScriptValue(\"Infinity\")", qInf());
+ value.insert("QScriptValue(\"-Infinity\")", qInf());
+ value.insert("QScriptValue(\"ciao\")", qQNaN());
+ value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", qQNaN());
+ value.insert("QScriptValue(QString(\"\"))", 0);
+ value.insert("QScriptValue(QString())", 0);
+ value.insert("QScriptValue(QString(\"0\"))", 0);
+ value.insert("QScriptValue(QString(\"123\"))", 123);
+ value.insert("QScriptValue(QString(\"12.4\"))", 12.4);
+ value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", qQNaN());
+ value.insert("QScriptValue(0, QScriptValue::NullValue)", 0);
+ value.insert("QScriptValue(0, true)", 1);
+ value.insert("QScriptValue(0, false)", 0);
+ value.insert("QScriptValue(0, int(122))", 122);
+ value.insert("QScriptValue(0, uint(124))", 124);
+ value.insert("QScriptValue(0, 0)", 0);
+ value.insert("QScriptValue(0, 0.0)", 0);
+ value.insert("QScriptValue(0, 123.0)", 123);
+ value.insert("QScriptValue(0, 6.37e-8)", 6.369999999999999e-08);
+ value.insert("QScriptValue(0, -6.37e-8)", -6.369999999999999e-08);
+ value.insert("QScriptValue(0, 0x43211234)", 1126240820);
+ value.insert("QScriptValue(0, 0x10000)", 65536);
+ value.insert("QScriptValue(0, 0x10001)", 65537);
+ value.insert("QScriptValue(0, qSNaN())", qQNaN());
+ value.insert("QScriptValue(0, qQNaN())", qQNaN());
+ value.insert("QScriptValue(0, qInf())", qInf());
+ value.insert("QScriptValue(0, -qInf())", qInf());
+ value.insert("QScriptValue(0, \"NaN\")", qQNaN());
+ value.insert("QScriptValue(0, \"Infinity\")", qInf());
+ value.insert("QScriptValue(0, \"-Infinity\")", qInf());
+ value.insert("QScriptValue(0, \"ciao\")", qQNaN());
+ value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", qQNaN());
+ value.insert("QScriptValue(0, QString(\"\"))", 0);
+ value.insert("QScriptValue(0, QString())", 0);
+ value.insert("QScriptValue(0, QString(\"0\"))", 0);
+ value.insert("QScriptValue(0, QString(\"123\"))", 123);
+ value.insert("QScriptValue(0, QString(\"12.3\"))", 12.3);
+ value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", qQNaN());
+ value.insert("QScriptValue(engine, QScriptValue::NullValue)", 0);
+ value.insert("QScriptValue(engine, true)", 1);
+ value.insert("QScriptValue(engine, false)", 0);
+ value.insert("QScriptValue(engine, int(122))", 122);
+ value.insert("QScriptValue(engine, uint(124))", 124);
+ value.insert("QScriptValue(engine, 0)", 0);
+ value.insert("QScriptValue(engine, 0.0)", 0);
+ value.insert("QScriptValue(engine, 123.0)", 123);
+ value.insert("QScriptValue(engine, 6.37e-8)", 6.369999999999999e-08);
+ value.insert("QScriptValue(engine, -6.37e-8)", -6.369999999999999e-08);
+ value.insert("QScriptValue(engine, 0x43211234)", 1126240820);
+ value.insert("QScriptValue(engine, 0x10000)", 65536);
+ value.insert("QScriptValue(engine, 0x10001)", 65537);
+ value.insert("QScriptValue(engine, qSNaN())", qQNaN());
+ value.insert("QScriptValue(engine, qQNaN())", qQNaN());
+ value.insert("QScriptValue(engine, qInf())", qInf());
+ value.insert("QScriptValue(engine, -qInf())", qInf());
+ value.insert("QScriptValue(engine, \"NaN\")", qQNaN());
+ value.insert("QScriptValue(engine, \"Infinity\")", qInf());
+ value.insert("QScriptValue(engine, \"-Infinity\")", qInf());
+ value.insert("QScriptValue(engine, \"ciao\")", qQNaN());
+ value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", qQNaN());
+ value.insert("QScriptValue(engine, QString(\"\"))", 0);
+ value.insert("QScriptValue(engine, QString())", 0);
+ value.insert("QScriptValue(engine, QString(\"0\"))", 0);
+ value.insert("QScriptValue(engine, QString(\"123\"))", 123);
+ value.insert("QScriptValue(engine, QString(\"1.23\"))", 1.23);
+ value.insert("engine->evaluate(\"[]\")", 0);
+ value.insert("engine->evaluate(\"{}\")", qQNaN());
+ value.insert("engine->evaluate(\"Object.prototype\")", qQNaN());
+ value.insert("engine->evaluate(\"Date.prototype\")", qQNaN());
+ value.insert("engine->evaluate(\"Array.prototype\")", 0);
+ value.insert("engine->evaluate(\"Function.prototype\")", qQNaN());
+ value.insert("engine->evaluate(\"Error.prototype\")", qQNaN());
+ value.insert("engine->evaluate(\"Object\")", qQNaN());
+ value.insert("engine->evaluate(\"Array\")", qQNaN());
+ value.insert("engine->evaluate(\"Number\")", qQNaN());
+ value.insert("engine->evaluate(\"Function\")", qQNaN());
+ value.insert("engine->evaluate(\"(function() { return 1; })\")", qQNaN());
+ value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", qQNaN());
+ value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", qQNaN());
+ value.insert("engine->evaluate(\"/foo/\")", qQNaN());
+ value.insert("engine->evaluate(\"new Object()\")", qQNaN());
+ value.insert("engine->evaluate(\"new Array()\")", 0);
+ value.insert("engine->evaluate(\"new Error()\")", qQNaN());
+ }
+ newRow(expr) << value.value(expr);
+}
+
+void tst_QScriptValue::qscriptvalue_castqsreal_test(const char*, const QScriptValue& value)
+{
+ QFETCH(qsreal, expected);
+ if (qIsNaN(expected)) {
+ QVERIFY(qIsNaN(qscriptvalue_cast<qsreal>(value)));
+ return;
+ }
+ if (qIsInf(expected)) {
+ QVERIFY(qIsInf(qscriptvalue_cast<qsreal>(value)));
+ return;
+ }
+ QCOMPARE(qscriptvalue_cast<qsreal>(value), expected);
+}
+
+DEFINE_TEST_FUNCTION(qscriptvalue_castqsreal)
+
+
+void tst_QScriptValue::qscriptvalue_castbool_initData()
+{
+ QTest::addColumn<bool>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::qscriptvalue_castbool_makeData(const char* expr)
+{
+ static QHash<QString, bool> value;
+ if (value.isEmpty()) {
+ value.insert("QScriptValue()", false);
+ value.insert("QScriptValue(QScriptValue::UndefinedValue)", false);
+ value.insert("QScriptValue(QScriptValue::NullValue)", false);
+ value.insert("QScriptValue(true)", true);
+ value.insert("QScriptValue(false)", false);
+ value.insert("QScriptValue(int(122))", true);
+ value.insert("QScriptValue(uint(124))", true);
+ value.insert("QScriptValue(0)", false);
+ value.insert("QScriptValue(0.0)", false);
+ value.insert("QScriptValue(123.0)", true);
+ value.insert("QScriptValue(6.37e-8)", true);
+ value.insert("QScriptValue(-6.37e-8)", true);
+ value.insert("QScriptValue(0x43211234)", true);
+ value.insert("QScriptValue(0x10000)", true);
+ value.insert("QScriptValue(0x10001)", true);
+ value.insert("QScriptValue(qSNaN())", false);
+ value.insert("QScriptValue(qQNaN())", false);
+ value.insert("QScriptValue(qInf())", true);
+ value.insert("QScriptValue(-qInf())", true);
+ value.insert("QScriptValue(\"NaN\")", true);
+ value.insert("QScriptValue(\"Infinity\")", true);
+ value.insert("QScriptValue(\"-Infinity\")", true);
+ value.insert("QScriptValue(\"ciao\")", true);
+ value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", true);
+ value.insert("QScriptValue(QString(\"\"))", false);
+ value.insert("QScriptValue(QString())", false);
+ value.insert("QScriptValue(QString(\"0\"))", true);
+ value.insert("QScriptValue(QString(\"123\"))", true);
+ value.insert("QScriptValue(QString(\"12.4\"))", true);
+ value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", false);
+ value.insert("QScriptValue(0, QScriptValue::NullValue)", false);
+ value.insert("QScriptValue(0, true)", true);
+ value.insert("QScriptValue(0, false)", false);
+ value.insert("QScriptValue(0, int(122))", true);
+ value.insert("QScriptValue(0, uint(124))", true);
+ value.insert("QScriptValue(0, 0)", false);
+ value.insert("QScriptValue(0, 0.0)", false);
+ value.insert("QScriptValue(0, 123.0)", true);
+ value.insert("QScriptValue(0, 6.37e-8)", true);
+ value.insert("QScriptValue(0, -6.37e-8)", true);
+ value.insert("QScriptValue(0, 0x43211234)", true);
+ value.insert("QScriptValue(0, 0x10000)", true);
+ value.insert("QScriptValue(0, 0x10001)", true);
+ value.insert("QScriptValue(0, qSNaN())", false);
+ value.insert("QScriptValue(0, qQNaN())", false);
+ value.insert("QScriptValue(0, qInf())", true);
+ value.insert("QScriptValue(0, -qInf())", true);
+ value.insert("QScriptValue(0, \"NaN\")", true);
+ value.insert("QScriptValue(0, \"Infinity\")", true);
+ value.insert("QScriptValue(0, \"-Infinity\")", true);
+ value.insert("QScriptValue(0, \"ciao\")", true);
+ value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", true);
+ value.insert("QScriptValue(0, QString(\"\"))", false);
+ value.insert("QScriptValue(0, QString())", false);
+ value.insert("QScriptValue(0, QString(\"0\"))", true);
+ value.insert("QScriptValue(0, QString(\"123\"))", true);
+ value.insert("QScriptValue(0, QString(\"12.3\"))", true);
+ value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", false);
+ value.insert("QScriptValue(engine, QScriptValue::NullValue)", false);
+ value.insert("QScriptValue(engine, true)", true);
+ value.insert("QScriptValue(engine, false)", false);
+ value.insert("QScriptValue(engine, int(122))", true);
+ value.insert("QScriptValue(engine, uint(124))", true);
+ value.insert("QScriptValue(engine, 0)", false);
+ value.insert("QScriptValue(engine, 0.0)", false);
+ value.insert("QScriptValue(engine, 123.0)", true);
+ value.insert("QScriptValue(engine, 6.37e-8)", true);
+ value.insert("QScriptValue(engine, -6.37e-8)", true);
+ value.insert("QScriptValue(engine, 0x43211234)", true);
+ value.insert("QScriptValue(engine, 0x10000)", true);
+ value.insert("QScriptValue(engine, 0x10001)", true);
+ value.insert("QScriptValue(engine, qSNaN())", false);
+ value.insert("QScriptValue(engine, qQNaN())", false);
+ value.insert("QScriptValue(engine, qInf())", true);
+ value.insert("QScriptValue(engine, -qInf())", true);
+ value.insert("QScriptValue(engine, \"NaN\")", true);
+ value.insert("QScriptValue(engine, \"Infinity\")", true);
+ value.insert("QScriptValue(engine, \"-Infinity\")", true);
+ value.insert("QScriptValue(engine, \"ciao\")", true);
+ value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", true);
+ value.insert("QScriptValue(engine, QString(\"\"))", false);
+ value.insert("QScriptValue(engine, QString())", false);
+ value.insert("QScriptValue(engine, QString(\"0\"))", true);
+ value.insert("QScriptValue(engine, QString(\"123\"))", true);
+ value.insert("QScriptValue(engine, QString(\"1.23\"))", true);
+ value.insert("engine->evaluate(\"[]\")", true);
+ value.insert("engine->evaluate(\"{}\")", false);
+ value.insert("engine->evaluate(\"Object.prototype\")", true);
+ value.insert("engine->evaluate(\"Date.prototype\")", true);
+ value.insert("engine->evaluate(\"Array.prototype\")", true);
+ value.insert("engine->evaluate(\"Function.prototype\")", true);
+ value.insert("engine->evaluate(\"Error.prototype\")", true);
+ value.insert("engine->evaluate(\"Object\")", true);
+ value.insert("engine->evaluate(\"Array\")", true);
+ value.insert("engine->evaluate(\"Number\")", true);
+ value.insert("engine->evaluate(\"Function\")", true);
+ value.insert("engine->evaluate(\"(function() { return 1; })\")", true);
+ value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", true);
+ value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", true);
+ value.insert("engine->evaluate(\"/foo/\")", true);
+ value.insert("engine->evaluate(\"new Object()\")", true);
+ value.insert("engine->evaluate(\"new Array()\")", true);
+ value.insert("engine->evaluate(\"new Error()\")", true);
+ }
+ newRow(expr) << value.value(expr);
+}
+
+void tst_QScriptValue::qscriptvalue_castbool_test(const char*, const QScriptValue& value)
+{
+ QFETCH(bool, expected);
+ QCOMPARE(qscriptvalue_cast<bool>(value), expected);
+}
+
+DEFINE_TEST_FUNCTION(qscriptvalue_castbool)
+
+
+void tst_QScriptValue::qscriptvalue_castqint32_initData()
+{
+ QTest::addColumn<qint32>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::qscriptvalue_castqint32_makeData(const char* expr)
+{
+ static QHash<QString, qint32> value;
+ if (value.isEmpty()) {
+ value.insert("QScriptValue()", 0);
+ value.insert("QScriptValue(QScriptValue::UndefinedValue)", 0);
+ value.insert("QScriptValue(QScriptValue::NullValue)", 0);
+ value.insert("QScriptValue(true)", 1);
+ value.insert("QScriptValue(false)", 0);
+ value.insert("QScriptValue(int(122))", 122);
+ value.insert("QScriptValue(uint(124))", 124);
+ value.insert("QScriptValue(0)", 0);
+ value.insert("QScriptValue(0.0)", 0);
+ value.insert("QScriptValue(123.0)", 123);
+ value.insert("QScriptValue(6.37e-8)", 0);
+ value.insert("QScriptValue(-6.37e-8)", 0);
+ value.insert("QScriptValue(0x43211234)", 1126240820);
+ value.insert("QScriptValue(0x10000)", 65536);
+ value.insert("QScriptValue(0x10001)", 65537);
+ value.insert("QScriptValue(qSNaN())", 0);
+ value.insert("QScriptValue(qQNaN())", 0);
+ value.insert("QScriptValue(qInf())", 0);
+ value.insert("QScriptValue(-qInf())", 0);
+ value.insert("QScriptValue(\"NaN\")", 0);
+ value.insert("QScriptValue(\"Infinity\")", 0);
+ value.insert("QScriptValue(\"-Infinity\")", 0);
+ value.insert("QScriptValue(\"ciao\")", 0);
+ value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0);
+ value.insert("QScriptValue(QString(\"\"))", 0);
+ value.insert("QScriptValue(QString())", 0);
+ value.insert("QScriptValue(QString(\"0\"))", 0);
+ value.insert("QScriptValue(QString(\"123\"))", 123);
+ value.insert("QScriptValue(QString(\"12.4\"))", 12);
+ value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0);
+ value.insert("QScriptValue(0, QScriptValue::NullValue)", 0);
+ value.insert("QScriptValue(0, true)", 1);
+ value.insert("QScriptValue(0, false)", 0);
+ value.insert("QScriptValue(0, int(122))", 122);
+ value.insert("QScriptValue(0, uint(124))", 124);
+ value.insert("QScriptValue(0, 0)", 0);
+ value.insert("QScriptValue(0, 0.0)", 0);
+ value.insert("QScriptValue(0, 123.0)", 123);
+ value.insert("QScriptValue(0, 6.37e-8)", 0);
+ value.insert("QScriptValue(0, -6.37e-8)", 0);
+ value.insert("QScriptValue(0, 0x43211234)", 1126240820);
+ value.insert("QScriptValue(0, 0x10000)", 65536);
+ value.insert("QScriptValue(0, 0x10001)", 65537);
+ value.insert("QScriptValue(0, qSNaN())", 0);
+ value.insert("QScriptValue(0, qQNaN())", 0);
+ value.insert("QScriptValue(0, qInf())", 0);
+ value.insert("QScriptValue(0, -qInf())", 0);
+ value.insert("QScriptValue(0, \"NaN\")", 0);
+ value.insert("QScriptValue(0, \"Infinity\")", 0);
+ value.insert("QScriptValue(0, \"-Infinity\")", 0);
+ value.insert("QScriptValue(0, \"ciao\")", 0);
+ value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0);
+ value.insert("QScriptValue(0, QString(\"\"))", 0);
+ value.insert("QScriptValue(0, QString())", 0);
+ value.insert("QScriptValue(0, QString(\"0\"))", 0);
+ value.insert("QScriptValue(0, QString(\"123\"))", 123);
+ value.insert("QScriptValue(0, QString(\"12.3\"))", 12);
+ value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0);
+ value.insert("QScriptValue(engine, QScriptValue::NullValue)", 0);
+ value.insert("QScriptValue(engine, true)", 1);
+ value.insert("QScriptValue(engine, false)", 0);
+ value.insert("QScriptValue(engine, int(122))", 122);
+ value.insert("QScriptValue(engine, uint(124))", 124);
+ value.insert("QScriptValue(engine, 0)", 0);
+ value.insert("QScriptValue(engine, 0.0)", 0);
+ value.insert("QScriptValue(engine, 123.0)", 123);
+ value.insert("QScriptValue(engine, 6.37e-8)", 0);
+ value.insert("QScriptValue(engine, -6.37e-8)", 0);
+ value.insert("QScriptValue(engine, 0x43211234)", 1126240820);
+ value.insert("QScriptValue(engine, 0x10000)", 65536);
+ value.insert("QScriptValue(engine, 0x10001)", 65537);
+ value.insert("QScriptValue(engine, qSNaN())", 0);
+ value.insert("QScriptValue(engine, qQNaN())", 0);
+ value.insert("QScriptValue(engine, qInf())", 0);
+ value.insert("QScriptValue(engine, -qInf())", 0);
+ value.insert("QScriptValue(engine, \"NaN\")", 0);
+ value.insert("QScriptValue(engine, \"Infinity\")", 0);
+ value.insert("QScriptValue(engine, \"-Infinity\")", 0);
+ value.insert("QScriptValue(engine, \"ciao\")", 0);
+ value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0);
+ value.insert("QScriptValue(engine, QString(\"\"))", 0);
+ value.insert("QScriptValue(engine, QString())", 0);
+ value.insert("QScriptValue(engine, QString(\"0\"))", 0);
+ value.insert("QScriptValue(engine, QString(\"123\"))", 123);
+ value.insert("QScriptValue(engine, QString(\"1.23\"))", 1);
+ value.insert("engine->evaluate(\"[]\")", 0);
+ value.insert("engine->evaluate(\"{}\")", 0);
+ value.insert("engine->evaluate(\"Object.prototype\")", 0);
+ value.insert("engine->evaluate(\"Date.prototype\")", 0);
+ value.insert("engine->evaluate(\"Array.prototype\")", 0);
+ value.insert("engine->evaluate(\"Function.prototype\")", 0);
+ value.insert("engine->evaluate(\"Error.prototype\")", 0);
+ value.insert("engine->evaluate(\"Object\")", 0);
+ value.insert("engine->evaluate(\"Array\")", 0);
+ value.insert("engine->evaluate(\"Number\")", 0);
+ value.insert("engine->evaluate(\"Function\")", 0);
+ value.insert("engine->evaluate(\"(function() { return 1; })\")", 0);
+ value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0);
+ value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0);
+ value.insert("engine->evaluate(\"/foo/\")", 0);
+ value.insert("engine->evaluate(\"new Object()\")", 0);
+ value.insert("engine->evaluate(\"new Array()\")", 0);
+ value.insert("engine->evaluate(\"new Error()\")", 0);
+ }
+ newRow(expr) << value.value(expr);
+}
+
+void tst_QScriptValue::qscriptvalue_castqint32_test(const char*, const QScriptValue& value)
+{
+ QFETCH(qint32, expected);
+ QCOMPARE(qscriptvalue_cast<qint32>(value), expected);
+}
+
+DEFINE_TEST_FUNCTION(qscriptvalue_castqint32)
+
+
+void tst_QScriptValue::qscriptvalue_castquint32_initData()
+{
+ QTest::addColumn<quint32>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::qscriptvalue_castquint32_makeData(const char* expr)
+{
+ static QHash<QString, quint32> value;
+ if (value.isEmpty()) {
+ value.insert("QScriptValue()", 0);
+ value.insert("QScriptValue(QScriptValue::UndefinedValue)", 0);
+ value.insert("QScriptValue(QScriptValue::NullValue)", 0);
+ value.insert("QScriptValue(true)", 1);
+ value.insert("QScriptValue(false)", 0);
+ value.insert("QScriptValue(int(122))", 122);
+ value.insert("QScriptValue(uint(124))", 124);
+ value.insert("QScriptValue(0)", 0);
+ value.insert("QScriptValue(0.0)", 0);
+ value.insert("QScriptValue(123.0)", 123);
+ value.insert("QScriptValue(6.37e-8)", 0);
+ value.insert("QScriptValue(-6.37e-8)", 0);
+ value.insert("QScriptValue(0x43211234)", 1126240820);
+ value.insert("QScriptValue(0x10000)", 65536);
+ value.insert("QScriptValue(0x10001)", 65537);
+ value.insert("QScriptValue(qSNaN())", 0);
+ value.insert("QScriptValue(qQNaN())", 0);
+ value.insert("QScriptValue(qInf())", 0);
+ value.insert("QScriptValue(-qInf())", 0);
+ value.insert("QScriptValue(\"NaN\")", 0);
+ value.insert("QScriptValue(\"Infinity\")", 0);
+ value.insert("QScriptValue(\"-Infinity\")", 0);
+ value.insert("QScriptValue(\"ciao\")", 0);
+ value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0);
+ value.insert("QScriptValue(QString(\"\"))", 0);
+ value.insert("QScriptValue(QString())", 0);
+ value.insert("QScriptValue(QString(\"0\"))", 0);
+ value.insert("QScriptValue(QString(\"123\"))", 123);
+ value.insert("QScriptValue(QString(\"12.4\"))", 12);
+ value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0);
+ value.insert("QScriptValue(0, QScriptValue::NullValue)", 0);
+ value.insert("QScriptValue(0, true)", 1);
+ value.insert("QScriptValue(0, false)", 0);
+ value.insert("QScriptValue(0, int(122))", 122);
+ value.insert("QScriptValue(0, uint(124))", 124);
+ value.insert("QScriptValue(0, 0)", 0);
+ value.insert("QScriptValue(0, 0.0)", 0);
+ value.insert("QScriptValue(0, 123.0)", 123);
+ value.insert("QScriptValue(0, 6.37e-8)", 0);
+ value.insert("QScriptValue(0, -6.37e-8)", 0);
+ value.insert("QScriptValue(0, 0x43211234)", 1126240820);
+ value.insert("QScriptValue(0, 0x10000)", 65536);
+ value.insert("QScriptValue(0, 0x10001)", 65537);
+ value.insert("QScriptValue(0, qSNaN())", 0);
+ value.insert("QScriptValue(0, qQNaN())", 0);
+ value.insert("QScriptValue(0, qInf())", 0);
+ value.insert("QScriptValue(0, -qInf())", 0);
+ value.insert("QScriptValue(0, \"NaN\")", 0);
+ value.insert("QScriptValue(0, \"Infinity\")", 0);
+ value.insert("QScriptValue(0, \"-Infinity\")", 0);
+ value.insert("QScriptValue(0, \"ciao\")", 0);
+ value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0);
+ value.insert("QScriptValue(0, QString(\"\"))", 0);
+ value.insert("QScriptValue(0, QString())", 0);
+ value.insert("QScriptValue(0, QString(\"0\"))", 0);
+ value.insert("QScriptValue(0, QString(\"123\"))", 123);
+ value.insert("QScriptValue(0, QString(\"12.3\"))", 12);
+ value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0);
+ value.insert("QScriptValue(engine, QScriptValue::NullValue)", 0);
+ value.insert("QScriptValue(engine, true)", 1);
+ value.insert("QScriptValue(engine, false)", 0);
+ value.insert("QScriptValue(engine, int(122))", 122);
+ value.insert("QScriptValue(engine, uint(124))", 124);
+ value.insert("QScriptValue(engine, 0)", 0);
+ value.insert("QScriptValue(engine, 0.0)", 0);
+ value.insert("QScriptValue(engine, 123.0)", 123);
+ value.insert("QScriptValue(engine, 6.37e-8)", 0);
+ value.insert("QScriptValue(engine, -6.37e-8)", 0);
+ value.insert("QScriptValue(engine, 0x43211234)", 1126240820);
+ value.insert("QScriptValue(engine, 0x10000)", 65536);
+ value.insert("QScriptValue(engine, 0x10001)", 65537);
+ value.insert("QScriptValue(engine, qSNaN())", 0);
+ value.insert("QScriptValue(engine, qQNaN())", 0);
+ value.insert("QScriptValue(engine, qInf())", 0);
+ value.insert("QScriptValue(engine, -qInf())", 0);
+ value.insert("QScriptValue(engine, \"NaN\")", 0);
+ value.insert("QScriptValue(engine, \"Infinity\")", 0);
+ value.insert("QScriptValue(engine, \"-Infinity\")", 0);
+ value.insert("QScriptValue(engine, \"ciao\")", 0);
+ value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0);
+ value.insert("QScriptValue(engine, QString(\"\"))", 0);
+ value.insert("QScriptValue(engine, QString())", 0);
+ value.insert("QScriptValue(engine, QString(\"0\"))", 0);
+ value.insert("QScriptValue(engine, QString(\"123\"))", 123);
+ value.insert("QScriptValue(engine, QString(\"1.23\"))", 1);
+ value.insert("engine->evaluate(\"[]\")", 0);
+ value.insert("engine->evaluate(\"{}\")", 0);
+ value.insert("engine->evaluate(\"Object.prototype\")", 0);
+ value.insert("engine->evaluate(\"Date.prototype\")", 0);
+ value.insert("engine->evaluate(\"Array.prototype\")", 0);
+ value.insert("engine->evaluate(\"Function.prototype\")", 0);
+ value.insert("engine->evaluate(\"Error.prototype\")", 0);
+ value.insert("engine->evaluate(\"Object\")", 0);
+ value.insert("engine->evaluate(\"Array\")", 0);
+ value.insert("engine->evaluate(\"Number\")", 0);
+ value.insert("engine->evaluate(\"Function\")", 0);
+ value.insert("engine->evaluate(\"(function() { return 1; })\")", 0);
+ value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0);
+ value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0);
+ value.insert("engine->evaluate(\"/foo/\")", 0);
+ value.insert("engine->evaluate(\"new Object()\")", 0);
+ value.insert("engine->evaluate(\"new Array()\")", 0);
+ value.insert("engine->evaluate(\"new Error()\")", 0);
+ }
+ newRow(expr) << value.value(expr);
+}
+
+void tst_QScriptValue::qscriptvalue_castquint32_test(const char*, const QScriptValue& value)
+{
+ QFETCH(quint32, expected);
+ QCOMPARE(qscriptvalue_cast<quint32>(value), expected);
+}
+
+DEFINE_TEST_FUNCTION(qscriptvalue_castquint32)
+
+
+void tst_QScriptValue::qscriptvalue_castquint16_initData()
+{
+ QTest::addColumn<quint16>("expected");
+ initScriptValues();
+}
+
+void tst_QScriptValue::qscriptvalue_castquint16_makeData(const char* expr)
+{
+ static QHash<QString, quint16> value;
+ if (value.isEmpty()) {
+ value.insert("QScriptValue()", 0);
+ value.insert("QScriptValue(QScriptValue::UndefinedValue)", 0);
+ value.insert("QScriptValue(QScriptValue::NullValue)", 0);
+ value.insert("QScriptValue(true)", 1);
+ value.insert("QScriptValue(false)", 0);
+ value.insert("QScriptValue(int(122))", 122);
+ value.insert("QScriptValue(uint(124))", 124);
+ value.insert("QScriptValue(0)", 0);
+ value.insert("QScriptValue(0.0)", 0);
+ value.insert("QScriptValue(123.0)", 123);
+ value.insert("QScriptValue(6.37e-8)", 0);
+ value.insert("QScriptValue(-6.37e-8)", 0);
+ value.insert("QScriptValue(0x43211234)", 4660);
+ value.insert("QScriptValue(0x10000)", 0);
+ value.insert("QScriptValue(0x10001)", 1);
+ value.insert("QScriptValue(qSNaN())", 0);
+ value.insert("QScriptValue(qQNaN())", 0);
+ value.insert("QScriptValue(qInf())", 0);
+ value.insert("QScriptValue(-qInf())", 0);
+ value.insert("QScriptValue(\"NaN\")", 0);
+ value.insert("QScriptValue(\"Infinity\")", 0);
+ value.insert("QScriptValue(\"-Infinity\")", 0);
+ value.insert("QScriptValue(\"ciao\")", 0);
+ value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0);
+ value.insert("QScriptValue(QString(\"\"))", 0);
+ value.insert("QScriptValue(QString())", 0);
+ value.insert("QScriptValue(QString(\"0\"))", 0);
+ value.insert("QScriptValue(QString(\"123\"))", 123);
+ value.insert("QScriptValue(QString(\"12.4\"))", 12);
+ value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0);
+ value.insert("QScriptValue(0, QScriptValue::NullValue)", 0);
+ value.insert("QScriptValue(0, true)", 1);
+ value.insert("QScriptValue(0, false)", 0);
+ value.insert("QScriptValue(0, int(122))", 122);
+ value.insert("QScriptValue(0, uint(124))", 124);
+ value.insert("QScriptValue(0, 0)", 0);
+ value.insert("QScriptValue(0, 0.0)", 0);
+ value.insert("QScriptValue(0, 123.0)", 123);
+ value.insert("QScriptValue(0, 6.37e-8)", 0);
+ value.insert("QScriptValue(0, -6.37e-8)", 0);
+ value.insert("QScriptValue(0, 0x43211234)", 4660);
+ value.insert("QScriptValue(0, 0x10000)", 0);
+ value.insert("QScriptValue(0, 0x10001)", 1);
+ value.insert("QScriptValue(0, qSNaN())", 0);
+ value.insert("QScriptValue(0, qQNaN())", 0);
+ value.insert("QScriptValue(0, qInf())", 0);
+ value.insert("QScriptValue(0, -qInf())", 0);
+ value.insert("QScriptValue(0, \"NaN\")", 0);
+ value.insert("QScriptValue(0, \"Infinity\")", 0);
+ value.insert("QScriptValue(0, \"-Infinity\")", 0);
+ value.insert("QScriptValue(0, \"ciao\")", 0);
+ value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0);
+ value.insert("QScriptValue(0, QString(\"\"))", 0);
+ value.insert("QScriptValue(0, QString())", 0);
+ value.insert("QScriptValue(0, QString(\"0\"))", 0);
+ value.insert("QScriptValue(0, QString(\"123\"))", 123);
+ value.insert("QScriptValue(0, QString(\"12.3\"))", 12);
+ value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0);
+ value.insert("QScriptValue(engine, QScriptValue::NullValue)", 0);
+ value.insert("QScriptValue(engine, true)", 1);
+ value.insert("QScriptValue(engine, false)", 0);
+ value.insert("QScriptValue(engine, int(122))", 122);
+ value.insert("QScriptValue(engine, uint(124))", 124);
+ value.insert("QScriptValue(engine, 0)", 0);
+ value.insert("QScriptValue(engine, 0.0)", 0);
+ value.insert("QScriptValue(engine, 123.0)", 123);
+ value.insert("QScriptValue(engine, 6.37e-8)", 0);
+ value.insert("QScriptValue(engine, -6.37e-8)", 0);
+ value.insert("QScriptValue(engine, 0x43211234)", 4660);
+ value.insert("QScriptValue(engine, 0x10000)", 0);
+ value.insert("QScriptValue(engine, 0x10001)", 1);
+ value.insert("QScriptValue(engine, qSNaN())", 0);
+ value.insert("QScriptValue(engine, qQNaN())", 0);
+ value.insert("QScriptValue(engine, qInf())", 0);
+ value.insert("QScriptValue(engine, -qInf())", 0);
+ value.insert("QScriptValue(engine, \"NaN\")", 0);
+ value.insert("QScriptValue(engine, \"Infinity\")", 0);
+ value.insert("QScriptValue(engine, \"-Infinity\")", 0);
+ value.insert("QScriptValue(engine, \"ciao\")", 0);
+ value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0);
+ value.insert("QScriptValue(engine, QString(\"\"))", 0);
+ value.insert("QScriptValue(engine, QString())", 0);
+ value.insert("QScriptValue(engine, QString(\"0\"))", 0);
+ value.insert("QScriptValue(engine, QString(\"123\"))", 123);
+ value.insert("QScriptValue(engine, QString(\"1.23\"))", 1);
+ value.insert("engine->evaluate(\"[]\")", 0);
+ value.insert("engine->evaluate(\"{}\")", 0);
+ value.insert("engine->evaluate(\"Object.prototype\")", 0);
+ value.insert("engine->evaluate(\"Date.prototype\")", 0);
+ value.insert("engine->evaluate(\"Array.prototype\")", 0);
+ value.insert("engine->evaluate(\"Function.prototype\")", 0);
+ value.insert("engine->evaluate(\"Error.prototype\")", 0);
+ value.insert("engine->evaluate(\"Object\")", 0);
+ value.insert("engine->evaluate(\"Array\")", 0);
+ value.insert("engine->evaluate(\"Number\")", 0);
+ value.insert("engine->evaluate(\"Function\")", 0);
+ value.insert("engine->evaluate(\"(function() { return 1; })\")", 0);
+ value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0);
+ value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0);
+ value.insert("engine->evaluate(\"/foo/\")", 0);
+ value.insert("engine->evaluate(\"new Object()\")", 0);
+ value.insert("engine->evaluate(\"new Array()\")", 0);
+ value.insert("engine->evaluate(\"new Error()\")", 0);
+ }
+ newRow(expr) << value.value(expr);
+}
+
+void tst_QScriptValue::qscriptvalue_castquint16_test(const char*, const QScriptValue& value)
+{
+ QFETCH(quint16, expected);
+ QCOMPARE(qscriptvalue_cast<quint16>(value), expected);
+}
+
+DEFINE_TEST_FUNCTION(qscriptvalue_castquint16)
diff --git a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
index 8abf3c0..5b2b0cf 100644
--- a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
+++ b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
@@ -136,6 +136,7 @@ private slots:
void task252507_mapFromToSource();
void task255652_removeRowsRecursive();
void taskQTBUG_6205_doubleProxySelectionSetSourceModel();
+ void taskQTBUG_7537_appearsAndSort();
protected:
void buildHierarchy(const QStringList &data, QAbstractItemModel *model);
@@ -2852,5 +2853,73 @@ void tst_QSortFilterProxyModel::taskQTBUG_6205_doubleProxySelectionSetSourceMode
QVERIFY(ism.selection().isEmpty());
}
+void tst_QSortFilterProxyModel::taskQTBUG_7537_appearsAndSort()
+{
+ class PModel : public QSortFilterProxyModel
+ {
+ public:
+ PModel() : mVisible(false) {};
+ protected:
+ bool filterAcceptsRow(int, const QModelIndex &) const
+ {
+ return mVisible;
+ }
+
+ public:
+ void updateXX()
+ {
+ mVisible = true;
+ invalidate();
+ }
+ private:
+ bool mVisible;
+ } proxyModel;
+
+
+ QStringListModel sourceModel;
+ QStringList list;
+ list << "b" << "a" << "c";
+ sourceModel.setStringList(list);
+
+ proxyModel.setSourceModel(&sourceModel);
+ proxyModel.setDynamicSortFilter(true);
+ proxyModel.sort(0, Qt::AscendingOrder);
+
+ QApplication::processEvents();
+ QCOMPARE(sourceModel.rowCount(), 3);
+ QCOMPARE(proxyModel.rowCount(), 0); //all rows are hidden at first;
+
+ QSignalSpy spyAbout1(&proxyModel, SIGNAL(layoutAboutToBeChanged()));
+ QSignalSpy spyChanged1(&proxyModel, SIGNAL(layoutChanged()));
+
+ //introducing secondProxyModel to test the layoutChange when many items appears at once
+ QSortFilterProxyModel secondProxyModel;
+ secondProxyModel.setSourceModel(&proxyModel);
+ secondProxyModel.setDynamicSortFilter(true);
+ secondProxyModel.sort(0, Qt::DescendingOrder);
+ QCOMPARE(secondProxyModel.rowCount(), 0); //all rows are hidden at first;
+ QSignalSpy spyAbout2(&secondProxyModel, SIGNAL(layoutAboutToBeChanged()));
+ QSignalSpy spyChanged2(&secondProxyModel, SIGNAL(layoutChanged()));
+
+ proxyModel.updateXX();
+ QApplication::processEvents();
+ //now rows should be visible, and sorted
+ QCOMPARE(proxyModel.rowCount(), 3);
+ QCOMPARE(proxyModel.data(proxyModel.index(0,0), Qt::DisplayRole).toString(), QString::fromLatin1("a"));
+ QCOMPARE(proxyModel.data(proxyModel.index(1,0), Qt::DisplayRole).toString(), QString::fromLatin1("b"));
+ QCOMPARE(proxyModel.data(proxyModel.index(2,0), Qt::DisplayRole).toString(), QString::fromLatin1("c"));
+
+ //now rows should be visible, and sorted
+ QCOMPARE(secondProxyModel.rowCount(), 3);
+ QCOMPARE(secondProxyModel.data(secondProxyModel.index(0,0), Qt::DisplayRole).toString(), QString::fromLatin1("c"));
+ QCOMPARE(secondProxyModel.data(secondProxyModel.index(1,0), Qt::DisplayRole).toString(), QString::fromLatin1("b"));
+ QCOMPARE(secondProxyModel.data(secondProxyModel.index(2,0), Qt::DisplayRole).toString(), QString::fromLatin1("a"));
+
+ QCOMPARE(spyAbout1.count(), 1);
+ QCOMPARE(spyChanged1.count(), 1);
+ QCOMPARE(spyAbout2.count(), 1);
+ QCOMPARE(spyChanged2.count(), 1);
+}
+
QTEST_MAIN(tst_QSortFilterProxyModel)
#include "tst_qsortfilterproxymodel.moc"
diff --git a/tests/auto/qsslcertificate/more-certificates/malformed-just-begin-no-newline.pem b/tests/auto/qsslcertificate/more-certificates/malformed-just-begin-no-newline.pem
new file mode 100644
index 0000000..75f3c32
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/malformed-just-begin-no-newline.pem
@@ -0,0 +1 @@
+-----BEGIN CERTIFICATE----- \ No newline at end of file
diff --git a/tests/auto/qsslcertificate/more-certificates/malformed-just-begin.pem b/tests/auto/qsslcertificate/more-certificates/malformed-just-begin.pem
new file mode 100644
index 0000000..a71aecf
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/malformed-just-begin.pem
@@ -0,0 +1 @@
+-----BEGIN CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/no-ending-newline.pem b/tests/auto/qsslcertificate/more-certificates/no-ending-newline.pem
new file mode 100644
index 0000000..f8056c7
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/no-ending-newline.pem
@@ -0,0 +1,13 @@
+-----BEGIN CERTIFICATE-----
+MIIB8zCCAVwCAREwDQYJKoZIhvcNAQEFBQAwWzELMAkGA1UEBhMCQVUxEzARBgNV
+BAgTClF1ZWVuc2xhbmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRswGQYD
+VQQDExJUZXN0IENBICgxMDI0IGJpdCkwHhcNMDcwNDE3MDc0MDI2WhcNMDcwNTE3
+MDc0MDI2WjApMRowGAYDVQQDExFuYW1lL3dpdGgvc2xhc2hlczELMAkGA1UEBhMC
+Tk8wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOud6QOsME+pWANExxgmL0iT
+1ayg++hTxHsqAYnm/FoMxfUh+NdKkgJn2/GfNppinfPOSI667VqonU+7JBZDTLV5
+CPbZIo9fFQpDJQN6naev4yaxU1VeYFfI7S8c8zYKeGSR+RenNNeLvfH80YxPpZZ1
+snv8IfDH2V8MVxiyr7lLAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAleaU4pgzV6KY
++q9QuXapUYMsC2GiNtDmkG3k+MTHUO8XlE4hqPrIM6rRf7zKQdZ950R2wL9FSnYl
+Qm1Tdv38dCka6ivMBqvRuOt9axH3m0G7nzHL7U3zaCbtEx3yVln+b3yYtiVpTuq0
+3MLrt7tQGAW6ra8ISf6YY1W65/uVXZE=
+-----END CERTIFICATE----- \ No newline at end of file
diff --git a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
index 44f8522..c76c11f 100644
--- a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
+++ b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
@@ -543,6 +543,9 @@ void tst_QSslCertificate::fromPath_data()
QTest::newRow("\"d.*/c.*.pem\" wildcard der") << QString("d.*/c.*.pem") << int(QRegExp::Wildcard) << false << 0;
QTest::newRow("trailing-whitespace") << QString("more-certificates/trailing-whitespace.pem") << int(QRegExp::FixedString) << true << 1;
+ QTest::newRow("no-ending-newline") << QString("more-certificates/no-ending-newline.pem") << int(QRegExp::FixedString) << true << 1;
+ QTest::newRow("malformed-just-begin") << QString("more-certificates/malformed-just-begin.pem") << int(QRegExp::FixedString) << true << 0;
+ QTest::newRow("malformed-just-begin-no-newline") << QString("more-certificates/malformed-just-begin-no-newline.pem") << int(QRegExp::FixedString) << true << 0;
}
void tst_QSslCertificate::fromPath()
diff --git a/tests/auto/qstyle/tst_qstyle.cpp b/tests/auto/qstyle/tst_qstyle.cpp
index 51fde74..a76c82d 100644
--- a/tests/auto/qstyle/tst_qstyle.cpp
+++ b/tests/auto/qstyle/tst_qstyle.cpp
@@ -52,6 +52,7 @@
#include <qstyleoption.h>
#include <qscrollbar.h>
#include <qprogressbar.h>
+#include <qtoolbutton.h>
#include <qplastiquestyle.h>
#include <qwindowsstyle.h>
@@ -445,6 +446,8 @@ void tst_QStyle::testWindowsVistaStyle()
if (QSysInfo::WindowsVersion == QSysInfo::WV_VISTA)
testPainting(&vistastyle, "vista");
+ else if (QSysInfo::WindowsVersion == QSysInfo::WV_XP)
+ testPainting(&vistastyle, "xp");
#endif
}
@@ -460,6 +463,7 @@ void comparePixmap(const QString &filename, const QPixmap &pixmap)
void tst_QStyle::testPainting(QStyle *style, const QString &platform)
{
+qDebug("TEST PAINTING");
//Test Menu
QString fileName = "images/" + platform + "/menu.png";
QMenu menu;
@@ -538,6 +542,19 @@ void tst_QStyle::testPainting(QStyle *style, const QString &platform)
pixmap = QPixmap::grabWidget(&mdiArea);
mdiArea.hide();
comparePixmap(fileName, pixmap);
+
+ // QToolButton
+ fileName = "images/" + platform + "/toolbutton.png";
+ QToolButton tb;
+ tb.setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
+ tb.setText("AaQqPpXx");
+ tb.setIcon(style->standardPixmap(QStyle::SP_DirHomeIcon));
+ tb.setStyle(style);
+ tb.show();
+ pixmap = QPixmap::grabWidget(&tb);
+ tb.hide();
+ comparePixmap(fileName, pixmap);
+
}
void tst_QStyle::testMacStyle()
diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp
index 7a5e68f..430712c 100644
--- a/tests/auto/qtableview/tst_qtableview.cpp
+++ b/tests/auto/qtableview/tst_qtableview.cpp
@@ -3024,6 +3024,14 @@ void tst_QTableView::spans_data()
<< QPoint(0, 0)
<< 1
<< 1;
+
+ QTest::newRow("QTBUG-6004 (follow-up): No failing Q_ASSERT, then it passes.")
+ << 10 << 10
+ << (SpanList() << QRect(2, 2, 1, 3) << QRect(2, 2, 1, 1))
+ << false
+ << QPoint(0, 0)
+ << 1
+ << 1;
}
void tst_QTableView::spans()
diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp
index ecd6f09..f108f4c 100644
--- a/tests/auto/qurl/tst_qurl.cpp
+++ b/tests/auto/qurl/tst_qurl.cpp
@@ -90,7 +90,6 @@ public slots:
private slots:
void getSetCheck();
void constructing();
- void isDetached();
void assignment();
void comparison();
void copying();
@@ -166,6 +165,8 @@ private slots:
void ace_testsuite();
void std3violations_data();
void std3violations();
+ void std3deviations_data();
+ void std3deviations();
void tldRestrictions_data();
void tldRestrictions();
void emptyQueryOrFragment();
@@ -319,25 +320,6 @@ void tst_QUrl::constructing()
QVERIFY(!buildUNC.isEmpty());
}
-void tst_QUrl::isDetached()
-{
- QUrl url;
- QVERIFY(!url.isDetached());
-
- url = "http://qt.nokia.com/";
- QVERIFY(url.isDetached());
-
- url.clear();
- QVERIFY(!url.isDetached());
-
- url.setHost("qt.nokia.com");
- QVERIFY(url.isDetached());
-
- QUrl url2 = url;
- QVERIFY(!url.isDetached());
- QVERIFY(!url2.isDetached());
-}
-
void tst_QUrl::assignment()
{
QUrl url("http://qt.nokia.com/");
@@ -3258,6 +3240,8 @@ void tst_QUrl::std3violations_data()
QTest::newRow("bang") << "foo!" << false;
QTest::newRow("plus") << "foo+bar" << false;
QTest::newRow("dot") << "foo.bar";
+ QTest::newRow("startingdot") << ".bar" << false;
+ QTest::newRow("startingdot2") << ".example.com" << false;
QTest::newRow("slash") << "foo/bar" << true;
QTest::newRow("colon") << "foo:80" << true;
QTest::newRow("question") << "foo?bar" << true;
@@ -3302,6 +3286,24 @@ void tst_QUrl::std3violations()
QVERIFY(!url.isValid());
}
+void tst_QUrl::std3deviations_data()
+{
+ QTest::addColumn<QString>("source");
+
+ QTest::newRow("ending-dot") << "example.com.";
+ QTest::newRow("ending-dot3002") << QString("example.com") + QChar(0x3002);
+}
+
+void tst_QUrl::std3deviations()
+{
+ QFETCH(QString, source);
+ QVERIFY(!QUrl::toAce(source).isEmpty());
+
+ QUrl url;
+ url.setHost(source);
+ QVERIFY(!url.host().isEmpty());
+}
+
void tst_QUrl::tldRestrictions_data()
{
QTest::addColumn<QString>("tld");
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index ee4e726..ea90ae3 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -5439,26 +5439,24 @@ public:
QRegion r;
};
-template<typename R, typename C>
-void verifyColor(R const& region, C const& color)
-{
- const QRegion r = QRegion(region);
- for (int i = 0; i < r.rects().size(); ++i) {
- const QRect rect = r.rects().at(i);
- for (int t = 0; t < 5; t++) {
- const QPixmap pixmap = QPixmap::grabWindow(QDesktopWidget().winId(),
- rect.left(), rect.top(),
- rect.width(), rect.height());
- QCOMPARE(pixmap.size(), rect.size());
- QPixmap expectedPixmap(pixmap); /* ensure equal formats */
- expectedPixmap.fill(color);
- if (pixmap.toImage().pixel(0,0) != QColor(color).rgb() && t < 4 )
- { QTest::qWait(200); continue; }
- QCOMPARE(pixmap.toImage().pixel(0,0), QColor(color).rgb());
- QCOMPARE(pixmap, expectedPixmap);
- break;
- }
- }
+#define VERIFY_COLOR(region, color) { \
+ const QRegion r = QRegion(region); \
+ for (int i = 0; i < r.rects().size(); ++i) { \
+ const QRect rect = r.rects().at(i); \
+ for (int t = 0; t < 5; t++) { \
+ const QPixmap pixmap = QPixmap::grabWindow(QDesktopWidget().winId(), \
+ rect.left(), rect.top(), \
+ rect.width(), rect.height()); \
+ QCOMPARE(pixmap.size(), rect.size()); \
+ QPixmap expectedPixmap(pixmap); /* ensure equal formats */ \
+ expectedPixmap.fill(color); \
+ if (pixmap.toImage().pixel(0,0) != QColor(color).rgb() && t < 4 ) \
+ { QTest::qWait(200); continue; } \
+ QCOMPARE(pixmap.toImage().pixel(0,0), QColor(color).rgb()); \
+ QCOMPARE(pixmap, expectedPixmap); \
+ break; \
+ } \
+ } \
}
void tst_QWidget::moveChild_data()
@@ -5499,9 +5497,9 @@ void tst_QWidget::moveChild()
#endif
QTRY_COMPARE(parent.r, QRegion(parent.rect()) - child.geometry());
QTRY_COMPARE(child.r, QRegion(child.rect()));
- verifyColor(child.geometry().translated(tlwOffset),
+ VERIFY_COLOR(child.geometry().translated(tlwOffset),
child.color);
- verifyColor(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset),
+ VERIFY_COLOR(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset),
parent.color);
parent.reset();
child.reset();
@@ -5520,9 +5518,9 @@ void tst_QWidget::moveChild()
// should be scrolled in backingstore
QCOMPARE(child.r, QRegion());
#endif
- verifyColor(child.geometry().translated(tlwOffset),
+ VERIFY_COLOR(child.geometry().translated(tlwOffset),
child.color);
- verifyColor(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset),
+ VERIFY_COLOR(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset),
parent.color);
}
@@ -5553,8 +5551,8 @@ void tst_QWidget::showAndMoveChild()
child.move(desktopDimensions.width()/2, desktopDimensions.height()/2);
qApp->processEvents();
- verifyColor(child.geometry().translated(tlwOffset), Qt::blue);
- verifyColor(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset), Qt::red);
+ VERIFY_COLOR(child.geometry().translated(tlwOffset), Qt::blue);
+ VERIFY_COLOR(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset), Qt::red);
}
void tst_QWidget::subtractOpaqueSiblings()
diff --git a/tests/auto/selftests/expected_xunit.txt b/tests/auto/selftests/expected_xunit.txt
index 5ec4668..3c014e3 100644
--- a/tests/auto/selftests/expected_xunit.txt
+++ b/tests/auto/selftests/expected_xunit.txt
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite errors="5" failures="3" tests="9" name="tst_Xunit">
<properties>
- <property value="4.6.2" name="QTestVersion"/>
- <property value="4.6.2" name="QtVersion"/>
+ <property value="<INSERT_QT_VERSION_HERE>" name="QTestVersion"/>
+ <property value="<INSERT_QT_VERSION_HERE>" name="QtVersion"/>
</properties>
<testcase result="pass" name="initTestCase"/>
<testcase result="pass" name="testFunc1">
diff --git a/tests/auto/selftests/tst_selftests.cpp b/tests/auto/selftests/tst_selftests.cpp
index 6608439..3d58c15 100644
--- a/tests/auto/selftests/tst_selftests.cpp
+++ b/tests/auto/selftests/tst_selftests.cpp
@@ -248,7 +248,7 @@ void tst_Selftests::doRunSubTest(QString &subdir, QStringList &arguments )
continue;
const QString output(QString::fromLatin1(line));
- const QString expected(QString::fromLatin1(exp.at(i)));
+ const QString expected(QString::fromLatin1(exp.at(i)).replace("<INSERT_QT_VERSION_HERE>", QT_VERSION_STR));
if (line.contains("ASSERT") && output != expected)
QEXPECT_FAIL("assert", "QTestLib prints out the absolute path.", Continue);
diff --git a/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro b/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro
index 39267c8..3f49ccc 100644
--- a/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro
+++ b/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro
@@ -1,7 +1,6 @@
TEMPLATE = subdirs
contains(QT_CONFIG,xmlpatterns) {
SUBDIRS += lib
- !wince*:lib.file = lib/lib.pro
test.depends = lib
}
SUBDIRS += test