diff options
Diffstat (limited to 'tests/benchmarks')
8 files changed, 26 insertions, 25 deletions
diff --git a/tests/benchmarks/declarative/creation/tst_creation.cpp b/tests/benchmarks/declarative/creation/tst_creation.cpp index 6f00473..99324f4 100644 --- a/tests/benchmarks/declarative/creation/tst_creation.cpp +++ b/tests/benchmarks/declarative/creation/tst_creation.cpp @@ -203,7 +203,7 @@ void tst_creation::qobject_10tree_cpp() void tst_creation::qobject_qmltype() { - QDeclarativeType *t = QDeclarativeMetaType::qmlType("Qt/QtObject", 4, 6); + QDeclarativeType *t = QDeclarativeMetaType::qmlType("Qt/QtObject", 4, 7); QBENCHMARK { QObject *obj = t->create(); @@ -347,7 +347,7 @@ void tst_creation::elements_data() void tst_creation::elements() { QFETCH(QByteArray, type); - QDeclarativeType *t = QDeclarativeMetaType::qmlType(type, 4, 6); + QDeclarativeType *t = QDeclarativeMetaType::qmlType(type, 4, 7); if (!t || !t->isCreatable()) QSKIP("Non-creatable type", SkipSingle); diff --git a/tests/benchmarks/declarative/painting/painting.pro b/tests/benchmarks/declarative/painting/painting.pro index 2f98e8b..a228ea7 100644 --- a/tests/benchmarks/declarative/painting/painting.pro +++ b/tests/benchmarks/declarative/painting/painting.pro @@ -11,3 +11,4 @@ INCLUDEPATH += . SOURCES += paintbenchmark.cpp QT += opengl CONFIG += console +macx:CONFIG -= app_bundle diff --git a/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp index 4bba022..e2e8c8a 100644 --- a/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp +++ b/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp @@ -68,7 +68,7 @@ private: void tst_qmlgraphicsimage::qmlgraphicsimage() { int x = 0; - QUrl url("image.png"); + QUrl url(SRCDIR "/image.png"); QBENCHMARK { QUrl url2("http://localhost/image" + QString::number(x++) + ".png"); QDeclarativeImage *image = new QDeclarativeImage; @@ -80,7 +80,7 @@ void tst_qmlgraphicsimage::qmlgraphicsimage() void tst_qmlgraphicsimage::qmlgraphicsimage_file() { int x = 0; - QUrl url("image.png"); + QUrl url(SRCDIR "/image.png"); QBENCHMARK { QUrl url2("http://localhost/image" + QString::number(x++) + ".png"); QDeclarativeImage *image = new QDeclarativeImage; @@ -93,7 +93,7 @@ void tst_qmlgraphicsimage::qmlgraphicsimage_file() void tst_qmlgraphicsimage::qmlgraphicsimage_url() { int x = 0; - QUrl url("image.png"); + QUrl url(SRCDIR "/image.png"); QBENCHMARK { QUrl url2("http://localhost/image" + QString::number(x++) + ".png"); QDeclarativeImage *image = new QDeclarativeImage; diff --git a/tests/benchmarks/declarative/script/data/slot_complex_js.js b/tests/benchmarks/declarative/script/data/slot_complex_js.js new file mode 100644 index 0000000..64a1f65 --- /dev/null +++ b/tests/benchmarks/declarative/script/data/slot_complex_js.js @@ -0,0 +1,8 @@ +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 index ed4f78b..7bda48b 100644 --- a/tests/benchmarks/declarative/script/data/slot_complex_js.qml +++ b/tests/benchmarks/declarative/script/data/slot_complex_js.qml @@ -1,18 +1,8 @@ import Qt.test 1.0 +import "slot_complex_js.js" as Logic TestObject { - Script { - function myCustomFunction(n) { - var a = 1; - while (n > 0) { - a = a * n; - n--; - } - return a; - } - } - - onMySignal: { for (var ii = 0; ii < 10000; ++ii) { myCustomFunction(10); } } + onMySignal: { for (var ii = 0; ii < 10000; ++ii) { Logic.myCustomFunction(10); } } } diff --git a/tests/benchmarks/declarative/script/data/slot_simple_js.js b/tests/benchmarks/declarative/script/data/slot_simple_js.js new file mode 100644 index 0000000..d6e6060 --- /dev/null +++ b/tests/benchmarks/declarative/script/data/slot_simple_js.js @@ -0,0 +1,3 @@ +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 index a88265c..7ea3177 100644 --- a/tests/benchmarks/declarative/script/data/slot_simple_js.qml +++ b/tests/benchmarks/declarative/script/data/slot_simple_js.qml @@ -1,13 +1,7 @@ import Qt.test 1.0 +import "slot_simple_js.js" as Logic TestObject { - - Script { - function myCustomFunction() { - return 0; - } - } - - onMySignal: { for (var ii = 0; ii < 10000; ++ii) { myCustomFunction(); } } + onMySignal: { for (var ii = 0; ii < 10000; ++ii) { Logic.myCustomFunction(); } } } diff --git a/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp b/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp index 8c30be4..7015bd1 100644 --- a/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp +++ b/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp @@ -159,12 +159,17 @@ void tst_QWidget::update_data() QTest::newRow("10x10x1 opaque") << 10 << 10 << 1 << true; QTest::newRow("10x10x10 opaque") << 10 << 10 << 10 << true; QTest::newRow("10x10x100 opaque") << 10 << 10 << 100 << true; +#ifndef Q_OS_SYMBIAN + //These test cases cause stack overflow in QWidgetPrivate::paintSiblingsRecursive + //see http://bugreports.qt.nokia.com/browse/QTBUG-8512 + //Symbian threads have a hard limit of 80kB user stack QTest::newRow("25x25x1 transparent ") << 25 << 25 << 1 << false; QTest::newRow("25x25x10 transparent") << 25 << 25 << 10 << false; QTest::newRow("25x25x100 transparent") << 25 << 25 << 100 << false; QTest::newRow("25x25x1 opaque") << 25 << 25 << 1 << true; QTest::newRow("25x25x10 opaque") << 25 << 25 << 10 << true; QTest::newRow("25x25x100 opaque") << 25 << 25 << 100 << true; +#endif } void tst_QWidget::update() |