diff options
Diffstat (limited to 'tests/benchmarks/declarative')
236 files changed, 0 insertions, 18442 deletions
diff --git a/tests/benchmarks/declarative/animation/animation.pro b/tests/benchmarks/declarative/animation/animation.pro deleted file mode 100644 index fc72040a3d..0000000000 --- a/tests/benchmarks/declarative/animation/animation.pro +++ /dev/null @@ -1,10 +0,0 @@ -TEMPLATE = app -TARGET = tst_animation -QT += declarative -macx:CONFIG -= app_bundle - -SOURCES += tst_animation.cpp - -DEFINES += SRCDIR=\\\"$$PWD\\\" - -QT += testlib core-private gui-private declarative-private quick-private v8-private diff --git a/tests/benchmarks/declarative/animation/data/animation.qml b/tests/benchmarks/declarative/animation/data/animation.qml deleted file mode 100644 index c48f5ccbe3..0000000000 --- a/tests/benchmarks/declarative/animation/data/animation.qml +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -ParallelAnimation { - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} - NumberAnimation {} -} diff --git a/tests/benchmarks/declarative/animation/tst_animation.cpp b/tests/benchmarks/declarative/animation/tst_animation.cpp deleted file mode 100644 index 6273d9740e..0000000000 --- a/tests/benchmarks/declarative/animation/tst_animation.cpp +++ /dev/null @@ -1,204 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <qtest.h> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> -#include <private/qdeclarativemetatype_p.h> -#include <private/qdeclarativeanimation_p_p.h> -#include <QDeclarativeContext> - -class tst_animation : public QObject -{ - Q_OBJECT -public: - tst_animation(); - -private slots: - void abstractAnimation(); - void bulkValueAnimator(); - void propertyUpdater(); - - void animationtree_qml(); - - void animationelements_data(); - void animationelements(); - - void numberAnimation(); - void numberAnimationStarted(); - void numberAnimationMultipleTargets(); - void numberAnimationEmpty(); - -private: - QDeclarativeEngine engine; -}; - -tst_animation::tst_animation() -{ -} - -inline QUrl TEST_FILE(const QString &filename) -{ - return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename); -} - -void tst_animation::abstractAnimation() -{ - QBENCHMARK { - QAbstractAnimationJob *animation = new QAbstractAnimationJob; - delete animation; - } -} - -void tst_animation::bulkValueAnimator() -{ - QBENCHMARK { - QDeclarativeBulkValueAnimator *animator = new QDeclarativeBulkValueAnimator; - delete animator; - } -} - -void tst_animation::propertyUpdater() -{ - QBENCHMARK { - QDeclarativeAnimationPropertyUpdater *updater = new QDeclarativeAnimationPropertyUpdater; - delete updater; - } -} - -void tst_animation::animationtree_qml() -{ - QDeclarativeComponent component(&engine, TEST_FILE("animation.qml")); - QObject *obj = component.create(); - delete obj; - - QBENCHMARK { - QObject *obj = component.create(); - delete obj; - } -} - -void tst_animation::animationelements_data() -{ - QTest::addColumn<QString>("type"); - - QSet<QString> types = QDeclarativeMetaType::qmlTypeNames().toSet(); - foreach (const QString &type, types) { - if (type.contains(QLatin1String("Animation"))) - QTest::newRow(type.toLatin1()) << type; - } - - QTest::newRow("QtQuick/Behavior") << "QtQuick/Behavior"; - QTest::newRow("QtQuick/Transition") << "QtQuick/Transition"; -} - -void tst_animation::animationelements() -{ - QFETCH(QString, type); - QDeclarativeType *t = QDeclarativeMetaType::qmlType(type, 2, 0); - if (!t || !t->isCreatable()) - QSKIP("Non-creatable type"); - - QBENCHMARK { - QObject *obj = t->create(); - delete obj; - } -} - -void tst_animation::numberAnimation() -{ - QDeclarativeComponent component(&engine); - component.setData("import QtQuick 2.0\nItem { Rectangle { id: rect; NumberAnimation { target: rect; property: \"x\"; to: 100; duration: 500; easing.type: Easing.InOutQuad } } }", QUrl()); - - QObject *obj = component.create(); - delete obj; - - QBENCHMARK { - QObject *obj = component.create(); - delete obj; - } -} - -void tst_animation::numberAnimationStarted() -{ - QDeclarativeComponent component(&engine); - component.setData("import QtQuick 2.0\nItem { Rectangle { id: rect; NumberAnimation { target: rect; property: \"x\"; to: 100; duration: 500; easing.type: Easing.InOutQuad; running: true; paused: true } } }", QUrl()); - - QObject *obj = component.create(); - delete obj; - - QBENCHMARK { - QObject *obj = component.create(); - delete obj; - } -} - -void tst_animation::numberAnimationMultipleTargets() -{ - QDeclarativeComponent component(&engine); - component.setData("import QtQuick 2.0\nItem { Rectangle { id: rect; NumberAnimation { target: rect; properties: \"x,y,z,width,height,implicitWidth,implicitHeight\"; to: 100; duration: 500; easing.type: Easing.InOutQuad; running: true; paused: true } } }", QUrl()); - - QObject *obj = component.create(); - delete obj; - - QBENCHMARK { - QObject *obj = component.create(); - delete obj; - } -} - -void tst_animation::numberAnimationEmpty() -{ - QDeclarativeComponent component(&engine); - component.setData("import QtQuick 2.0\nNumberAnimation { }", QUrl()); - - QObject *obj = component.create(); - delete obj; - - QBENCHMARK { - QObject *obj = component.create(); - delete obj; - } -} - -QTEST_MAIN(tst_animation) - -#include "tst_animation.moc" diff --git a/tests/benchmarks/declarative/binding/binding.pro b/tests/benchmarks/declarative/binding/binding.pro deleted file mode 100644 index ba59080232..0000000000 --- a/tests/benchmarks/declarative/binding/binding.pro +++ /dev/null @@ -1,11 +0,0 @@ -CONFIG += testcase -TEMPLATE = app -TARGET = tst_binding -QT += declarative testlib -macx:CONFIG -= app_bundle - -SOURCES += tst_binding.cpp testtypes.cpp -HEADERS += testtypes.h - -# Define SRCDIR equal to test's source directory -DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/benchmarks/declarative/binding/data/creation.txt b/tests/benchmarks/declarative/binding/data/creation.txt deleted file mode 100644 index 05704fa341..0000000000 --- a/tests/benchmarks/declarative/binding/data/creation.txt +++ /dev/null @@ -1,9 +0,0 @@ -import Test 1.0 - -MyQmlObject { - id: myObject - property int myValue: 1 - object: myObject - - result: ### -} diff --git a/tests/benchmarks/declarative/binding/data/idproperty.txt b/tests/benchmarks/declarative/binding/data/idproperty.txt deleted file mode 100644 index 4e474ba49a..0000000000 --- a/tests/benchmarks/declarative/binding/data/idproperty.txt +++ /dev/null @@ -1,9 +0,0 @@ -import Test 1.0 - -MyQmlObject { - id: myObject - - MyQmlObject { - result: ### - } -} diff --git a/tests/benchmarks/declarative/binding/data/localproperty.txt b/tests/benchmarks/declarative/binding/data/localproperty.txt deleted file mode 100644 index c7ca0efdb4..0000000000 --- a/tests/benchmarks/declarative/binding/data/localproperty.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Test 1.0 - -MyQmlObject { - result: ### -} diff --git a/tests/benchmarks/declarative/binding/data/objectproperty.txt b/tests/benchmarks/declarative/binding/data/objectproperty.txt deleted file mode 100644 index 06409f2dd1..0000000000 --- a/tests/benchmarks/declarative/binding/data/objectproperty.txt +++ /dev/null @@ -1,8 +0,0 @@ -import Test 1.0 - -MyQmlObject { - id: myObject - object: myObject - - result: ### -} diff --git a/tests/benchmarks/declarative/binding/testtypes.cpp b/tests/benchmarks/declarative/binding/testtypes.cpp deleted file mode 100644 index 31af4f15b0..0000000000 --- a/tests/benchmarks/declarative/binding/testtypes.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include "testtypes.h" - -void registerTypes() -{ - qmlRegisterType<MyQmlObject>("Test", 1, 0, "MyQmlObject"); -} diff --git a/tests/benchmarks/declarative/binding/testtypes.h b/tests/benchmarks/declarative/binding/testtypes.h deleted file mode 100644 index 1c99842e33..0000000000 --- a/tests/benchmarks/declarative/binding/testtypes.h +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#ifndef TESTTYPES_H -#define TESTTYPES_H - -#include <QtCore/qobject.h> -#include <QtDeclarative/qdeclarative.h> - -class MyQmlObject : public QObject -{ - Q_OBJECT - Q_PROPERTY(int result READ result WRITE setResult) - Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged) - Q_PROPERTY(MyQmlObject *object READ object WRITE setObject NOTIFY objectChanged) - Q_PROPERTY(QDeclarativeListProperty<QObject> data READ data) - Q_CLASSINFO("DefaultProperty", "data") -public: - MyQmlObject() : m_result(0), m_value(0), m_object(0) {} - - int result() const { return m_result; } - void setResult(int r) { m_result = r; } - - int value() const { return m_value; } - void setValue(int v) { m_value = v; emit valueChanged(); } - - QDeclarativeListProperty<QObject> data() { return QDeclarativeListProperty<QObject>(this, m_data); } - - MyQmlObject *object() const { return m_object; } - void setObject(MyQmlObject *o) { m_object = o; emit objectChanged(); } - -signals: - void valueChanged(); - void objectChanged(); - -private: - QList<QObject *> m_data; - int m_result; - int m_value; - MyQmlObject *m_object; -}; -QML_DECLARE_TYPE(MyQmlObject); - -void registerTypes(); - -#endif // TESTTYPES_H diff --git a/tests/benchmarks/declarative/binding/tst_binding.cpp b/tests/benchmarks/declarative/binding/tst_binding.cpp deleted file mode 100644 index 858e99016b..0000000000 --- a/tests/benchmarks/declarative/binding/tst_binding.cpp +++ /dev/null @@ -1,188 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <qtest.h> -#include <QDeclarativeEngine> -#include <QDeclarativeContext> -#include <QDeclarativeComponent> -#include <QFile> -#include <QDebug> -#include "testtypes.h" - -class tst_binding : public QObject -{ - Q_OBJECT - -public: - tst_binding(); - virtual ~tst_binding(); - -public slots: - void initTestCase(); - void cleanupTestCase(); - -private slots: - void objectproperty_data(); - void objectproperty(); - void basicproperty_data(); - void basicproperty(); - void creation_data(); - void creation(); - -private: - QDeclarativeEngine engine; - MyQmlObject tstObject; -}; - -tst_binding::tst_binding() -{ -} - -tst_binding::~tst_binding() -{ -} - -void tst_binding::initTestCase() -{ - registerTypes(); - engine.rootContext()->setContextProperty("tstObject", &tstObject); -} - -void tst_binding::cleanupTestCase() -{ -} - -#define COMPONENT(filename, binding) \ - QDeclarativeComponent c(&engine); \ - { \ - QFile f(filename); \ - QVERIFY(f.open(QIODevice::ReadOnly)); \ - QByteArray data = f.readAll(); \ - data.replace("###", binding.toUtf8()); \ - c.setData(data, QUrl()); \ - QVERIFY(c.isReady()); \ - } - -void tst_binding::objectproperty_data() -{ - QTest::addColumn<QString>("file"); - QTest::addColumn<QString>("binding"); - - QTest::newRow("object.value") << SRCDIR "/data/objectproperty.txt" << "object.value"; - QTest::newRow("object.value + 10") << SRCDIR "/data/objectproperty.txt" << "object.value + 10"; -} - -void tst_binding::objectproperty() -{ - QFETCH(QString, file); - QFETCH(QString, binding); - - COMPONENT(file, binding); - - MyQmlObject object1; - MyQmlObject object2; - - MyQmlObject *object = qobject_cast<MyQmlObject *>(c.create()); - QVERIFY(object != 0); - object->setObject(&object2); - - QBENCHMARK { - object->setObject(&object1); - object->setObject(&object2); - } -} - -void tst_binding::basicproperty_data() -{ - QTest::addColumn<QString>("file"); - QTest::addColumn<QString>("binding"); - - QTest::newRow("value") << SRCDIR "/data/localproperty.txt" << "value"; - QTest::newRow("value + 10") << SRCDIR "/data/localproperty.txt" << "value + 10"; - QTest::newRow("value + value + 10") << SRCDIR "/data/localproperty.txt" << "value + value + 10"; - - QTest::newRow("myObject.value") << SRCDIR "/data/idproperty.txt" << "myObject.value"; - QTest::newRow("myObject.value + 10") << SRCDIR "/data/idproperty.txt" << "myObject.value + 10"; - QTest::newRow("myObject.value + myObject.value + 10") << SRCDIR "/data/idproperty.txt" << "myObject.value + myObject.value + 10"; -} - -void tst_binding::basicproperty() -{ - QFETCH(QString, file); - QFETCH(QString, binding); - - COMPONENT(file, binding); - - MyQmlObject *object = qobject_cast<MyQmlObject *>(c.create()); - QVERIFY(object != 0); - object->setValue(10); - - QBENCHMARK { - object->setValue(1); - } -} - -void tst_binding::creation_data() -{ - QTest::addColumn<QString>("file"); - QTest::addColumn<QString>("binding"); - - QTest::newRow("constant") << SRCDIR "/data/creation.txt" << "10"; - QTest::newRow("ownProperty") << SRCDIR "/data/creation.txt" << "myObject.value"; - QTest::newRow("declaredProperty") << SRCDIR "/data/creation.txt" << "myObject.myValue"; - QTest::newRow("contextProperty") << SRCDIR "/data/creation.txt" << "tstObject.value"; -} - -void tst_binding::creation() -{ - QFETCH(QString, file); - QFETCH(QString, binding); - - COMPONENT(file, binding); - - QBENCHMARK { - QObject *o = c.create(); - delete o; - } -} - -QTEST_MAIN(tst_binding) -#include "tst_binding.moc" diff --git a/tests/benchmarks/declarative/compilation/compilation.pro b/tests/benchmarks/declarative/compilation/compilation.pro deleted file mode 100644 index 44ea3d0c68..0000000000 --- a/tests/benchmarks/declarative/compilation/compilation.pro +++ /dev/null @@ -1,11 +0,0 @@ -CONFIG += testcase -TEMPLATE = app -TARGET = tst_compilation -QT += declarative testlib -macx:CONFIG -= app_bundle - -CONFIG += release - -SOURCES += tst_compilation.cpp - -DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/benchmarks/declarative/compilation/data/BoomBlock.qml b/tests/benchmarks/declarative/compilation/data/BoomBlock.qml deleted file mode 100644 index 58ef377b71..0000000000 --- a/tests/benchmarks/declarative/compilation/data/BoomBlock.qml +++ /dev/null @@ -1,106 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import Qt.labs.particles 1.0 - -Item { - id: block - property bool dying: false - property bool spawned: false - property int type: 0 - property int targetX: 0 - property int targetY: 0 - - SpringFollow on x { enabled: spawned; to: targetX; spring: 2; damping: 0.2 } - SpringFollow on y { to: targetY; spring: 2; damping: 0.2 } - - Image { - id: img - source: { - if(type == 0){ - "pics/redStone.png"; - } else if(type == 1) { - "pics/blueStone.png"; - } else { - "pics/greenStone.png"; - } - } - opacity: 0 - Behavior on opacity { NumberAnimation { duration: 200 } } - anchors.fill: parent - } - - Particles { - id: particles - - width: 1; height: 1 - anchors.centerIn: parent - - emissionRate: 0 - lifeSpan: 700; lifeSpanDeviation: 600 - angle: 0; angleDeviation: 360; - velocity: 100; velocityDeviation: 30 - source: { - if(type == 0){ - "pics/redStar.png"; - } else if (type == 1) { - "pics/blueStar.png"; - } else { - "pics/greenStar.png"; - } - } - } - - states: [ - State { - name: "AliveState"; when: spawned == true && dying == false - PropertyChanges { target: img; opacity: 1 } - }, - - State { - name: "DeathState"; when: dying == true - StateChangeScript { script: particles.burst(50); } - PropertyChanges { target: img; opacity: 0 } - StateChangeScript { script: block.destroy(1000); } - } - ] -} diff --git a/tests/benchmarks/declarative/compilation/tst_compilation.cpp b/tests/benchmarks/declarative/compilation/tst_compilation.cpp deleted file mode 100644 index b9c619af31..0000000000 --- a/tests/benchmarks/declarative/compilation/tst_compilation.cpp +++ /dev/null @@ -1,160 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <qtest.h> - -#include <QtDeclarative/qdeclarativeengine.h> -#include <QtDeclarative/qdeclarativecomponent.h> -#include <QtDeclarative/private/qdeclarativejsengine_p.h> -#include <QtDeclarative/private/qdeclarativejsmemorypool_p.h> -#include <QtDeclarative/private/qdeclarativejsparser_p.h> -#include <QtDeclarative/private/qdeclarativejslexer_p.h> -#include <QtDeclarative/private/qdeclarativescript_p.h> - -#include <QFile> -#include <QDebug> -#include <QTextStream> - -class tst_compilation : public QObject -{ - Q_OBJECT -public: - tst_compilation(); - -private slots: - void boomblock(); - - void jsparser_data(); - void jsparser(); - - void scriptparser_data(); - void scriptparser(); - -private: - QDeclarativeEngine engine; -}; - -tst_compilation::tst_compilation() -{ -} - -inline QUrl TEST_FILE(const QString &filename) -{ - return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename); -} - -void tst_compilation::boomblock() -{ - QFile f(SRCDIR + QLatin1String("/data/BoomBlock.qml")); - QVERIFY(f.open(QIODevice::ReadOnly)); - QByteArray data = f.readAll(); - - //get rid of initialization effects - { - QDeclarativeComponent c(&engine); - c.setData(data, QUrl()); - } - - QBENCHMARK { - QDeclarativeComponent c(&engine); - c.setData(data, QUrl()); -// QVERIFY(c.isReady()); - } -} - -void tst_compilation::jsparser_data() -{ - QTest::addColumn<QString>("file"); - - QTest::newRow("boomblock") << QString(SRCDIR + QLatin1String("/data/BoomBlock.qml")); -} - -void tst_compilation::jsparser() -{ - QFETCH(QString, file); - - QFile f(file); - QVERIFY(f.open(QIODevice::ReadOnly)); - QByteArray data = f.readAll(); - - QTextStream stream(data, QIODevice::ReadOnly); - const QString code = stream.readAll(); - - QBENCHMARK { - QDeclarativeJS::Engine engine; - QDeclarativeJS::NodePool nodePool(file, &engine); - - QDeclarativeJS::Lexer lexer(&engine); - lexer.setCode(code, -1); - - QDeclarativeJS::Parser parser(&engine); - parser.parse(); - parser.ast(); - } -} - -void tst_compilation::scriptparser_data() -{ - QTest::addColumn<QString>("file"); - - QTest::newRow("boomblock") << QString(SRCDIR + QLatin1String("/data/BoomBlock.qml")); -} - -void tst_compilation::scriptparser() -{ - QFETCH(QString, file); - - QFile f(file); - QVERIFY(f.open(QIODevice::ReadOnly)); - QByteArray data = f.readAll(); - - QUrl url = QUrl::fromLocalFile(file); - - QBENCHMARK { - QDeclarativeScript::Parser parser; - parser.parse(data, url); - parser.tree(); - } -} - -QTEST_MAIN(tst_compilation) - -#include "tst_compilation.moc" diff --git a/tests/benchmarks/declarative/creation/creation.pro b/tests/benchmarks/declarative/creation/creation.pro deleted file mode 100644 index 6d0d9d7e8f..0000000000 --- a/tests/benchmarks/declarative/creation/creation.pro +++ /dev/null @@ -1,10 +0,0 @@ -CONFIG += testcase -TEMPLATE = app -TARGET = tst_creation -macx:CONFIG -= app_bundle - -SOURCES += tst_creation.cpp - -DEFINES += SRCDIR=\\\"$$PWD\\\" - -QT += core-private gui-private declarative-private qtquick1-private widgets testlib diff --git a/tests/benchmarks/declarative/creation/data/item.qml b/tests/benchmarks/declarative/creation/data/item.qml deleted file mode 100644 index ebc50ceb13..0000000000 --- a/tests/benchmarks/declarative/creation/data/item.qml +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} - Item {} -} diff --git a/tests/benchmarks/declarative/creation/data/qobject.qml b/tests/benchmarks/declarative/creation/data/qobject.qml deleted file mode 100644 index 4b59535bcb..0000000000 --- a/tests/benchmarks/declarative/creation/data/qobject.qml +++ /dev/null @@ -1,45 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -QtObject { -} diff --git a/tests/benchmarks/declarative/creation/tst_creation.cpp b/tests/benchmarks/declarative/creation/tst_creation.cpp deleted file mode 100644 index 809271e4d2..0000000000 --- a/tests/benchmarks/declarative/creation/tst_creation.cpp +++ /dev/null @@ -1,361 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <qtest.h> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> -#include <private/qdeclarativemetatype_p.h> -#include <QDebug> -#include <QGraphicsScene> -#include <QGraphicsItem> -#include <QDeclarativeItem> -#include <QDeclarativeContext> -#include <QtQuick1/private/qdeclarativetextinput_p.h> -#include <private/qobject_p.h> - -class tst_creation : public QObject -{ - Q_OBJECT -public: - tst_creation(); - -private slots: - void qobject_cpp(); - void qobject_qml(); - void qobject_qmltype(); - void qobject_alloc(); - - void qobject_10flat_qml(); - void qobject_10flat_cpp(); - - void qobject_10tree_qml(); - void qobject_10tree_cpp(); - - void itemtree_notree_cpp(); - void itemtree_objtree_cpp(); - void itemtree_cpp(); - void itemtree_data_cpp(); - void itemtree_qml(); - void itemtree_scene_cpp(); - - void elements_data(); - void elements(); - -private: - QDeclarativeEngine engine; -}; - -class TestType : public QObject -{ -Q_OBJECT -Q_PROPERTY(QDeclarativeListProperty<QObject> resources READ resources) -Q_CLASSINFO("DefaultProperty", "resources") -public: - TestType(QObject *parent = 0) - : QObject(parent) {} - - QDeclarativeListProperty<QObject> resources() { - return QDeclarativeListProperty<QObject>(this, 0, resources_append); - } - - static void resources_append(QDeclarativeListProperty<QObject> *p, QObject *o) { - o->setParent(p->object); - } -}; - -tst_creation::tst_creation() -{ - qmlRegisterType<TestType>("Qt.test", 1, 0, "TestType"); - - //get rid of initialization effects - QDeclarative1TextInput te; -} - -inline QUrl TEST_FILE(const QString &filename) -{ - return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename); -} - -void tst_creation::qobject_cpp() -{ - QBENCHMARK { - QObject *obj = new QObject; - delete obj; - } -} - -void tst_creation::qobject_qml() -{ - QDeclarativeComponent component(&engine); - component.setData("import QtQuick 2.0\nQtObject {}", QUrl()); - QObject *obj = component.create(); - delete obj; - - QBENCHMARK { - QObject *obj = component.create(); - delete obj; - } -} - -void tst_creation::qobject_10flat_qml() -{ - QDeclarativeComponent component(&engine); - component.setData("import Qt.test 1.0\nTestType { resources: [ TestType{},TestType{},TestType{},TestType{},TestType{},TestType{},TestType{},TestType{},TestType{},TestType{} ] }", QUrl()); - QObject *obj = component.create(); - delete obj; - - QBENCHMARK { - QObject *obj = component.create(); - delete obj; - } -} - -void tst_creation::qobject_10flat_cpp() -{ - QBENCHMARK { - QObject *item = new TestType; - new TestType(item); - new TestType(item); - new TestType(item); - new TestType(item); - new TestType(item); - new TestType(item); - new TestType(item); - new TestType(item); - new TestType(item); - new TestType(item); - delete item; - } -} - -void tst_creation::qobject_10tree_qml() -{ - QDeclarativeComponent component(&engine); - component.setData("import Qt.test 1.0\nTestType { TestType{ TestType { TestType{ TestType{ TestType{ TestType{ TestType{ TestType{ TestType{ TestType{ } } } } } } } } } } }", QUrl()); - - QObject *obj = component.create(); - delete obj; - - QBENCHMARK { - QObject *obj = component.create(); - delete obj; - } -} - -void tst_creation::qobject_10tree_cpp() -{ - QBENCHMARK { - QObject *item = new TestType; - QObject *root = item; - item = new TestType(item); - item = new TestType(item); - item = new TestType(item); - item = new TestType(item); - item = new TestType(item); - item = new TestType(item); - item = new TestType(item); - item = new TestType(item); - item = new TestType(item); - item = new TestType(item); - delete root; - } -} - -void tst_creation::qobject_qmltype() -{ - QDeclarativeType *t = QDeclarativeMetaType::qmlType("QtQuick/QtObject", 2, 0); - - QBENCHMARK { - QObject *obj = t->create(); - delete obj; - } -} - -struct QObjectFakeData { - char data[sizeof(QObjectPrivate)]; -}; - -struct QObjectFake { - QObjectFake(); - virtual ~QObjectFake(); -private: - QObjectFakeData *d; -}; - -QObjectFake::QObjectFake() -{ - d = new QObjectFakeData; -} - -QObjectFake::~QObjectFake() -{ - delete d; -} - -void tst_creation::qobject_alloc() -{ - QBENCHMARK { - QObjectFake *obj = new QObjectFake; - delete obj; - } -} - -struct QDeclarativeGraphics_Derived : public QObject -{ - void setParent_noEvent(QObject *parent) { - bool sce = d_ptr->sendChildEvents; - d_ptr->sendChildEvents = false; - setParent(parent); - d_ptr->sendChildEvents = sce; - } -}; - -inline void QDeclarativeGraphics_setParent_noEvent(QObject *object, QObject *parent) -{ - static_cast<QDeclarativeGraphics_Derived *>(object)->setParent_noEvent(parent); -} - -void tst_creation::itemtree_notree_cpp() -{ - QBENCHMARK { - QDeclarativeItem *item = new QDeclarativeItem; - for (int i = 0; i < 30; ++i) { - QDeclarativeItem *child = new QDeclarativeItem; - Q_UNUSED(child); - } - delete item; - } -} - -void tst_creation::itemtree_objtree_cpp() -{ - QBENCHMARK { - QDeclarativeItem *item = new QDeclarativeItem; - for (int i = 0; i < 30; ++i) { - QDeclarativeItem *child = new QDeclarativeItem; - QDeclarativeGraphics_setParent_noEvent(child,item); - } - delete item; - } -} - -void tst_creation::itemtree_cpp() -{ - QBENCHMARK { - QDeclarativeItem *item = new QDeclarativeItem; - for (int i = 0; i < 30; ++i) { - QDeclarativeItem *child = new QDeclarativeItem; - QDeclarativeGraphics_setParent_noEvent(child,item); - child->setParentItem(item); - } - delete item; - } -} - -void tst_creation::itemtree_data_cpp() -{ - QBENCHMARK { - QDeclarativeItem *item = new QDeclarativeItem; - for (int i = 0; i < 30; ++i) { - QDeclarativeItem *child = new QDeclarativeItem; - QDeclarativeGraphics_setParent_noEvent(child,item); - QDeclarativeListReference ref(item, "data"); - ref.append(child); - } - delete item; - } -} - -void tst_creation::itemtree_qml() -{ - QDeclarativeComponent component(&engine, TEST_FILE("item.qml")); - QObject *obj = component.create(); - delete obj; - - QBENCHMARK { - QObject *obj = component.create(); - delete obj; - } -} - -void tst_creation::itemtree_scene_cpp() -{ - QGraphicsScene scene; - QDeclarativeItem *root = new QDeclarativeItem; - scene.addItem(root); - QBENCHMARK { - QDeclarativeItem *item = new QDeclarativeItem; - for (int i = 0; i < 30; ++i) { - QDeclarativeItem *child = new QDeclarativeItem; - QDeclarativeGraphics_setParent_noEvent(child,item); - child->setParentItem(item); - } - item->setParentItem(root); - delete item; - } - delete root; -} - -void tst_creation::elements_data() -{ - QTest::addColumn<QString>("type"); - - QList<QString> types = QDeclarativeMetaType::qmlTypeNames(); - foreach (QString type, types) - QTest::newRow(type.toLatin1()) << type; -} - -void tst_creation::elements() -{ - QFETCH(QString, type); - QDeclarativeType *t = QDeclarativeMetaType::qmlType(type, 2, 0); - if (!t || !t->isCreatable()) - QSKIP("Non-creatable type"); - - QBENCHMARK { - QObject *obj = t->create(); - delete obj; - } -} - -QTEST_MAIN(tst_creation) - -#include "tst_creation.moc" diff --git a/tests/benchmarks/declarative/declarative.pro b/tests/benchmarks/declarative/declarative.pro deleted file mode 100644 index 820d84b0a2..0000000000 --- a/tests/benchmarks/declarative/declarative.pro +++ /dev/null @@ -1,18 +0,0 @@ -TEMPLATE = subdirs - -SUBDIRS += \ - binding \ - creation \ - javascript \ - holistic \ - pointers \ - qdeclarativecomponent \ - qdeclarativeimage \ - qdeclarativemetaproperty \ - script \ - qmltime \ - js - -contains(QT_CONFIG, opengl): SUBDIRS += painting - -include(../trusted-benchmarks.pri) diff --git a/tests/benchmarks/declarative/holistic/data/dynamicTargets/DynamicFour.qml b/tests/benchmarks/declarative/holistic/data/dynamicTargets/DynamicFour.qml deleted file mode 100644 index ccccc371ac..0000000000 --- a/tests/benchmarks/declarative/holistic/data/dynamicTargets/DynamicFour.qml +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: root - property int dynamicWidth: 100 - property int dynamicHeight: rect1.height + rect2.height - property int widthSignaledProperty: 10 - property int heightSignaledProperty: 10 - - Rectangle { - id: rect1 - width: root.dynamicWidth + 20 - height: width + (5*3) - 8 + (width/9) - color: "red" - border.color: "black" - border.width: 5 - radius: 10 - } - - Rectangle { - id: rect2 - width: rect1.width - 50 - height: width + (5*4) - 6 + (width/3) - color: "red" - border.color: "black" - border.width: 5 - radius: 10 - } - - onDynamicWidthChanged: { - widthSignaledProperty = widthSignaledProperty + (6*5) - 2; - } - - onDynamicHeightChanged: { - heightSignaledProperty = widthSignaledProperty + heightSignaledProperty + (5*3) - 7; - } -} diff --git a/tests/benchmarks/declarative/holistic/data/dynamicTargets/DynamicOne.qml b/tests/benchmarks/declarative/holistic/data/dynamicTargets/DynamicOne.qml deleted file mode 100644 index 154f9db9a3..0000000000 --- a/tests/benchmarks/declarative/holistic/data/dynamicTargets/DynamicOne.qml +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: root - property int dynamicWidth: 10 - - Rectangle { - width: 100 - height: root.dynamicWidth + (5*3) - 8 + (root.dynamicWidth/10) - color: "red" - border.color: "black" - border.width: 5 - radius: 10 - } -} diff --git a/tests/benchmarks/declarative/holistic/data/dynamicTargets/DynamicThree.qml b/tests/benchmarks/declarative/holistic/data/dynamicTargets/DynamicThree.qml deleted file mode 100644 index 064ba57254..0000000000 --- a/tests/benchmarks/declarative/holistic/data/dynamicTargets/DynamicThree.qml +++ /dev/null @@ -1,61 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: root - property int dynamicWidth: 10 - property int widthSignaledProperty: 20 - - Rectangle { - width: 100 - height: root.dynamicWidth + (5*3) - 8 + (root.dynamicWidth/10) - color: "red" - border.color: "black" - border.width: 5 - radius: 10 - } - - onDynamicWidthChanged: { - widthSignaledProperty = dynamicWidth + (20/4) + 7 - 1; - } -} diff --git a/tests/benchmarks/declarative/holistic/data/dynamicTargets/DynamicTwo.qml b/tests/benchmarks/declarative/holistic/data/dynamicTargets/DynamicTwo.qml deleted file mode 100644 index a3aac3ebd6..0000000000 --- a/tests/benchmarks/declarative/holistic/data/dynamicTargets/DynamicTwo.qml +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: root - property int dynamicWidth: 100 - property int dynamicHeight: rect1.height + rect2.height - - Rectangle { - id: rect1 - width: root.dynamicWidth + 20 - height: width + (5*3) - 8 + (width/9) - color: "red" - border.color: "black" - border.width: 5 - radius: 10 - } - - Rectangle { - id: rect2 - width: rect1.width - 50 - height: width + (5*4) - 6 + (width/3) - color: "red" - border.color: "black" - border.width: 5 - radius: 10 - } -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/Mlbsi.qml b/tests/benchmarks/declarative/holistic/data/jsImports/Mlbsi.qml deleted file mode 100644 index 854cc3258d..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/Mlbsi.qml +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -import "mlbsi.js" as MlbsiJs - -Item { - id: testQtObject - property int importedScriptFunctionValue: MlbsiJs.testFunc(20) -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/Mldsi.qml b/tests/benchmarks/declarative/holistic/data/jsImports/Mldsi.qml deleted file mode 100644 index 919fce1c46..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/Mldsi.qml +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -import "mldsi.js" as MldsiJs - -Item { - id: testQtObject - property int importedScriptFunctionValue: MldsiJs.testFunc(20) -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/Mlsi.qml b/tests/benchmarks/declarative/holistic/data/jsImports/Mlsi.qml deleted file mode 100644 index 74451f85fd..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/Mlsi.qml +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -import "mlsi.js" as MlsiJs - -Item { - id: testQtObject - property int importedScriptFunctionValue: MlsiJs.testFunc(20) -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/ModuleBm.qml b/tests/benchmarks/declarative/holistic/data/jsImports/ModuleBm.qml deleted file mode 100644 index 18ef8a2599..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/ModuleBm.qml +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -import "moduleBm.js" as ModuleBmJs - -Item { - id: testQtObject - property int importedScriptFunctionValue: ModuleBmJs.testFunc(20) -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/Msbsi.qml b/tests/benchmarks/declarative/holistic/data/jsImports/Msbsi.qml deleted file mode 100644 index d7a8b74dd1..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/Msbsi.qml +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -import "msbsi.js" as MsbsiJs - -Item { - id: testQtObject - property int importedScriptFunctionValue: MsbsiJs.testFunc(20) -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/Msdsi.qml b/tests/benchmarks/declarative/holistic/data/jsImports/Msdsi.qml deleted file mode 100644 index 266a26ef8e..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/Msdsi.qml +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -import "msdsi.js" as MsdsiJs - -Item { - id: testQtObject - property int importedScriptFunctionValue: MsdsiJs.testFunc(20) -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/Mssi.qml b/tests/benchmarks/declarative/holistic/data/jsImports/Mssi.qml deleted file mode 100644 index e589981252..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/Mssi.qml +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -import "mssi.js" as MssiJs - -Item { - id: testQtObject - property int importedScriptFunctionValue: MssiJs.testFunc(20) -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/PragmaBm.qml b/tests/benchmarks/declarative/holistic/data/jsImports/PragmaBm.qml deleted file mode 100644 index f5753af88b..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/PragmaBm.qml +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -import "pragmaBmOne.js" as PragmaBmOneJs -import "pragmaBmTwo.js" as PragmaBmTwoJs - -Item { - id: testQtObject - - // value = 20 + 2 + 9 + (nbr times shared testFunc has been called previously == 0) - property int importedScriptFunctionValueOne: PragmaBmOneJs.testFuncOne(20) - - // value = 20 + 3 + 9 + (nbr times shared testFunc has been called previously == 1) - property int importedScriptFunctionValueTwo: PragmaBmTwoJs.testFuncTwo(20) -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/PragmaModuleBm.qml b/tests/benchmarks/declarative/holistic/data/jsImports/PragmaModuleBm.qml deleted file mode 100644 index 8e1baa8572..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/PragmaModuleBm.qml +++ /dev/null @@ -1,51 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -import "pragmaModuleBm.js" as PragmaModuleBmJs - -Item { - id: testQtObject - - // value = 20 + (Qt.test.Enum3 == 2) + 9 + (nbr times shared testFunc has been called previously = 0) + 9 + (nbr times shared testFunc has been called previously = 1) - property int importedScriptFunctionValue: PragmaModuleBmJs.testFuncThree(20) -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/Slsi.qml b/tests/benchmarks/declarative/holistic/data/jsImports/Slsi.qml deleted file mode 100644 index aa21358b47..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/Slsi.qml +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -import "slsi.js" as SlsiJs - -Item { - id: testQtObject - property int importedScriptFunctionValue: SlsiJs.testFunc(20) -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/Sssi.qml b/tests/benchmarks/declarative/holistic/data/jsImports/Sssi.qml deleted file mode 100644 index 0ed7a3ee72..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/Sssi.qml +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -import "sssi.js" as SssiJs - -Item { - id: testQtObject - property int importedScriptFunctionValue: SssiJs.testFunc(20) -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi.js b/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi.js deleted file mode 100644 index 36a5fea77f..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi.js +++ /dev/null @@ -1,133 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It imports many other (non-nested) single, small, scripts. - -.import "mlbsi1.js" as Mlbsi1 -.import "mlbsi2.js" as Mlbsi2 -.import "mlbsi3.js" as Mlbsi3 -.import "mlbsi4.js" as Mlbsi4 -.import "mlbsi5.js" as Mlbsi5 -.import "mlbsi6.js" as Mlbsi6 -.import "mlbsi7.js" as Mlbsi7 -.import "mlbsi8.js" as Mlbsi8 -.import "mlbsi9.js" as Mlbsi9 -.import "mlbsi10.js" as Mlbsi10 -.import "mlbsi11.js" as Mlbsi11 -.import "mlbsi12.js" as Mlbsi12 -.import "mlbsi13.js" as Mlbsi13 -.import "mlbsi14.js" as Mlbsi14 -.import "mlbsi15.js" as Mlbsi15 - -function testFunc(seedValue) { - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - var retn = cumulativeTotal * 0.53; - retn += Mlbsi1.testFunc(seedValue); - retn += Mlbsi2.testFunc(seedValue); - retn += Mlbsi3.testFunc(seedValue); - retn += Mlbsi4.testFunc(seedValue); - retn += Mlbsi5.testFunc(seedValue); - retn += Mlbsi6.testFunc(retn); - retn += Mlbsi7.testFunc(seedValue); - retn += Mlbsi8.testFunc(seedValue); - retn += Mlbsi9.testFunc(retn); - retn += Mlbsi10.testFunc(seedValue); - retn += Mlbsi11.testFunc(seedValue); - retn += Mlbsi12.testFunc(seedValue); - retn += Mlbsi13.testFunc(seedValue); - retn += Mlbsi14.testFunc(seedValue); - retn += Mlbsi15.testFunc(seedValue); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.000017 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.000017 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi1.js b/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi1.js deleted file mode 100644 index 459451609b..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi1.js +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.145); - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00001 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00001 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi10.js b/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi10.js deleted file mode 100644 index 69202e63eb..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi10.js +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.1045); - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.000010 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.000010 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi11.js b/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi11.js deleted file mode 100644 index 9f3e28a1f6..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi11.js +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.1145); - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.000011 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.000011 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi12.js b/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi12.js deleted file mode 100644 index 349c7cdd3f..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi12.js +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.1245); - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.000012 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.000012 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi13.js b/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi13.js deleted file mode 100644 index 925178fadb..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi13.js +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.1345); - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.000013 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.000013 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi14.js b/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi14.js deleted file mode 100644 index 25f17ca1b8..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi14.js +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.1445); - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.000014 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.000014 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi15.js b/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi15.js deleted file mode 100644 index 9445222cd9..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi15.js +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.1545); - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.000015 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.000015 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi2.js b/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi2.js deleted file mode 100644 index f375c57663..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi2.js +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.245); - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00002 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00002 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi3.js b/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi3.js deleted file mode 100644 index 0bfe7f021d..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi3.js +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.345); - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00003 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00003 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi4.js b/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi4.js deleted file mode 100644 index 8707e296ec..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi4.js +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.445); - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00004 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00004 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi5.js b/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi5.js deleted file mode 100644 index 0b1e8cf3de..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi5.js +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.545); - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00005 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00005 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi6.js b/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi6.js deleted file mode 100644 index eb839108de..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi6.js +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.645); - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00006 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00006 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi7.js b/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi7.js deleted file mode 100644 index fb22fa8f73..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi7.js +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.745); - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00007 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00007 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi8.js b/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi8.js deleted file mode 100644 index 736703c5bc..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi8.js +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.845); - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00008 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00008 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi9.js b/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi9.js deleted file mode 100644 index a1587a7de9..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mlbsi9.js +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.945); - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00009 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00009 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi.js b/tests/benchmarks/declarative/holistic/data/jsImports/mldsi.js deleted file mode 100644 index c0bad9c5a6..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi.js +++ /dev/null @@ -1,105 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It imports other small scripts which are deeply nested. - -.import "mldsi1.js" as Mldsi1 - -function testFunc(seedValue) { - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - var retn = cumulativeTotal * 0.5; - retn *= Mldsi1.testFunc(seedValue + retn); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.000017 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.000017 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi1.js b/tests/benchmarks/declarative/holistic/data/jsImports/mldsi1.js deleted file mode 100644 index b2a513da3b..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi1.js +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It imports other large scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi2.js" as Msdsi2 - -function testFunc(seedValue) { - var retn = 0.15; - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= Msdsi2.testFunc(seedValue + retn); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00001 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00001 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi10.js b/tests/benchmarks/declarative/holistic/data/jsImports/mldsi10.js deleted file mode 100644 index 864f027a6e..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi10.js +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It imports other large scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi11.js" as Msdsi11 - -function testFunc(seedValue) { - var retn = 0.105; - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= Msdsi11.testFunc(seedValue + retn); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.000010 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.000010 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi11.js b/tests/benchmarks/declarative/holistic/data/jsImports/mldsi11.js deleted file mode 100644 index 2c126ec1c6..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi11.js +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It imports other large scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi12.js" as Msdsi12 - -function testFunc(seedValue) { - var retn = 0.115; - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= Msdsi12.testFunc(seedValue + retn); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.000011 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.000011 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi12.js b/tests/benchmarks/declarative/holistic/data/jsImports/mldsi12.js deleted file mode 100644 index 76c14d8771..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi12.js +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It imports other large scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi13.js" as Msdsi13 - -function testFunc(seedValue) { - var retn = 0.125; - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= Msdsi13.testFunc(seedValue + retn); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.000012 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.000012 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi13.js b/tests/benchmarks/declarative/holistic/data/jsImports/mldsi13.js deleted file mode 100644 index aaa2c6ab14..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi13.js +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It imports other large scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi14.js" as Msdsi14 - -function testFunc(seedValue) { - var retn = 0.135; - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= Msdsi14.testFunc(seedValue + retn); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.000013 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.000013 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi14.js b/tests/benchmarks/declarative/holistic/data/jsImports/mldsi14.js deleted file mode 100644 index 11394a87fb..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi14.js +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It imports other large scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi15.js" as Msdsi15 - -function testFunc(seedValue) { - var retn = 0.145; - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= Msdsi15.testFunc(seedValue + retn); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.000014 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.000014 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi15.js b/tests/benchmarks/declarative/holistic/data/jsImports/mldsi15.js deleted file mode 100644 index 2978dbedf3..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi15.js +++ /dev/null @@ -1,104 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It is imported by another script. - -function testFunc(seedValue) { - var retn = 0.155; - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= (seedValue + retn); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.000015 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.000015 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi2.js b/tests/benchmarks/declarative/holistic/data/jsImports/mldsi2.js deleted file mode 100644 index f9105c07f2..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi2.js +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It imports other large scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi3.js" as Msdsi3 - -function testFunc(seedValue) { - var retn = 0.25; - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= Msdsi3.testFunc(seedValue + retn); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00002 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00002 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi3.js b/tests/benchmarks/declarative/holistic/data/jsImports/mldsi3.js deleted file mode 100644 index 046988b47a..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi3.js +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It imports other large scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi4.js" as Msdsi4 - -function testFunc(seedValue) { - var retn = 0.35; - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= Msdsi4.testFunc(seedValue + retn); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00003 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00003 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi4.js b/tests/benchmarks/declarative/holistic/data/jsImports/mldsi4.js deleted file mode 100644 index 7996c0d3f1..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi4.js +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It imports other large scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi5.js" as Msdsi5 - -function testFunc(seedValue) { - var retn = 0.45; - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= Msdsi5.testFunc(seedValue + retn); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00004 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00004 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi5.js b/tests/benchmarks/declarative/holistic/data/jsImports/mldsi5.js deleted file mode 100644 index 183a09153a..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi5.js +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It imports other large scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi6.js" as Msdsi6 - -function testFunc(seedValue) { - var retn = 0.55; - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= Msdsi6.testFunc(seedValue + retn); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00005 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00005 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi6.js b/tests/benchmarks/declarative/holistic/data/jsImports/mldsi6.js deleted file mode 100644 index ad17faa47d..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi6.js +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It imports other large scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi7.js" as Msdsi7 - -function testFunc(seedValue) { - var retn = 0.65; - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= Msdsi7.testFunc(seedValue + retn); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00006 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00006 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi7.js b/tests/benchmarks/declarative/holistic/data/jsImports/mldsi7.js deleted file mode 100644 index 07e69fe6ee..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi7.js +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It imports other large scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi8.js" as Msdsi8 - -function testFunc(seedValue) { - var retn = 0.75; - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= Msdsi8.testFunc(seedValue + retn); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00007 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00007 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi8.js b/tests/benchmarks/declarative/holistic/data/jsImports/mldsi8.js deleted file mode 100644 index cf245f461c..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi8.js +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It imports other large scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi9.js" as Msdsi9 - -function testFunc(seedValue) { - var retn = 0.85; - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= Msdsi9.testFunc(seedValue + retn); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00008 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00008 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi9.js b/tests/benchmarks/declarative/holistic/data/jsImports/mldsi9.js deleted file mode 100644 index 2286e15d79..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mldsi9.js +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It imports other large scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi10.js" as Msdsi10 - -function testFunc(seedValue) { - var retn = 0.95; - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn *= (1 + (cumulativeTotal * 0.001)); - retn *= Msdsi10.testFunc(seedValue + retn); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00009 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00009 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mlsi.js b/tests/benchmarks/declarative/holistic/data/jsImports/mlsi.js deleted file mode 100644 index 8c05cfb8bd..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mlsi.js +++ /dev/null @@ -1,138 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It imports many other (non-nested) single, large, scripts, -// and also imports many other nested, large scripts. - -.import "mldsi4.js" as Mldsi4 -.import "mldsi9.js" as Mldsi9 -.import "mlbsi1.js" as Mlbsi1 -.import "mlbsi2.js" as Mlbsi2 -.import "mlbsi3.js" as Mlbsi3 -.import "mlbsi4.js" as Mlbsi4 -.import "mlbsi5.js" as Mlbsi5 -.import "mlbsi6.js" as Mlbsi6 -.import "mlbsi7.js" as Mlbsi7 -.import "mlbsi8.js" as Mlbsi8 -.import "mlbsi9.js" as Mlbsi9 -.import "mlbsi10.js" as Mlbsi10 -.import "mlbsi11.js" as Mlbsi11 -.import "mlbsi12.js" as Mlbsi12 -.import "mlbsi13.js" as Mlbsi13 -.import "mlbsi14.js" as Mlbsi14 -.import "mlbsi15.js" as Mlbsi15 - -function testFunc(seedValue) { - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - var retn = cumulativeTotal; - retn += Mlbsi1.testFunc(seedValue); - retn += Mlbsi2.testFunc(seedValue); - retn += Mlbsi3.testFunc(retn); - retn += Mlbsi4.testFunc(seedValue); - retn += Mlbsi5.testFunc(seedValue); - retn += Mlbsi6.testFunc(seedValue); - retn *= Mldsi9.testFunc(retn); - retn += Mlbsi7.testFunc(seedValue); - retn += Mlbsi8.testFunc(retn); - retn += Mlbsi9.testFunc(seedValue); - retn += Mlbsi10.testFunc(seedValue); - retn += Mlbsi11.testFunc(seedValue); - retn *= Mldsi4.testFunc(retn); - retn += Mlbsi12.testFunc(seedValue); - retn += Mlbsi13.testFunc(retn); - retn += Mlbsi14.testFunc(seedValue); - retn += Mlbsi15.testFunc(seedValue); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00001 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00001 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/moduleBm.js b/tests/benchmarks/declarative/holistic/data/jsImports/moduleBm.js deleted file mode 100644 index 29bd1f83af..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/moduleBm.js +++ /dev/null @@ -1,109 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It doesn't import any other scripts. -.import Qt.test 1.0 as QtTest - -function testFunc(seedValue) { - var retn = QtTest.EnumValue3; - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn += (cumulativeTotal * 0.45); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00001 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00001 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} - - diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi.js b/tests/benchmarks/declarative/holistic/data/jsImports/msbsi.js deleted file mode 100644 index 5126faca00..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi.js +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It imports many other (non-nested) single, small, scripts. - -.import "msbsi1.js" as Msbsi1 -.import "msbsi2.js" as Msbsi2 -.import "msbsi3.js" as Msbsi3 -.import "msbsi4.js" as Msbsi4 -.import "msbsi5.js" as Msbsi5 -.import "msbsi6.js" as Msbsi6 -.import "msbsi7.js" as Msbsi7 -.import "msbsi8.js" as Msbsi8 -.import "msbsi9.js" as Msbsi9 -.import "msbsi10.js" as Msbsi10 -.import "msbsi11.js" as Msbsi11 -.import "msbsi12.js" as Msbsi12 -.import "msbsi13.js" as Msbsi13 -.import "msbsi14.js" as Msbsi14 -.import "msbsi15.js" as Msbsi15 - -function testFunc(seedValue) { - var retn = 10 * (seedValue * 0.45); - retn += Msbsi1.testFunc(seedValue); - retn += Msbsi2.testFunc(seedValue); - retn += Msbsi3.testFunc(seedValue); - retn += Msbsi4.testFunc(seedValue); - retn += Msbsi5.testFunc(seedValue); - retn += Msbsi6.testFunc(seedValue); - retn += Msbsi7.testFunc(seedValue); - retn += Msbsi8.testFunc(seedValue); - retn += Msbsi9.testFunc(seedValue); - retn += Msbsi10.testFunc(seedValue); - retn += Msbsi11.testFunc(seedValue); - retn += Msbsi12.testFunc(seedValue); - retn += Msbsi13.testFunc(seedValue); - retn += Msbsi14.testFunc(seedValue); - retn += Msbsi15.testFunc(seedValue); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi1.js b/tests/benchmarks/declarative/holistic/data/jsImports/msbsi1.js deleted file mode 100644 index d5ba35fc97..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi1.js +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.145); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi10.js b/tests/benchmarks/declarative/holistic/data/jsImports/msbsi10.js deleted file mode 100644 index f24ad0f7ee..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi10.js +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.1045); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi11.js b/tests/benchmarks/declarative/holistic/data/jsImports/msbsi11.js deleted file mode 100644 index 30e072ab04..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi11.js +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.1145); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi12.js b/tests/benchmarks/declarative/holistic/data/jsImports/msbsi12.js deleted file mode 100644 index 3bf414a0ec..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi12.js +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.1245); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi13.js b/tests/benchmarks/declarative/holistic/data/jsImports/msbsi13.js deleted file mode 100644 index 7487b7f1a9..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi13.js +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.1345); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi14.js b/tests/benchmarks/declarative/holistic/data/jsImports/msbsi14.js deleted file mode 100644 index 504b365752..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi14.js +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.1445); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi15.js b/tests/benchmarks/declarative/holistic/data/jsImports/msbsi15.js deleted file mode 100644 index 1887f157c1..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi15.js +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.1545); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi2.js b/tests/benchmarks/declarative/holistic/data/jsImports/msbsi2.js deleted file mode 100644 index 56997c1394..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi2.js +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.245); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi3.js b/tests/benchmarks/declarative/holistic/data/jsImports/msbsi3.js deleted file mode 100644 index ce84ab63e4..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi3.js +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.345); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi4.js b/tests/benchmarks/declarative/holistic/data/jsImports/msbsi4.js deleted file mode 100644 index 61d15d11af..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi4.js +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.445); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi5.js b/tests/benchmarks/declarative/holistic/data/jsImports/msbsi5.js deleted file mode 100644 index e5bf0e1527..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi5.js +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.545); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi6.js b/tests/benchmarks/declarative/holistic/data/jsImports/msbsi6.js deleted file mode 100644 index 8f25ad23d8..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi6.js +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.645); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi7.js b/tests/benchmarks/declarative/holistic/data/jsImports/msbsi7.js deleted file mode 100644 index 70d521d3dc..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi7.js +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.745); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi8.js b/tests/benchmarks/declarative/holistic/data/jsImports/msbsi8.js deleted file mode 100644 index ed9f473ff9..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi8.js +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.845); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi9.js b/tests/benchmarks/declarative/holistic/data/jsImports/msbsi9.js deleted file mode 100644 index 73a8eaf37b..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msbsi9.js +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It doesn't import any other scripts. -// It is imported from another script. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.945); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi.js b/tests/benchmarks/declarative/holistic/data/jsImports/msdsi.js deleted file mode 100644 index f88af5b416..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi.js +++ /dev/null @@ -1,51 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It imports other small scripts which are deeply nested. - -.import "msdsi1.js" as Msdsi1 - -function testFunc(seedValue) { - var retn = 0.5; - retn *= Msdsi1.testFunc(seedValue + retn); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi1.js b/tests/benchmarks/declarative/holistic/data/jsImports/msdsi1.js deleted file mode 100644 index 1d60d24b5e..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi1.js +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It imports other small scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi2.js" as Msdsi2 - -function testFunc(seedValue) { - var retn = 0.15; - retn *= Msdsi2.testFunc(seedValue + retn); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi10.js b/tests/benchmarks/declarative/holistic/data/jsImports/msdsi10.js deleted file mode 100644 index 8b1151f3e2..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi10.js +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It imports other small scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi11.js" as Msdsi11 - -function testFunc(seedValue) { - var retn = 0.105; - retn *= Msdsi11.testFunc(seedValue + retn); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi11.js b/tests/benchmarks/declarative/holistic/data/jsImports/msdsi11.js deleted file mode 100644 index b27d0f37af..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi11.js +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It imports other small scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi12.js" as Msdsi12 - -function testFunc(seedValue) { - var retn = 0.115; - retn *= Msdsi12.testFunc(seedValue + retn); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi12.js b/tests/benchmarks/declarative/holistic/data/jsImports/msdsi12.js deleted file mode 100644 index ba62852113..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi12.js +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It imports other small scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi13.js" as Msdsi13 - -function testFunc(seedValue) { - var retn = 0.125; - retn *= Msdsi13.testFunc(seedValue + retn); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi13.js b/tests/benchmarks/declarative/holistic/data/jsImports/msdsi13.js deleted file mode 100644 index f4b17ff627..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi13.js +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It imports other small scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi14.js" as Msdsi14 - -function testFunc(seedValue) { - var retn = 0.135; - retn *= Msdsi14.testFunc(seedValue + retn); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi14.js b/tests/benchmarks/declarative/holistic/data/jsImports/msdsi14.js deleted file mode 100644 index 4f96539faf..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi14.js +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It imports other small scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi15.js" as Msdsi15 - -function testFunc(seedValue) { - var retn = 0.145; - retn *= Msdsi15.testFunc(seedValue + retn); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi15.js b/tests/benchmarks/declarative/holistic/data/jsImports/msdsi15.js deleted file mode 100644 index 113ed1bdc8..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi15.js +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It is imported by another script. - -function testFunc(seedValue) { - var retn = 0.155; - retn *= (seedValue + retn); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi2.js b/tests/benchmarks/declarative/holistic/data/jsImports/msdsi2.js deleted file mode 100644 index 67a35bc3ae..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi2.js +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It imports other small scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi3.js" as Msdsi3 - -function testFunc(seedValue) { - var retn = 0.25; - retn *= Msdsi3.testFunc(seedValue + retn); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi3.js b/tests/benchmarks/declarative/holistic/data/jsImports/msdsi3.js deleted file mode 100644 index 81b4747409..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi3.js +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It imports other small scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi4.js" as Msdsi4 - -function testFunc(seedValue) { - var retn = 0.35; - retn *= Msdsi4.testFunc(seedValue + retn); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi4.js b/tests/benchmarks/declarative/holistic/data/jsImports/msdsi4.js deleted file mode 100644 index 37a4d9d2aa..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi4.js +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It imports other small scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi5.js" as Msdsi5 - -function testFunc(seedValue) { - var retn = 0.45; - retn *= Msdsi5.testFunc(seedValue + retn); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi5.js b/tests/benchmarks/declarative/holistic/data/jsImports/msdsi5.js deleted file mode 100644 index df57e75cea..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi5.js +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It imports other small scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi6.js" as Msdsi6 - -function testFunc(seedValue) { - var retn = 0.55; - retn *= Msdsi6.testFunc(seedValue + retn); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi6.js b/tests/benchmarks/declarative/holistic/data/jsImports/msdsi6.js deleted file mode 100644 index 43e0b43877..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi6.js +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It imports other small scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi7.js" as Msdsi7 - -function testFunc(seedValue) { - var retn = 0.65; - retn *= Msdsi7.testFunc(seedValue + retn); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi7.js b/tests/benchmarks/declarative/holistic/data/jsImports/msdsi7.js deleted file mode 100644 index 569b613e92..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi7.js +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It imports other small scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi8.js" as Msdsi8 - -function testFunc(seedValue) { - var retn = 0.75; - retn *= Msdsi8.testFunc(seedValue + retn); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi8.js b/tests/benchmarks/declarative/holistic/data/jsImports/msdsi8.js deleted file mode 100644 index b1a5bd514b..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi8.js +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It imports other small scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi9.js" as Msdsi9 - -function testFunc(seedValue) { - var retn = 0.85; - retn *= Msdsi9.testFunc(seedValue + retn); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi9.js b/tests/benchmarks/declarative/holistic/data/jsImports/msdsi9.js deleted file mode 100644 index 3a0c4d0354..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/msdsi9.js +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It imports other small scripts which are deeply nested. -// It is imported by another script. - -.import "msdsi10.js" as Msdsi10 - -function testFunc(seedValue) { - var retn = 0.95; - retn *= Msdsi10.testFunc(seedValue + retn); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/mssi.js b/tests/benchmarks/declarative/holistic/data/jsImports/mssi.js deleted file mode 100644 index 7a82033d88..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/mssi.js +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It imports many other (non-nested) single, small, scripts, -// and also imports many other nested, small scripts. - -.import "msdsi4.js" as Msdsi4 -.import "msdsi9.js" as Msdsi9 -.import "msbsi1.js" as Msbsi1 -.import "msbsi2.js" as Msbsi2 -.import "msbsi3.js" as Msbsi3 -.import "msbsi4.js" as Msbsi4 -.import "msbsi5.js" as Msbsi5 -.import "msbsi6.js" as Msbsi6 -.import "msbsi7.js" as Msbsi7 -.import "msbsi8.js" as Msbsi8 -.import "msbsi9.js" as Msbsi9 -.import "msbsi10.js" as Msbsi10 -.import "msbsi11.js" as Msbsi11 -.import "msbsi12.js" as Msbsi12 -.import "msbsi13.js" as Msbsi13 -.import "msbsi14.js" as Msbsi14 -.import "msbsi15.js" as Msbsi15 - -function testFunc(seedValue) { - var retn = 10 * (seedValue * 0.85); - retn += Msbsi1.testFunc(seedValue); - retn += Msbsi2.testFunc(seedValue); - retn += Msbsi3.testFunc(retn); - retn += Msbsi4.testFunc(seedValue); - retn += Msbsi5.testFunc(seedValue); - retn += Msbsi6.testFunc(seedValue); - retn *= Msdsi9.testFunc(retn); - retn += Msbsi7.testFunc(seedValue); - retn += Msbsi8.testFunc(retn); - retn += Msbsi9.testFunc(seedValue); - retn += Msbsi10.testFunc(seedValue); - retn += Msbsi11.testFunc(seedValue); - retn *= Msdsi4.testFunc(retn); - retn += Msbsi12.testFunc(seedValue); - retn += Msbsi13.testFunc(retn); - retn += Msbsi14.testFunc(seedValue); - retn += Msbsi15.testFunc(seedValue); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/pragmaBmOne.js b/tests/benchmarks/declarative/holistic/data/jsImports/pragmaBmOne.js deleted file mode 100644 index b92b79afaf..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/pragmaBmOne.js +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It imports a shared library script. -.import "pragmaLib.js" as PragmaLibJs - -function testFuncOne(seedValue) { - var retn = seedValue + 2; - retn += PragmaLibJs.testFunc(); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/pragmaBmTwo.js b/tests/benchmarks/declarative/holistic/data/jsImports/pragmaBmTwo.js deleted file mode 100644 index c086016bef..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/pragmaBmTwo.js +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It imports a shared library script. -.import "pragmaLib.js" as PragmaLibJs - -function testFuncTwo(seedValue) { - var retn = seedValue + 3; - retn += PragmaLibJs.testFunc(); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/pragmaLib.js b/tests/benchmarks/declarative/holistic/data/jsImports/pragmaLib.js deleted file mode 100644 index 8b65a68111..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/pragmaLib.js +++ /dev/null @@ -1,119 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It doesn't import any other scripts. -// It is a shared script, with data which should be shared. -.pragma library - -var sharedValue = 9; - -function testFunc() { - var retn = sharedValue; - sharedValue += 1; // increment the shared value - return retn; -} - -function testFuncBig(seedValue) { - var retn = sharedValue; - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn += (cumulativeTotal * 0.45); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - sharedValue += 1; // increment the shared value - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00001 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00001 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} - - diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/pragmaModuleBm.js b/tests/benchmarks/declarative/holistic/data/jsImports/pragmaModuleBm.js deleted file mode 100644 index df710f1acf..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/pragmaModuleBm.js +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It imports a QML module and two other scripts. -// Each of those two other scripts imports a single script, -// which is a .pragma library script (shared between the two). - -.import Qt.test 1.0 as QtTest -.import "pragmaBmOne.js" as PragmaBmOneJs -.import "pragmaBmTwo.js" as PragmaBmTwoJs - -function testFuncThree(seedValue) { - var retn = seedValue + QtTest.EnumValue3; - retn += PragmaBmOneJs.testFuncOne(seedValue); - retn += PragmaBmTwoJs.testFuncTwo(seedValue); - return retn; -} - diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/slsi.js b/tests/benchmarks/declarative/holistic/data/jsImports/slsi.js deleted file mode 100644 index 98af47885f..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/slsi.js +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, large, imported script. -// It doesn't import any other scripts. - -function testFunc(seedValue) { - var retn = 5; - var firstFactor = calculateFirstFactor(seedValue); - var secondFactor = calculateSecondFactor(seedValue); - var modificationTerm = calculateModificationTerm(seedValue); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (seedValue * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (seedValue * 50)) { - break; - } - } - } - retn += (cumulativeTotal * 0.45); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} - -function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00001 / seedValue)); - return firstFactor; -} - -function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00001 / seedValue)); - return secondFactor; -} - -function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((calculateFirstFactor(seedValue) * seedValue) / 3) + (4*calculateSecondFactor(seedValue) * seedValue * 1.33)) + (calculateSecondFactor(seedValue) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; -} - - diff --git a/tests/benchmarks/declarative/holistic/data/jsImports/sssi.js b/tests/benchmarks/declarative/holistic/data/jsImports/sssi.js deleted file mode 100644 index 88d9fb643b..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsImports/sssi.js +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This JavaScript file is a single, small, imported script. -// It doesn't import any other scripts. - -function testFunc(seedValue) { - var retn = 5; - retn += (seedValue * 0.45); - retn *= (1 + (3.1415962 / seedValue)); - retn /= 2.41497; - retn -= (seedValue * -1); - return retn; -} diff --git a/tests/benchmarks/declarative/holistic/data/jsTargets/JsOne.qml b/tests/benchmarks/declarative/holistic/data/jsTargets/JsOne.qml deleted file mode 100644 index 41d4ff5bbd..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsTargets/JsOne.qml +++ /dev/null @@ -1,61 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: root - property int dynamicWidth: 10 - property int widthSignaledProperty: 20 - - Rectangle { - width: 100 - height: 50 - color: "red" - border.color: "black" - border.width: 5 - radius: 10 - } - - onDynamicWidthChanged: { - widthSignaledProperty = dynamicWidth + (20/4) + 7 - 1; - } -} diff --git a/tests/benchmarks/declarative/holistic/data/jsTargets/JsTwo.qml b/tests/benchmarks/declarative/holistic/data/jsTargets/JsTwo.qml deleted file mode 100644 index cb5da5a22d..0000000000 --- a/tests/benchmarks/declarative/holistic/data/jsTargets/JsTwo.qml +++ /dev/null @@ -1,118 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: root - property int dynamicWidth: 10 - property int widthSignaledProperty: 20 - - Rectangle { - width: 100 - height: 50 - color: "red" - border.color: "black" - border.width: 5 - radius: 10 - } - - function calculateFirstFactor(seedValue) { - var firstFactor = (0.45 * (9.3 / 3.1) - 0.90); - firstFactor *= (1 + (0.00001 / seedValue)); - return firstFactor; - } - - function calculateSecondFactor(seedValue) { - var secondFactor = 0.78 * (6.3 / 2.1) - (0.39 * 4); - secondFactor *= (1 + (0.00001 / seedValue)); - return secondFactor; - } - - function calculateModificationTerm(seedValue) { - var modificationTerm = (12 + (9*7) - 54 + 16 - ((root.calculateFirstFactor(seedValue + 0.3) * seedValue) / 3) + (4*root.calculateSecondFactor(seedValue+2) * seedValue * 1.33)) + (root.calculateSecondFactor(seedValue+1) * seedValue); - modificationTerm = modificationTerm + (33/2) + 19 - (9*2) - (61*3) + 177; - return modificationTerm; - } - - onDynamicWidthChanged: { - // do a bit of maths - var firstFactor = root.calculateFirstFactor(8); - var secondFactor = root.calculateSecondFactor(dynamicWidth / firstFactor); - var modificationTerm = root.calculateModificationTerm(dynamicWidth / secondFactor); - - // do some regexp matching - var someString = "This is a random string which we'll perform regular expression matching on to reduce considerably. This is meant to be part of a complex javascript expression whose evaluation takes considerably longer than the creation cost of QScriptValue."; - var regexpPattern = new RegExp("is", "i"); - var regexpOutputLength = 0; - var temp = regexpPattern.exec(someString); - while (temp == "is") { - regexpOutputLength += 4; - regexpOutputLength *= 2; - temp = regexpPattern.exec(someString); - if (regexpOutputLength > (dynamicWidth * 3)) { - temp = "break"; - } - } - - // spin in a for loop for a while - var i = 0; - var j = 0; - var cumulativeTotal = 3; - for (i = 20; i > 1; i--) { - for (j = 31; j > 5; j--) { - var branchVariable = i + j; - if (branchVariable % 3 == 0) { - cumulativeTotal -= secondFactor; - } else { - cumulativeTotal += firstFactor; - } - - if (cumulativeTotal > (dynamicWidth * 50)) { - break; - } - } - } - - // and update the property - widthSignaledProperty = (dynamicWidth + (20/4) + 7 - 1) * modificationTerm + regexpOutputLength - (cumulativeTotal / 73); - } -} diff --git a/tests/benchmarks/declarative/holistic/data/largeTargets/gridview-example.qml b/tests/benchmarks/declarative/holistic/data/largeTargets/gridview-example.qml deleted file mode 100644 index 373b1b8ced..0000000000 --- a/tests/benchmarks/declarative/holistic/data/largeTargets/gridview-example.qml +++ /dev/null @@ -1,91 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Rectangle { - width: 300; height: 400 - color: "white" - - ListModel { - id: appModel - ListElement { name: "Music"; shade: "blue" } - ListElement { name: "Movies"; shade: "red" } - ListElement { name: "Camera"; shade: "green" } - ListElement { name: "Calendar"; shade: "yellow" } - ListElement { name: "Messaging"; shade: "cyan" } - ListElement { name: "Todo List"; shade: "magenta" } - ListElement { name: "Contacts"; shade: "black" } - } - - Component { - id: appDelegate - - Item { - width: 100; height: 100 - - Rectangle { - id: myColoredIcon - width: 20 - height: 20 - y: 20; anchors.horizontalCenter: parent.horizontalCenter - color: shade - } - Text { - anchors { top: myColoredIcon.bottom; horizontalCenter: parent.horizontalCenter } - text: name - } - } - } - - Component { - id: appHighlight - Rectangle { width: 80; height: 80; color: "lightsteelblue" } - } - - GridView { - anchors.fill: parent - cellWidth: 100; cellHeight: 100 - highlight: appHighlight - focus: true - model: appModel - delegate: appDelegate - } -} diff --git a/tests/benchmarks/declarative/holistic/data/largeTargets/layoutdirection.qml b/tests/benchmarks/declarative/holistic/data/largeTargets/layoutdirection.qml deleted file mode 100644 index 9f039594b3..0000000000 --- a/tests/benchmarks/declarative/holistic/data/largeTargets/layoutdirection.qml +++ /dev/null @@ -1,151 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Rectangle { - - width: column.width + 100 - height: column.height + 100 - property int direction: Qt.application.layoutDirection - - Column { - id: column - spacing: 10 - anchors.centerIn: parent - width: 230 - - Text { - text: "Row" - anchors.horizontalCenter: parent.horizontalCenter - } - Row { - layoutDirection: direction - spacing: 10 - move: Transition { - NumberAnimation { - properties: "x" - } - } - Repeater { - model: 4 - Loader { - property int value: index - sourceComponent: delegate - } - } - } - Text { - text: "Grid" - anchors.horizontalCenter: parent.horizontalCenter - } - Grid { - layoutDirection: direction - spacing: 10; columns: 4 - move: Transition { - NumberAnimation { - properties: "x" - } - } - Repeater { - model: 11 - Loader { - property int value: index - sourceComponent: delegate - } - } - } - Text { - text: "Flow" - anchors.horizontalCenter: parent.horizontalCenter - } - Flow { - layoutDirection: direction - spacing: 10; width: parent.width - move: Transition { - NumberAnimation { - properties: "x" - } - } - Repeater { - model: 10 - Loader { - property int value: index - sourceComponent: delegate - } - } - } - Rectangle { - height: 50; width: parent.width - color: mouseArea.pressed ? "black" : "gray" - Text { - text: direction ? "Right to left" : "Left to right" - color: "white" - font.pixelSize: 16 - anchors.centerIn: parent - } - MouseArea { - id: mouseArea - onClicked: { - if (direction == Qt.LeftToRight) { - direction = Qt.RightToLeft; - } else { - direction = Qt.LeftToRight; - } - } - anchors.fill: parent - } - } - } - - Component { - id: delegate - Rectangle { - width: 50; height: 50 - color: Qt.rgba(0.8/(parent.value+1),0.8/(parent.value+1),0.8/(parent.value+1),1.0) - Text { - text: parent.parent.value+1 - color: "white" - font.pixelSize: 20 - anchors.centerIn: parent - } - } - } -} diff --git a/tests/benchmarks/declarative/holistic/data/largeTargets/mousearea-example.qml b/tests/benchmarks/declarative/holistic/data/largeTargets/mousearea-example.qml deleted file mode 100644 index 4c82b58302..0000000000 --- a/tests/benchmarks/declarative/holistic/data/largeTargets/mousearea-example.qml +++ /dev/null @@ -1,112 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Rectangle { - id: box - width: 350; height: 250 - - Rectangle { - id: redSquare - width: 80; height: 80 - anchors.top: parent.top; anchors.left: parent.left; anchors.margins: 10 - color: "red" - - Text { text: "Click"; font.pixelSize: 16; anchors.centerIn: parent } - - MouseArea { - anchors.fill: parent - hoverEnabled: true - acceptedButtons: Qt.LeftButton | Qt.RightButton - - onEntered: info.text = 'Entered' - onExited: info.text = 'Exited (pressed=' + pressed + ')' - - onPressed: { - info.text = 'Pressed (button=' + (mouse.button == Qt.RightButton ? 'right' : 'left') - + ' shift=' + (mouse.modifiers & Qt.ShiftModifier ? 'true' : 'false') + ')' - var posInBox = redSquare.mapToItem(box, mouse.x, mouse.y) - posInfo.text = + mouse.x + ',' + mouse.y + ' in square' - + ' (' + posInBox.x + ',' + posInBox.y + ' in window)' - } - - onReleased: { - info.text = 'Released (isClick=' + mouse.isClick + ' wasHeld=' + mouse.wasHeld + ')' - posInfo.text = '' - } - - onPressAndHold: info.text = 'Press and hold' - onClicked: info.text = 'Clicked (wasHeld=' + mouse.wasHeld + ')' - onDoubleClicked: info.text = 'Double clicked' - } - } - - Rectangle { - id: blueSquare - width: 80; height: 80 - x: box.width - width - 10; y: 10 // making this item draggable, so don't use anchors - color: "blue" - - Text { text: "Drag"; font.pixelSize: 16; color: "white"; anchors.centerIn: parent } - - MouseArea { - anchors.fill: parent - drag.target: blueSquare - drag.axis: Drag.XandYAxis - drag.minimumX: 0 - drag.maximumX: box.width - parent.width - drag.minimumY: 0 - drag.maximumY: box.height - parent.width - } - } - - Text { - id: info - anchors.bottom: posInfo.top; anchors.horizontalCenter: parent.horizontalCenter; anchors.margins: 30 - - onTextChanged: console.log(text) - } - - Text { - id: posInfo - anchors.bottom: parent.bottom; anchors.horizontalCenter: parent.horizontalCenter; anchors.margins: 30 - } -} diff --git a/tests/benchmarks/declarative/holistic/data/resolutionTargets/ResolveOne.qml b/tests/benchmarks/declarative/holistic/data/resolutionTargets/ResolveOne.qml deleted file mode 100644 index 2673ac36ed..0000000000 --- a/tests/benchmarks/declarative/holistic/data/resolutionTargets/ResolveOne.qml +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This file has some nested items and does a lot of id resolution. -// This will allow us to benchmark the cost of resolving names in -// bindings. - -import QtQuick 2.0 - -Item { - id: root - property int baseWidth: 500 - property int baseHeight: 600 - property string baseColor: "red" - - Item { - id: childOne - property int baseWidth: root.baseWidth - 1 - property int baseHeight: root.baseHeight - 1 - property string baseColor: root.baseColor - - Item { - id: childTwo - property int baseWidth: root.baseWidth - 2 - property int baseHeight: childOne.baseHeight - 1 - property string baseColor: childOne.baseColor - - Item { - id: childThree - property int baseWidth: childOne.baseWidth - 2 - property int baseHeight: root.baseHeight - 3 - property string baseColor: "blue" - - Item { - id: childFour - property int baseWidth: childTwo.baseWidth - 2 - property int baseHeight: childThree.baseHeight - 1 - property string baseColor: "earthy " + root.baseColor - - Item { - id: childFive - property int baseWidth: root.baseWidth - 5 - property int baseHeight: childFour.baseHeight - 1 - property string baseColor: "carnelian " + childTwo.baseColor - } - } - - Item { - id: childSix - property int baseWidth: parent.baseWidth - 3 - property int baseHeight: root.baseHeight - 6 - property string baseColor: "rust " + root.baseColor - - Item { - id: childSeven - property int baseWidth: childOne.baseWidth - 6 - property int baseHeight: childTwo.baseHeight - 5 - property string baseColor: "sky " + childThree.baseColor - } - } - } - } - } - - Rectangle { - width: childOne.baseWidth - height: childOne.baseHeight - color: parent.baseColor - border.color: "black" - border.width: 5 - radius: 10 - } -} diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/CppToJs.qml b/tests/benchmarks/declarative/holistic/data/scopeSwitching/CppToJs.qml deleted file mode 100644 index d319f6e8cb..0000000000 --- a/tests/benchmarks/declarative/holistic/data/scopeSwitching/CppToJs.qml +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "cppToJs.js" as CppToJs - -Item { - id: jsConsumer - property int sideEffect: 10 - - function callJsFunction() { - jsConsumer.sideEffect = jsConsumer.sideEffect + CppToJs.nextValue; - } -} diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/CppToQml.qml b/tests/benchmarks/declarative/holistic/data/scopeSwitching/CppToQml.qml deleted file mode 100644 index a9d064f740..0000000000 --- a/tests/benchmarks/declarative/holistic/data/scopeSwitching/CppToQml.qml +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: root - property int arbitrary: 10 - property int dependent: arbitrary + 5 -} diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppEight.qml b/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppEight.qml deleted file mode 100644 index 97bb125bfc..0000000000 --- a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppEight.qml +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import Qt.test 1.0 - -Item { - id: arbitraryVariantConsumer - property MyArbitraryVariantProvider a: MyArbitraryVariantProvider { id: arbitraryVariantProvider } - property int sideEffect: 10 - - function callCppFunction() { - // in this case, we call a nonconst CPP function with an integer return value and an integer argument. - arbitraryVariantConsumer.sideEffect = arbitraryVariantConsumer.sideEffect + arbitraryVariantProvider.modifyVariantChangeCount(arbitraryVariantConsumer.sideEffect); - } -} diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppEleven.qml b/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppEleven.qml deleted file mode 100644 index 2258e82500..0000000000 --- a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppEleven.qml +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import Qt.test 1.0 - -Item { - id: arbitraryVariantConsumer - property MyArbitraryVariantProvider a: MyArbitraryVariantProvider { id: arbitraryVariantProvider } - property variant someVariant; - property int sideEffect: 10 - - function callCppFunction() { - // in this case, we call a nonconst CPP function with variant return value and variant + integer arguments. - arbitraryVariantConsumer.sideEffect = arbitraryVariantConsumer.sideEffect + 3; - var tempVariant = arbitraryVariantProvider.setVariantToFilledPixmap(sideEffect + 183, sideEffect + 134, sideEffect + 38, sideEffect + 77, sideEffect + 21); - someVariant = arbitraryVariantProvider.setVariantAddCount(sideEffect, tempVariant); - } -} diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppFive.qml b/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppFive.qml deleted file mode 100644 index f349d0fcbf..0000000000 --- a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppFive.qml +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import Qt.test 1.0 - -Item { - id: arbitraryVariantConsumer - property MyArbitraryVariantProvider a: MyArbitraryVariantProvider { id: arbitraryVariantProvider } - property int sideEffect: 10 - - function callCppFunction() { - // in this case, we call a const CPP function with an integer return value and no arguments. - arbitraryVariantConsumer.sideEffect = arbitraryVariantConsumer.sideEffect + arbitraryVariantProvider.variantChangeCount(); - } -} diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppFour.qml b/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppFour.qml deleted file mode 100644 index 267d36fba2..0000000000 --- a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppFour.qml +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import Qt.test 1.0 - -Item { - id: arbitraryVariantConsumer - property MyArbitraryVariantProvider a: MyArbitraryVariantProvider { id: arbitraryVariantProvider } - property int sideEffect: 10 - - function callCppFunction() { - // in this case, we call a nonconst CPP function with no return value and an integer argument. - arbitraryVariantConsumer.sideEffect = arbitraryVariantConsumer.sideEffect + 2; - arbitraryVariantProvider.setVariantChangeCount(arbitraryVariantConsumer.sideEffect); - } -} diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppNine.qml b/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppNine.qml deleted file mode 100644 index ec3772ea62..0000000000 --- a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppNine.qml +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import Qt.test 1.0 - -Item { - id: arbitraryVariantConsumer - property MyArbitraryVariantProvider a: MyArbitraryVariantProvider { id: arbitraryVariantProvider } - property variant someVariant; - property int sideEffect: 10 - - function callCppFunction() { - // in this case, we call a const CPP function with variant return value and integer arguments. - arbitraryVariantConsumer.sideEffect = arbitraryVariantConsumer.sideEffect + 3; - someVariant = arbitraryVariantProvider.possibleVariant(sideEffect, sideEffect * 2, sideEffect * 5); - } -} diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppOne.qml b/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppOne.qml deleted file mode 100644 index e4a3c1acc2..0000000000 --- a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppOne.qml +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import Qt.test 1.0 - -Item { - id: arbitraryVariantConsumer - property MyArbitraryVariantProvider a: MyArbitraryVariantProvider { id: arbitraryVariantProvider } - property int sideEffect: 10 - - function callCppFunction() { - // in this case, we call a const CPP function with no return value and no arguments. - arbitraryVariantConsumer.sideEffect = arbitraryVariantConsumer.sideEffect + 2; - arbitraryVariantProvider.doNothing(); - } -} diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppSeven.qml b/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppSeven.qml deleted file mode 100644 index 56c18a02db..0000000000 --- a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppSeven.qml +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import Qt.test 1.0 - -Item { - id: arbitraryVariantConsumer - property MyArbitraryVariantProvider a: MyArbitraryVariantProvider { id: arbitraryVariantProvider } - property int sideEffect: 10 - - function callCppFunction() { - // in this case, we call a const CPP function with an integer return value and an integer argument. - arbitraryVariantConsumer.sideEffect = arbitraryVariantConsumer.sideEffect + arbitraryVariantProvider.countPlus(arbitraryVariantConsumer.sideEffect); - } -} diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppSix.qml b/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppSix.qml deleted file mode 100644 index c14c43075b..0000000000 --- a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppSix.qml +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import Qt.test 1.0 - -Item { - id: arbitraryVariantConsumer - property MyArbitraryVariantProvider a: MyArbitraryVariantProvider { id: arbitraryVariantProvider } - property int sideEffect: 10 - - function callCppFunction() { - // in this case, we call a nonconst CPP function with an integer return value and no arguments. - arbitraryVariantConsumer.sideEffect = arbitraryVariantConsumer.sideEffect + arbitraryVariantProvider.modifyVariantChangeCount(); - } -} diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppTen.qml b/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppTen.qml deleted file mode 100644 index 05ededef38..0000000000 --- a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppTen.qml +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import Qt.test 1.0 - -Item { - id: arbitraryVariantConsumer - property MyArbitraryVariantProvider a: MyArbitraryVariantProvider { id: arbitraryVariantProvider } - property variant someVariant; - property int sideEffect: 10 - - function callCppFunction() { - // in this case, we call a nonconst CPP function with variant return value and integer arguments. - arbitraryVariantConsumer.sideEffect = arbitraryVariantConsumer.sideEffect + 3; - someVariant = arbitraryVariantProvider.setVariantToFilledPixmap(sideEffect + 183, sideEffect + 134, sideEffect + 38, sideEffect + 77, sideEffect + 21); - } -} diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppThree.qml b/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppThree.qml deleted file mode 100644 index 2f11f9acb3..0000000000 --- a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppThree.qml +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import Qt.test 1.0 - -Item { - id: arbitraryVariantConsumer - property MyArbitraryVariantProvider a: MyArbitraryVariantProvider { id: arbitraryVariantProvider } - property int sideEffect: 10 - - function callCppFunction() { - // in this case, we call a const CPP function with no return value and an integer argument. - arbitraryVariantConsumer.sideEffect = arbitraryVariantConsumer.sideEffect + 2; - arbitraryVariantProvider.doNothing(arbitraryVariantConsumer.sideEffect); - } -} diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppTwo.qml b/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppTwo.qml deleted file mode 100644 index 0fe6d18507..0000000000 --- a/tests/benchmarks/declarative/holistic/data/scopeSwitching/JsToCppTwo.qml +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import Qt.test 1.0 - -Item { - id: arbitraryVariantConsumer - property MyArbitraryVariantProvider a: MyArbitraryVariantProvider { id: arbitraryVariantProvider } - property int sideEffect: 10 - - function callCppFunction() { - // in this case, we call a nonconst CPP function with no return value and no arguments. - arbitraryVariantConsumer.sideEffect = arbitraryVariantConsumer.sideEffect + 2; - arbitraryVariantProvider.incrementVariantChangeCount(); - } -} diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/ScarceOne.qml b/tests/benchmarks/declarative/holistic/data/scopeSwitching/ScarceOne.qml deleted file mode 100644 index d604242a99..0000000000 --- a/tests/benchmarks/declarative/holistic/data/scopeSwitching/ScarceOne.qml +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import Qt.test 1.0 - -Item { - id: scarceResourceConsumer - - property MyScarceResourceProvider a: MyScarceResourceProvider { id: scarceResourceProvider } - - property variant ssr; - property variant lsr; - - function copyScarceResources() { - ssr = scarceResourceProvider.smallScarceResource; - lsr = scarceResourceProvider.largeScarceResource; - } -} diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/ScarceTwo.qml b/tests/benchmarks/declarative/holistic/data/scopeSwitching/ScarceTwo.qml deleted file mode 100644 index cd79bb8074..0000000000 --- a/tests/benchmarks/declarative/holistic/data/scopeSwitching/ScarceTwo.qml +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import Qt.test 1.0 - -Item { - id: scarceResourceConsumer - - property MyScarceResourceProvider a: MyScarceResourceProvider { id: scarceResourceProvider } - - property variant ssr: scarceResourceProvider.smallScarceResource - property variant lsr: scarceResourceProvider.largeScarceResource -} diff --git a/tests/benchmarks/declarative/holistic/data/scopeSwitching/cppToJs.js b/tests/benchmarks/declarative/holistic/data/scopeSwitching/cppToJs.js deleted file mode 100644 index e62c2f27d6..0000000000 --- a/tests/benchmarks/declarative/holistic/data/scopeSwitching/cppToJs.js +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -.pragma library - -var generatedValue = 5; - -function generateNextValue() { - generatedValue += 1; - return generatedValue; -} diff --git a/tests/benchmarks/declarative/holistic/data/smallTargets/SmallFour.qml b/tests/benchmarks/declarative/holistic/data/smallTargets/SmallFour.qml deleted file mode 100644 index 80af3bfee9..0000000000 --- a/tests/benchmarks/declarative/holistic/data/smallTargets/SmallFour.qml +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Text { - text: "Hello World!" - font.family: "Helvetica" - font.pointSize: 24 - color: "red" -} diff --git a/tests/benchmarks/declarative/holistic/data/smallTargets/SmallOne.qml b/tests/benchmarks/declarative/holistic/data/smallTargets/SmallOne.qml deleted file mode 100644 index 58d52fe25d..0000000000 --- a/tests/benchmarks/declarative/holistic/data/smallTargets/SmallOne.qml +++ /dev/null @@ -1,51 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Rectangle { - width: 100 - height: 100 - color: "red" - border.color: "black" - border.width: 5 - radius: 10 -} diff --git a/tests/benchmarks/declarative/holistic/data/smallTargets/SmallThree.qml b/tests/benchmarks/declarative/holistic/data/smallTargets/SmallThree.qml deleted file mode 100644 index a3e27f9ad6..0000000000 --- a/tests/benchmarks/declarative/holistic/data/smallTargets/SmallThree.qml +++ /dev/null @@ -1,51 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Rectangle { - width: 100; height: 100 - gradient: Gradient { - GradientStop { position: 0.0; color: "red" } - GradientStop { position: 0.33; color: "yellow" } - GradientStop { position: 1.0; color: "green" } - } -} diff --git a/tests/benchmarks/declarative/holistic/data/smallTargets/SmallTwo.qml b/tests/benchmarks/declarative/holistic/data/smallTargets/SmallTwo.qml deleted file mode 100644 index 3ff2c5e8b0..0000000000 --- a/tests/benchmarks/declarative/holistic/data/smallTargets/SmallTwo.qml +++ /dev/null @@ -1,51 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Rectangle { - width: 100 - height: 100 - color: "blue" - border.color: "black" - border.width: 5 - radius: 10 -} diff --git a/tests/benchmarks/declarative/holistic/holistic.pro b/tests/benchmarks/declarative/holistic/holistic.pro deleted file mode 100644 index 586af79275..0000000000 --- a/tests/benchmarks/declarative/holistic/holistic.pro +++ /dev/null @@ -1,13 +0,0 @@ -CONFIG += testcase -TEMPLATE = app -TARGET = tst_holistic -QT += declarative network testlib -macx:CONFIG -= app_bundle - -CONFIG += release - -SOURCES += tst_holistic.cpp \ - testtypes.cpp -HEADERS += testtypes.h - -DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/benchmarks/declarative/holistic/testtypes.cpp b/tests/benchmarks/declarative/holistic/testtypes.cpp deleted file mode 100644 index 872a3be7b1..0000000000 --- a/tests/benchmarks/declarative/holistic/testtypes.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include "testtypes.h" -#include <QWidget> -#include <QPlainTextEdit> -#include <QDeclarativeEngine> -#include <QScriptEngine> - -static QScriptValue script_api(QDeclarativeEngine *engine, QScriptEngine *scriptEngine) -{ - Q_UNUSED(engine) - Q_UNUSED(scriptEngine) - - static int testProperty = 13; - QScriptValue v = scriptEngine->newObject(); - v.setProperty("scriptTestProperty", testProperty++); - return v; -} - -static QObject *qobject_api(QDeclarativeEngine *engine, QScriptEngine *scriptEngine) -{ - Q_UNUSED(engine) - Q_UNUSED(scriptEngine) - - testQObjectApi *o = new testQObjectApi(); - o->setQObjectTestProperty(20); - return o; -} - -static QObject *qobject_api_engine_parent(QDeclarativeEngine *engine, QScriptEngine *scriptEngine) -{ - Q_UNUSED(scriptEngine) - - static int testProperty = 26; - testQObjectApi *o = new testQObjectApi(engine); - o->setQObjectTestProperty(testProperty++); - return o; -} - -void registerTypes() -{ - qmlRegisterType<MyQmlObject>("Qt.test", 1,0, "MyQmlObjectAlias"); - qmlRegisterType<MyQmlObject>("Qt.test", 1,0, "MyQmlObject"); - - qmlRegisterType<QPlainTextEdit>("Qt.test",1,0,"QPlainTextEdit"); - qRegisterMetaType<MyQmlObject::MyType>("MyQmlObject::MyType"); - - qmlRegisterType<ScarceResourceProvider>("Qt.test", 1,0, "MyScarceResourceProvider"); - qmlRegisterType<ArbitraryVariantProvider>("Qt.test", 1,0, "MyArbitraryVariantProvider"); - - qmlRegisterModuleApi("Qt.test",1,0,script_api); // register (script) module API for an existing uri which contains elements - qmlRegisterModuleApi("Qt.test",1,0,qobject_api); // register (qobject) for an existing uri for which another module API was previously regd. Should replace! - qmlRegisterModuleApi("Qt.test.scriptApi",1,0,script_api); // register (script) module API for a uri which doesn't contain elements - qmlRegisterModuleApi("Qt.test.qobjectApi",1,0,qobject_api); // register (qobject) module API for a uri which doesn't contain elements - qmlRegisterModuleApi("Qt.test.qobjectApi",1,3,qobject_api); // register (qobject) module API for a uri which doesn't contain elements, minor version set - qmlRegisterModuleApi("Qt.test.qobjectApi",2,0,qobject_api); // register (qobject) module API for a uri which doesn't contain elements, major version set - qmlRegisterModuleApi("Qt.test.qobjectApiParented",1,0,qobject_api_engine_parent); // register (parented qobject) module API for a uri which doesn't contain elements -} - -//#include "testtypes.moc" diff --git a/tests/benchmarks/declarative/holistic/testtypes.h b/tests/benchmarks/declarative/holistic/testtypes.h deleted file mode 100644 index c3824d2352..0000000000 --- a/tests/benchmarks/declarative/holistic/testtypes.h +++ /dev/null @@ -1,355 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#ifndef TESTTYPES_H -#define TESTTYPES_H - -#include <QtCore/qobject.h> -#include <QtDeclarative/qdeclarative.h> -#include <QtDeclarative/qdeclarativeexpression.h> -#include <QtCore/qpoint.h> -#include <QtCore/qsize.h> -#include <QtDeclarative/qdeclarativelist.h> -#include <QtCore/qrect.h> -#include <QtGui/qmatrix.h> -#include <QtGui/qcolor.h> -#include <QtGui/qpixmap.h> -#include <QtGui/qvector3d.h> -#include <QtCore/qdatetime.h> -#include <QtScript/qjsvalue.h> -#include <QtDeclarative/qdeclarativescriptstring.h> -#include <QtDeclarative/qdeclarativecomponent.h> - -class MyQmlAttachedObject : public QObject -{ - Q_OBJECT - Q_PROPERTY(int value READ value CONSTANT) - Q_PROPERTY(int value2 READ value2 WRITE setValue2) -public: - MyQmlAttachedObject(QObject *parent) : QObject(parent), m_value2(0) {} - - int value() const { return 19; } - int value2() const { return m_value2; } - void setValue2(int v) { m_value2 = v; } - - void emitMySignal() { emit mySignal(); } - -signals: - void mySignal(); - -private: - int m_value2; -}; - -class MyQmlObject : public QObject -{ - Q_OBJECT - Q_ENUMS(MyEnum) - Q_ENUMS(MyEnum2) - Q_PROPERTY(int deleteOnSet READ deleteOnSet WRITE setDeleteOnSet) - Q_PROPERTY(bool trueProperty READ trueProperty CONSTANT) - Q_PROPERTY(bool falseProperty READ falseProperty CONSTANT) - Q_PROPERTY(int value READ value WRITE setValue) - Q_PROPERTY(int console READ console CONSTANT) - Q_PROPERTY(QString stringProperty READ stringProperty WRITE setStringProperty NOTIFY stringChanged) - Q_PROPERTY(QObject *objectProperty READ objectProperty WRITE setObjectProperty NOTIFY objectChanged) - Q_PROPERTY(QDeclarativeListProperty<QObject> objectListProperty READ objectListProperty CONSTANT) - Q_PROPERTY(int resettableProperty READ resettableProperty WRITE setResettableProperty RESET resetProperty) - Q_PROPERTY(QRegExp regExp READ regExp WRITE setRegExp) - Q_PROPERTY(int nonscriptable READ nonscriptable WRITE setNonscriptable SCRIPTABLE false) - -public: - MyQmlObject(): myinvokableObject(0), m_methodCalled(false), m_methodIntCalled(false), m_object(0), m_value(0), m_resetProperty(13) {} - - enum MyEnum { EnumValue1 = 0, EnumValue2 = 1 }; - enum MyEnum2 { EnumValue3 = 2, EnumValue4 = 3 }; - - bool trueProperty() const { return true; } - bool falseProperty() const { return false; } - - QString stringProperty() const { return m_string; } - void setStringProperty(const QString &s) - { - if (s == m_string) - return; - m_string = s; - emit stringChanged(); - } - - QObject *objectProperty() const { return m_object; } - void setObjectProperty(QObject *obj) { - if (obj == m_object) - return; - m_object = obj; - emit objectChanged(); - } - - QDeclarativeListProperty<QObject> objectListProperty() { return QDeclarativeListProperty<QObject>(this, m_objectQList); } - - bool methodCalled() const { return m_methodCalled; } - bool methodIntCalled() const { return m_methodIntCalled; } - - QString string() const { return m_string; } - - static MyQmlAttachedObject *qmlAttachedProperties(QObject *o) { - return new MyQmlAttachedObject(o); - } - - int deleteOnSet() const { return 1; } - void setDeleteOnSet(int v) { if(v) delete this; } - - int value() const { return m_value; } - void setValue(int v) { m_value = v; } - - int resettableProperty() const { return m_resetProperty; } - void setResettableProperty(int v) { m_resetProperty = v; } - void resetProperty() { m_resetProperty = 13; } - - QRegExp regExp() { return m_regExp; } - void setRegExp(const QRegExp ®Exp) { m_regExp = regExp; } - - int console() const { return 11; } - - int nonscriptable() const { return 0; } - void setNonscriptable(int) {} - - MyQmlObject *myinvokableObject; - Q_INVOKABLE MyQmlObject *returnme() { return this; } - - struct MyType { - int value; - }; - QVariant variant() const { return m_variant; } - -signals: - void basicSignal(); - void argumentSignal(int a, QString b, qreal c); - void stringChanged(); - void objectChanged(); - void anotherBasicSignal(); - void thirdBasicSignal(); - void signalWithUnknownType(const MyQmlObject::MyType &arg); - -public slots: - void deleteMe() { delete this; } - void methodNoArgs() { m_methodCalled = true; } - void method(int a) { if(a == 163) m_methodIntCalled = true; } - void setString(const QString &s) { m_string = s; } - void myinvokable(MyQmlObject *o) { myinvokableObject = o; } - void variantMethod(const QVariant &v) { m_variant = v; } - -private: - friend class tst_qdeclarativeecmascript; - bool m_methodCalled; - bool m_methodIntCalled; - - QObject *m_object; - QString m_string; - QList<QObject *> m_objectQList; - int m_value; - int m_resetProperty; - QRegExp m_regExp; - QVariant m_variant; -}; - -QML_DECLARE_TYPEINFO(MyQmlObject, QML_HAS_ATTACHED_PROPERTIES) -Q_DECLARE_METATYPE(MyQmlObject::MyType) - -class testQObjectApi : public QObject -{ - Q_OBJECT - Q_PROPERTY (int qobjectTestProperty READ qobjectTestProperty NOTIFY qobjectTestPropertyChanged) - -public: - testQObjectApi(QObject* parent = 0) - : QObject(parent), m_testProperty(0) - { - } - - ~testQObjectApi() {} - - int qobjectTestProperty() const { return m_testProperty; } - void setQObjectTestProperty(int tp) { m_testProperty = tp; emit qobjectTestPropertyChanged(tp); } - -signals: - void qobjectTestPropertyChanged(int testProperty); - -private: - int m_testProperty; -}; - -class ArbitraryVariantProvider : public QObject -{ - Q_OBJECT - Q_PROPERTY(QVariant arbitraryVariant READ arbitraryVariant WRITE setArbitraryVariant NOTIFY arbitraryVariantChanged) - -public: - ArbitraryVariantProvider(QObject *parent = 0) - : QObject(parent), m_value(QVariant(QString(QLatin1String("random string value")))), m_count(1) - { - } - - ~ArbitraryVariantProvider() {} - - // the variant provided by the provider - QVariant arbitraryVariant() const { return m_value; } - void setArbitraryVariant(const QVariant& value) { m_value = value; emit arbitraryVariantChanged(); } - Q_INVOKABLE int changeVariant() - { - QPixmap pv(150, 150); - pv.fill(Qt::green); - int choice = qrand() % 4; - switch (choice) { - case 0: setArbitraryVariant(QVariant(QString(QLatin1String("string variant value")))); break; - case 1: setArbitraryVariant(QVariant(QColor(110, 120, 130))); break; - case 2: setArbitraryVariant(QVariant(55)); break; - default: setArbitraryVariant(QVariant(pv)); break; - } - - m_count += 1; - return m_count; - } - Q_INVOKABLE QVariant setVariantToFilledPixmap(int width, int height, int r, int g, int b) - { - QPixmap pv(width % 300, height % 300); - pv.fill(QColor(r % 256, g % 256, b % 256)); - m_value = pv; - m_count += 1; - return m_value; - } - Q_INVOKABLE QVariant setVariantAddCount(int addToCount, const QVariant& newValue) - { - m_value = newValue; - m_count += addToCount; - return m_value; - } - Q_INVOKABLE QVariant possibleVariant(int randomFactorOne, int randomFactorTwo, int randomFactorThree) const - { - QVariant retn; - QPixmap pv(randomFactorOne % 300, randomFactorTwo % 300); - pv.fill(QColor(randomFactorOne % 256, randomFactorTwo % 256, randomFactorThree % 256)); - int choice = qrand() % 4; - switch (choice) { - case 0: retn = QVariant(QString(QLatin1String("string variant value"))); break; - case 1: retn = QVariant(QColor(randomFactorThree % 256, randomFactorTwo % 256, randomFactorOne % 256)); break; - case 2: retn = QVariant((55 + randomFactorThree)); break; - default: retn = QVariant(pv); break; - } - return retn; - } - - // the following functions cover permutations of return value and arguments. - // functions with no return value: - Q_INVOKABLE void doNothing() const { /* does nothing */ } // no args, const - Q_INVOKABLE void incrementVariantChangeCount() { m_count = m_count + 1; } // no args, nonconst - Q_INVOKABLE void doNothing(int) const { /* does nothing. */ } // arg, const - Q_INVOKABLE void setVariantChangeCount(int newCount) { m_count = newCount; } // arg, nonconst - // functions with return value: - Q_INVOKABLE int variantChangeCount() const { return m_count; } // no args, const - Q_INVOKABLE int modifyVariantChangeCount() { m_count += 3; return m_count; } // no args, nonconst - Q_INVOKABLE int countPlus(int value) const { return m_count + value; } // arg, const - Q_INVOKABLE int modifyVariantChangeCount(int modifier) { m_count += modifier; return m_count; } // arg, nonconst. - -signals: - void arbitraryVariantChanged(); - -private: - QVariant m_value; - int m_count; -}; - -class ScarceResourceProvider : public QObject -{ - Q_OBJECT - Q_PROPERTY(QPixmap smallScarceResource READ smallScarceResource WRITE setSmallScarceResource NOTIFY smallScarceResourceChanged) - Q_PROPERTY(QPixmap largeScarceResource READ largeScarceResource WRITE setLargeScarceResource NOTIFY largeScarceResourceChanged) - -public: - ScarceResourceProvider(QObject *parent = 0) - : QObject(parent), m_small(100, 100), m_large(1000, 1000), m_colour(1) - { - m_small.fill(Qt::blue); - m_large.fill(Qt::blue); - } - - ~ScarceResourceProvider() {} - - QPixmap smallScarceResource() const { return m_small; } - void setSmallScarceResource(QPixmap v) { m_small = v; emit smallScarceResourceChanged(); } - bool smallScarceResourceIsDetached() const { return m_small.isDetached(); } - - QPixmap largeScarceResource() const { return m_large; } - void setLargeScarceResource(QPixmap v) { m_large = v; emit largeScarceResourceChanged(); } - bool largeScarceResourceIsDetached() const { return m_large.isDetached(); } - - Q_INVOKABLE void changeResources() - { - QPixmap newSmall(100, 100); - QPixmap newLarge(1000, 1000); - - if (m_colour == 1) { - m_colour = 2; - newSmall.fill(Qt::red); - newLarge.fill(Qt::red); - } else { - m_colour = 1; - newSmall.fill(Qt::blue); - newLarge.fill(Qt::blue); - } - - setSmallScarceResource(newSmall); - setLargeScarceResource(newLarge); - } - -signals: - void smallScarceResourceChanged(); - void largeScarceResourceChanged(); - -private: - QPixmap m_small; - QPixmap m_large; - - int m_colour; -}; - -void registerTypes(); - -#endif // TESTTYPES_H - diff --git a/tests/benchmarks/declarative/holistic/tst_holistic.cpp b/tests/benchmarks/declarative/holistic/tst_holistic.cpp deleted file mode 100644 index 6a2aa19804..0000000000 --- a/tests/benchmarks/declarative/holistic/tst_holistic.cpp +++ /dev/null @@ -1,607 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "testtypes.h" - -#include <qtest.h> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> -#include <QDeclarativeContext> -#include <QDeclarativeProperty> -#include <QFile> -#include <QDebug> - -// Conceptually, there are several different "holistic" areas to benchmark: -// 1) Loading -// - read file from disk -// - parse/lex file -// - handle nested imports -// 2) Compilation -// - create meta object templates etc -// - compile to bytecode and cache it -// 3) Instantiation -// - running the bytecode to create an object tree, assign properties, etc -// - and, importantly, to evaluate bindings for the first time (incl. js expressions) -// 4) Dynamicism -// - bindings evaluation -// - signal handlers -// -// Aside from this, we also need to determine: -// 1) JavaScript Metrics -// - simple expressions -// - complex expressions -// - instantiation vs evaluation time -// - imports and nested imports -// 2) Context-switch costs -// - how expensive is it to call a cpp function from QML -// - how expensive is it to call a js function from cpp via QML -// - how expensive is it to pass around objects between them -// 3) Complete creation time. -// - loading + compilation + instantiation (for "application startup time" metric) -// -// In some cases, we want to include "initialization costs"; -// i.e., we need to tell the engine not to cache type data resulting -// in compilation between rounds, and we need to tell the engine not -// to cache whatever it caches between instantiations of components. -// The reason for this is that it is often the "first start of application" -// performance which we're attempting to benchmark. - -// define some custom types we use in test data functions. -typedef QList<QString> PropertyNameList; -Q_DECLARE_METATYPE(PropertyNameList); -typedef QList<QVariant> PropertyValueList; -Q_DECLARE_METATYPE(PropertyValueList); - -class tst_holistic : public QObject -{ - Q_OBJECT - -public: - tst_holistic(); - -private slots: - void initTestCase() - { - registerTypes(); - qRegisterMetaType<PropertyNameList>("PropertyNameList"); - qRegisterMetaType<PropertyValueList>("PropertyValueList"); - } - - void compilation_data(); - void compilation(); - void instantiation_data() { compilation_data(); } - void instantiation(); - void creation_data() { compilation_data(); } - void creation(); - void dynamicity_data(); - void dynamicity(); - - void cppToJsDirect_data(); - void cppToJsDirect(); - void cppToJsIndirect(); - - void typeResolution_data(); - void typeResolution(); - -private: - QDeclarativeEngine engine; -}; - -tst_holistic::tst_holistic() -{ -} - -inline QUrl TEST_FILE(const QString &filename) -{ - return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename); -} - - -void tst_holistic::compilation_data() -{ - QTest::addColumn<QStringList>("files"); - QTest::addColumn<int>("repetitions"); - - QStringList f; - - // Benchmarks: a single, small component once with no caching. - f << QString(SRCDIR + QLatin1String("/data/smallTargets/SmallOne.qml")); - QTest::newRow("single small component") << f << 1; - - // Benchmarks: a single, small component ten times with caching. - QTest::newRow("single small component cached") << f << 10; f.clear(); - - // Benchmarks: a single, large component once with no caching. - f << QString(SRCDIR + QLatin1String("/data/largeTargets/mousearea-example.qml")); - QTest::newRow("single large component") << f << 1; - - // Benchmarks: a single, large component ten times with caching. - QTest::newRow("single large component cached") << f << 10; f.clear(); - - // Benchmarks: 4 small components once each with no caching - f << QString(SRCDIR + QLatin1String("/data/smallTargets/SmallOne.qml")); - f << QString(SRCDIR + QLatin1String("/data/smallTargets/SmallTwo.qml")); - f << QString(SRCDIR + QLatin1String("/data/smallTargets/SmallThree.qml")); - f << QString(SRCDIR + QLatin1String("/data/smallTargets/SmallFour.qml")); - QTest::newRow("multiple small components") << f << 1; - - // Benchmarks: 4 small components ten times each with caching - QTest::newRow("multiple small components cached") << f << 10; f.clear(); - - // Benchmarks: 3 large components once each with no caching. - f << QString(SRCDIR + QLatin1String("/data/largeTargets/mousearea-example.qml")); - f << QString(SRCDIR + QLatin1String("/data/largeTargets/gridview-example.qml")); - f << QString(SRCDIR + QLatin1String("/data/largeTargets/layoutdirection.qml")); - QTest::newRow("multiple large components") << f << 1; - - // Benchmarks: 3 large components ten times each with caching. - QTest::newRow("multiple large components cached") << f << 10; f.clear(); - - // Benchmarks: single small component which imports a single small js file, no caching - f << QString(SRCDIR + QLatin1String("/data/jsImports/Sssi.qml")); - QTest::newRow("single small js import") << f << 1; - - // Benchmarks: single small component which imports a single small js file, 10 reps, with caching - QTest::newRow("single small js import, cached") << f << 10; f.clear(); - - // Benchmarks: single small component which imports multiple small js files (no deep nesting), no caching - f << QString(SRCDIR + QLatin1String("/data/jsImports/Msbsi.qml")); - QTest::newRow("multiple small js imports, shallow") << f << 1; - - // Benchmarks: single small component which imports multiple small js files (no deep nesting), 10 reps, with caching - QTest::newRow("multiple small js imports, shallow, cached") << f << 10; f.clear(); - - // Benchmarks: single small component which imports multiple small js files (with deep nesting), no caching - f << QString(SRCDIR + QLatin1String("/data/jsImports/Msdsi.qml")); - QTest::newRow("multiple small js imports, deeply nested") << f << 1; - - // Benchmarks: single small component which imports multiple small js files (with deep nesting), 10 reps, with caching - QTest::newRow("multiple small js imports, deeply nested, cached") << f << 10; f.clear(); - - // Benchmarks: single small component which imports multiple small js files (nested and unnested), no caching - f << QString(SRCDIR + QLatin1String("/data/jsImports/Mssi.qml")); - QTest::newRow("muliple small js imports, both") << f << 1; - - // Benchmarks: single small component which imports multiple small js files (nested and unnested), 10 reps, with caching - QTest::newRow("muliple small js imports, both, cached") << f << 10; f.clear(); - - // Benchmarks: single small component which imports a single large js file, no caching - f << QString(SRCDIR + QLatin1String("/data/jsImports/Slsi.qml")); - QTest::newRow("single large js import") << f << 1; - - // Benchmarks: single small component which imports a single large js file, 10 reps, with caching - QTest::newRow("single large js import, cached") << f << 10; f.clear(); - - // Benchmarks: single small component which imports multiple large js files (no deep nesting), no caching - f << QString(SRCDIR + QLatin1String("/data/jsImports/Mlbsi.qml")); - QTest::newRow("multiple large js imports, shallow") << f << 1; - - // Benchmarks: single small component which imports multiple large js files (no deep nesting), 10 reps, with caching - QTest::newRow("multiple large js imports, shallow, cached") << f << 10; f.clear(); - - // Benchmarks: single small component which imports multiple large js files (with deep nesting), no caching - f << QString(SRCDIR + QLatin1String("/data/jsImports/Mldsi.qml")); - QTest::newRow("multiple large js imports, deeply nested") << f << 1; - - // Benchmarks: single small component which imports multiple large js files (with deep nesting), 10 reps, with caching - QTest::newRow("multiple large js imports, deeply nested, cached") << f << 10; f.clear(); - - // Benchmarks: single small component which imports multiple large js files (nested and unnested), no caching - f << QString(SRCDIR + QLatin1String("/data/jsImports/Mlsi.qml")); - QTest::newRow("multiple large js imports, both") << f << 1; - - // Benchmarks: single small component which imports multiple large js files (nested and unnested), 10 reps, with caching - QTest::newRow("multiple large js imports, both, cached") << f << 10; f.clear(); - - // Benchmarks: single small component which imports multiple js files which all import a .pragma library js file, no caching - f << QString(SRCDIR + QLatin1String("/data/jsImports/PragmaBm.qml")); - QTest::newRow(".pragma library js import") << f << 1; - - // Benchmarks: single small component which imports multiple js files which all import a .pragma library js file, 10 reps, with caching - QTest::newRow(".pragma library js import, cached") << f << 10; f.clear(); - - // Benchmarks: single small component which imports a js file which imports a QML module, no caching - f << QString(SRCDIR + QLatin1String("/data/jsImports/ModuleBm.qml")); - QTest::newRow("import js with QML import") << f << 1; - - // Benchmarks: single small component which imports a js file which imports a QML module, 10 reps, with caching - QTest::newRow("import js with QML import, cached") << f << 10; f.clear(); - - // Benchmarks: single small component which imports multiple js files which all import a .pragma library js file and a QML module, no caching - f << QString(SRCDIR + QLatin1String("/data/jsImports/PragmaModuleBm.qml")); - QTest::newRow("import js with QML import and .pragma library") << f << 1; - - // Benchmarks: single small component which imports multiple js files which all import a .pragma library js file and a QML module, 10 reps, with caching - QTest::newRow("import js with QML import and .pragma library, cached") << f << 10; f.clear(); -} - -void tst_holistic::compilation() -{ - // This function benchmarks the cost of loading and compiling specified QML files. - // If "repetitions" is non-zero, each file from "files" will be compiled "repetitions" - // times, without clearing the engine's component cache between compilations. - - QFETCH(QStringList, files); - QFETCH(int, repetitions); - Q_ASSERT(files.size() > 0); - Q_ASSERT(repetitions > 0); - - QBENCHMARK { - engine.clearComponentCache(); - for (int i = 0; i < repetitions; ++i) { - for (int j = 0; j < files.size(); ++j) { - QDeclarativeComponent c(&engine, QUrl::fromLocalFile(files.at(j))); - } - } - } -} - -void tst_holistic::instantiation() -{ - // This function benchmarks the cost of instantiating components compiled from specified QML files. - // If "repetitions" is non-zero, each component compiled from "files" will be instantiated "repetitions" - // times, without clearing the component's instantiation cache between instantiations. - - QFETCH(QStringList, files); - QFETCH(int, repetitions); - Q_ASSERT(files.size() > 0); - Q_ASSERT(repetitions > 0); - - QList<QDeclarativeComponent*> components; - for (int i = 0; i < files.size(); ++i) { - QDeclarativeComponent *c = new QDeclarativeComponent(&engine, QUrl::fromLocalFile(files.at(i))); - components.append(c); - } - - QBENCHMARK { - // XXX TODO: clear each component's instantiation cache - - for (int i = 0; i < repetitions; ++i) { - for (int j = 0; j < components.size(); ++j) { - QObject *obj = components.at(j)->create(); - delete obj; - } - } - } - - // cleanup - for (int i = 0; i < components.size(); ++i) { - delete components.at(i); - } -} - -void tst_holistic::creation() -{ - // This function benchmarks the cost of loading, compiling and instantiating specified QML files. - // If "repetitions" is non-zero, each file from "files" will be created "repetitions" - // times, without clearing the engine's component cache between component creation. - - QFETCH(QStringList, files); - QFETCH(int, repetitions); - Q_ASSERT(files.size() > 0); - Q_ASSERT(repetitions > 0); - - QBENCHMARK { - engine.clearComponentCache(); - for (int i = 0; i < repetitions; ++i) { - for (int j = 0; j < files.size(); ++j) { - QDeclarativeComponent c(&engine, QUrl::fromLocalFile(files.at(j))); - QObject *obj = c.create(); - delete obj; - } - } - } -} - -void tst_holistic::dynamicity_data() -{ - QTest::addColumn<QString>("file"); - QTest::addColumn<QString>("writeProperty"); - QTest::addColumn<QVariant>("writeValueOne"); - QTest::addColumn<QVariant>("writeValueTwo"); - QTest::addColumn<QString>("readProperty"); - - QString f; - - // Benchmarks: single simple property binding - f = QString(SRCDIR + QLatin1String("/data/dynamicTargets/DynamicOne.qml")); - QTest::newRow("single simple property binding") << f << QString(QLatin1String("dynamicWidth")) << QVariant(300) << QVariant(500) << QString(QLatin1String("height")); - - // Benchmarks: multiple simple property bindings in one component - f = QString(SRCDIR + QLatin1String("/data/dynamicTargets/DynamicTwo.qml")); - QTest::newRow("multiple simple property bindings") << f << QString(QLatin1String("dynamicWidth")) << QVariant(300) << QVariant(500) << QString(QLatin1String("dynamicWidth")); - - // Benchmarks: single simple property binding plus onPropertyChanged slot - f = QString(SRCDIR + QLatin1String("/data/dynamicTargets/DynamicThree.qml")); - QTest::newRow("single simple plus slot") << f << QString(QLatin1String("dynamicWidth")) << QVariant(300) << QVariant(500) << QString(QLatin1String("dynamicWidth")); - - // Benchmarks: multiple simple property bindings plus multiple onPropertyChanged slots in one component - f = QString(SRCDIR + QLatin1String("/data/dynamicTargets/DynamicFour.qml")); - QTest::newRow("multiple simple plus slots") << f << QString(QLatin1String("dynamicWidth")) << QVariant(300) << QVariant(500) << QString(QLatin1String("dynamicHeight")); - - // Benchmarks: single simple js expression in a slot - f = QString(SRCDIR + QLatin1String("/data/jsTargets/JsOne.qml")); - QTest::newRow("single simple js expression slot") << f << QString(QLatin1String("dynamicWidth")) << QVariant(300) << QVariant(500) << QString(QLatin1String("dynamicWidth")); - - // Benchmarks: single complex js expression in a slot - f = QString(SRCDIR + QLatin1String("/data/jsTargets/JsTwo.qml")); - QTest::newRow("single complex js expression slot") << f << QString(QLatin1String("dynamicWidth")) << QVariant(300) << QVariant(500) << QString(QLatin1String("dynamicWidth")); - - // Benchmarks: simple property assignment and bindings update - f = QString(SRCDIR + QLatin1String("/data/scopeSwitching/CppToQml.qml")); - QTest::newRow("single simple property binding") << f << QString(QLatin1String("arbitrary")) << QVariant(36) << QVariant(35) << QString(QLatin1String("arbitrary")); -} - -void tst_holistic::dynamicity() -{ - // This function benchmarks the cost of "continued operation" - signal invocation, - // updating bindings, etc. Note that we take two different writeValues in order - // to force updates to occur, and we read to force lazy evaluation to occur. - - QFETCH(QString, file); - QFETCH(QString, writeProperty); - QFETCH(QVariant, writeValueOne); - QFETCH(QVariant, writeValueTwo); - QFETCH(QString, readProperty); - - QDeclarativeComponent c(&engine, file); - QObject *obj = c.create(); - - QVariant readValue; - QVariant writeValue; - bool usedFirst = false; - - QBENCHMARK { - if (usedFirst) { - writeValue = writeValueTwo; - usedFirst = false; - } else { - writeValue = writeValueOne; - usedFirst = true; - } - - obj->setProperty(writeProperty.toAscii().constData(), writeValue); - readValue = obj->property(readProperty.toAscii().constData()); - } - - delete obj; -} - - - - - - - -void tst_holistic::cppToJsDirect_data() -{ - QTest::addColumn<QString>("file"); - QTest::addColumn<QString>("methodName"); - - QString f; - - // Benchmarks: cost of calling a js function from cpp directly - f = QString(SRCDIR + QLatin1String("/data/scopeSwitching/CppToJs.qml")); - QTest::newRow("cpp-to-js") << f << QString(QLatin1String("callJsFunction")); - - // Benchmarks: cost of calling js function which calls cpp function: - // const CPP function with no return value and no arguments. - f = QString(SRCDIR + QLatin1String("/data/scopeSwitching/JsToCppOne.qml")); - QTest::newRow("cpp-to-js-to-cpp: no retn, no args") << f << QString(QLatin1String("callCppFunction")); - - // Benchmarks: cost of calling js function which calls cpp function: - // nonconst CPP function with no return value and no arguments. - f = QString(SRCDIR + QLatin1String("/data/scopeSwitching/JsToCppTwo.qml")); - QTest::newRow("cpp-to-js-to-cpp: nonconst, no retn, no args") << f << QString(QLatin1String("callCppFunction")); - - // Benchmarks: cost of calling js function which calls cpp function: - // const CPP function with no return value and a single integer argument. - f = QString(SRCDIR + QLatin1String("/data/scopeSwitching/JsToCppThree.qml")); - QTest::newRow("cpp-to-js-to-cpp: const, no retn, int arg") << f << QString(QLatin1String("callCppFunction")); - - // Benchmarks: cost of calling js function which calls cpp function: - // nonconst CPP function with no return value and a single integer argument. - f = QString(SRCDIR + QLatin1String("/data/scopeSwitching/JsToCppFour.qml")); - QTest::newRow("cpp-to-js-to-cpp: nonconst, no retn, int arg") << f << QString(QLatin1String("callCppFunction")); - - // Benchmarks: cost of calling js function which calls cpp function: - // const CPP function with an integer return value and no arguments. - f = QString(SRCDIR + QLatin1String("/data/scopeSwitching/JsToCppFive.qml")); - QTest::newRow("cpp-to-js-to-cpp: const, int retn, no args") << f << QString(QLatin1String("callCppFunction")); - - // Benchmarks: cost of calling js function which calls cpp function: - // nonconst CPP function with an integer return value and no arguments. - f = QString(SRCDIR + QLatin1String("/data/scopeSwitching/JsToCppSix.qml")); - QTest::newRow("cpp-to-js-to-cpp: nonconst, int retn, no args") << f << QString(QLatin1String("callCppFunction")); - - // Benchmarks: cost of calling js function which calls cpp function: - // const CPP function with an integer return value and a single integer argument. - f = QString(SRCDIR + QLatin1String("/data/scopeSwitching/JsToCppSeven.qml")); - QTest::newRow("cpp-to-js-to-cpp: const, int retn, int arg") << f << QString(QLatin1String("callCppFunction")); - - // Benchmarks: cost of calling js function which calls cpp function: - // nonconst CPP function with an integer return value and a single integer argument. - f = QString(SRCDIR + QLatin1String("/data/scopeSwitching/JsToCppEight.qml")); - QTest::newRow("cpp-to-js-to-cpp: nonconst, int retn, int arg") << f << QString(QLatin1String("callCppFunction")); - - // Benchmarks: cost of calling js function which calls cpp function: - // const CPP function with a variant return value and multiple integer arguments. - f = QString(SRCDIR + QLatin1String("/data/scopeSwitching/JsToCppNine.qml")); - QTest::newRow("cpp-to-js-to-cpp: const, variant retn, int args") << f << QString(QLatin1String("callCppFunction")); - - // Benchmarks: cost of calling js function which calls cpp function: - // nonconst CPP function with a variant return value and multiple integer arguments. - f = QString(SRCDIR + QLatin1String("/data/scopeSwitching/JsToCppTen.qml")); - QTest::newRow("cpp-to-js-to-cpp: nonconst, variant retn, int args") << f << QString(QLatin1String("callCppFunction")); - - // Benchmarks: cost of calling js function which calls cpp function: - // nonconst CPP function with a variant return value and multiple integer arguments. - f = QString(SRCDIR + QLatin1String("/data/scopeSwitching/JsToCppEleven.qml")); - QTest::newRow("cpp-to-js-to-cpp: nonconst, variant retn, variant + int args") << f << QString(QLatin1String("callCppFunction")); - - // Benchmarks: calling js function which copies scarce resources by calling back into cpp scope - f = QString(SRCDIR + QLatin1String("/data/scopeSwitching/ScarceOne.qml")); - QTest::newRow("cpp-to-js-to-coo: copy scarce resources") << f << QString(QLatin1String("copyScarceResources")); -} - - -void tst_holistic::cppToJsDirect() -{ - // This function benchmarks the cost of calling from CPP scope to JS scope - // (and possibly vice versa, if the invoked js method then calls to cpp). - - QFETCH(QString, file); - QFETCH(QString, methodName); - - QDeclarativeComponent c(&engine, file); - QObject *obj = c.create(); - - QBENCHMARK { - QMetaObject::invokeMethod(obj, methodName.toLatin1().constData()); - } - - delete obj; -} - - -void tst_holistic::cppToJsIndirect() -{ - // This function benchmarks the cost of binding scarce resources - // to properties of a QML component. The engine should automatically release such - // resources when they are no longer used. - // The benchmark deliberately causes change signals to be emitted (and - // modifies the scarce resources) so that the properties are updated. - - QDeclarativeComponent c(&engine, QString(SRCDIR + QLatin1String("/data/scopeSwitching/ScarceTwo.qml"))); - QObject *obj = c.create(); - - ScarceResourceProvider *srp = 0; - srp = qobject_cast<ScarceResourceProvider*>(QDeclarativeProperty::read(obj, "a").value<QObject*>()); - - QBENCHMARK { - srp->changeResources(); // will cause small+large scarce resources changed signals to be emitted. - } - - delete obj; -} - - - - - -void tst_holistic::typeResolution_data() -{ - QTest::addColumn<QString>("file"); - QTest::addColumn<PropertyNameList>("propertyNameOne"); - QTest::addColumn<PropertyValueList>("propertyValueOne"); - QTest::addColumn<PropertyNameList>("propertyNameTwo"); - QTest::addColumn<PropertyValueList>("propertyValueTwo"); - QTest::addColumn<int>("repetitions"); - - QString f; - PropertyNameList pn1; - PropertyValueList pv1; - PropertyNameList pn2; - PropertyValueList pv2; - - // Benchmarks: resolving nested ids and types, no caching - f = QString(SRCDIR + QLatin1String("/data/resolutionTargets/ResolveOne.qml")); - pn1 << QString(QLatin1String("baseWidth")) << QString(QLatin1String("baseHeight")) << QString(QLatin1String("baseColor")); - pv1 << QVariant(401) << QVariant(402) << QVariant(QString(QLatin1String("brown"))); - pn2 << QString(QLatin1String("baseWidth")) << QString(QLatin1String("baseHeight")) << QString(QLatin1String("baseColor")); - pv2 << QVariant(403) << QVariant(404) << QVariant(QString(QLatin1String("orange"))); - QTest::newRow("nested id resolution") << f << pn1 << pv1 << pn2 << pv2 << 1; - - // Benchmarks: resolving nested ids and types, 10 reps with caching - QTest::newRow("nested id resolution, cached") << f << pn1 << pv1 << pn2 << pv2 << 10; - pn1.clear(); pn2.clear(); pv1.clear(); pv2.clear(); -} - -void tst_holistic::typeResolution() -{ - // This function benchmarks the cost of "continued operation" (signal invocation, - // updating bindings, etc) where the component has lots of nested items with - // lots of resolving required. Note that we take two different writeValues in order - // to force updates to occur. - - QFETCH(QString, file); - QFETCH(PropertyNameList, propertyNameOne); - QFETCH(PropertyValueList, propertyValueOne); - QFETCH(PropertyNameList, propertyNameTwo); - QFETCH(PropertyValueList, propertyValueTwo); - QFETCH(int, repetitions); - - Q_ASSERT(propertyNameOne.size() == propertyValueOne.size()); - Q_ASSERT(propertyNameTwo.size() == propertyValueTwo.size()); - Q_ASSERT(repetitions > 0); - - QDeclarativeComponent c(&engine, file); - QObject *obj = c.create(); - - PropertyNameList writeProperty; - PropertyValueList writeValue; - bool usedFirst = false; - - QBENCHMARK { - for (int i = 0; i < repetitions; ++i) { - if (usedFirst) { - writeProperty = propertyNameOne; - writeValue = propertyValueOne; - usedFirst = false; - } else { - writeProperty = propertyNameTwo; - writeValue = propertyValueTwo; - usedFirst = true; - } - - for (int j = 0; j < writeProperty.size(); ++j) { - obj->setProperty(writeProperty.at(j).toAscii().constData(), writeValue.at(j)); - } - } - } - - delete obj; -} - - -QTEST_MAIN(tst_holistic) - -#include "tst_holistic.moc" diff --git a/tests/benchmarks/declarative/javascript/data/NestedIdObject.qml b/tests/benchmarks/declarative/javascript/data/NestedIdObject.qml deleted file mode 100644 index 753d547ace..0000000000 --- a/tests/benchmarks/declarative/javascript/data/NestedIdObject.qml +++ /dev/null @@ -1,9 +0,0 @@ -import QtQuick 2.0 - -QtObject { - function runtest() { - for (var ii = 0; ii < 5000000; ++ii) { - root - } - } -} diff --git a/tests/benchmarks/declarative/javascript/data/intQObjectProperty.qml b/tests/benchmarks/declarative/javascript/data/intQObjectProperty.qml deleted file mode 100644 index c3e6ebc16a..0000000000 --- a/tests/benchmarks/declarative/javascript/data/intQObjectProperty.qml +++ /dev/null @@ -1,13 +0,0 @@ -import Qt.test 1.0 - -TestObject { - id: root - - function runtest() { - var r = root; - - for (var ii = 0; ii < 5000000; ++ii) { - r.intValue - } - } -} diff --git a/tests/benchmarks/declarative/javascript/data/localId.qml b/tests/benchmarks/declarative/javascript/data/localId.qml deleted file mode 100644 index d42b891092..0000000000 --- a/tests/benchmarks/declarative/javascript/data/localId.qml +++ /dev/null @@ -1,13 +0,0 @@ -// Benchmarks the cost of accessing an id in the same file as the script. - -import QtQuick 2.0 - -QtObject { - id: root - - function runtest() { - for (var ii = 0; ii < 5000000; ++ii) { - root - } - } -} diff --git a/tests/benchmarks/declarative/javascript/data/nestedId.qml b/tests/benchmarks/declarative/javascript/data/nestedId.qml deleted file mode 100644 index 538699d452..0000000000 --- a/tests/benchmarks/declarative/javascript/data/nestedId.qml +++ /dev/null @@ -1,13 +0,0 @@ -// Benchmarks the cost of accessing an id in a parent context of the script. - -import QtQuick 2.0 - -QtObject { - id: root - - property variant object: NestedIdObject {} - function runtest() { - object.runtest(); - } -} - diff --git a/tests/benchmarks/declarative/javascript/data/stringQObjectProperty.qml b/tests/benchmarks/declarative/javascript/data/stringQObjectProperty.qml deleted file mode 100644 index ccd8a791b6..0000000000 --- a/tests/benchmarks/declarative/javascript/data/stringQObjectProperty.qml +++ /dev/null @@ -1,14 +0,0 @@ -import Qt.test 1.0 - -TestObject { - id: root - - function runtest() { - var r = root; - - for (var ii = 0; ii < 5000000; ++ii) { - r.stringValue - } - } -} - diff --git a/tests/benchmarks/declarative/javascript/javascript.pro b/tests/benchmarks/declarative/javascript/javascript.pro deleted file mode 100644 index 8026540309..0000000000 --- a/tests/benchmarks/declarative/javascript/javascript.pro +++ /dev/null @@ -1,11 +0,0 @@ -CONFIG += testcase -TEMPLATE = app -TARGET = tst_javascript -QT += declarative testlib -macx:CONFIG -= app_bundle - -SOURCES += tst_javascript.cpp testtypes.cpp -HEADERS += testtypes.h - -# Define SRCDIR equal to test's source directory -DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/benchmarks/declarative/javascript/testtypes.cpp b/tests/benchmarks/declarative/javascript/testtypes.cpp deleted file mode 100644 index 0ba82a495d..0000000000 --- a/tests/benchmarks/declarative/javascript/testtypes.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "testtypes.h" -#include <QtDeclarative/qdeclarative.h> - -void registerTypes() -{ - qmlRegisterType<TestObject>("Qt.test", 1,0, "TestObject"); -} diff --git a/tests/benchmarks/declarative/javascript/testtypes.h b/tests/benchmarks/declarative/javascript/testtypes.h deleted file mode 100644 index 91be9078ed..0000000000 --- a/tests/benchmarks/declarative/javascript/testtypes.h +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef TESTTYPES_H -#define TESTTYPES_H - -#include <QtCore/qobject.h> - -class TestObject : public QObject -{ - Q_OBJECT - Q_PROPERTY(int intValue READ intValue); - Q_PROPERTY(QString stringValue READ stringValue); - -public: - TestObject() : m_string("Hello world!") {} - - int intValue() const { return 13; } - QString stringValue() const { return m_string; } - -private: - QString m_string; -}; - -void registerTypes(); - -#endif // TESTTYPES_H diff --git a/tests/benchmarks/declarative/javascript/tst_javascript.cpp b/tests/benchmarks/declarative/javascript/tst_javascript.cpp deleted file mode 100644 index f27c7e5b73..0000000000 --- a/tests/benchmarks/declarative/javascript/tst_javascript.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QDir> -#include <QDebug> -#include <qtest.h> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> - -#include "testtypes.h" - -class tst_javascript : public QObject -{ - Q_OBJECT - -public: - tst_javascript(); - virtual ~tst_javascript(); - -private slots: - void run_data(); - void run(); - -private: - QDeclarativeEngine engine; -}; - -tst_javascript::tst_javascript() -{ - registerTypes(); -} - -tst_javascript::~tst_javascript() -{ -} - -void tst_javascript::run_data() -{ - QTest::addColumn<QString>("file"); - - QDir dir(SRCDIR "/data"); - - QStringList files = dir.entryList(QDir::Files | QDir::NoDotAndDotDot); - - for (int ii = 0; ii < files.count(); ++ii) { - QString file = files.at(ii); - if (file.endsWith(".qml") && file.at(0).isLower()) { - - QString testName = file.left(file.length() - 4 /* strlen(".qml") */); - QString fileName = QLatin1String(SRCDIR) + QLatin1String("/data/") + file; - - - QTest::newRow(qPrintable(testName)) << fileName; - - } - } -} - -void tst_javascript::run() -{ - QFETCH(QString, file); - - QDeclarativeComponent c(&engine, file); - - if (c.isError()) { - qWarning() << c.errors(); - } - - QVERIFY(!c.isError()); - - QObject *o = c.create(); - QVERIFY(o != 0); - - QMetaMethod method = o->metaObject()->method(o->metaObject()->indexOfMethod("runtest()")); - - QBENCHMARK { - method.invoke(o); - } - - delete o; -} - -QTEST_MAIN(tst_javascript) - -#include "tst_javascript.moc" diff --git a/tests/benchmarks/declarative/js/js.pro b/tests/benchmarks/declarative/js/js.pro deleted file mode 100644 index b1448d8eb8..0000000000 --- a/tests/benchmarks/declarative/js/js.pro +++ /dev/null @@ -1,10 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS = \ - qjsengine \ - qjsvalue \ - qjsvalueiterator \ - -TRUSTED_BENCHMARKS += \ - qjsvalue \ - qjsengine \ - diff --git a/tests/benchmarks/declarative/js/qjsengine/qjsengine.pro b/tests/benchmarks/declarative/js/qjsengine/qjsengine.pro deleted file mode 100644 index f04da8ec95..0000000000 --- a/tests/benchmarks/declarative/js/qjsengine/qjsengine.pro +++ /dev/null @@ -1,7 +0,0 @@ -CONFIG += testcase -TEMPLATE = app -TARGET = tst_bench_qjsengine - -SOURCES += tst_qjsengine.cpp - -QT += declarative testlib diff --git a/tests/benchmarks/declarative/js/qjsengine/tst_qjsengine.cpp b/tests/benchmarks/declarative/js/qjsengine/tst_qjsengine.cpp deleted file mode 100644 index c7011e40a0..0000000000 --- a/tests/benchmarks/declarative/js/qjsengine/tst_qjsengine.cpp +++ /dev/null @@ -1,600 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <qtest.h> -#include <QtDeclarative/qjsvalue.h> -#include <QtDeclarative/qjsengine.h> - - -Q_DECLARE_METATYPE(QJSValue) - -class tst_QJSEngine : public QObject -{ - Q_OBJECT - -public: - tst_QJSEngine(); - virtual ~tst_QJSEngine(); - -public slots: - void init(); - void cleanup(); - -private slots: - void constructor(); -#if 0 // No defaultPrototype for now - void defaultPrototype(); - void setDefaultPrototype(); -#endif - void evaluate_data(); - void evaluate(); -#if 0 // No program - void evaluateProgram_data(); - void evaluateProgram(); -#endif -#if 0 // no connections for now - void connectAndDisconnect(); -#endif - void globalObject(); - void hasUncaughtException(); -#if 0 // no is Evaluating for now - void isEvaluating(); -#endif - void newArray_data(); - void newArray(); - void newDate(); - void newObject(); -#if 0 // No ScriptClass - void newObjectWithScriptClass(); -#endif -#if 0 // no qmetaobject - void newQMetaObject(); -#endif - void newQObject(); -#if 0 // no native functions for now - void newFunction(); -#endif - void newRegExp(); - void newVariant(); - void undefinedValue(); - void collectGarbage(); -#if 0 // No extensions - void availableExtensions(); - void importedExtensions(); -#endif -#if 0 // no context - void currentContext(); - void pushAndPopContext(); -#endif -#if 0 // no stringhandle - void toStringHandle(); -#endif - void castValueToQreal(); -#if 0 // no native functions for now - void nativeCall(); -#endif -#if 0 // no translations - void installTranslatorFunctions(); - void translation_data(); - void translation(); -#endif -#if 0 // no declarative class - void readScopeProperty_data(); - void readScopeProperty(); -#endif -#if 0 // no context - void evaluateInNewContext(); - void evaluateInNewContextWithScope(); -#endif -#if 0 // no pushScope - void evaluateBindingExpression(); -#endif - -private: - void defineStandardTestValues(); - void newEngine() - { - delete m_engine; - m_engine = new QJSEngine; - } - - QJSEngine *m_engine; -}; - -tst_QJSEngine::tst_QJSEngine() - : m_engine(0) -{ -} - -tst_QJSEngine::~tst_QJSEngine() -{ - delete m_engine; -} - -void tst_QJSEngine::init() -{ -} - -void tst_QJSEngine::cleanup() -{ -} - -void tst_QJSEngine::constructor() -{ - QBENCHMARK { - QJSEngine engine; - (void)engine.parent(); - } -} - -#if 0 // No defaultPrototype for now -void tst_QJSEngine::defaultPrototype() -{ - newEngine(); - int type = qMetaTypeId<int>(); - m_engine->setDefaultPrototype(type, m_engine->newObject()); - QBENCHMARK { - m_engine->defaultPrototype(type); - } -} - -void tst_QJSEngine::setDefaultPrototype() -{ - newEngine(); - int type = qMetaTypeId<int>(); - QJSValue proto = m_engine->newObject(); - QBENCHMARK { - m_engine->setDefaultPrototype(type, proto); - } -} - -#endif - -void tst_QJSEngine::evaluate_data() -{ - QTest::addColumn<QString>("code"); - QTest::newRow("empty script") << QString::fromLatin1(""); - QTest::newRow("number literal") << QString::fromLatin1("123"); - QTest::newRow("string literal") << QString::fromLatin1("'ciao'"); - QTest::newRow("regexp literal") << QString::fromLatin1("/foo/gim"); - QTest::newRow("null literal") << QString::fromLatin1("null"); - QTest::newRow("undefined literal") << QString::fromLatin1("undefined"); - QTest::newRow("null literal") << QString::fromLatin1("null"); - QTest::newRow("empty object literal") << QString::fromLatin1("{}"); - QTest::newRow("this") << QString::fromLatin1("this"); - QTest::newRow("object literal with one property") << QString::fromLatin1("{ foo: 123 }"); - QTest::newRow("object literal with two properties") << QString::fromLatin1("{ foo: 123, bar: 456 }"); - QTest::newRow("object literal with many properties") << QString::fromLatin1("{ a: 1, b: 2, c: 3, d: 4, e: 5, f: 6, g: 7, h: 8, i: 9, j: 10 }"); - QTest::newRow("empty array literal") << QString::fromLatin1("[]"); - QTest::newRow("array literal with one element") << QString::fromLatin1("[1]"); - QTest::newRow("array literal with two elements") << QString::fromLatin1("[1,2]"); - QTest::newRow("array literal with many elements") << QString::fromLatin1("[1,2,3,4,5,6,7,8,9,10,9,8,7,6,5,4,3,2,1]"); - QTest::newRow("empty function definition") << QString::fromLatin1("function foo() { }"); - QTest::newRow("function definition") << QString::fromLatin1("function foo() { return 123; }"); - QTest::newRow("for loop with empty body (1000 iterations)") << QString::fromLatin1("for (i = 0; i < 1000; ++i) {}"); - QTest::newRow("for loop with empty body (10000 iterations)") << QString::fromLatin1("for (i = 0; i < 10000; ++i) {}"); - QTest::newRow("for loop with empty body (100000 iterations)") << QString::fromLatin1("for (i = 0; i < 100000; ++i) {}"); - QTest::newRow("for loop with empty body (1000000 iterations)") << QString::fromLatin1("for (i = 0; i < 1000000; ++i) {}"); - QTest::newRow("for loop (1000 iterations)") << QString::fromLatin1("j = 0; for (i = 0; i < 1000; ++i) { j += i; }; j"); - QTest::newRow("for loop (10000 iterations)") << QString::fromLatin1("j = 0; for (i = 0; i < 10000; ++i) { j += i; }; j"); - QTest::newRow("for loop (100000 iterations)") << QString::fromLatin1("j = 0; for (i = 0; i < 100000; ++i) { j += i; }; j"); - QTest::newRow("for loop (1000000 iterations)") << QString::fromLatin1("j = 0; for (i = 0; i < 1000000; ++i) { j += i; }; j"); - QTest::newRow("assignments") << QString::fromLatin1("a = 1; b = 2; c = 3; d = 4"); - QTest::newRow("while loop (1000 iterations)") << QString::fromLatin1("i = 0; while (i < 1000) { ++i; }; i"); - QTest::newRow("while loop (10000 iterations)") << QString::fromLatin1("i = 0; while (i < 10000) { ++i; }; i"); - QTest::newRow("while loop (100000 iterations)") << QString::fromLatin1("i = 0; while (i < 100000) { ++i; }; i"); - QTest::newRow("while loop (1000000 iterations)") << QString::fromLatin1("i = 0; while (i < 1000000) { ++i; }; i"); - QTest::newRow("function expression") << QString::fromLatin1("(function(a, b, c){ return a + b + c; })(1, 2, 3)"); -} - -void tst_QJSEngine::evaluate() -{ - QFETCH(QString, code); - newEngine(); - - QBENCHMARK { - (void)m_engine->evaluate(code); - } -} - -#if 0 -void tst_QJSEngine::connectAndDisconnect() -{ - newEngine(); - QJSValue fun = m_engine->evaluate("(function() { })"); - QBENCHMARK { - qScriptConnect(m_engine, SIGNAL(destroyed()), QJSValue(), fun); - qScriptDisconnect(m_engine, SIGNAL(destroyed()), QJSValue(), fun); - } -} - -void tst_QJSEngine::evaluateProgram_data() -{ - evaluate_data(); -} - -void tst_QJSEngine::evaluateProgram() -{ - QFETCH(QString, code); - QScriptProgram program(code); - newEngine(); - - QBENCHMARK { - (void)m_engine->evaluate(program); - } -} -#endif - -void tst_QJSEngine::globalObject() -{ - newEngine(); - QBENCHMARK { - m_engine->globalObject(); - } -} - -void tst_QJSEngine::hasUncaughtException() -{ - newEngine(); - QBENCHMARK { - m_engine->hasUncaughtException(); - } -} - -#if 0 -void tst_QJSEngine::isEvaluating() -{ - newEngine(); - QBENCHMARK { - m_engine->isEvaluating(); - } -} -#endif - -void tst_QJSEngine::newArray_data() -{ - QTest::addColumn<int>("size"); - QTest::newRow("size=0") << 0; - QTest::newRow("size=10") << 10; - QTest::newRow("size=100") << 0; - QTest::newRow("size=1000") << 0; - QTest::newRow("size=10000") << 0; - QTest::newRow("size=50000") << 0; -} - -void tst_QJSEngine::newArray() -{ - QFETCH(int, size); - newEngine(); - QBENCHMARK { - m_engine->newArray(size); - } -} - -void tst_QJSEngine::newDate() -{ - newEngine(); - QDateTime dt = QDateTime::currentDateTime(); - QBENCHMARK { - m_engine->toScriptValue(dt); - } -} - -void tst_QJSEngine::newObject() -{ - newEngine(); - QBENCHMARK { - (void)m_engine->newObject(); - } -} - -#if 0 -void tst_QJSEngine::newObjectWithScriptClass() -{ - newEngine(); - QScriptClass cls(m_engine); - QBENCHMARK { - m_engine->newObject(&cls); - } -} - -void tst_QJSEngine::newQMetaObject() -{ - newEngine(); - QBENCHMARK { - m_engine->newQMetaObject(&QJSEngine::staticMetaObject); - } -} -#endif - -void tst_QJSEngine::newQObject() -{ - newEngine(); - QBENCHMARK { - (void)m_engine->newQObject(QCoreApplication::instance()); - } -} - -#if 0 -static QJSValue testFunction(QScriptContext *, QJSEngine *) -{ - return 0; -} - -void tst_QJSEngine::newFunction() -{ - newEngine(); - QBENCHMARK { - (void)m_engine->newFunction(testFunction); - } -} -#endif - -void tst_QJSEngine::newRegExp() -{ - newEngine(); - QRegExp re = QRegExp("foo"); - QBENCHMARK { - m_engine->toScriptValue(re); - } -} - -void tst_QJSEngine::newVariant() -{ - newEngine(); - QVariant var(QPoint(10, 20)); - QBENCHMARK { - (void)m_engine->toScriptValue(var); - } -} - -void tst_QJSEngine::undefinedValue() -{ - newEngine(); - QVariant var; - QBENCHMARK { - m_engine->toScriptValue(var); - } -} - -void tst_QJSEngine::collectGarbage() -{ - newEngine(); - QBENCHMARK { - m_engine->collectGarbage(); - } -} - -#if 0 -void tst_QJSEngine::availableExtensions() -{ - newEngine(); - QBENCHMARK { - m_engine->availableExtensions(); - } -} - -void tst_QJSEngine::importedExtensions() -{ - newEngine(); - QBENCHMARK { - m_engine->importedExtensions(); - } -} - -void tst_QJSEngine::currentContext() -{ - newEngine(); - QBENCHMARK { - m_engine->currentContext(); - } -} - -void tst_QJSEngine::pushAndPopContext() -{ - newEngine(); - QBENCHMARK { - (void)m_engine->pushContext(); - m_engine->popContext(); - } -} -#endif - -#if 0 -void tst_QJSEngine::toStringHandle() -{ - newEngine(); - QString str = QString::fromLatin1("foobarbaz"); - QBENCHMARK { - (void)m_engine->toStringHandle(str); - } -} -#endif - -void tst_QJSEngine::castValueToQreal() -{ - QJSValue val(123); - QBENCHMARK { - (void)qjsvalue_cast<qreal>(val); - } -} - -#if 0 -static QJSValue native_function(QScriptContext *, QJSEngine *) -{ - return 42; -} - -void tst_QJSEngine::nativeCall() -{ - newEngine(); - m_engine->globalObject().setProperty("fun", m_engine->newFunction(native_function)); - QBENCHMARK{ - m_engine->evaluate("var w = 0; for (i = 0; i < 100000; ++i) {\n" - " w += fun() + fun(); w -= fun(); fun(); w -= fun(); }"); - } -} - -void tst_QJSEngine::installTranslatorFunctions() -{ - newEngine(); - QBENCHMARK { - m_engine->installTranslatorFunctions(); - } -} - -void tst_QJSEngine::translation_data() -{ - QTest::addColumn<QString>("text"); - QTest::addColumn<QString>("fileName"); - QTest::newRow("no translation") << "\"hello world\"" << ""; - QTest::newRow("qsTr") << "qsTr(\"hello world\")" << ""; - QTest::newRow("qsTranslate") << "qsTranslate(\"\", \"hello world\")" << ""; - QTest::newRow("qsTr:script.js") << "qsTr(\"hello world\")" << "script.js"; -} - -void tst_QJSEngine::translation() -{ - QFETCH(QString, text); - QFETCH(QString, fileName); - newEngine(); - m_engine->installTranslatorFunctions(); - - QBENCHMARK { - (void)m_engine->evaluate(text, fileName); - } -} -#endif - -#if 0 -void tst_QJSEngine::readScopeProperty_data() -{ - QTest::addColumn<bool>("staticScope"); - QTest::addColumn<bool>("nestedScope"); - QTest::newRow("single dynamic scope") << false << false; - QTest::newRow("single static scope") << true << false; - QTest::newRow("double dynamic scope") << false << true; - QTest::newRow("double static scope") << true << true; -} - -void tst_QJSEngine::readScopeProperty() -{ - QFETCH(bool, staticScope); - QFETCH(bool, nestedScope); - - newEngine(); - QScriptContext *ctx = m_engine->pushContext(); - - QJSValue scope; - if (staticScope) - scope = QScriptDeclarativeClass::newStaticScopeObject(m_engine); - else - scope = m_engine->newObject(); - scope.setProperty("foo", 123); - ctx->pushScope(scope); - - if (nestedScope) { - QJSValue scope2; - if (staticScope) - scope2 = QScriptDeclarativeClass::newStaticScopeObject(m_engine); - else - scope2 = m_engine->newObject(); - scope2.setProperty("bar", 456); // ensure a miss in inner scope - ctx->pushScope(scope2); - } - - QJSValue fun = m_engine->evaluate("(function() {\n" - " for (var i = 0; i < 10000; ++i) {\n" - " foo; foo; foo; foo; foo; foo; foo; foo;\n" - " }\n" - "})"); - m_engine->popContext(); - QVERIFY(fun.isFunction()); - QBENCHMARK { - fun.call(); - } -} - -void tst_QJSEngine::evaluateInNewContext() -{ - QJSEngine engine; - QBENCHMARK { - engine.pushContext(); - engine.evaluate("var a = 10"); - engine.popContext(); - } -} - -void tst_QJSEngine::evaluateInNewContextWithScope() -{ - QJSEngine engine; - QJSValue scope = engine.newObject(); - scope.setProperty("foo", 123); - QBENCHMARK { - QScriptContext *ctx = engine.pushContext(); - ctx->pushScope(scope); - engine.evaluate("foo"); - engine.popContext(); - } -} - -// Binding expressions in QML are implemented as anonymous functions -// with custom scopes. -void tst_QJSEngine::evaluateBindingExpression() -{ - QJSEngine engine; - QScriptContext *ctx = engine.pushContext(); - QJSValue scope = engine.newObject(); - scope.setProperty("foo", 123); - ctx->pushScope(scope); - QJSValue fun = engine.evaluate("(function() { return foo; })"); - QVERIFY(fun.isFunction()); - engine.popContext(); - QVERIFY(fun.call().equals(scope.property("foo"))); - QJSValue receiver = engine.globalObject(); - QBENCHMARK { - fun.call(receiver); - } -} -#endif - -QTEST_MAIN(tst_QJSEngine) -#include "tst_qjsengine.moc" diff --git a/tests/benchmarks/declarative/js/qjsvalue/qjsvalue.pro b/tests/benchmarks/declarative/js/qjsvalue/qjsvalue.pro deleted file mode 100644 index 2dc917d3aa..0000000000 --- a/tests/benchmarks/declarative/js/qjsvalue/qjsvalue.pro +++ /dev/null @@ -1,7 +0,0 @@ -CONFIG += testcase -TEMPLATE = app -TARGET = tst_bench_qjsvalue - -SOURCES += tst_qjsvalue.cpp - -QT += declarative testlib diff --git a/tests/benchmarks/declarative/js/qjsvalue/tst_qjsvalue.cpp b/tests/benchmarks/declarative/js/qjsvalue/tst_qjsvalue.cpp deleted file mode 100644 index 4c085ab437..0000000000 --- a/tests/benchmarks/declarative/js/qjsvalue/tst_qjsvalue.cpp +++ /dev/null @@ -1,979 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <qtest.h> -#include <QtDeclarative/qjsvalue.h> -#include <QtDeclarative/qjsengine.h> - -Q_DECLARE_METATYPE(QJSValue) - -class tst_QJSValue : public QObject -{ - Q_OBJECT - -public: - tst_QJSValue(); - virtual ~tst_QJSValue(); - -public slots: - void init(); - void cleanup(); - -private slots: - void boolConstructor(); - void floatConstructor(); - void numberConstructor(); - void stringConstructor(); - void nullConstructor(); - void undefinedConstructor(); - void boolConstructorWithEngine(); - void floatConstructorWithEngine(); - void intConstructorWithEngine(); - void stringConstructorWithEngine(); - void undefinedConstructorWithEngine(); - void copyConstructor_data(); - void copyConstructor(); - void call_data(); - void call(); - void construct_data(); - void construct(); -#if 0 // no data - void data(); - void setData(); - void data_noData_data(); - void data_noData(); -#endif - void equalsSelf_data(); - void equalsSelf(); -#if 0 // no less then - void lessThanSelf_data(); - void lessThanSelf(); -#endif - void strictlyEqualsSelf_data(); - void strictlyEqualsSelf(); - void isArray_data(); - void isArray(); - void isBool_data(); - void isBool(); - void isDate_data(); - void isDate(); - void isError_data(); - void isError(); - void isCallable_data(); - void isCallable(); - void isNull_data(); - void isNull(); - void isNumber_data(); - void isNumber(); - void isObject_data(); - void isObject(); -#if 0 // no qmetaobject - void isQMetaObject_data(); - void isQMetaObject(); -#endif - void isQObject_data(); - void isQObject(); - void isRegExp_data(); - void isRegExp(); - void isString_data(); - void isString(); - void isUndefined_data(); - void isUndefined(); - void isVariant_data(); - void isVariant(); - void toBool_data(); - void toBool(); - void toDateTime_data(); - void toDateTime(); - void toInt_data(); - void toInt(); - void toNumber_data(); - void toNumber(); - void toRegExp_data(); - void toRegExp(); - void toString_data(); - void toString(); - void toUInt_data(); - void toUInt(); -#if 0 // no qmetaobject - void toQMetaObject_data(); - void toQMetaObject(); -#endif - void toQObject_data(); - void toQObject(); - void toVariant_data(); - void toVariant(); - void property_data(); - void property(); -#if 0 // no string handle - void propertyById_data(); - void propertyById(); -#endif - void propertyByIndex(); - void setProperty_data(); - void setProperty(); -#if 0 // no string handle - void setPropertyById_data(); - void setPropertyById(); -#endif - void setPropertyByIndex(); -#if 0 // no propertyFlags for now - void propertyFlags_data(); - void propertyFlags(); - void propertyFlagsById_data(); - void propertyFlagsById(); -#endif - void prototype_data(); - void prototype(); - void setPrototype(); -#if 0 // no script class - void scriptClass_data(); - void scriptClass(); - void setScriptClass(); -#endif -#if 0 // no string handle - void readMetaProperty(); - void writeMetaProperty(); -#endif - -private: - void defineStandardTestValues(); - void newEngine() - { - delete m_engine; - m_engine = new QJSEngine; - } - - QJSEngine *m_engine; -}; - -tst_QJSValue::tst_QJSValue() - : m_engine(0) -{ -} - -tst_QJSValue::~tst_QJSValue() -{ - delete m_engine; -} - -void tst_QJSValue::init() -{ -} - -void tst_QJSValue::cleanup() -{ -} - -void tst_QJSValue::boolConstructor() -{ - QBENCHMARK { - QJSValue val(true); - } -} - -void tst_QJSValue::floatConstructor() -{ - QBENCHMARK { - QJSValue val(123.0); - } -} - -void tst_QJSValue::numberConstructor() -{ - QBENCHMARK { - (void)QJSValue(123); - } -} - -void tst_QJSValue::stringConstructor() -{ - QString str = QString::fromLatin1("ciao"); - QBENCHMARK { - (void)QJSValue(str); - } -} - -void tst_QJSValue::nullConstructor() -{ - QBENCHMARK { - QJSValue val(QJSValue::NullValue); - } -} - -void tst_QJSValue::undefinedConstructor() -{ - QBENCHMARK { - QJSValue val(QJSValue::UndefinedValue); - } -} - -void tst_QJSValue::boolConstructorWithEngine() -{ - newEngine(); - QBENCHMARK { - m_engine->toScriptValue(true); - } -} - -void tst_QJSValue::floatConstructorWithEngine() -{ - newEngine(); - QBENCHMARK { - m_engine->toScriptValue(123.0); - } -} - -void tst_QJSValue::intConstructorWithEngine() -{ - newEngine(); - QBENCHMARK { - m_engine->toScriptValue(123); - } -} - -void tst_QJSValue::stringConstructorWithEngine() -{ - newEngine(); - QString str = QString::fromLatin1("ciao"); - QBENCHMARK { - m_engine->toScriptValue(str); - } -} - -void tst_QJSValue::undefinedConstructorWithEngine() -{ - newEngine(); - QVariant var; - QBENCHMARK { - m_engine->toScriptValue(var); - } -} - -void tst_QJSValue::copyConstructor_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::copyConstructor() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - QJSValue copy(val); - } -} - -void tst_QJSValue::call_data() -{ - newEngine(); - QTest::addColumn<QString>("code"); - QTest::newRow("empty function") << QString::fromLatin1("(function(){})"); - QTest::newRow("function returning number") << QString::fromLatin1("(function(){ return 123; })"); - QTest::newRow("closure") << QString::fromLatin1("(function(a, b){ return function() { return a + b; }; })(1, 2)"); -} - -void tst_QJSValue::call() -{ - QFETCH(QString, code); - QJSValue fun = m_engine->evaluate(code); - QVERIFY(fun.isCallable()); - QBENCHMARK { - (void)fun.call(); - } -} - -void tst_QJSValue::construct_data() -{ - newEngine(); - QTest::addColumn<QString>("code"); - QTest::newRow("empty function") << QString::fromLatin1("(function(){})"); - QTest::newRow("simple constructor") << QString::fromLatin1("(function(){ this.x = 10; this.y = 20; })"); -} - -void tst_QJSValue::construct() -{ - QFETCH(QString, code); - QJSValue fun = m_engine->evaluate(code); - QVERIFY(fun.isCallable()); - QBENCHMARK { - (void)fun.callAsConstructor(); - } -} - -#if 0 -void tst_QJSValue::data() -{ - newEngine(); - QJSValue obj = m_engine->newObject(); - obj.setData(QJSValue(m_engine, 123)); - QBENCHMARK { - obj.data(); - } -} - -void tst_QJSValue::setData() -{ - newEngine(); - QJSValue obj = m_engine->newObject(); - QJSValue val(m_engine, 123); - QBENCHMARK { - obj.setData(val); - } -} - -void tst_QJSValue::data_noData_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::data_noData() -{ - QFETCH(QJSValue, val); - QVERIFY(!val.data().isValid()); - QBENCHMARK { - val.data(); - } -} -#endif - -void tst_QJSValue::equalsSelf_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::equalsSelf() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.equals(val); - } -} - -#if 0 -void tst_QJSValue::lessThanSelf_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::lessThanSelf() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.lessThan(val); - } -} -#endif - -void tst_QJSValue::strictlyEqualsSelf_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::strictlyEqualsSelf() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.strictlyEquals(val); - } -} - -void tst_QJSValue::isArray_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::isArray() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.isArray(); - } -} - -void tst_QJSValue::isBool_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::isBool() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.isBool(); - } -} - -void tst_QJSValue::isDate_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::isDate() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.isDate(); - } -} - -void tst_QJSValue::isError_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::isError() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.isError(); - } -} - -void tst_QJSValue::isCallable_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::isCallable() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.isCallable(); - } -} - -void tst_QJSValue::isNull_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::isNull() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.isNull(); - } -} - -void tst_QJSValue::isNumber_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::isNumber() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.isNumber(); - } -} - -void tst_QJSValue::isObject_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::isObject() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.isObject(); - } -} - -#if 0 -void tst_QJSValue::isQMetaObject_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::isQMetaObject() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.isQMetaObject(); - } -} -#endif - -void tst_QJSValue::isQObject_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::isQObject() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.isQObject(); - } -} - -void tst_QJSValue::isRegExp_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::isRegExp() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.isRegExp(); - } -} - -void tst_QJSValue::isString_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::isString() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.isString(); - } -} - -void tst_QJSValue::isUndefined_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::isUndefined() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.isUndefined(); - } -} - -void tst_QJSValue::isVariant_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::isVariant() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.isVariant(); - } -} - -void tst_QJSValue::toBool_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::toBool() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.toBool(); - } -} - -void tst_QJSValue::toDateTime_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::toDateTime() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.toDateTime(); - } -} - -void tst_QJSValue::toInt_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::toInt() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.toInt(); - } -} - -void tst_QJSValue::toNumber_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::toNumber() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.toNumber(); - } -} - -void tst_QJSValue::toRegExp_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::toRegExp() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - qjsvalue_cast<QRegExp>(val); - } -} - -void tst_QJSValue::toString_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::toString() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - (void)val.toString(); - } -} - -#if 0 -void tst_QJSValue::toQMetaObject_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::toQMetaObject() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.toQMetaObject(); - } -} -#endif - -void tst_QJSValue::toQObject_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::toQObject() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - (void)val.toQObject(); - } -} - -void tst_QJSValue::toUInt_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::toUInt() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.toUInt(); - } -} - -void tst_QJSValue::toVariant_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::toVariant() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.toVariant(); - } -} -void tst_QJSValue::property_data() -{ - QTest::addColumn<QString>("propertyName"); - QTest::addColumn<bool>("create"); - QTest::newRow("foo") << QString::fromLatin1("foo") << true; - QTest::newRow("hasOwnProperty") << QString::fromLatin1("hasOwnProperty") << false; // From Object.prototype. - QTest::newRow("noSuchProperty") << QString::fromLatin1("noSuchProperty") << false; -} - -void tst_QJSValue::property() -{ - QFETCH(QString, propertyName); - QFETCH(bool, create); - newEngine(); - QJSValue obj = m_engine->newObject(); - if (create) - obj.setProperty(propertyName, 123); - QBENCHMARK { - (void)obj.property(propertyName); - } -} - -#if 0 -void tst_QJSValue::propertyById_data() -{ - property_data(); -} - -void tst_QJSValue::propertyById() -{ - QFETCH(QString, propertyName); - QFETCH(bool, create); - newEngine(); - QJSValue obj = m_engine->newObject(); - QJSString id = m_engine->toStringHandle(propertyName); - if (create) - obj.setProperty(id, 123); - QBENCHMARK { - obj.property(id); - } -} -#endif - -void tst_QJSValue::propertyByIndex() -{ - newEngine(); - QJSValue obj = m_engine->newObject(); - obj.setProperty(123, 456); - QBENCHMARK { - obj.property(123); - } -} - -void tst_QJSValue::setProperty_data() -{ - newEngine(); - QTest::addColumn<QString>("propertyName"); - QTest::addColumn<QJSValue>("val"); - QTest::newRow("foo") << QString::fromLatin1("foo") << QJSValue(123); - QTest::newRow("bar") << QString::fromLatin1("bar") << m_engine->toScriptValue(123); - QTest::newRow("baz") << QString::fromLatin1("baz") << QJSValue(); - QTest::newRow("toString") << QString::fromLatin1("toString") << m_engine->toScriptValue(true); -} - -void tst_QJSValue::setProperty() -{ - QFETCH(QString, propertyName); - QFETCH(QJSValue, val); - QJSValue obj = m_engine->newObject(); - QBENCHMARK { - obj.setProperty(propertyName, val); - } -} - -#if 0 -void tst_QJSValue::setPropertyById_data() -{ - setProperty_data(); -} - -void tst_QJSValue::setPropertyById() -{ - QFETCH(QString, propertyName); - QFETCH(QJSValue, val); - QJSValue obj = m_engine->newObject(); - QJSString id = m_engine->toStringHandle(propertyName); - QBENCHMARK { - obj.setProperty(id, val); - } -} -#endif - -void tst_QJSValue::setPropertyByIndex() -{ - newEngine(); - QJSValue obj = m_engine->newObject(); - QJSValue val(456); - QBENCHMARK { - obj.setProperty(123, 456); - } -} - -#if 0 -void tst_QJSValue::propertyFlags_data() -{ - property_data(); -} - -void tst_QJSValue::propertyFlags() -{ - QFETCH(QString, propertyName); - QFETCH(bool, create); - newEngine(); - QJSValue obj = m_engine->newObject(); - if (create) - obj.setProperty(propertyName, 123, QJSValue::SkipInEnumeration | QJSValue::ReadOnly); - QBENCHMARK { - (void)obj.propertyFlags(propertyName); - } -} - -void tst_QJSValue::propertyFlagsById_data() -{ - propertyFlags_data(); -} - -void tst_QJSValue::propertyFlagsById() -{ - QFETCH(QString, propertyName); - QFETCH(bool, create); - newEngine(); - QJSValue obj = m_engine->newObject(); - QJSString id = m_engine->toStringHandle(propertyName); - if (create) - obj.setProperty(id, 123, QJSValue::SkipInEnumeration | QJSValue::ReadOnly); - QBENCHMARK { - obj.propertyFlags(id); - } -} -#endif - -void tst_QJSValue::prototype_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::prototype() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.prototype(); - } -} - -void tst_QJSValue::setPrototype() -{ - newEngine(); - QJSValue obj = m_engine->newObject(); - QJSValue proto = m_engine->newObject(); - QBENCHMARK { - obj.setPrototype(proto); - } -} - -#if 0 -void tst_QJSValue::scriptClass_data() -{ - defineStandardTestValues(); -} - -void tst_QJSValue::scriptClass() -{ - QFETCH(QJSValue, val); - QBENCHMARK { - val.scriptClass(); - } -} - -void tst_QJSValue::setScriptClass() -{ - newEngine(); - QJSValue obj = m_engine->newObject(); - QJSClass cls(m_engine); - QBENCHMARK { - obj.setScriptClass(&cls); - } -} - -void tst_QJSValue::readMetaProperty() -{ - newEngine(); - QJSValue object = m_engine->newQObject(QCoreApplication::instance()); - QJSString propertyName = m_engine->toStringHandle("objectName"); - QBENCHMARK { - for (int i = 0; i < 10000; ++i) - object.property(propertyName); - } -} - -void tst_QJSValue::writeMetaProperty() -{ - newEngine(); - QJSValue object = m_engine->newQObject(QCoreApplication::instance()); - QJSString propertyName = m_engine->toStringHandle("objectName"); - QJSValue value(m_engine, "foo"); - QBENCHMARK { - for (int i = 0; i < 10000; ++i) - object.setProperty(propertyName, value); - } -} -#endif - -void tst_QJSValue::defineStandardTestValues() -{ - newEngine(); - QTest::addColumn<QJSValue>("val"); - QTest::newRow("bool") << m_engine->evaluate("true"); - QTest::newRow("number") << m_engine->evaluate("123"); - QTest::newRow("string") << m_engine->evaluate("'ciao'"); - QTest::newRow("null") << m_engine->evaluate("null"); - QTest::newRow("undefined") << m_engine->evaluate("undefined"); - QTest::newRow("object") << m_engine->evaluate("({foo:123})"); - QTest::newRow("array") << m_engine->evaluate("[10,20,30]"); - QTest::newRow("function") << m_engine->evaluate("(function foo(a, b, c) { return a + b + c; })"); - QTest::newRow("date") << m_engine->evaluate("new Date"); - QTest::newRow("regexp") << m_engine->evaluate("new RegExp('foo')"); - QTest::newRow("error") << m_engine->evaluate("new Error"); - - QTest::newRow("qobject") << m_engine->newQObject(this); -#if 0 // no qmetaobject - QTest::newRow("qmetaobject") << m_engine->newQMetaObject(&QJSEngine::staticMetaObject); -#endif - QTest::newRow("variant") << m_engine->toScriptValue(QPoint(10, 20)); -#if 0 // no classess - QTest::newRow("qscriptclassobject") << m_engine->newObject(new QJSClass(m_engine)); -#endif - - QTest::newRow("invalid") << QJSValue(); - QTest::newRow("bool-no-engine") << QJSValue(true); - QTest::newRow("number-no-engine") << QJSValue(123.0); - QTest::newRow("string-no-engine") << QJSValue(QString::fromLatin1("hello")); - QTest::newRow("null-no-engine") << QJSValue(QJSValue::NullValue); - QTest::newRow("undefined-no-engine") << QJSValue(QJSValue::UndefinedValue); -} - -QTEST_MAIN(tst_QJSValue) -#include "tst_qjsvalue.moc" diff --git a/tests/benchmarks/declarative/js/qjsvalueiterator/qjsvalueiterator.pro b/tests/benchmarks/declarative/js/qjsvalueiterator/qjsvalueiterator.pro deleted file mode 100644 index a15ceba9a4..0000000000 --- a/tests/benchmarks/declarative/js/qjsvalueiterator/qjsvalueiterator.pro +++ /dev/null @@ -1,7 +0,0 @@ -CONFIG += testcase -TEMPLATE = app -TARGET = tst_bench_qjsvalueiterator - -SOURCES += tst_qjsvalueiterator.cpp - -QT = core declarative testlib diff --git a/tests/benchmarks/declarative/js/qjsvalueiterator/tst_qjsvalueiterator.cpp b/tests/benchmarks/declarative/js/qjsvalueiterator/tst_qjsvalueiterator.cpp deleted file mode 100644 index f8426fbefb..0000000000 --- a/tests/benchmarks/declarative/js/qjsvalueiterator/tst_qjsvalueiterator.cpp +++ /dev/null @@ -1,309 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <qtest.h> -#include <QtDeclarative/qjsengine.h> -#include <QtDeclarative/qjsvalue.h> -#include <QtDeclarative/qjsvalueiterator.h> - -class tst_QJSValueIterator : public QObject -{ - Q_OBJECT - -public: - tst_QJSValueIterator(); - virtual ~tst_QJSValueIterator(); - - void dataHelper(); - -private slots: - void init(); - void cleanup(); - - void hasNextAndNext(); - - void constructAndNext_data(); - void constructAndNext(); - - void name_data(); - void name(); -#if 0 // No string handle - void scriptName_data(); - void scriptName(); -#endif - - void value_data(); - void value(); -#if 0 // no setValue - void setValue_data(); - void setValue(); -#endif -#if 0 // no flags - void flags(); -#endif - -#if 0 // no array index - void iterateArrayAndConvertNameToIndex(); -#endif -#if 0 // no setValue - void iterateArrayAndDoubleElements(); -#endif -#if 0 // no remove - void iterateArrayAndRemoveAllElements(); -#endif -}; - -tst_QJSValueIterator::tst_QJSValueIterator() -{ -} - -tst_QJSValueIterator::~tst_QJSValueIterator() -{ -} - -void tst_QJSValueIterator::init() -{ -} - -void tst_QJSValueIterator::cleanup() -{ -} - -void tst_QJSValueIterator::dataHelper() -{ - QTest::addColumn<QString>("code"); - QTest::newRow("{ foo: 123 }") << QString::fromLatin1("({ foo: 123 })"); - QTest::newRow("Math") << QString::fromLatin1("Math"); - QTest::newRow("Array.prototype") << QString::fromLatin1("Array.prototype"); - QTest::newRow("Global Object") << QString::fromLatin1("this"); - QTest::newRow("['foo']") << QString::fromLatin1("['foo']"); - QTest::newRow("array with 1000 elements") - << QString::fromLatin1("(function() {" - " var a = new Array;" - " for (i = 0; i < 1000; ++i)" - " a[i] = i;" - " return a;" - "})()"); -} - -void tst_QJSValueIterator::hasNextAndNext() -{ - QJSEngine engine; - QJSValue object = engine.newObject(); - for (int i = 0; i < 2000; ++i) - object.setProperty(i, i); - QBENCHMARK { - for (int i = 0; i < 1000; ++i) { - QJSValueIterator it(object); - while (it.hasNext()) - it.next(); - } - } -} - -void tst_QJSValueIterator::constructAndNext_data() -{ - dataHelper(); -} - -void tst_QJSValueIterator::constructAndNext() -{ - QFETCH(QString, code); - QJSEngine engine; - QJSValue object = engine.evaluate(code); - Q_ASSERT(object.isObject()); - - QBENCHMARK { - for (int i = 0; i < 100; ++i) { - QJSValueIterator it(object); - it.next(); - } - } -} - -void tst_QJSValueIterator::name_data() -{ - dataHelper(); -} - -void tst_QJSValueIterator::name() -{ - QFETCH(QString, code); - QJSEngine engine; - QJSValue object = engine.evaluate(code); - Q_ASSERT(object.isObject()); - - QJSValueIterator it(object); - it.next(); - QBENCHMARK { - for (int i = 0; i < 200000; ++i) - it.name(); - } -} - -#if 0 -void tst_QJSValueIterator::scriptName_data() -{ - dataHelper(); -} - -void tst_QJSValueIterator::scriptName() -{ - QFETCH(QString, code); - QJSEngine engine; - QJSValue object = engine.evaluate(code); - Q_ASSERT(object.isObject()); - - QJSValueIterator it(object); - it.next(); - QBENCHMARK { - for (int i = 0; i < 50000; ++i) - it.scriptName(); - } -} -#endif - -void tst_QJSValueIterator::value_data() -{ - dataHelper(); -} - -void tst_QJSValueIterator::value() -{ - QFETCH(QString, code); - QJSEngine engine; - QJSValue object = engine.evaluate(code); - Q_ASSERT(object.isObject()); - - QJSValueIterator it(object); - it.next(); - QBENCHMARK { - for (int i = 0; i < 50000; ++i) - it.value(); - } -} - -#if 0 -void tst_QJSValueIterator::setValue_data() -{ - dataHelper(); -} - -void tst_QJSValueIterator::setValue() -{ - QFETCH(QString, code); - QJSEngine engine; - QJSValue object = engine.evaluate(code); - Q_ASSERT(object.isObject()); - - QJSValueIterator it(object); - it.next(); - QJSValue newValue(&engine, 456); - QBENCHMARK { - for (int i = 0; i < 50000; ++i) - it.setValue(newValue); - } -} - -void tst_QJSValueIterator::flags() -{ - QJSEngine engine; - QJSValue object = engine.newObject(); - QJSValue::PropertyFlags flags = flags; - object.setProperty("foo", 123, QJSValue::SkipInEnumeration | QJSValue::ReadOnly | QJSValue::Undeletable); - QJSValueIterator it(object); - it.next(); - QBENCHMARK { - for (int i = 0; i < 50000; ++i) - it.flags(); - } -} -#endif - -#if 0 -void tst_QJSValueIterator::iterateArrayAndConvertNameToIndex() -{ - QJSEngine engine; - QJSValue array = engine.newArray(); - for (int i = 0; i < 20000; ++i) - array.setProperty(i, i); - QBENCHMARK { - QJSValueIterator it(array); - while (it.hasNext()) { - it.next(); - it.scriptName().toArrayIndex(); - } - } -} - -void tst_QJSValueIterator::iterateArrayAndDoubleElements() -{ - QJSEngine engine; - QJSValue array = engine.newArray(); - for (int i = 0; i < 20000; ++i) - array.setProperty(i, i); - QBENCHMARK { - QJSValueIterator it(array); - while (it.hasNext()) { - it.next(); - it.setValue(QJSValue(&engine, it.value().toNumber() * 2)); - } - } -} - -void tst_QJSValueIterator::iterateArrayAndRemoveAllElements() -{ - QJSEngine engine; - QJSValue array = engine.newArray(); - for (int i = 0; i < 20000; ++i) - array.setProperty(i, i); - QBENCHMARK { - QJSValueIterator it(array); - while (it.hasNext()) { - it.next(); - it.remove(); - } - } -} -#endif - -QTEST_MAIN(tst_QJSValueIterator) -#include "tst_qjsvalueiterator.moc" diff --git a/tests/benchmarks/declarative/painting/data/63x63.png b/tests/benchmarks/declarative/painting/data/63x63.png Binary files differdeleted file mode 100644 index d9efda8a7a..0000000000 --- a/tests/benchmarks/declarative/painting/data/63x63.png +++ /dev/null diff --git a/tests/benchmarks/declarative/painting/data/63x63_opaque.png b/tests/benchmarks/declarative/painting/data/63x63_opaque.png Binary files differdeleted file mode 100644 index d1429080db..0000000000 --- a/tests/benchmarks/declarative/painting/data/63x63_opaque.png +++ /dev/null diff --git a/tests/benchmarks/declarative/painting/data/64x64.png b/tests/benchmarks/declarative/painting/data/64x64.png Binary files differdeleted file mode 100644 index b149f33c3d..0000000000 --- a/tests/benchmarks/declarative/painting/data/64x64.png +++ /dev/null diff --git a/tests/benchmarks/declarative/painting/data/64x64_opaque.png b/tests/benchmarks/declarative/painting/data/64x64_opaque.png Binary files differdeleted file mode 100644 index 94c07f3b3e..0000000000 --- a/tests/benchmarks/declarative/painting/data/64x64_opaque.png +++ /dev/null diff --git a/tests/benchmarks/declarative/painting/paintbenchmark.cpp b/tests/benchmarks/declarative/painting/paintbenchmark.cpp deleted file mode 100644 index 548a9269f6..0000000000 --- a/tests/benchmarks/declarative/painting/paintbenchmark.cpp +++ /dev/null @@ -1,417 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QApplication> -#include <QPixmap> -#include <QImage> -#include <QPainter> -#include <QPainterPath> -#include <QGLWidget> -#include <QTextLayout> -#include <QVBoxLayout> -#include <QTime> -#include <QDebug> -#include <QStaticText> - -int iterations = 20; -const int count = 600; -const int lines = 12; -const int spacing = 36; -QSizeF size(1000, 800); -const qreal lineWidth = 1000; -QString strings[lines]; -QGLWidget *testWidget = 0; - -void paint_QTextLayout(QPainter &p, bool useCache) -{ - static bool first = true; - static QTextLayout *textLayout[lines]; - if (first) { - for (int i = 0; i < lines; ++i) { - textLayout[i] = new QTextLayout(strings[i]); - int leading = p.fontMetrics().leading(); - qreal height = 0; - qreal widthUsed = 0; - textLayout[i]->setCacheEnabled(useCache); - textLayout[i]->beginLayout(); - while (1) { - QTextLine line = textLayout[i]->createLine(); - if (!line.isValid()) - break; - - line.setLineWidth(lineWidth); - height += leading; - line.setPosition(QPointF(0, height)); - height += line.height(); - widthUsed = qMax(widthUsed, line.naturalTextWidth()); - } - textLayout[i]->endLayout(); - } - first = false; - } - for (int i = 0; i < count; ++i) { - for (int j = 0; j < lines; ++j) { - textLayout[j]->draw(&p, QPoint(0, j*spacing)); - } - } -} - -void paint_QTextLayout_noCache(QPainter &p) -{ - paint_QTextLayout(p, false); -} - -void paint_QTextLayout_cache(QPainter &p) -{ - paint_QTextLayout(p, true); -} - -void paint_QStaticText(QPainter &p, bool useOptimizations) -{ - static QStaticText *staticText[lines]; - static bool first = true; - if (first) { - for (int i = 0; i < lines; ++i) { - staticText[i] = new QStaticText(strings[i]); - if (useOptimizations) - staticText[i]->setPerformanceHint(QStaticText::AggressiveCaching); - else - staticText[i]->setPerformanceHint(QStaticText::ModerateCaching); - } - first = false; - } - for (int i = 0; i < count; ++i) { - for (int j = 0; j < lines; ++j) { - p.drawStaticText(QPointF(0, 30 + j*spacing), *staticText[j]); - } - } -} - -void paint_QStaticText_noOptimizations(QPainter &p) -{ - paint_QStaticText(p, false); -} - -void paint_QStaticText_optimizations(QPainter &p) -{ - paint_QStaticText(p, true); -} - -void paint_QPixmapCachedText(QPainter &p) -{ - static bool first = true; - static QPixmap cacheText[lines]; - if (first) { - for (int i = 0; i < lines; ++i) { - QRectF trueSize; - trueSize = p.boundingRect(QRectF(QPointF(0,0), size), 0, strings[i]); - cacheText[i] = QPixmap(trueSize.size().toSize()); - cacheText[i].fill(Qt::transparent); - QPainter paint(&cacheText[i]); - paint.setPen(Qt::black); - paint.drawText(QRectF(QPointF(0,0), trueSize.size().toSize()), strings[i]); - } - first = false; - } - for (int i = 0; i < count; i++) { - for (int j = 0; j < lines; ++j) { - p.drawPixmap(0,j*spacing,cacheText[j]); - } - } -} - -void paint_RoundedRect(QPainter &p) -{ - static bool first = true; - if (first) { - if (testWidget) { - QGLFormat format = testWidget->format(); - if (!format.sampleBuffers()) - qWarning() << "Cannot paint antialiased rounded rect without sampleBuffers"; - } - first = false; - } - p.setRenderHint(QPainter::Antialiasing, true); - p.setPen(Qt::black); - p.setBrush(Qt::red); - for (int i = 0; i < count; i++) { - for (int j = 0; j < lines; ++j) { - QSize size((j+1)*50, spacing-1); - p.drawRoundedRect(QRectF(QPointF(0,j*spacing), size), 8, 8); - } - } -} - -void paint_QPixmapCachedRoundedRect(QPainter &p) -{ - static bool first = true; - static QPixmap cacheRect; - if (first) { - const int pw = 0; - const int radius = 8; - cacheRect = QPixmap(radius*2 + 3 + pw*2, radius*2 + 3 + pw*2); - cacheRect.fill(Qt::transparent); - QPainter paint(&cacheRect); - paint.setRenderHint(QPainter::Antialiasing); - paint.setPen(Qt::black); - paint.setBrush(Qt::red); - if (pw%2) - paint.drawRoundedRect(QRectF(qreal(pw)/2+1, qreal(pw)/2+1, cacheRect.width()-(pw+1), cacheRect.height()-(pw+1)), radius, radius); - else - paint.drawRoundedRect(QRectF(qreal(pw)/2, qreal(pw)/2, cacheRect.width()-pw, cacheRect.height()-pw), radius, radius); - - first = false; - } - for (int i = 0; i < count; i++) { - for (int j = 0; j < lines; ++j) { - QSize size((j+1)*50, spacing-1); - - p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, true); - - const int pw = 0; - - int xOffset = (cacheRect.width()-1)/2; - int yOffset = (cacheRect.height()-1)/2; - - QMargins margins(xOffset, yOffset, xOffset, yOffset); - QTileRules rules(Qt::StretchTile, Qt::StretchTile); - //NOTE: even though our item may have qreal-based width and height, qDrawBorderPixmap only supports QRects - qDrawBorderPixmap(&p, QRect(-pw/2, j*spacing-pw/2, size.width()+pw, size.height()+pw), margins, cacheRect, cacheRect.rect(), margins, rules); - } - } -} - -void paint_pathCacheRoundedRect(QPainter &p) -{ - static bool first = true; - static QPainterPath path[lines]; - if (first) { - for (int j = 0; j < lines; ++j) { - path[j].addRoundedRect(QRectF(0,0,(j+1)*50, spacing-1), 8, 8); - } - first = false; - } - p.setRenderHint(QPainter::Antialiasing, true); - p.setPen(Qt::black); - p.setBrush(Qt::red); - for (int i = 0; i < count; i++) { - for (int j = 0; j < lines; ++j) { - p.translate(0,j*spacing); - p.drawPath(path[j]); - p.translate(0,-j*spacing); - } - } -} - -void paint_QPixmap63x63_opaque(QPainter &p) -{ - static bool first = true; - static QPixmap pm; - if (first) { - pm.load("data/63x63_opaque.png"); - first = false; - } - for (int i = 0; i < count; i++) { - for (int j = 0; j < lines; ++j) { - p.drawPixmap((i%10) * 64,j*spacing, pm); - } - } -} - -void paint_QPixmap64x64_opaque(QPainter &p) -{ - static bool first = true; - static QPixmap pm; - if (first) { - pm.load("data/64x64_opaque.png"); - first = false; - } - for (int i = 0; i < count; i++) { - for (int j = 0; j < lines; ++j) { - p.drawPixmap((i%10) * 64,j*spacing, pm); - } - } -} - -void paint_QPixmap63x63(QPainter &p) -{ - static bool first = true; - static QPixmap pm; - if (first) { - pm.load("data/63x63.png"); - first = false; - } - for (int i = 0; i < count; i++) { - for (int j = 0; j < lines; ++j) { - p.drawPixmap((i%10) * 64,j*spacing, pm); - } - } -} - -void paint_QPixmap64x64(QPainter &p) -{ - static bool first = true; - static QPixmap pm; - if (first) { - pm.load("data/64x64.png"); - first = false; - } - for (int i = 0; i < count; i++) { - for (int j = 0; j < lines; ++j) { - p.drawPixmap((i%10) * 64,j*spacing, pm); - } - } -} -typedef void(*PaintFunc)(QPainter &); - -struct { - const char *name; - PaintFunc func; -} funcs[] = { - { "QTextLayoutNoCache", &paint_QTextLayout_noCache }, - { "QTextLayoutWithCache", &paint_QTextLayout_cache }, - { "QStaticTextNoBackendOptimizations", &paint_QStaticText_noOptimizations }, - { "QStaticTextWithBackendOptimizations", &paint_QStaticText_optimizations }, - { "CachedText", &paint_QPixmapCachedText }, - { "RoundedRect", &paint_RoundedRect }, - { "CachedRoundedRect", &paint_QPixmapCachedRoundedRect }, - { "PathCacheRoundedRect", &paint_pathCacheRoundedRect }, - { "QPixmap63x63_opaque", &paint_QPixmap63x63_opaque }, - { "QPixmap64x64_opaque", &paint_QPixmap64x64_opaque }, - { "QPixmap63x63", &paint_QPixmap63x63 }, - { "QPixmap64x64", &paint_QPixmap64x64 }, - { 0, 0 } -}; - -PaintFunc testFunc = 0; - -class MyGLWidget : public QGLWidget -{ -public: - MyGLWidget(const QGLFormat &format) : QGLWidget(format), frames(0) { - const char chars[] = "abcd efgh ijkl mnop qrst uvwx yz!$. ABCD 1234"; - int len = strlen(chars); - for (int i = 0; i < lines; ++i) { - for (int j = 0; j < 60; j++) { - strings[i] += QChar(chars[rand() % len]); - } - } - } - - void paintEvent(QPaintEvent *) { - static int last = 0; - static bool firstRun = true; - if (firstRun) { - timer.start(); - firstRun = false; - } else { - int elapsed = timer.elapsed(); - qDebug() << "frame elapsed:" << elapsed - last; - last = elapsed; - } - QPainter p(this); - p.fillRect(rect(), Qt::white); - p.setPen(Qt::black); - QTime drawTimer; - drawTimer.start(); - testFunc(p); - qDebug() << "draw time" << drawTimer.elapsed(); - if (iterations--) - update(); - else - qApp->quit(); - } - - QTime timer; - int frames; -}; - -int main(int argc, char *argv[]) -{ - QApplication app(argc, argv); - - bool sampleBuffers = false; - - for (int i = 1; i < argc; ++i) { - QString arg = argv[i]; - if (arg == "-test") { - arg = argv[++i]; - int j = 0; - while (funcs[j].name) { - if (arg == funcs[j].name) { - testFunc = funcs[j].func; - qDebug() << "Running test" << arg; - break; - } - ++j; - } - } else if (arg == "-iterations") { - arg = argv[++i]; - iterations = arg.toInt(); - } else if (arg == "-sampleBuffers") { - sampleBuffers = true; - } - } - - if (testFunc == 0) { - qDebug() << "Usage: textspeed -test <test> [-sampleBuffers] [-iterations n]"; - qDebug() << "where <test> can be:"; - int j = 0; - while (funcs[j].name) { - qDebug() << " " << funcs[j].name; - ++j; - } - exit(1); - } - - QWidget w; - QGLFormat format = QGLFormat::defaultFormat(); - format.setSampleBuffers(sampleBuffers); - testWidget = new MyGLWidget(format); - testWidget->setAutoFillBackground(false); - QVBoxLayout *layout = new QVBoxLayout(&w); - w.setLayout(layout); - layout->addWidget(testWidget); - w.showFullScreen(); - app.exec(); - - return 0; -} diff --git a/tests/benchmarks/declarative/painting/painting.pro b/tests/benchmarks/declarative/painting/painting.pro deleted file mode 100644 index ff85b5f5f2..0000000000 --- a/tests/benchmarks/declarative/painting/painting.pro +++ /dev/null @@ -1,7 +0,0 @@ -requires(contains(QT_CONFIG,opengl)) - -QT += opengl -CONFIG += console -macx:CONFIG -= app_bundle - -SOURCES += paintbenchmark.cpp diff --git a/tests/benchmarks/declarative/pointers/pointers.pro b/tests/benchmarks/declarative/pointers/pointers.pro deleted file mode 100644 index d4112f94ec..0000000000 --- a/tests/benchmarks/declarative/pointers/pointers.pro +++ /dev/null @@ -1,8 +0,0 @@ -CONFIG += testcase -QT += declarative testlib -TEMPLATE = app -TARGET = tst_pointers -macx:CONFIG -= app_bundle - -SOURCES += tst_pointers.cpp - diff --git a/tests/benchmarks/declarative/pointers/tst_pointers.cpp b/tests/benchmarks/declarative/pointers/tst_pointers.cpp deleted file mode 100644 index ce81c7f5c9..0000000000 --- a/tests/benchmarks/declarative/pointers/tst_pointers.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <qtest.h> -#include "private/qdeclarativeguard_p.h" -#include <QWeakPointer> - -class tst_pointers : public QObject -{ - Q_OBJECT - -public: - tst_pointers() {} - -private slots: - void qmlguard(); - void weakPointer(); -}; - -void tst_pointers::qmlguard() -{ - QObject *obj = new QObject; - QBENCHMARK { - QDeclarativeGuard<QObject> guardedObject; - guardedObject = obj; - } -} - -void tst_pointers::weakPointer() -{ - QObject *obj = new QObject; - QBENCHMARK { - QWeakPointer<QObject> guardedObject; - guardedObject = obj; - } -} - -QTEST_MAIN(tst_pointers) -#include "tst_pointers.moc" diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/myqmlobject.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/myqmlobject.qml deleted file mode 100644 index a7db476f70..0000000000 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/myqmlobject.qml +++ /dev/null @@ -1,44 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt.test 4.6 - -MyQmlObject {} diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/myqmlobject_binding.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/myqmlobject_binding.qml deleted file mode 100644 index a8add75aee..0000000000 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/myqmlobject_binding.qml +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt.test 4.6 - -MyQmlObject { - result: value -} - diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml deleted file mode 100644 index 91371c80d6..0000000000 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml +++ /dev/null @@ -1,44 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -QtObject {} diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml deleted file mode 100644 index 240f27b4ac..0000000000 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -QtObject { - id: blah -} - diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml deleted file mode 100644 index dbe9e99260..0000000000 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml +++ /dev/null @@ -1,112 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -Item { - id: block - property bool dying: false - property bool spawned: false - property int type: 0 - property ParticleSystem particleSystem - - Behavior on x { - enabled: spawned; - SpringAnimation{ spring: 2; damping: 0.2 } - } - Behavior on y { - SpringAnimation{ spring: 2; damping: 0.2 } - } - - Image { - id: img - source: { - if(type == 0){ - "pics/redStone.png"; - } else if(type == 1) { - "pics/blueStone.png"; - } else { - "pics/greenStone.png"; - } - } - opacity: 0 - Behavior on opacity { NumberAnimation { duration: 200 } } - anchors.fill: parent - } - Emitter { - id: particles - system: particleSystem - group: { - if(type == 0){ - "red"; - } else if (type == 1) { - "blue"; - } else { - "green"; - } - } - anchors.fill: parent - - speed: TargetDirection{targetX: block.width/2; targetY: block.height/2; magnitude: -60; magnitudeVariation: 60} - shape: EllipseShape{fill:true} - enabled: false; - lifeSpan: 700; lifeSpanVariation: 100 - emitRate: 1000 - maximumEmitted: 100 //only fires 0.1s bursts (still 2x old number) - size: 28 - endSize: 14 - } - - states: [ - State { - name: "AliveState"; when: spawned == true && dying == false - PropertyChanges { target: img; opacity: 1 } - }, - - State { - name: "DeathState"; when: dying == true - StateChangeScript { script: particles.pulse(0.1); } - PropertyChanges { target: img; opacity: 0 } - StateChangeScript { script: block.destroy(1000); } - } - ] -} diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/blueStone.png b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/blueStone.png Binary files differdeleted file mode 100644 index 20e43c75b6..0000000000 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/blueStone.png +++ /dev/null diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/greenStone.png b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/greenStone.png Binary files differdeleted file mode 100644 index b568a1900c..0000000000 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/greenStone.png +++ /dev/null diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/redStone.png b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/redStone.png Binary files differdeleted file mode 100644 index 36b09a2686..0000000000 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/redStone.png +++ /dev/null diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/yellowStone.png b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/yellowStone.png Binary files differdeleted file mode 100644 index b1ce76212c..0000000000 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/pics/yellowStone.png +++ /dev/null diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml deleted file mode 100644 index 3a86c48af1..0000000000 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -QtObject { - property int a - property bool b - property double c - property real d - property string e - property url f - property color g - property date h - property variant i - property variant j -} - diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml deleted file mode 100644 index 9d4dc03c82..0000000000 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -QtObject { - property int a -} diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro b/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro deleted file mode 100644 index 0d415db8ba..0000000000 --- a/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro +++ /dev/null @@ -1,11 +0,0 @@ -CONFIG += testcase -TEMPLATE = app -TARGET = tst_qdeclarativecomponent -QT += declarative testlib -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativecomponent.cpp testtypes.cpp -HEADERS += testtypes.h - -# Define SRCDIR equal to test's source directory -DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/testtypes.cpp b/tests/benchmarks/declarative/qdeclarativecomponent/testtypes.cpp deleted file mode 100644 index 4d2932aa79..0000000000 --- a/tests/benchmarks/declarative/qdeclarativecomponent/testtypes.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include "testtypes.h" - -void registerTypes() -{ - qmlRegisterType<MyQmlObject>("Qt.test", 4, 6, "MyQmlObject"); -} diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/testtypes.h b/tests/benchmarks/declarative/qdeclarativecomponent/testtypes.h deleted file mode 100644 index 1c99842e33..0000000000 --- a/tests/benchmarks/declarative/qdeclarativecomponent/testtypes.h +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#ifndef TESTTYPES_H -#define TESTTYPES_H - -#include <QtCore/qobject.h> -#include <QtDeclarative/qdeclarative.h> - -class MyQmlObject : public QObject -{ - Q_OBJECT - Q_PROPERTY(int result READ result WRITE setResult) - Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged) - Q_PROPERTY(MyQmlObject *object READ object WRITE setObject NOTIFY objectChanged) - Q_PROPERTY(QDeclarativeListProperty<QObject> data READ data) - Q_CLASSINFO("DefaultProperty", "data") -public: - MyQmlObject() : m_result(0), m_value(0), m_object(0) {} - - int result() const { return m_result; } - void setResult(int r) { m_result = r; } - - int value() const { return m_value; } - void setValue(int v) { m_value = v; emit valueChanged(); } - - QDeclarativeListProperty<QObject> data() { return QDeclarativeListProperty<QObject>(this, m_data); } - - MyQmlObject *object() const { return m_object; } - void setObject(MyQmlObject *o) { m_object = o; emit objectChanged(); } - -signals: - void valueChanged(); - void objectChanged(); - -private: - QList<QObject *> m_data; - int m_result; - int m_value; - MyQmlObject *m_object; -}; -QML_DECLARE_TYPE(MyQmlObject); - -void registerTypes(); - -#endif // TESTTYPES_H diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp b/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp deleted file mode 100644 index d20126b132..0000000000 --- a/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <qtest.h> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> -#include <QFile> -#include <QDebug> -#include "testtypes.h" - -class tst_qmlcomponent : public QObject -{ - Q_OBJECT - -public: - tst_qmlcomponent(); - virtual ~tst_qmlcomponent(); - -public slots: - void initTestCase(); - void cleanupTestCase(); - -private slots: - void creation_data(); - void creation(); - -private: - QDeclarativeEngine engine; -}; - -tst_qmlcomponent::tst_qmlcomponent() -{ -} - -tst_qmlcomponent::~tst_qmlcomponent() -{ -} - -void tst_qmlcomponent::initTestCase() -{ - registerTypes(); -} - -void tst_qmlcomponent::cleanupTestCase() -{ -} - -void tst_qmlcomponent::creation_data() -{ - QTest::addColumn<QString>("file"); - - QTest::newRow("Object") << SRCDIR "/data/object.qml"; - QTest::newRow("Object - Id") << SRCDIR "/data/object_id.qml"; - QTest::newRow("MyQmlObject") << SRCDIR "/data/myqmlobject.qml"; - QTest::newRow("MyQmlObject: basic binding") << SRCDIR "/data/myqmlobject_binding.qml"; - QTest::newRow("Synthesized properties") << SRCDIR "/data/synthesized_properties.qml"; - QTest::newRow("Synthesized properties.2") << SRCDIR "/data/synthesized_properties.2.qml"; - QTest::newRow("SameGame - BoomBlock") << SRCDIR "/data/samegame/BoomBlock.qml"; -} - -void tst_qmlcomponent::creation() -{ - QFETCH(QString, file); - - QDeclarativeComponent c(&engine, file); - QVERIFY(c.isReady()); - - QObject *obj = c.create(); - delete obj; - - QBENCHMARK { - QObject *obj = c.create(); - delete obj; - } -} - -QTEST_MAIN(tst_qmlcomponent) -#include "tst_qdeclarativecomponent.moc" diff --git a/tests/benchmarks/declarative/qdeclarativedebugtrace/qdeclarativedebugtrace.pro b/tests/benchmarks/declarative/qdeclarativedebugtrace/qdeclarativedebugtrace.pro deleted file mode 100644 index 6f2712adec..0000000000 --- a/tests/benchmarks/declarative/qdeclarativedebugtrace/qdeclarativedebugtrace.pro +++ /dev/null @@ -1,8 +0,0 @@ -CONFIG += testcase -QT += declarative testlib -TEMPLATE = app -TARGET = tst_qdeclarativedebugtrace -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativedebugtrace.cpp - diff --git a/tests/benchmarks/declarative/qdeclarativedebugtrace/tst_qdeclarativedebugtrace.cpp b/tests/benchmarks/declarative/qdeclarativedebugtrace/tst_qdeclarativedebugtrace.cpp deleted file mode 100644 index a8ac44a008..0000000000 --- a/tests/benchmarks/declarative/qdeclarativedebugtrace/tst_qdeclarativedebugtrace.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QtCore/QElapsedTimer> -#include <QObject> -#include <qtest.h> - -class tst_qdeclarativedebugtrace : public QObject -{ - Q_OBJECT - -public: - tst_qdeclarativedebugtrace() {} - -private slots: - void all(); - void startElapsed(); - void doubleElapsed(); - void trace(); -}; - -void tst_qdeclarativedebugtrace::all() -{ - QBENCHMARK { - QElapsedTimer t; - t.start(); - t.nsecsElapsed(); - } -} - -void tst_qdeclarativedebugtrace::startElapsed() -{ - QElapsedTimer t; - QBENCHMARK { - t.start(); - t.nsecsElapsed(); - } -} - -void tst_qdeclarativedebugtrace::doubleElapsed() -{ - QElapsedTimer t; - t.start(); - QBENCHMARK { - t.nsecsElapsed(); - t.nsecsElapsed(); - } -} - -void tst_qdeclarativedebugtrace::trace() -{ - QString s("A decent sized string of text here."); - QBENCHMARK { - QByteArray data; - QDataStream ds(&data, QIODevice::WriteOnly); - ds << (qint64)100 << (int)5 << (int)5 << s; - } -} - -QTEST_MAIN(tst_qdeclarativedebugtrace) - -#include "tst_qdeclarativedebugtrace.moc" diff --git a/tests/benchmarks/declarative/qdeclarativeimage/image.png b/tests/benchmarks/declarative/qdeclarativeimage/image.png Binary files differdeleted file mode 100644 index 623d36233d..0000000000 --- a/tests/benchmarks/declarative/qdeclarativeimage/image.png +++ /dev/null diff --git a/tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro b/tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro deleted file mode 100644 index 6a46e8f40c..0000000000 --- a/tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro +++ /dev/null @@ -1,11 +0,0 @@ -CONFIG += testcase -TEMPLATE = app -TARGET = tst_qdeclarativeimage -QT += declarative testlib -macx:CONFIG -= app_bundle -CONFIG += release - -SOURCES += tst_qdeclarativeimage.cpp - -DEFINES += SRCDIR=\\\"$$PWD\\\" - diff --git a/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp deleted file mode 100644 index fcebd35671..0000000000 --- a/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <qtest.h> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> -#include <private/qdeclarativeimage_p.h> - -class tst_qmlgraphicsimage : public QObject -{ - Q_OBJECT -public: - tst_qmlgraphicsimage() {} - -private slots: - void qmlgraphicsimage(); - void qmlgraphicsimage_file(); - void qmlgraphicsimage_url(); - -private: - QDeclarativeEngine engine; -}; - -void tst_qmlgraphicsimage::qmlgraphicsimage() -{ - int x = 0; - QUrl url(SRCDIR "/image.png"); - QBENCHMARK { - QUrl url2("http://localhost/image" + QString::number(x++) + ".png"); - QDeclarativeImage *image = new QDeclarativeImage; - QDeclarativeEngine::setContextForObject(image, engine.rootContext()); - delete image; - } -} - -void tst_qmlgraphicsimage::qmlgraphicsimage_file() -{ - int x = 0; - QUrl url(SRCDIR "/image.png"); - //get rid of initialization effects - { - QDeclarativeImage *image = new QDeclarativeImage; - QDeclarativeEngine::setContextForObject(image, engine.rootContext()); - image->setSource(url); - } - QBENCHMARK { - QUrl url2("http://localhost/image" + QString::number(x++) + ".png"); - QDeclarativeImage *image = new QDeclarativeImage; - QDeclarativeEngine::setContextForObject(image, engine.rootContext()); - image->setSource(url); - delete image; - } -} - -void tst_qmlgraphicsimage::qmlgraphicsimage_url() -{ - int x = 0; - QUrl url(SRCDIR "/image.png"); - QBENCHMARK { - QUrl url2("http://localhost/image" + QString::number(x++) + ".png"); - QDeclarativeImage *image = new QDeclarativeImage; - QDeclarativeEngine::setContextForObject(image, engine.rootContext()); - image->setSource(url2); - delete image; - } -} - -QTEST_MAIN(tst_qmlgraphicsimage) - -#include "tst_qdeclarativeimage.moc" diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml b/tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml deleted file mode 100644 index c386df72a3..0000000000 --- a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml +++ /dev/null @@ -1,44 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item {} diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml b/tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml deleted file mode 100644 index 6eec87aea1..0000000000 --- a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - property int blah -} - diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro b/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro deleted file mode 100644 index 1ac0bb240a..0000000000 --- a/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro +++ /dev/null @@ -1,10 +0,0 @@ -CONFIG += testcase -TEMPLATE = app -TARGET = tst_qdeclarativemetaproperty -QT += declarative testlib -macx:CONFIG -= app_bundle - -SOURCES += tst_qdeclarativemetaproperty.cpp - -# Define SRCDIR equal to test's source directory -DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp b/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp deleted file mode 100644 index 7726c051ac..0000000000 --- a/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <qtest.h> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> -#include <QDeclarativeProperty> -#include <QFile> -#include <QDebug> - -class tst_qmlmetaproperty : public QObject -{ - Q_OBJECT - -public: - tst_qmlmetaproperty(); - virtual ~tst_qmlmetaproperty(); - -public slots: - void init(); - void cleanup(); - -private slots: - void lookup_data(); - void lookup(); - -private: - QDeclarativeEngine engine; -}; - -tst_qmlmetaproperty::tst_qmlmetaproperty() -{ -} - -tst_qmlmetaproperty::~tst_qmlmetaproperty() -{ -} - -void tst_qmlmetaproperty::init() -{ -} - -void tst_qmlmetaproperty::cleanup() -{ -} - -void tst_qmlmetaproperty::lookup_data() -{ - QTest::addColumn<QString>("file"); - - QTest::newRow("Simple Object") << SRCDIR "/data/object.qml"; - QTest::newRow("Synthesized Object") << SRCDIR "/data/synthesized_object.qml"; -} - -void tst_qmlmetaproperty::lookup() -{ - QFETCH(QString, file); - - QDeclarativeComponent c(&engine, file); - QVERIFY(c.isReady()); - - QObject *obj = c.create(); - - QBENCHMARK { - QDeclarativeProperty p(obj, "x"); - } - - delete obj; -} - -QTEST_MAIN(tst_qmlmetaproperty) -#include "tst_qdeclarativemetaproperty.moc" diff --git a/tests/benchmarks/declarative/qmltime/example.qml b/tests/benchmarks/declarative/qmltime/example.qml deleted file mode 100644 index f608963930..0000000000 --- a/tests/benchmarks/declarative/qmltime/example.qml +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QmlTime 1.0 as QmlTime - -Item { - - property string name: "Bob Smith" - - QmlTime.Timer { - component: Item { - Text { text: name } - } - } -} - diff --git a/tests/benchmarks/declarative/qmltime/qmltime.cpp b/tests/benchmarks/declarative/qmltime/qmltime.cpp deleted file mode 100644 index f33b9205e7..0000000000 --- a/tests/benchmarks/declarative/qmltime/qmltime.cpp +++ /dev/null @@ -1,283 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> -#include <QDebug> -#include <QApplication> -#include <QTime> -#include <QDeclarativeContext> -#include <QGraphicsScene> -#include <QGraphicsRectItem> - -class Timer : public QObject -{ - Q_OBJECT - Q_PROPERTY(QDeclarativeComponent *component READ component WRITE setComponent) - -public: - Timer(); - - QDeclarativeComponent *component() const; - void setComponent(QDeclarativeComponent *); - - static Timer *timerInstance(); - - void run(uint); - - bool willParent() const; - void setWillParent(bool p); - -private: - void runTest(QDeclarativeContext *, uint); - - QDeclarativeComponent *m_component; - static Timer *m_timer; - - bool m_willparent; - QGraphicsScene m_scene; - QGraphicsRectItem m_item; -}; -QML_DECLARE_TYPE(Timer); - -Timer *Timer::m_timer = 0; - -Timer::Timer() -: m_component(0), m_willparent(false) -{ - if (m_timer) - qWarning("Timer: Timer already registered"); - m_timer = this; - - m_scene.setItemIndexMethod(QGraphicsScene::NoIndex); - m_scene.addItem(&m_item); -} - -QDeclarativeComponent *Timer::component() const -{ - return m_component; -} - -void Timer::setComponent(QDeclarativeComponent *c) -{ - m_component = c; -} - -Timer *Timer::timerInstance() -{ - return m_timer; -} - -void Timer::run(uint iterations) -{ - QDeclarativeContext context(qmlContext(this)); - - QObject *o = m_component->create(&context); - QGraphicsObject *go = qobject_cast<QGraphicsObject *>(o); - if (m_willparent && go) - go->setParentItem(&m_item); - delete o; - - runTest(&context, iterations); -} - -bool Timer::willParent() const -{ - return m_willparent; -} - -void Timer::setWillParent(bool p) -{ - m_willparent = p; -} - -void Timer::runTest(QDeclarativeContext *context, uint iterations) -{ - QTime t; - t.start(); - for (uint ii = 0; ii < iterations; ++ii) { - QObject *o = m_component->create(context); - QGraphicsObject *go = qobject_cast<QGraphicsObject *>(o); - if (m_willparent && go) - go->setParentItem(&m_item); - delete o; - } - - int e = t.elapsed(); - - qWarning() << "Total:" << e << "ms, Per iteration:" << qreal(e) / qreal(iterations) << "ms"; - -} - -void usage(const char *name) -{ - qWarning("Usage: %s [-iterations <count>] [-parent] <qml file>\n", name); - - qWarning("qmltime is a tool for benchmarking the runtime cost of instantiating\n" - "a QML component. It is typically run as follows:\n" - "\n" - "%s path/to/benchmark.qml\n" - "\n" - "If the -parent option is specified, the component being measured will also\n" - "be parented to an item already in the scene.\n" - "\n" - "If the -iterations option is specified, the benchmark will run the specified\n" - "number of iterations. If -iterations is not specified, 1024 iterations\n" - "are performed.\n" - "\n" - "qmltime expects the file to be benchmarked to contain a certain structure.\n" - "Specifically, it requires the presence of a QmlTime.Timer element. For example,\n" - "say we wanted to benchmark the following list delegate:\n" - "\n" - "Rectangle {\n" - " color: \"green\"\n" - " width: 400; height: 100\n" - " Text {\n" - " anchors.centerIn: parent\n" - " text: name\n" - " }\n" - "}\n" - "\n" - "we would create a benchmark file that looks like this:\n" - "\n" - "import QtQuick 2.0\n" - "import QmlTime 1.0 as QmlTime\n" - "\n" - "Item {\n" - "\n" - " property string name: \"Bob Smith\"\n" - "\n" - " QmlTime.Timer {\n" - " component: Rectangle {\n" - " color: \"green\"\n" - " width: 400; height: 100\n" - " Text {\n" - " anchors.centerIn: parent\n" - " text: name\n" - " }\n" - " }\n" - " }\n" - "}\n" - "\n" - "The outer Item functions as a dummy data provider for any additional\n" - "data required by the bindings in the component being benchmarked (in the\n" - "example above we provide a \"name\" property).\n" - "\n" - "When started, the component is instantiated once before running\n" - "the benchmark, which means that the reported time does not include\n" - "compile time (as the results of compilation are cached internally).\n" - "In this sense the times reported by qmltime best correspond to the\n" - "costs associated with delegate creation in the view classes, where the\n" - "same delegate is instantiated over and over. Conversely, it is not a\n" - "good approximation for e.g. Loader, which typically only instantiates\n" - "an element once (and so for Loader the compile time is very relevant\n" - "to the overall cost).", name); - - exit(-1); -} - -int main(int argc, char ** argv) -{ - QApplication app(argc, argv); - - qmlRegisterType<Timer>("QmlTime", 1, 0, "Timer"); - - uint iterations = 1024; - QString filename; - bool willParent = false; - - for (int ii = 1; ii < argc; ++ii) { - QByteArray arg(argv[ii]); - - if (arg == "-iterations") { - if (ii + 1 < argc) { - ++ii; - QByteArray its(argv[ii]); - bool ok = false; - iterations = its.toUInt(&ok); - if (!ok) - usage(argv[0]); - } else { - usage(argv[0]); - } - } else if (arg == "-parent") { - willParent = true; - } else if (arg == "-help") { - usage(argv[0]); - } else { - filename = QLatin1String(argv[ii]); - } - } - - if (filename.isEmpty()) - usage(argv[0]); - - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, filename); - if (component.isError()) { - qWarning() << component.errors(); - return -1; - } - - QObject *obj = component.create(); - if (!obj) { - qWarning() << component.errors(); - return -1; - } - - Timer *timer = Timer::timerInstance(); - if (!timer) { - qWarning() << "A Tester.Timer instance is required."; - return -1; - } - - timer->setWillParent(willParent); - - if (!timer->component()) { - qWarning() << "The timer has no component"; - return -1; - } - - timer->run(iterations); - - return 0; -} - -#include "qmltime.moc" diff --git a/tests/benchmarks/declarative/qmltime/qmltime.pro b/tests/benchmarks/declarative/qmltime/qmltime.pro deleted file mode 100644 index e1948981bf..0000000000 --- a/tests/benchmarks/declarative/qmltime/qmltime.pro +++ /dev/null @@ -1,8 +0,0 @@ -CONFIG += testcase -TEMPLATE = app -TARGET = qmltime -QT += declarative widgets testlib -macx:CONFIG -= app_bundle - -SOURCES += qmltime.cpp - diff --git a/tests/benchmarks/declarative/qmltime/tests/anchors/empty.qml b/tests/benchmarks/declarative/qmltime/tests/anchors/empty.qml deleted file mode 100644 index b08b43268c..0000000000 --- a/tests/benchmarks/declarative/qmltime/tests/anchors/empty.qml +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QmlTime 1.0 as QmlTime - -Item { - - QmlTime.Timer { - component: Component { - Item { - Item { - anchors.leftMargin: 0 - } - Item { - anchors.leftMargin: 0 - } - Item { - anchors.leftMargin: 0 - } - Item { - anchors.leftMargin: 0 - } - Item { - anchors.leftMargin: 0 - } - Item { - anchors.leftMargin: 0 - } - Item { - anchors.leftMargin: 0 - } - } - } - } -} - diff --git a/tests/benchmarks/declarative/qmltime/tests/anchors/fill.qml b/tests/benchmarks/declarative/qmltime/tests/anchors/fill.qml deleted file mode 100644 index a173050427..0000000000 --- a/tests/benchmarks/declarative/qmltime/tests/anchors/fill.qml +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QmlTime 1.0 as QmlTime - -Item { - - QmlTime.Timer { - component: Component { - Item { - Item { - anchors.fill: parent - anchors.leftMargin: 0 - } - Item { - anchors.fill: parent - anchors.leftMargin: 0 - } - Item { - anchors.fill: parent - anchors.leftMargin: 0 - } - Item { - anchors.fill: parent - anchors.leftMargin: 0 - } - Item { - anchors.fill: parent - anchors.leftMargin: 0 - } - Item { - anchors.fill: parent - anchors.leftMargin: 0 - } - Item { - anchors.fill: parent - anchors.leftMargin: 0 - } - } - } - } -} - diff --git a/tests/benchmarks/declarative/qmltime/tests/anchors/null.qml b/tests/benchmarks/declarative/qmltime/tests/anchors/null.qml deleted file mode 100644 index ea01839e14..0000000000 --- a/tests/benchmarks/declarative/qmltime/tests/anchors/null.qml +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QmlTime 1.0 as QmlTime - -Item { - - QmlTime.Timer { - component: Component { - Item { - Item { - } - Item { - } - Item { - } - Item { - } - Item { - } - Item { - } - Item { - } - } - } - } -} - diff --git a/tests/benchmarks/declarative/qmltime/tests/animation/large.qml b/tests/benchmarks/declarative/qmltime/tests/animation/large.qml deleted file mode 100644 index b58de4955b..0000000000 --- a/tests/benchmarks/declarative/qmltime/tests/animation/large.qml +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QmlTime 1.0 as QmlTime - -Item { - - QmlTime.Timer { - component: Component { - ParallelAnimation { - NumberAnimation { duration: 500 } - NumberAnimation { duration: 4000; } - NumberAnimation { duration: 2000; easing.type: "OutBack"} - ColorAnimation { duration: 3000} - SequentialAnimation { - PauseAnimation { duration: 1000 } - ScriptAction { script: doSomething(); } - PauseAnimation { duration: 800 } - ScriptAction { script: doSomethingElse(); } - PauseAnimation { duration: 800 } - ParallelAnimation { - NumberAnimation { duration: 200;} - SequentialAnimation { - PauseAnimation { duration: 200} - ParallelAnimation { - NumberAnimation { duration: 300;} - NumberAnimation { duration: 300;} - } - NumberAnimation { from: 0; to: 1; duration: 500 } - PauseAnimation { duration: 200 } - NumberAnimation { from: 1; to: 0; duration: 500 } - } - SequentialAnimation { - PauseAnimation { duration: 150} - NumberAnimation { duration: 300; easing.type: "OutBounce" } - } - } - } - } - } - } - -} diff --git a/tests/benchmarks/declarative/qmltime/tests/animation/largeNoProps.qml b/tests/benchmarks/declarative/qmltime/tests/animation/largeNoProps.qml deleted file mode 100644 index fbe4acb8d3..0000000000 --- a/tests/benchmarks/declarative/qmltime/tests/animation/largeNoProps.qml +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QmlTime 1.0 as QmlTime - -Item { - - QmlTime.Timer { - component: Component { - ParallelAnimation { - NumberAnimation { } - NumberAnimation { } - NumberAnimation { } - ColorAnimation { } - SequentialAnimation { - PauseAnimation { } - ScriptAction { } - PauseAnimation { } - ScriptAction { } - PauseAnimation { } - ParallelAnimation { - NumberAnimation { } - SequentialAnimation { - PauseAnimation { } - ParallelAnimation { - NumberAnimation { } - NumberAnimation { } - } - NumberAnimation { } - PauseAnimation { } - NumberAnimation { } - } - SequentialAnimation { - PauseAnimation { } - NumberAnimation { } - } - } - } - } - } - } - -} diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml b/tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml deleted file mode 100644 index 85698d6bf6..0000000000 --- a/tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QmlTime 1.0 as QmlTime - -Item { - - QmlTime.Timer { - component: Component { - Item { - children: [ - Rectangle { }, - Rectangle { }, - Item { }, - Image { }, - Text { }, - Item { }, - Item { }, - Image { }, - Image { }, - Row { }, - Image { }, - Image { }, - Column { }, - Row { }, - Text { }, - Text { }, - Text { }, - MouseArea { } - ] - - } - } - } - -} diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml b/tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml deleted file mode 100644 index 6a8ca1b968..0000000000 --- a/tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QmlTime 1.0 as QmlTime - -Item { - - QmlTime.Timer { - component: Component { - Item { - data: [ - Rectangle { }, - Rectangle { }, - Item { }, - Image { }, - Text { }, - Item { }, - Item { }, - Image { }, - Image { }, - Row { }, - Image { }, - Image { }, - Column { }, - Row { }, - Text { }, - Text { }, - Text { }, - MouseArea { } - ] - - } - } - } - -} diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/no_creation.qml b/tests/benchmarks/declarative/qmltime/tests/item_creation/no_creation.qml deleted file mode 100644 index 4dde9f289e..0000000000 --- a/tests/benchmarks/declarative/qmltime/tests/item_creation/no_creation.qml +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QmlTime 1.0 as QmlTime - -Item { - - QmlTime.Timer { - component: Component { - Item { - } - } - } -} diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml b/tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml deleted file mode 100644 index 802598839c..0000000000 --- a/tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QmlTime 1.0 as QmlTime - -Item { - - QmlTime.Timer { - component: Component { - Item { - resources: [ - Rectangle { }, - Rectangle { }, - Item { }, - Image { }, - Text { }, - Item { }, - Item { }, - Image { }, - Image { }, - Row { }, - Image { }, - Image { }, - Column { }, - Row { }, - Text { }, - Text { }, - Text { }, - MouseArea { } - ] - - } - } - } - -} diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/Loaded.qml b/tests/benchmarks/declarative/qmltime/tests/loader/Loaded.qml deleted file mode 100644 index d5d22f948c..0000000000 --- a/tests/benchmarks/declarative/qmltime/tests/loader/Loaded.qml +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - Rectangle {} - Text {} - Image {} -} diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/component_loader.qml b/tests/benchmarks/declarative/qmltime/tests/loader/component_loader.qml deleted file mode 100644 index ab42dfb2f9..0000000000 --- a/tests/benchmarks/declarative/qmltime/tests/loader/component_loader.qml +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QmlTime 1.0 as QmlTime - -Item { - - QmlTime.Timer { - component: Component { - Item { - Loader { - sourceComponent: Loaded {} - } - } - } - } -} - diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/empty_loader.qml b/tests/benchmarks/declarative/qmltime/tests/loader/empty_loader.qml deleted file mode 100644 index c32ca2e61b..0000000000 --- a/tests/benchmarks/declarative/qmltime/tests/loader/empty_loader.qml +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QmlTime 1.0 as QmlTime - -Item { - - QmlTime.Timer { - component: Component { - Item { - Loader {} - Loaded {} - } - } - } -} - diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/no_loader.qml b/tests/benchmarks/declarative/qmltime/tests/loader/no_loader.qml deleted file mode 100644 index dff5f11f99..0000000000 --- a/tests/benchmarks/declarative/qmltime/tests/loader/no_loader.qml +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QmlTime 1.0 as QmlTime - -Item { - - QmlTime.Timer { - component: Component { - Item { - Loaded {} - } - } - } -} - diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/source_loader.qml b/tests/benchmarks/declarative/qmltime/tests/loader/source_loader.qml deleted file mode 100644 index 6b16afc1c4..0000000000 --- a/tests/benchmarks/declarative/qmltime/tests/loader/source_loader.qml +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QmlTime 1.0 as QmlTime - -Item { - - QmlTime.Timer { - component: Component { - Item { - Loader { - source: "Loaded.qml" - } - } - } - } -} - diff --git a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml deleted file mode 100644 index e9f13e9deb..0000000000 --- a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QmlTime 1.0 as QmlTime - -Item { - QmlTime.Timer { - component: Component { - Item { - Rectangle { } - Rectangle { } - Item { - Image { } - Text { } - } - - Item { - Item { - Image { } - Image { } - Item { - Image { } - Image { } - } - } - - Item { - Item { - Text { } - Text { } - } - Text { } - } - } - MouseArea { } - } - } - } -} diff --git a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml deleted file mode 100644 index d50da90764..0000000000 --- a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QmlTime 1.0 as QmlTime - -Item { - QmlTime.Timer { - component: Component { - Item { - Rectangle { } - Rectangle { } - Item { - Image { } - Text { } - } - - Item { - Item { - Image { } - Image { } - Row { } - Image { } - Image { } - } - - Column { } - Row { } - Text { } - Text { } - Text { } - } - MouseArea { } - } - } - } -} diff --git a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml deleted file mode 100644 index 8f7814be6a..0000000000 --- a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QmlTime 1.0 as QmlTime - -Item { - QmlTime.Timer { - component: Component { - Item { - Rectangle { } - Rectangle { } - Item { - Image { } - Text { } - } - - Item { - Item { - Image { } - Image { } - Row { - Image { } - Image { } - } - } - - Column { - Row { - Text { } - Text { } - } - Text { } - } - } - MouseArea { } - } - } - } -} diff --git a/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/null.qml b/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/null.qml deleted file mode 100644 index 34d6b30670..0000000000 --- a/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/null.qml +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QmlTime 1.0 as QmlTime - -Item { - - QmlTime.Timer { - component: Component { - QtObject { - } - } - } - -} diff --git a/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/property.qml b/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/property.qml deleted file mode 100644 index 4dd63bb36e..0000000000 --- a/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/property.qml +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QmlTime 1.0 as QmlTime - -Item { - - QmlTime.Timer { - component: Component { - QtObject { - property string s - property string s2 - property string s3 - property string s4 - } - } - } - -} - diff --git a/tests/benchmarks/declarative/script/data/CustomObject.qml b/tests/benchmarks/declarative/script/data/CustomObject.qml deleted file mode 100644 index 7c8c561114..0000000000 --- a/tests/benchmarks/declarative/script/data/CustomObject.qml +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -QtObject { - property real prop1: 0 - property real prop2: 1 - property real prop3: 0 -} diff --git a/tests/benchmarks/declarative/script/data/block.qml b/tests/benchmarks/declarative/script/data/block.qml deleted file mode 100644 index 67ad5cbed2..0000000000 --- a/tests/benchmarks/declarative/script/data/block.qml +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Rectangle { - width: 200; height: 200 - CustomObject { id: theObject } - function doSomethingDirect() { - theObject.prop1 = 0; - - for (var i = 0; i < 1000; ++i) - theObject.prop1 += theObject.prop2; - - theObject.prop3 = theObject.prop1; - } - - function doSomethingLocalObj() { - theObject.prop1 = 0; - - var incrementObj = theObject; - for (var i = 0; i < 1000; ++i) - incrementObj.prop1 += incrementObj.prop2; - - incrementObj.prop3 = incrementObj.prop1; - } - - function doSomethingLocal() { - theObject.prop1 = 0; - - var increment = theObject.prop2; - for (var i = 0; i < 1000; ++i) - theObject.prop1 += increment; - - theObject.prop3 = theObject.prop1; - } -} diff --git a/tests/benchmarks/declarative/script/data/enums.qml b/tests/benchmarks/declarative/script/data/enums.qml deleted file mode 100644 index 8450b15732..0000000000 --- a/tests/benchmarks/declarative/script/data/enums.qml +++ /dev/null @@ -1,51 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the Declarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - function runtest() { - var a = 0; - for (var ii = 0; ii < 100000; ++ii) - a += Text.RichText; - return a; - } -} diff --git a/tests/benchmarks/declarative/script/data/global.js b/tests/benchmarks/declarative/script/data/global.js deleted file mode 100644 index 4e3a4780f9..0000000000 --- a/tests/benchmarks/declarative/script/data/global.js +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -var incVar = 1; -var total; - -function doSomething() { - for (var i = 0; i < 10000; ++i) - Math.sin(90); -} - -function doIncrement() { - total = 0; - for (var i = 0; i < 100000; ++i) - total += incVar; -} diff --git a/tests/benchmarks/declarative/script/data/global_prop.qml b/tests/benchmarks/declarative/script/data/global_prop.qml deleted file mode 100644 index c77faaf9f4..0000000000 --- a/tests/benchmarks/declarative/script/data/global_prop.qml +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "global.js" as Program - -Rectangle { - width: 200; height: 200 - - signal triggered - signal incrementTriggered - - onTriggered: Program.doSomething(); - onIncrementTriggered: Program.doIncrement(); -} diff --git a/tests/benchmarks/declarative/script/data/namespacedEnums.qml b/tests/benchmarks/declarative/script/data/namespacedEnums.qml deleted file mode 100644 index e49bf7e1ad..0000000000 --- a/tests/benchmarks/declarative/script/data/namespacedEnums.qml +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the Declarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 as QtQuick - -QtQuick.Item { - function runtest() { - var a = 0; - for (var ii = 0; ii < 100000; ++ii) - a += QtQuick.Text.RichText; - return a; - } -} - diff --git a/tests/benchmarks/declarative/script/data/script.js b/tests/benchmarks/declarative/script/data/script.js deleted file mode 100644 index 9f46570004..0000000000 --- a/tests/benchmarks/declarative/script/data/script.js +++ /dev/null @@ -1 +0,0 @@ -function func() { return 1; } diff --git a/tests/benchmarks/declarative/script/data/script2.js b/tests/benchmarks/declarative/script/data/script2.js deleted file mode 100644 index 102f081140..0000000000 --- a/tests/benchmarks/declarative/script/data/script2.js +++ /dev/null @@ -1,2 +0,0 @@ -function func() { return 2; } - diff --git a/tests/benchmarks/declarative/script/data/scriptCall.qml b/tests/benchmarks/declarative/script/data/scriptCall.qml deleted file mode 100644 index 420f621dfc..0000000000 --- a/tests/benchmarks/declarative/script/data/scriptCall.qml +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the Declarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "script.js" as Script -import "script2.js" as OtherScript - -Item { - function runtest() { - var a = 0; - for (var ii = 0; ii < 1000000; ++ii) - a += Script.func(); - return a; - } -} - diff --git a/tests/benchmarks/declarative/script/data/signal_args.qml b/tests/benchmarks/declarative/script/data/signal_args.qml deleted file mode 100644 index ed5c56a197..0000000000 --- a/tests/benchmarks/declarative/script/data/signal_args.qml +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt.test 1.0 - -TestObject { - onMySignalWithArgs: { var a = n; return a; } -} - diff --git a/tests/benchmarks/declarative/script/data/signal_qml.qml b/tests/benchmarks/declarative/script/data/signal_qml.qml deleted file mode 100644 index c5bda7d18e..0000000000 --- a/tests/benchmarks/declarative/script/data/signal_qml.qml +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt.test 1.0 - -TestObject { - onMySignal: { var a = 1; return a; } -} - diff --git a/tests/benchmarks/declarative/script/data/signal_unconnected.qml b/tests/benchmarks/declarative/script/data/signal_unconnected.qml deleted file mode 100644 index 90fe2bc6f5..0000000000 --- a/tests/benchmarks/declarative/script/data/signal_unconnected.qml +++ /dev/null @@ -1,45 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt.test 1.0 - -TestObject { -} diff --git a/tests/benchmarks/declarative/script/data/signal_unusedArgs.qml b/tests/benchmarks/declarative/script/data/signal_unusedArgs.qml deleted file mode 100644 index 6de5815939..0000000000 --- a/tests/benchmarks/declarative/script/data/signal_unusedArgs.qml +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt.test 1.0 - -TestObject { - onMySignalWithArgs: { var a = 1; return a; } -} - diff --git a/tests/benchmarks/declarative/script/data/slot_complex.qml b/tests/benchmarks/declarative/script/data/slot_complex.qml deleted file mode 100644 index 8e2cb30089..0000000000 --- a/tests/benchmarks/declarative/script/data/slot_complex.qml +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt.test 1.0 - -TestObject { - function myCustomFunction(b) { - var n = b; - var a = 1; - while (n > 0) { - a = a * n; - n--; - } - return a; - } - - onMySignal: { for (var ii = 0; ii < 10000; ++ii) { myCustomFunction(10); } } -} - diff --git a/tests/benchmarks/declarative/script/data/slot_complex_js.js b/tests/benchmarks/declarative/script/data/slot_complex_js.js deleted file mode 100644 index 64a1f65daa..0000000000 --- a/tests/benchmarks/declarative/script/data/slot_complex_js.js +++ /dev/null @@ -1,8 +0,0 @@ -function myCustomFunction(n) { - var a = 1; - while (n > 0) { - a = a * n; - n--; - } - return a; -} diff --git a/tests/benchmarks/declarative/script/data/slot_complex_js.qml b/tests/benchmarks/declarative/script/data/slot_complex_js.qml deleted file mode 100644 index ca06046389..0000000000 --- a/tests/benchmarks/declarative/script/data/slot_complex_js.qml +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt.test 1.0 -import "slot_complex_js.js" as Logic - -TestObject { - onMySignal: { for (var ii = 0; ii < 10000; ++ii) { Logic.myCustomFunction(10); } } -} - - diff --git a/tests/benchmarks/declarative/script/data/slot_simple.qml b/tests/benchmarks/declarative/script/data/slot_simple.qml deleted file mode 100644 index c93fbcc757..0000000000 --- a/tests/benchmarks/declarative/script/data/slot_simple.qml +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt.test 1.0 - -TestObject { - function myCustomFunction() { - return 0; - } - - onMySignal: { for (var ii = 0; ii < 10000; ++ii) { myCustomFunction(); } } -} diff --git a/tests/benchmarks/declarative/script/data/slot_simple_js.js b/tests/benchmarks/declarative/script/data/slot_simple_js.js deleted file mode 100644 index d6e60608da..0000000000 --- a/tests/benchmarks/declarative/script/data/slot_simple_js.js +++ /dev/null @@ -1,3 +0,0 @@ -function myCustomFunction() { - return 0; -} diff --git a/tests/benchmarks/declarative/script/data/slot_simple_js.qml b/tests/benchmarks/declarative/script/data/slot_simple_js.qml deleted file mode 100644 index 07334ab4fa..0000000000 --- a/tests/benchmarks/declarative/script/data/slot_simple_js.qml +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt.test 1.0 -import "slot_simple_js.js" as Logic - -TestObject { - onMySignal: { for (var ii = 0; ii < 10000; ++ii) { Logic.myCustomFunction(); } } -} - diff --git a/tests/benchmarks/declarative/script/script.pro b/tests/benchmarks/declarative/script/script.pro deleted file mode 100644 index 310d17d3c9..0000000000 --- a/tests/benchmarks/declarative/script/script.pro +++ /dev/null @@ -1,10 +0,0 @@ -CONFIG += testcase -TEMPLATE = app -TARGET = tst_script -QT += declarative testlib -macx:CONFIG -= app_bundle -CONFIG += release - -SOURCES += tst_script.cpp - -DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/benchmarks/declarative/script/tst_script.cpp b/tests/benchmarks/declarative/script/tst_script.cpp deleted file mode 100644 index 0e5d782134..0000000000 --- a/tests/benchmarks/declarative/script/tst_script.cpp +++ /dev/null @@ -1,803 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <qtest.h> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> -#include <private/qdeclarativeengine_p.h> -#include <private/qdeclarativeobjectscriptclass_p.h> -#include <private/qdeclarativerectangle_p.h> -#include <QScriptEngine> -#include <QScriptValue> - -class tst_script : public QObject -{ - Q_OBJECT -public: - tst_script() {} - -private slots: - void initTestCase(); - - void property_js(); - void property_getter(); - void property_getter_js(); - void property_getter_qobject(); - void property_getter_qmetaproperty(); - void property_qobject(); - void property_qmlobject(); - - void setproperty_js(); - void setproperty_qmlobject(); - - void function_js(); - void function_cpp(); - void function_qobject(); - void function_qmlobject(); - - void function_args_js(); - void function_args_cpp(); - void function_args_qobject(); - void function_args_qmlobject(); - - void signal_unconnected(); - void signal_qml(); - void signal_args(); - void signal_unusedArgs(); - - void slot_simple(); - void slot_simple_js(); - void slot_complex(); - void slot_complex_js(); - - void block_data(); - void block(); - - void global_property_js(); - void global_property_qml(); - void global_property_qml_js(); - - void scriptfile_property(); - - void enums(); - void namespacedEnums(); - void scriptCall(); -}; - -inline QUrl TEST_FILE(const QString &filename) -{ - return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename); -} - -class TestObject : public QObject -{ - Q_OBJECT - Q_PROPERTY(int x READ x WRITE setX) - -public: - TestObject(QObject *parent = 0); - - int x(); - void setX(int x) { m_x = x; } - - void emitMySignal() { emit mySignal(); } - void emitMySignalWithArgs(int n) { emit mySignalWithArgs(n); } - -signals: - void mySignal(); - void mySignalWithArgs(int n); - -public slots: - int method() { - return x(); - } - - int methodArgs(int val) { - return val + x(); - } - -private: - int m_x; -}; -QML_DECLARE_TYPE(TestObject); - -TestObject::TestObject(QObject *parent) -: QObject(parent), m_x(0) -{ -} - -int TestObject::x() -{ - return m_x++; -} - -void tst_script::initTestCase() -{ - qmlRegisterType<TestObject>("Qt.test", 1, 0, "TestObject"); -} - - -#define PROPERTY_PROGRAM \ - "(function(testObject) { return (function() { " \ - " var test = 0; " \ - " for (var ii = 0; ii < 10000; ++ii) { " \ - " test += testObject.x; " \ - " } " \ - " return test; " \ - "}); })" - -void tst_script::property_js() -{ - QScriptEngine engine; - - QScriptValue v = engine.newObject(); - v.setProperty(QLatin1String("x"), 10); - - QScriptValueList args; - args << v; - QScriptValue prog = engine.evaluate(PROPERTY_PROGRAM).call(engine.globalObject(), args); - prog.call(); - - QBENCHMARK { - prog.call().toNumber(); - } -} - -static QScriptValue property_getter_method(QScriptContext *, QScriptEngine *engine) -{ - static int x = 0; - return QScriptValue(engine,x++); -} - -void tst_script::property_getter() -{ - QScriptEngine engine; - - QScriptValue v = engine.newObject(); - v.setProperty(QLatin1String("x"), engine.newFunction(property_getter_method), - QScriptValue::PropertyGetter); - - QScriptValueList args; - args << v; - QScriptValue prog = engine.evaluate(PROPERTY_PROGRAM).call(engine.globalObject(), args); - prog.call(); - - QBENCHMARK { - prog.call(); - } -} - -static TestObject *property_getter_qobject_object = 0; -static QScriptValue property_getter_qobject_method(QScriptContext *, QScriptEngine *) -{ - static int idx = -1; - if (idx == -1) - idx = TestObject::staticMetaObject.indexOfProperty("x"); - - int value = 0; - void *args[] = { &value, 0 }; - QMetaObject::metacall(property_getter_qobject_object, QMetaObject::ReadProperty, idx, args); - - return QScriptValue(value); -} - -static QScriptValue property_getter_qmetaproperty_method(QScriptContext *, QScriptEngine *) -{ - static int idx = -1; - if (idx == -1) - idx = TestObject::staticMetaObject.indexOfProperty("x"); - - int value = 0; - value = property_getter_qobject_object->metaObject()->property(idx).read(property_getter_qobject_object).toInt(); - - return QScriptValue(value); -} - -void tst_script::property_getter_qobject() -{ - QScriptEngine engine; - - TestObject to; - property_getter_qobject_object = &to; - QScriptValue v = engine.newObject(); - v.setProperty(QLatin1String("x"), engine.newFunction(property_getter_qobject_method), - QScriptValue::PropertyGetter); - - QScriptValueList args; - args << v; - QScriptValue prog = engine.evaluate(PROPERTY_PROGRAM).call(engine.globalObject(), args); - prog.call(); - - QBENCHMARK { - prog.call(); - } - property_getter_qobject_object = 0; -} - -void tst_script::property_getter_qmetaproperty() -{ - QScriptEngine engine; - - TestObject to; - property_getter_qobject_object = &to; - QScriptValue v = engine.newObject(); - v.setProperty(QLatin1String("x"), engine.newFunction(property_getter_qmetaproperty_method), - QScriptValue::PropertyGetter); - - QScriptValueList args; - args << v; - QScriptValue prog = engine.evaluate(PROPERTY_PROGRAM).call(engine.globalObject(), args); - prog.call(); - - QBENCHMARK { - prog.call(); - } - property_getter_qobject_object = 0; -} - - -void tst_script::property_getter_js() -{ - QScriptEngine engine; - - QScriptValue v = engine.evaluate("(function() { var o = new Object; o._x = 0; o.__defineGetter__(\"x\", function() { return this._x++; }); return o; })").call(); - - QScriptValueList args; - args << v; - QScriptValue prog = engine.evaluate(PROPERTY_PROGRAM).call(engine.globalObject(), args); - prog.call(); - - QBENCHMARK { - prog.call(); - } -} - -void tst_script::property_qobject() -{ - QScriptEngine engine; - - TestObject to; - QScriptValue v = engine.newQObject(&to); - - QScriptValueList args; - args << v; - QScriptValue prog = engine.evaluate(PROPERTY_PROGRAM).call(engine.globalObject(), args); - prog.call(); - - QBENCHMARK { - prog.call(); - } -} - -void tst_script::property_qmlobject() -{ - QDeclarativeEngine qmlengine; - - QScriptEngine *engine = QDeclarativeEnginePrivate::getScriptEngine(&qmlengine); - TestObject to; - - QScriptValue v = QDeclarativeEnginePrivate::get(&qmlengine)->objectClass->newQObject(&to); - - QScriptValueList args; - args << v; - QScriptValue prog = engine->evaluate(PROPERTY_PROGRAM).call(engine->globalObject(), args); - prog.call(); - - QBENCHMARK { - prog.call(); - } -} - -#define SETPROPERTY_PROGRAM \ - "(function(testObject) { return (function() { " \ - " for (var ii = 0; ii < 10000; ++ii) { " \ - " testObject.x = ii; " \ - " } " \ - "}); })" - -void tst_script::setproperty_js() -{ - QScriptEngine engine; - - QScriptValue v = engine.newObject(); - v.setProperty(QLatin1String("x"), 0); - - QScriptValueList args; - args << v; - QScriptValue prog = engine.evaluate(SETPROPERTY_PROGRAM).call(engine.globalObject(), args); - prog.call(); - - QBENCHMARK { - prog.call(); - } -} - -void tst_script::setproperty_qmlobject() -{ - QDeclarativeEngine qmlengine; - - QScriptEngine *engine = QDeclarativeEnginePrivate::getScriptEngine(&qmlengine); - TestObject to; - - QScriptValue v = QDeclarativeEnginePrivate::get(&qmlengine)->objectClass->newQObject(&to); - - QScriptValueList args; - args << v; - QScriptValue prog = engine->evaluate(SETPROPERTY_PROGRAM).call(engine->globalObject(), args); - prog.call(); - - QBENCHMARK { - prog.call(); - } -} - -#define FUNCTION_PROGRAM \ - "(function(testObject) { return (function() { " \ - " var test = 0; " \ - " for (var ii = 0; ii < 10000; ++ii) { " \ - " test += testObject.method(); " \ - " } " \ - " return test; " \ - "}); })" - -void tst_script::function_js() -{ - QScriptEngine engine; - - QScriptValue v = engine.evaluate("(function() { var o = new Object; o._x = 0; o.method = (function() { return this._x++; }); return o; })").call(); - - QScriptValueList args; - args << v; - QScriptValue prog = engine.evaluate(FUNCTION_PROGRAM).call(engine.globalObject(), args); - prog.call(); - - QBENCHMARK { - prog.call(); - } -} - -static QScriptValue function_method(QScriptContext *, QScriptEngine *) -{ - static int x = 0; - return QScriptValue(x++); -} - -void tst_script::function_cpp() -{ - QScriptEngine engine; - - QScriptValue v = engine.newObject(); - v.setProperty(QLatin1String("method"), engine.newFunction(function_method)); - - QScriptValueList args; - args << v; - QScriptValue prog = engine.evaluate(FUNCTION_PROGRAM).call(engine.globalObject(), args); - prog.call(); - - QBENCHMARK { - prog.call(); - } -} - -void tst_script::function_qobject() -{ - QScriptEngine engine; - - TestObject to; - QScriptValue v = engine.newQObject(&to); - - QScriptValueList args; - args << v; - QScriptValue prog = engine.evaluate(FUNCTION_PROGRAM).call(engine.globalObject(), args); - prog.call(); - - QBENCHMARK { - prog.call(); - } -} - -void tst_script::function_qmlobject() -{ - QDeclarativeEngine qmlengine; - - QScriptEngine *engine = QDeclarativeEnginePrivate::getScriptEngine(&qmlengine); - TestObject to; - - QScriptValue v = QDeclarativeEnginePrivate::get(&qmlengine)->objectClass->newQObject(&to); - - QScriptValueList args; - args << v; - QScriptValue prog = engine->evaluate(FUNCTION_PROGRAM).call(engine->globalObject(), args); - prog.call(); - - QBENCHMARK { - prog.call(); - } -} - -#define FUNCTION_ARGS_PROGRAM \ - "(function(testObject) { return (function() { " \ - " var test = 0; " \ - " for (var ii = 0; ii < 10000; ++ii) { " \ - " test += testObject.methodArgs(ii); " \ - " } " \ - " return test; " \ - "}); })" - -void tst_script::function_args_js() -{ - QScriptEngine engine; - - QScriptValue v = engine.evaluate("(function() { var o = new Object; o._x = 0; o.methodArgs = (function(a) { return a + this._x++; }); return o; })").call(); - - QScriptValueList args; - args << v; - QScriptValue prog = engine.evaluate(FUNCTION_ARGS_PROGRAM).call(engine.globalObject(), args); - prog.call(); - - QBENCHMARK { - prog.call(); - } -} - -static QScriptValue function_args_method(QScriptContext *ctxt, QScriptEngine *) -{ - static int x = 0; - return QScriptValue(ctxt->argument(0).toNumber() + x++); -} - -void tst_script::function_args_cpp() -{ - QScriptEngine engine; - - QScriptValue v = engine.newObject(); - v.setProperty(QLatin1String("methodArgs"), engine.newFunction(function_args_method)); - - QScriptValueList args; - args << v; - QScriptValue prog = engine.evaluate(FUNCTION_ARGS_PROGRAM).call(engine.globalObject(), args); - prog.call(); - - QBENCHMARK { - prog.call(); - } -} - -void tst_script::function_args_qobject() -{ - QScriptEngine engine; - - TestObject to; - QScriptValue v = engine.newQObject(&to); - - QScriptValueList args; - args << v; - QScriptValue prog = engine.evaluate(FUNCTION_ARGS_PROGRAM).call(engine.globalObject(), args); - prog.call(); - - QBENCHMARK { - prog.call(); - } -} - -void tst_script::function_args_qmlobject() -{ - QDeclarativeEngine qmlengine; - - QScriptEngine *engine = QDeclarativeEnginePrivate::getScriptEngine(&qmlengine); - TestObject to; - - QScriptValue v = QDeclarativeEnginePrivate::get(&qmlengine)->objectClass->newQObject(&to); - - QScriptValueList args; - args << v; - QScriptValue prog = engine->evaluate(FUNCTION_ARGS_PROGRAM).call(engine->globalObject(), args); - prog.call(); - - QBENCHMARK { - prog.call(); - } -} - -void tst_script::signal_unconnected() -{ - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("signal_unconnected.qml")); - TestObject *object = qobject_cast<TestObject *>(component.create()); - QVERIFY(object != 0); - - QBENCHMARK { - object->emitMySignal(); - } - - delete object; -} - -void tst_script::signal_qml() -{ - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("signal_qml.qml")); - TestObject *object = qobject_cast<TestObject *>(component.create()); - QVERIFY(object != 0); - - QBENCHMARK { - object->emitMySignal(); - } - - delete object; -} - -void tst_script::signal_args() -{ - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("signal_args.qml")); - TestObject *object = qobject_cast<TestObject *>(component.create()); - QVERIFY(object != 0); - - QBENCHMARK { - object->emitMySignalWithArgs(11); - } - - delete object; -} - -void tst_script::signal_unusedArgs() -{ - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("signal_unusedArgs.qml")); - TestObject *object = qobject_cast<TestObject *>(component.create()); - QVERIFY(object != 0); - - QBENCHMARK { - object->emitMySignalWithArgs(11); - } - - delete object; -} - -void tst_script::slot_simple() -{ - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("slot_simple.qml")); - TestObject *object = qobject_cast<TestObject *>(component.create()); - QVERIFY(object != 0); - - QBENCHMARK { - object->emitMySignal(); - } - - delete object; -} - -void tst_script::slot_simple_js() -{ - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("slot_simple_js.qml")); - TestObject *object = qobject_cast<TestObject *>(component.create()); - QVERIFY(object != 0); - - QBENCHMARK { - object->emitMySignal(); - } - - delete object; -} - -void tst_script::slot_complex() -{ - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("slot_complex.qml")); - TestObject *object = qobject_cast<TestObject *>(component.create()); - QVERIFY(object != 0); - - QBENCHMARK { - object->emitMySignal(); - } - - delete object; -} - -void tst_script::slot_complex_js() -{ - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("slot_complex_js.qml")); - TestObject *object = qobject_cast<TestObject *>(component.create()); - QVERIFY(object != 0); - - QBENCHMARK { - object->emitMySignal(); - } - - delete object; -} - -void tst_script::block_data() -{ - QTest::addColumn<QString>("methodName"); - QTest::newRow("direct") << "doSomethingDirect()"; - QTest::newRow("localObj") << "doSomethingLocalObj()"; - QTest::newRow("local") << "doSomethingLocal()"; -} - -void tst_script::block() -{ - QFETCH(QString, methodName); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("block.qml")); - QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle *>(component.create()); - QVERIFY(rect != 0); - - int index = rect->metaObject()->indexOfMethod(methodName.toUtf8()); - QVERIFY(index != -1); - QMetaMethod method = rect->metaObject()->method(index); - - QBENCHMARK { - method.invoke(rect, Qt::DirectConnection); - } - - delete rect; -} - -#define GLOBALPROPERTY_PROGRAM \ - "(function() { " \ - " for (var ii = 0; ii < 10000; ++ii) { " \ - " Math.sin(90); " \ - " } " \ - "})" - -void tst_script::global_property_js() -{ - QScriptEngine engine; - - QScriptValue prog = engine.evaluate(GLOBALPROPERTY_PROGRAM); - prog.call(); - - QBENCHMARK { - prog.call(); - } -} - -void tst_script::global_property_qml() -{ - QDeclarativeEngine qmlengine; - - QScriptEngine *engine = QDeclarativeEnginePrivate::getScriptEngine(&qmlengine); - QScriptValue prog = engine->evaluate(GLOBALPROPERTY_PROGRAM); - prog.call(); - - QBENCHMARK { - prog.call(); - } -} - -void tst_script::global_property_qml_js() -{ - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("global_prop.qml")); - QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle *>(component.create()); - QVERIFY(rect != 0); - - int index = rect->metaObject()->indexOfMethod("triggered()"); - QVERIFY(index != -1); - QMetaMethod method = rect->metaObject()->method(index); - - QBENCHMARK { - method.invoke(rect, Qt::DirectConnection); - } - - delete rect; -} - -void tst_script::scriptfile_property() -{ - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("global_prop.qml")); - QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle *>(component.create()); - QVERIFY(rect != 0); - - int index = rect->metaObject()->indexOfMethod("incrementTriggered()"); - QVERIFY(index != -1); - QMetaMethod method = rect->metaObject()->method(index); - - QBENCHMARK { - method.invoke(rect, Qt::DirectConnection); - } - - delete rect; -} - -void tst_script::enums() -{ - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("enums.qml")); - QObject *o = component.create(); - QVERIFY(o != 0); - - int index = o->metaObject()->indexOfMethod("runtest()"); - QVERIFY(index != -1); - QMetaMethod method = o->metaObject()->method(index); - - QBENCHMARK { - method.invoke(o, Qt::DirectConnection); - } - - delete o; -} - -void tst_script::namespacedEnums() -{ - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("namespacedEnums.qml")); - QObject *o = component.create(); - QVERIFY(o != 0); - - int index = o->metaObject()->indexOfMethod("runtest()"); - QVERIFY(index != -1); - QMetaMethod method = o->metaObject()->method(index); - - QBENCHMARK { - method.invoke(o, Qt::DirectConnection); - } - - delete o; -} - -void tst_script::scriptCall() -{ - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, TEST_FILE("scriptCall.qml")); - QObject *o = component.create(); - QVERIFY(o != 0); - - int index = o->metaObject()->indexOfMethod("runtest()"); - QVERIFY(index != -1); - QMetaMethod method = o->metaObject()->method(index); - - QBENCHMARK { - method.invoke(o, Qt::DirectConnection); - } - - delete o; -} - -QTEST_MAIN(tst_script) - -#include "tst_script.moc" diff --git a/tests/benchmarks/declarative/typeimports/data/QmlTestType1.qml b/tests/benchmarks/declarative/typeimports/data/QmlTestType1.qml deleted file mode 100644 index 47467a64a6..0000000000 --- a/tests/benchmarks/declarative/typeimports/data/QmlTestType1.qml +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt.test 2.0 -TestType1 { } diff --git a/tests/benchmarks/declarative/typeimports/data/QmlTestType2.qml b/tests/benchmarks/declarative/typeimports/data/QmlTestType2.qml deleted file mode 100644 index 2547d44ec0..0000000000 --- a/tests/benchmarks/declarative/typeimports/data/QmlTestType2.qml +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt.test 2.0 -TestType2 { } diff --git a/tests/benchmarks/declarative/typeimports/data/QmlTestType3.qml b/tests/benchmarks/declarative/typeimports/data/QmlTestType3.qml deleted file mode 100644 index b07f70a802..0000000000 --- a/tests/benchmarks/declarative/typeimports/data/QmlTestType3.qml +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt.test 2.0 -TestType3 { } diff --git a/tests/benchmarks/declarative/typeimports/data/QmlTestType4.qml b/tests/benchmarks/declarative/typeimports/data/QmlTestType4.qml deleted file mode 100644 index 3407b3b0bd..0000000000 --- a/tests/benchmarks/declarative/typeimports/data/QmlTestType4.qml +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt.test 2.0 -TestType4 { } diff --git a/tests/benchmarks/declarative/typeimports/data/cpp.qml b/tests/benchmarks/declarative/typeimports/data/cpp.qml deleted file mode 100644 index 28bc3222d3..0000000000 --- a/tests/benchmarks/declarative/typeimports/data/cpp.qml +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt.test 2.0 - -TestType1 { - TestType1 { } TestType2 { } TestType3 { } TestType4 { } - TestType1 { } TestType2 { } TestType3 { } TestType4 { } - TestType1 { } TestType2 { } TestType3 { } TestType4 { } - TestType1 { } TestType2 { } TestType3 { } TestType4 { } - TestType1 { } TestType2 { } TestType3 { } TestType4 { } - - TestType1 { } TestType2 { } TestType3 { } TestType4 { } - TestType1 { } TestType2 { } TestType3 { } TestType4 { } - TestType1 { } TestType2 { } TestType3 { } TestType4 { } - TestType1 { } TestType2 { } TestType3 { } TestType4 { } - TestType1 { } TestType2 { } TestType3 { } TestType4 { } -} diff --git a/tests/benchmarks/declarative/typeimports/data/qml.qml b/tests/benchmarks/declarative/typeimports/data/qml.qml deleted file mode 100644 index c6a71b30c5..0000000000 --- a/tests/benchmarks/declarative/typeimports/data/qml.qml +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -QmlTestType1 { - QmlTestType1 { } QmlTestType2 { } QmlTestType3 { } QmlTestType4 { } - QmlTestType1 { } QmlTestType2 { } QmlTestType3 { } QmlTestType4 { } - QmlTestType1 { } QmlTestType2 { } QmlTestType3 { } QmlTestType4 { } - QmlTestType1 { } QmlTestType2 { } QmlTestType3 { } QmlTestType4 { } - QmlTestType1 { } QmlTestType2 { } QmlTestType3 { } QmlTestType4 { } - - QmlTestType1 { } QmlTestType2 { } QmlTestType3 { } QmlTestType4 { } - QmlTestType1 { } QmlTestType2 { } QmlTestType3 { } QmlTestType4 { } - QmlTestType1 { } QmlTestType2 { } QmlTestType3 { } QmlTestType4 { } - QmlTestType1 { } QmlTestType2 { } QmlTestType3 { } QmlTestType4 { } - QmlTestType1 { } QmlTestType2 { } QmlTestType3 { } QmlTestType4 { } -} diff --git a/tests/benchmarks/declarative/typeimports/tst_typeimports.cpp b/tests/benchmarks/declarative/typeimports/tst_typeimports.cpp deleted file mode 100644 index a4fb034eb2..0000000000 --- a/tests/benchmarks/declarative/typeimports/tst_typeimports.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <qtest.h> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> -#include <QDebug> - -class tst_typeimports : public QObject -{ - Q_OBJECT -public: - tst_typeimports(); - -private slots: - void cpp(); - void qml(); - -private: - QDeclarativeEngine engine; -}; - -class TestType1 : public QObject -{ - Q_OBJECT - Q_PROPERTY(QDeclarativeListProperty<QObject> resources READ resources); - Q_CLASSINFO("DefaultProperty", "resources"); -public: - TestType1(QObject *parent = 0) : QObject(parent) {} - - QDeclarativeListProperty<QObject> resources() { - return QDeclarativeListProperty<QObject>(this, 0, resources_append); - } - - static void resources_append(QDeclarativeListProperty<QObject> *p, QObject *o) { - o->setParent(p->object); - } -}; - -class TestType2 : public TestType1 -{ - Q_OBJECT -public: - TestType2(QObject *parent = 0) : TestType1(parent) {} -}; - - -class TestType3 : public TestType1 -{ - Q_OBJECT -public: - TestType3(QObject *parent = 0) : TestType1(parent) {} -}; - -class TestType4 : public TestType1 -{ - Q_OBJECT -public: - TestType4(QObject *parent = 0) : TestType1(parent) {} -}; - - -tst_typeimports::tst_typeimports() -{ - qmlRegisterType<TestType1>("Qt.test", 1, 0, "TestType1"); - qmlRegisterType<TestType2>("Qt.test", 1, 0, "TestType2"); - qmlRegisterType<TestType3>("Qt.test", 2, 0, "TestType3"); - qmlRegisterType<TestType4>("Qt.test", 2, 0, "TestType4"); -} - -inline QUrl TEST_FILE(const QString &filename) -{ - return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename); -} - -void tst_typeimports::cpp() -{ - QBENCHMARK { - QDeclarativeComponent component(&engine, TEST_FILE("cpp.qml")); - QVERIFY(component.isReady()); - } -} - -void tst_typeimports::qml() -{ - //get rid of initialization effects - { QDeclarativeComponent component(&engine, TEST_FILE("qml.qml")); } - - QBENCHMARK { - QDeclarativeComponent component(&engine, TEST_FILE("qml.qml")); - QVERIFY(component.isReady()); - } -} - -QTEST_MAIN(tst_typeimports) - -#include "tst_typeimports.moc" diff --git a/tests/benchmarks/declarative/typeimports/typeimports.pro b/tests/benchmarks/declarative/typeimports/typeimports.pro deleted file mode 100644 index 403387f0ce..0000000000 --- a/tests/benchmarks/declarative/typeimports/typeimports.pro +++ /dev/null @@ -1,9 +0,0 @@ -CONFIG += testcase -TEMPLATE = app -TARGET = tst_typeimports -QT += declarative testlib -macx:CONFIG -= app_bundle - -SOURCES += tst_typeimports.cpp - -DEFINES += SRCDIR=\\\"$$PWD\\\" |