From 8e9ec9b982808feb3608e3f9b4d4caf13b65428c Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Thu, 14 Jan 2010 12:27:18 +1000 Subject: Benchmark cleanup. --- tests/benchmarks/benchmarks.pro | 1 + .../declarative/binding/data/idproperty.txt | 9 ++ .../declarative/binding/data/localproperty.txt | 5 + .../declarative/binding/data/objectproperty.txt | 7 + .../benchmarks/declarative/binding/idproperty.txt | 9 -- .../declarative/binding/localproperty.txt | 5 - .../declarative/binding/objectproperty.txt | 7 - .../benchmarks/declarative/binding/tst_binding.cpp | 16 +-- tests/benchmarks/declarative/declarative.pro | 12 ++ .../declarative/qmlcomponent/data/myqmlobject.qml | 3 + .../qmlcomponent/data/myqmlobject_binding.qml | 6 + .../declarative/qmlcomponent/data/object.qml | 3 + .../declarative/qmlcomponent/data/object_id.qml | 6 + .../qmlcomponent/data/samegame/BoomBlock.qml | 55 +++++++ .../qmlcomponent/data/samegame/pics/blueStar.png | Bin 0 -> 278 bytes .../qmlcomponent/data/samegame/pics/blueStone.png | Bin 0 -> 2691 bytes .../qmlcomponent/data/samegame/pics/greenStar.png | Bin 0 -> 273 bytes .../qmlcomponent/data/samegame/pics/greenStone.png | Bin 0 -> 2662 bytes .../qmlcomponent/data/samegame/pics/redStar.png | Bin 0 -> 274 bytes .../qmlcomponent/data/samegame/pics/redStone.png | Bin 0 -> 2604 bytes .../data/samegame/pics/yellowStone.png | Bin 0 -> 2667 bytes .../qmlcomponent/data/synthesized_properties.2.qml | 15 ++ .../qmlcomponent/data/synthesized_properties.qml | 5 + .../declarative/qmlcomponent/myqmlobject.txt | 3 - .../qmlcomponent/myqmlobject_binding.txt | 6 - .../benchmarks/declarative/qmlcomponent/object.txt | 3 - .../declarative/qmlcomponent/object_id.txt | 6 - .../qmlcomponent/samegame/BoomBlock.qml | 55 ------- .../qmlcomponent/samegame/pics/blueStar.png | Bin 278 -> 0 bytes .../qmlcomponent/samegame/pics/blueStone.png | Bin 2691 -> 0 bytes .../qmlcomponent/samegame/pics/greenStar.png | Bin 273 -> 0 bytes .../qmlcomponent/samegame/pics/greenStone.png | Bin 2662 -> 0 bytes .../qmlcomponent/samegame/pics/redStar.png | Bin 274 -> 0 bytes .../qmlcomponent/samegame/pics/redStone.png | Bin 2604 -> 0 bytes .../qmlcomponent/samegame/pics/yellowStone.png | Bin 2667 -> 0 bytes .../qmlcomponent/synthesized_properties.2.txt | 15 -- .../qmlcomponent/synthesized_properties.txt | 5 - .../declarative/qmlcomponent/tst_qmlcomponent.cpp | 16 +-- .../declarative/qmlgraphicsimage/image.png | Bin 54398 -> 611 bytes .../qmlgraphicsimage/tst_qmlgraphicsimage.cpp | 5 - .../declarative/qmlmetaproperty/data/object.qml | 3 + .../qmlmetaproperty/data/synthesized_object.qml | 6 + .../declarative/qmlmetaproperty/object.txt | 3 - .../qmlmetaproperty/synthesized_object.txt | 6 - .../qmlmetaproperty/tst_qmlmetaproperty.cpp | 4 +- .../declarative/signalemission/signalemission.pro | 7 + .../signalemission/tst_signalemission.cpp | 160 +++++++++++++++++++++ 47 files changed, 321 insertions(+), 146 deletions(-) create mode 100644 tests/benchmarks/declarative/binding/data/idproperty.txt create mode 100644 tests/benchmarks/declarative/binding/data/localproperty.txt create mode 100644 tests/benchmarks/declarative/binding/data/objectproperty.txt delete mode 100644 tests/benchmarks/declarative/binding/idproperty.txt delete mode 100644 tests/benchmarks/declarative/binding/localproperty.txt delete mode 100644 tests/benchmarks/declarative/binding/objectproperty.txt create mode 100644 tests/benchmarks/declarative/declarative.pro create mode 100644 tests/benchmarks/declarative/qmlcomponent/data/myqmlobject.qml create mode 100644 tests/benchmarks/declarative/qmlcomponent/data/myqmlobject_binding.qml create mode 100644 tests/benchmarks/declarative/qmlcomponent/data/object.qml create mode 100644 tests/benchmarks/declarative/qmlcomponent/data/object_id.qml create mode 100644 tests/benchmarks/declarative/qmlcomponent/data/samegame/BoomBlock.qml create mode 100644 tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/blueStar.png create mode 100644 tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/blueStone.png create mode 100644 tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/greenStar.png create mode 100644 tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/greenStone.png create mode 100644 tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/redStar.png create mode 100644 tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/redStone.png create mode 100644 tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/yellowStone.png create mode 100644 tests/benchmarks/declarative/qmlcomponent/data/synthesized_properties.2.qml create mode 100644 tests/benchmarks/declarative/qmlcomponent/data/synthesized_properties.qml delete mode 100644 tests/benchmarks/declarative/qmlcomponent/myqmlobject.txt delete mode 100644 tests/benchmarks/declarative/qmlcomponent/myqmlobject_binding.txt delete mode 100644 tests/benchmarks/declarative/qmlcomponent/object.txt delete mode 100644 tests/benchmarks/declarative/qmlcomponent/object_id.txt delete mode 100644 tests/benchmarks/declarative/qmlcomponent/samegame/BoomBlock.qml delete mode 100644 tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStar.png delete mode 100644 tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStone.png delete mode 100644 tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStar.png delete mode 100644 tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStone.png delete mode 100644 tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStar.png delete mode 100644 tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStone.png delete mode 100644 tests/benchmarks/declarative/qmlcomponent/samegame/pics/yellowStone.png delete mode 100644 tests/benchmarks/declarative/qmlcomponent/synthesized_properties.2.txt delete mode 100644 tests/benchmarks/declarative/qmlcomponent/synthesized_properties.txt create mode 100644 tests/benchmarks/declarative/qmlmetaproperty/data/object.qml create mode 100644 tests/benchmarks/declarative/qmlmetaproperty/data/synthesized_object.qml delete mode 100644 tests/benchmarks/declarative/qmlmetaproperty/object.txt delete mode 100644 tests/benchmarks/declarative/qmlmetaproperty/synthesized_object.txt create mode 100644 tests/benchmarks/declarative/signalemission/signalemission.pro create mode 100644 tests/benchmarks/declarative/signalemission/tst_signalemission.cpp diff --git a/tests/benchmarks/benchmarks.pro b/tests/benchmarks/benchmarks.pro index 08bf0ed..2979ffc 100644 --- a/tests/benchmarks/benchmarks.pro +++ b/tests/benchmarks/benchmarks.pro @@ -41,3 +41,4 @@ SUBDIRS = containers-associative \ qthreadstorage contains(QT_CONFIG, opengl): SUBDIRS += opengl +contains(QT_CONFIG, declarative): SUBDIRS += declarative diff --git a/tests/benchmarks/declarative/binding/data/idproperty.txt b/tests/benchmarks/declarative/binding/data/idproperty.txt new file mode 100644 index 0000000..71e3c4e --- /dev/null +++ b/tests/benchmarks/declarative/binding/data/idproperty.txt @@ -0,0 +1,9 @@ +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 new file mode 100644 index 0000000..c7ca0ef --- /dev/null +++ b/tests/benchmarks/declarative/binding/data/localproperty.txt @@ -0,0 +1,5 @@ +import Test 1.0 + +MyQmlObject { + result: ### +} diff --git a/tests/benchmarks/declarative/binding/data/objectproperty.txt b/tests/benchmarks/declarative/binding/data/objectproperty.txt new file mode 100644 index 0000000..63fa74d --- /dev/null +++ b/tests/benchmarks/declarative/binding/data/objectproperty.txt @@ -0,0 +1,7 @@ +import Test 1.0 + +MyQmlObject { + id: MyObject + + result: ### +} diff --git a/tests/benchmarks/declarative/binding/idproperty.txt b/tests/benchmarks/declarative/binding/idproperty.txt deleted file mode 100644 index 71e3c4e..0000000 --- a/tests/benchmarks/declarative/binding/idproperty.txt +++ /dev/null @@ -1,9 +0,0 @@ -import Test 1.0 - -MyQmlObject { - id: MyObject - - MyQmlObject { - result: ### - } -} diff --git a/tests/benchmarks/declarative/binding/localproperty.txt b/tests/benchmarks/declarative/binding/localproperty.txt deleted file mode 100644 index c7ca0ef..0000000 --- a/tests/benchmarks/declarative/binding/localproperty.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Test 1.0 - -MyQmlObject { - result: ### -} diff --git a/tests/benchmarks/declarative/binding/objectproperty.txt b/tests/benchmarks/declarative/binding/objectproperty.txt deleted file mode 100644 index 63fa74d..0000000 --- a/tests/benchmarks/declarative/binding/objectproperty.txt +++ /dev/null @@ -1,7 +0,0 @@ -import Test 1.0 - -MyQmlObject { - id: MyObject - - result: ### -} diff --git a/tests/benchmarks/declarative/binding/tst_binding.cpp b/tests/benchmarks/declarative/binding/tst_binding.cpp index 02312e6..7b4875f 100644 --- a/tests/benchmarks/declarative/binding/tst_binding.cpp +++ b/tests/benchmarks/declarative/binding/tst_binding.cpp @@ -102,8 +102,8 @@ void tst_binding::objectproperty_data() QTest::addColumn("file"); QTest::addColumn("binding"); - QTest::newRow("object.value") << "objectproperty.txt" << "object.value"; - QTest::newRow("object.value + 10") << "objectproperty.txt" << "object.value + 10"; + QTest::newRow("object.value") << "data/objectproperty.txt" << "object.value"; + QTest::newRow("object.value + 10") << "data/objectproperty.txt" << "object.value + 10"; } void tst_binding::objectproperty() @@ -131,13 +131,13 @@ void tst_binding::basicproperty_data() QTest::addColumn("file"); QTest::addColumn("binding"); - QTest::newRow("value") << "localproperty.txt" << "value"; - QTest::newRow("value + 10") << "localproperty.txt" << "value + 10"; - QTest::newRow("value + value + 10") << "localproperty.txt" << "value + value + 10"; + QTest::newRow("value") << "data/localproperty.txt" << "value"; + QTest::newRow("value + 10") << "data/localproperty.txt" << "value + 10"; + QTest::newRow("value + value + 10") << "data/localproperty.txt" << "value + value + 10"; - QTest::newRow("MyObject.value") << "idproperty.txt" << "MyObject.value"; - QTest::newRow("MyObject.value + 10") << "idproperty.txt" << "MyObject.value + 10"; - QTest::newRow("MyObject.value + MyObject.value + 10") << "idproperty.txt" << "MyObject.value + MyObject.value + 10"; + QTest::newRow("MyObject.value") << "data/idproperty.txt" << "MyObject.value"; + QTest::newRow("MyObject.value + 10") << "data/idproperty.txt" << "MyObject.value + 10"; + QTest::newRow("MyObject.value + MyObject.value + 10") << "data/idproperty.txt" << "MyObject.value + MyObject.value + 10"; } void tst_binding::basicproperty() diff --git a/tests/benchmarks/declarative/declarative.pro b/tests/benchmarks/declarative/declarative.pro new file mode 100644 index 0000000..2f85265 --- /dev/null +++ b/tests/benchmarks/declarative/declarative.pro @@ -0,0 +1,12 @@ +TEMPLATE = subdirs +SUBDIRS += \ + binding \ + creation \ + pointers \ + qmlcomponent \ + qmlgraphicsimage \ + qmlmetaproperty \ + qmlpainting \ + script \ + text +# qmltime diff --git a/tests/benchmarks/declarative/qmlcomponent/data/myqmlobject.qml b/tests/benchmarks/declarative/qmlcomponent/data/myqmlobject.qml new file mode 100644 index 0000000..9c3f7f8 --- /dev/null +++ b/tests/benchmarks/declarative/qmlcomponent/data/myqmlobject.qml @@ -0,0 +1,3 @@ +import Qt.test 4.6 + +MyQmlObject {} diff --git a/tests/benchmarks/declarative/qmlcomponent/data/myqmlobject_binding.qml b/tests/benchmarks/declarative/qmlcomponent/data/myqmlobject_binding.qml new file mode 100644 index 0000000..e6cc4cf --- /dev/null +++ b/tests/benchmarks/declarative/qmlcomponent/data/myqmlobject_binding.qml @@ -0,0 +1,6 @@ +import Qt.test 4.6 + +MyQmlObject { + result: value +} + diff --git a/tests/benchmarks/declarative/qmlcomponent/data/object.qml b/tests/benchmarks/declarative/qmlcomponent/data/object.qml new file mode 100644 index 0000000..0d2d49b --- /dev/null +++ b/tests/benchmarks/declarative/qmlcomponent/data/object.qml @@ -0,0 +1,3 @@ +import Qt 4.6 + +QtObject {} diff --git a/tests/benchmarks/declarative/qmlcomponent/data/object_id.qml b/tests/benchmarks/declarative/qmlcomponent/data/object_id.qml new file mode 100644 index 0000000..69114af --- /dev/null +++ b/tests/benchmarks/declarative/qmlcomponent/data/object_id.qml @@ -0,0 +1,6 @@ +import Qt 4.6 + +QtObject { + id: Blah +} + diff --git a/tests/benchmarks/declarative/qmlcomponent/data/samegame/BoomBlock.qml b/tests/benchmarks/declarative/qmlcomponent/data/samegame/BoomBlock.qml new file mode 100644 index 0000000..723e62a --- /dev/null +++ b/tests/benchmarks/declarative/qmlcomponent/data/samegame/BoomBlock.qml @@ -0,0 +1,55 @@ +import Qt 4.6 + +Item { id:block + property bool dying: false + property bool spawned: false + property int type: 0 + property int targetX: 0 + property int targetY: 0 + + x: SpringFollow { enabled: spawned; source: targetX; spring: 2; damping: 0.2 } + y: SpringFollow { source: 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 + opacity: Behavior { 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/qmlcomponent/data/samegame/pics/blueStar.png b/tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/blueStar.png new file mode 100644 index 0000000..ff9588f Binary files /dev/null and b/tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/blueStar.png differ diff --git a/tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/blueStone.png b/tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/blueStone.png new file mode 100644 index 0000000..bf342e0 Binary files /dev/null and b/tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/blueStone.png differ diff --git a/tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/greenStar.png b/tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/greenStar.png new file mode 100644 index 0000000..cd06854 Binary files /dev/null and b/tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/greenStar.png differ diff --git a/tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/greenStone.png b/tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/greenStone.png new file mode 100644 index 0000000..5ac14a5 Binary files /dev/null and b/tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/greenStone.png differ diff --git a/tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/redStar.png b/tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/redStar.png new file mode 100644 index 0000000..0a4dffe Binary files /dev/null and b/tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/redStar.png differ diff --git a/tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/redStone.png b/tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/redStone.png new file mode 100644 index 0000000..b099f60 Binary files /dev/null and b/tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/redStone.png differ diff --git a/tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/yellowStone.png b/tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/yellowStone.png new file mode 100644 index 0000000..c56124a Binary files /dev/null and b/tests/benchmarks/declarative/qmlcomponent/data/samegame/pics/yellowStone.png differ diff --git a/tests/benchmarks/declarative/qmlcomponent/data/synthesized_properties.2.qml b/tests/benchmarks/declarative/qmlcomponent/data/synthesized_properties.2.qml new file mode 100644 index 0000000..27c5646 --- /dev/null +++ b/tests/benchmarks/declarative/qmlcomponent/data/synthesized_properties.2.qml @@ -0,0 +1,15 @@ +import Qt 4.6 + +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 var i + property variant j +} + diff --git a/tests/benchmarks/declarative/qmlcomponent/data/synthesized_properties.qml b/tests/benchmarks/declarative/qmlcomponent/data/synthesized_properties.qml new file mode 100644 index 0000000..d08f35b --- /dev/null +++ b/tests/benchmarks/declarative/qmlcomponent/data/synthesized_properties.qml @@ -0,0 +1,5 @@ +import Qt 4.6 + +QtObject { + property int a +} diff --git a/tests/benchmarks/declarative/qmlcomponent/myqmlobject.txt b/tests/benchmarks/declarative/qmlcomponent/myqmlobject.txt deleted file mode 100644 index 9c3f7f8..0000000 --- a/tests/benchmarks/declarative/qmlcomponent/myqmlobject.txt +++ /dev/null @@ -1,3 +0,0 @@ -import Qt.test 4.6 - -MyQmlObject {} diff --git a/tests/benchmarks/declarative/qmlcomponent/myqmlobject_binding.txt b/tests/benchmarks/declarative/qmlcomponent/myqmlobject_binding.txt deleted file mode 100644 index e6cc4cf..0000000 --- a/tests/benchmarks/declarative/qmlcomponent/myqmlobject_binding.txt +++ /dev/null @@ -1,6 +0,0 @@ -import Qt.test 4.6 - -MyQmlObject { - result: value -} - diff --git a/tests/benchmarks/declarative/qmlcomponent/object.txt b/tests/benchmarks/declarative/qmlcomponent/object.txt deleted file mode 100644 index 0d2d49b..0000000 --- a/tests/benchmarks/declarative/qmlcomponent/object.txt +++ /dev/null @@ -1,3 +0,0 @@ -import Qt 4.6 - -QtObject {} diff --git a/tests/benchmarks/declarative/qmlcomponent/object_id.txt b/tests/benchmarks/declarative/qmlcomponent/object_id.txt deleted file mode 100644 index 69114af..0000000 --- a/tests/benchmarks/declarative/qmlcomponent/object_id.txt +++ /dev/null @@ -1,6 +0,0 @@ -import Qt 4.6 - -QtObject { - id: Blah -} - diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/BoomBlock.qml b/tests/benchmarks/declarative/qmlcomponent/samegame/BoomBlock.qml deleted file mode 100644 index 723e62a..0000000 --- a/tests/benchmarks/declarative/qmlcomponent/samegame/BoomBlock.qml +++ /dev/null @@ -1,55 +0,0 @@ -import Qt 4.6 - -Item { id:block - property bool dying: false - property bool spawned: false - property int type: 0 - property int targetX: 0 - property int targetY: 0 - - x: SpringFollow { enabled: spawned; source: targetX; spring: 2; damping: 0.2 } - y: SpringFollow { source: 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 - opacity: Behavior { 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/qmlcomponent/samegame/pics/blueStar.png b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStar.png deleted file mode 100644 index ff9588f..0000000 Binary files a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStar.png and /dev/null differ diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStone.png b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStone.png deleted file mode 100644 index bf342e0..0000000 Binary files a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStone.png and /dev/null differ diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStar.png b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStar.png deleted file mode 100644 index cd06854..0000000 Binary files a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStar.png and /dev/null differ diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStone.png b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStone.png deleted file mode 100644 index 5ac14a5..0000000 Binary files a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStone.png and /dev/null differ diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStar.png b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStar.png deleted file mode 100644 index 0a4dffe..0000000 Binary files a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStar.png and /dev/null differ diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStone.png b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStone.png deleted file mode 100644 index b099f60..0000000 Binary files a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStone.png and /dev/null differ diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/yellowStone.png b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/yellowStone.png deleted file mode 100644 index c56124a..0000000 Binary files a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/yellowStone.png and /dev/null differ diff --git a/tests/benchmarks/declarative/qmlcomponent/synthesized_properties.2.txt b/tests/benchmarks/declarative/qmlcomponent/synthesized_properties.2.txt deleted file mode 100644 index 27c5646..0000000 --- a/tests/benchmarks/declarative/qmlcomponent/synthesized_properties.2.txt +++ /dev/null @@ -1,15 +0,0 @@ -import Qt 4.6 - -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 var i - property variant j -} - diff --git a/tests/benchmarks/declarative/qmlcomponent/synthesized_properties.txt b/tests/benchmarks/declarative/qmlcomponent/synthesized_properties.txt deleted file mode 100644 index d08f35b..0000000 --- a/tests/benchmarks/declarative/qmlcomponent/synthesized_properties.txt +++ /dev/null @@ -1,5 +0,0 @@ -import Qt 4.6 - -QtObject { - property int a -} diff --git a/tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp b/tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp index 50cfc93..f5a4540 100644 --- a/tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp +++ b/tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp @@ -23,7 +23,7 @@ ** ** 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. +** version 1.1, included in the file LGPL_EXCEPTION.qml in this package. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. @@ -89,13 +89,13 @@ void tst_qmlcomponent::creation_data() { QTest::addColumn("file"); - QTest::newRow("Object") << "object.txt"; - QTest::newRow("Object - Id") << "object_id.txt"; - QTest::newRow("MyQmlObject") << "myqmlobject.txt"; - QTest::newRow("MyQmlObject: basic binding") << "myqmlobject_binding.txt"; - QTest::newRow("Synthesized properties") << "synthesized_properties.txt"; - QTest::newRow("Synthesized properties.2") << "synthesized_properties.2.txt"; - QTest::newRow("SameGame - BoomBlock") << "samegame/BoomBlock.qml"; + QTest::newRow("Object") << "data/object.qml"; + QTest::newRow("Object - Id") << "data/object_id.qml"; + QTest::newRow("MyQmlObject") << "data/myqmlobject.qml"; + QTest::newRow("MyQmlObject: basic binding") << "data/myqmlobject_binding.qml"; + QTest::newRow("Synthesized properties") << "data/synthesized_properties.qml"; + QTest::newRow("Synthesized properties.2") << "data/synthesized_properties.2.qml"; + QTest::newRow("SameGame - BoomBlock") << "data/samegame/BoomBlock.qml"; } void tst_qmlcomponent::creation() diff --git a/tests/benchmarks/declarative/qmlgraphicsimage/image.png b/tests/benchmarks/declarative/qmlgraphicsimage/image.png index e94a94d..623d362 100644 Binary files a/tests/benchmarks/declarative/qmlgraphicsimage/image.png and b/tests/benchmarks/declarative/qmlgraphicsimage/image.png differ diff --git a/tests/benchmarks/declarative/qmlgraphicsimage/tst_qmlgraphicsimage.cpp b/tests/benchmarks/declarative/qmlgraphicsimage/tst_qmlgraphicsimage.cpp index bfd1c75..f6a6432 100644 --- a/tests/benchmarks/declarative/qmlgraphicsimage/tst_qmlgraphicsimage.cpp +++ b/tests/benchmarks/declarative/qmlgraphicsimage/tst_qmlgraphicsimage.cpp @@ -59,11 +59,6 @@ private: QmlEngine engine; }; -inline QUrl TEST_FILE(const QString &filename) -{ - return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename); -} - void tst_qmlgraphicsimage::qmlgraphicsimage() { int x = 0; diff --git a/tests/benchmarks/declarative/qmlmetaproperty/data/object.qml b/tests/benchmarks/declarative/qmlmetaproperty/data/object.qml new file mode 100644 index 0000000..11b95e1 --- /dev/null +++ b/tests/benchmarks/declarative/qmlmetaproperty/data/object.qml @@ -0,0 +1,3 @@ +import Qt 4.6 + +Item {} diff --git a/tests/benchmarks/declarative/qmlmetaproperty/data/synthesized_object.qml b/tests/benchmarks/declarative/qmlmetaproperty/data/synthesized_object.qml new file mode 100644 index 0000000..a923a0a --- /dev/null +++ b/tests/benchmarks/declarative/qmlmetaproperty/data/synthesized_object.qml @@ -0,0 +1,6 @@ +import Qt 4.6 + +Item { + property int blah +} + diff --git a/tests/benchmarks/declarative/qmlmetaproperty/object.txt b/tests/benchmarks/declarative/qmlmetaproperty/object.txt deleted file mode 100644 index 11b95e1..0000000 --- a/tests/benchmarks/declarative/qmlmetaproperty/object.txt +++ /dev/null @@ -1,3 +0,0 @@ -import Qt 4.6 - -Item {} diff --git a/tests/benchmarks/declarative/qmlmetaproperty/synthesized_object.txt b/tests/benchmarks/declarative/qmlmetaproperty/synthesized_object.txt deleted file mode 100644 index a923a0a..0000000 --- a/tests/benchmarks/declarative/qmlmetaproperty/synthesized_object.txt +++ /dev/null @@ -1,6 +0,0 @@ -import Qt 4.6 - -Item { - property int blah -} - diff --git a/tests/benchmarks/declarative/qmlmetaproperty/tst_qmlmetaproperty.cpp b/tests/benchmarks/declarative/qmlmetaproperty/tst_qmlmetaproperty.cpp index 3a3dc7a..8d0e549 100644 --- a/tests/benchmarks/declarative/qmlmetaproperty/tst_qmlmetaproperty.cpp +++ b/tests/benchmarks/declarative/qmlmetaproperty/tst_qmlmetaproperty.cpp @@ -89,8 +89,8 @@ void tst_qmlmetaproperty::lookup_data() { QTest::addColumn("file"); - QTest::newRow("Simple Object") << "object.txt"; - QTest::newRow("Synthesized Object") << "synthesized_object.txt"; + QTest::newRow("Simple Object") << "data/object.qml"; + QTest::newRow("Synthesized Object") << "data/synthesized_object.qml"; } void tst_qmlmetaproperty::lookup() diff --git a/tests/benchmarks/declarative/signalemission/signalemission.pro b/tests/benchmarks/declarative/signalemission/signalemission.pro new file mode 100644 index 0000000..0119aff --- /dev/null +++ b/tests/benchmarks/declarative/signalemission/signalemission.pro @@ -0,0 +1,7 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_signalemission +macx:CONFIG -= app_bundle + +SOURCES += tst_signalemission.cpp + diff --git a/tests/benchmarks/declarative/signalemission/tst_signalemission.cpp b/tests/benchmarks/declarative/signalemission/tst_signalemission.cpp new file mode 100644 index 0000000..8327638 --- /dev/null +++ b/tests/benchmarks/declarative/signalemission/tst_signalemission.cpp @@ -0,0 +1,160 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include + +class LotsOfSignals : public QObject +{ + Q_OBJECT +public: + LotsOfSignals() {} + +signals: + void extraSignal1(); + void extraSignal2(); + void extraSignal3(); + void extraSignal4(); + void extraSignal5(); + void extraSignal6(); + void extraSignal7(); + void extraSignal8(); + void extraSignal9(); + void extraSignal10(); + void extraSignal12(); + void extraSignal13(); + void extraSignal14(); + void extraSignal15(); + void extraSignal16(); + void extraSignal17(); + void extraSignal18(); + void extraSignal19(); + void extraSignal20(); + void extraSignal21(); + void extraSignal22(); + void extraSignal23(); + void extraSignal24(); + void extraSignal25(); + void extraSignal26(); + void extraSignal27(); + void extraSignal28(); + void extraSignal29(); + void extraSignal30(); + void extraSignal31(); + void extraSignal32(); + void extraSignal33(); + void extraSignal34(); + void extraSignal35(); + void extraSignal36(); + void extraSignal37(); + void extraSignal38(); + void extraSignal39(); + void extraSignal40(); + void extraSignal41(); + void extraSignal42(); + void extraSignal43(); + void extraSignal44(); + void extraSignal45(); + void extraSignal46(); + void extraSignal47(); + void extraSignal48(); + void extraSignal49(); + void extraSignal50(); + void extraSignal51(); + void extraSignal52(); + void extraSignal53(); + void extraSignal54(); + void extraSignal55(); + void extraSignal56(); + void extraSignal57(); + void extraSignal58(); + void extraSignal59(); + void extraSignal60(); + void extraSignal61(); + void extraSignal62(); + void extraSignal63(); + void extraSignal64(); + void extraSignal65(); + void extraSignal66(); + void extraSignal67(); + void extraSignal68(); + void extraSignal69(); + void extraSignal70(); +}; + +class tst_signalemission : public QObject +{ + Q_OBJECT +public: + tst_signalemission() {} + +private slots: + void unconnected_data(); + void unconnected(); +}; + +void tst_signalemission::unconnected_data() +{ + QTest::addColumn("signal_index"); + QTest::newRow("9") << 9; + QTest::newRow("32") << 32; + QTest::newRow("33") << 33; + QTest::newRow("64") << 64; + QTest::newRow("65") << 65; + QTest::newRow("70") << 70; +} + +void tst_signalemission::unconnected() +{ + LotsOfSignals *obj = new LotsOfSignals; + QFETCH(int, signal_index); + QVERIFY(obj->metaObject()->methodCount() == 73); + void *v; + QBENCHMARK { + //+1 because QObject has one slot + QMetaObject::metacall(obj, QMetaObject::InvokeMetaMethod, signal_index+1, &v); + } + delete obj; +} + +QTEST_MAIN(tst_signalemission) +#include "tst_signalemission.moc" -- cgit v0.12