summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks')
-rw-r--r--tests/benchmarks/script/qscriptengine/tst_qscriptengine.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/benchmarks/script/qscriptengine/tst_qscriptengine.cpp b/tests/benchmarks/script/qscriptengine/tst_qscriptengine.cpp
index 6c6f0b1..35e2f28 100644
--- a/tests/benchmarks/script/qscriptengine/tst_qscriptengine.cpp
+++ b/tests/benchmarks/script/qscriptengine/tst_qscriptengine.cpp
@@ -269,19 +269,22 @@ void tst_QScriptEngine::nativeCall()
void tst_QScriptEngine::translation_data()
{
QTest::addColumn<QString>("text");
- QTest::newRow("no translation") << "\"hello world\"";
- QTest::newRow("qsTr") << "qsTr(\"hello world\")";
- QTest::newRow("qsTranslate") << "qsTranslate(\"\", \"hello world\")";
+ QTest::addColumn<QString>("fileName");
+ QTest::newRow("no translation") << "\"hello world\"" << "";
+ QTest::newRow("qsTr") << "qsTr(\"hello world\")" << "";
+ QTest::newRow("qsTranslate") << "qsTranslate(\"\", \"hello world\")" << "";
+ QTest::newRow("qsTr:script.js") << "qsTr(\"hello world\")" << "script.js";
}
void tst_QScriptEngine::translation()
{
QFETCH(QString, text);
+ QFETCH(QString, fileName);
QScriptEngine engine;
engine.installTranslatorFunctions();
QBENCHMARK {
- (void)engine.evaluate(text);
+ (void)engine.evaluate(text, fileName);
}
}