summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-10-29 14:17:58 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-10-29 14:17:58 (GMT)
commite336c7a35f98d53f5746bbe8c0c7fbbaa0cf96e9 (patch)
treed13c48f4aa523de9aff848b3b557a36b1ab7870e /tests/benchmarks
parent732bd6893a9e65d33927b9083fe5e30c0864e409 (diff)
parent8331d6dab88b589164e27e8f44980c742835a729 (diff)
downloadQt-e336c7a35f98d53f5746bbe8c0c7fbbaa0cf96e9.zip
Qt-e336c7a35f98d53f5746bbe8c0c7fbbaa0cf96e9.tar.gz
Qt-e336c7a35f98d53f5746bbe8c0c7fbbaa0cf96e9.tar.bz2
Merge branch '4.6'
Conflicts: tools/qdoc3/test/qt-inc.qdocconf
Diffstat (limited to 'tests/benchmarks')
-rw-r--r--tests/benchmarks/qscriptengine/tst_qscriptengine.cpp19
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"