diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-10-26 02:57:20 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-10-26 03:28:45 (GMT) |
commit | b51b792145ce18e9489630e5d0f0dba9d385393f (patch) | |
tree | df69affe1abdf6fe70d5a296f8fe837442b985c3 /tests/benchmarks | |
parent | 05d3e827565d635e75cfd49e46b3ba72903a1e6f (diff) | |
parent | 6cd67bb07271950cca86dcad764b8581da588a51 (diff) | |
download | Qt-b51b792145ce18e9489630e5d0f0dba9d385393f.zip Qt-b51b792145ce18e9489630e5d0f0dba9d385393f.tar.gz Qt-b51b792145ce18e9489630e5d0f0dba9d385393f.tar.bz2 |
Merge branch 'qscriptprogram' of git@scm.dev.nokia.troll.no:qt/khansens-qt-script-program into kinetic-declarativeui
Manually merged src/declarative/qml/qmlexpression.cpp
src/script/api/qscriptengine.cpp
src/script/api/qscriptengine.h
Diffstat (limited to 'tests/benchmarks')
-rw-r--r-- | tests/benchmarks/qscriptengine/tst_qscriptengine.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp b/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp index 4f011c4..8d5f6e6 100644 --- a/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp +++ b/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp @@ -60,6 +60,8 @@ private slots: void constructor(); void evaluate_data(); void evaluate(); + void evaluateProgram_data(); + void evaluateProgram(); void connectAndDisconnect(); void newObject(); void newQObject(); @@ -153,6 +155,22 @@ void tst_QScriptEngine::connectAndDisconnect() } } +void tst_QScriptEngine::evaluateProgram_data() +{ + evaluate_data(); +} + +void tst_QScriptEngine::evaluateProgram() +{ + QFETCH(QString, code); + QScriptEngine engine; + QScriptProgram program(code); + + QBENCHMARK { + (void)engine.evaluate(program); + } +} + void tst_QScriptEngine::newObject() { QScriptEngine engine; @@ -241,6 +259,5 @@ void tst_QScriptEngine::nativeCall() } } - QTEST_MAIN(tst_QScriptEngine) #include "tst_qscriptengine.moc" |