diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-05-13 00:08:48 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-05-13 00:08:48 (GMT) |
commit | 386b658ce39bfab16ea14b232c61ad4703f11619 (patch) | |
tree | d68d6fbf210464dfd7ce78e22c0fabc9e1537a40 /tests/benchmarks/declarative/script | |
parent | 7894bbb901a2ba74284bd6c0544b06c6a41f6b6f (diff) | |
download | Qt-386b658ce39bfab16ea14b232c61ad4703f11619.zip Qt-386b658ce39bfab16ea14b232c61ad4703f11619.tar.gz Qt-386b658ce39bfab16ea14b232c61ad4703f11619.tar.bz2 |
Fix broken benchmarks.
Diffstat (limited to 'tests/benchmarks/declarative/script')
4 files changed, 15 insertions, 20 deletions
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(); } } } |