summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/auto.pro5
-rw-r--r--tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp2
-rw-r--r--tests/auto/qsqldatabase/tst_qsqldatabase.cpp1
-rw-r--r--tests/benchmarks/qscriptengine/tst_qscriptengine.cpp21
4 files changed, 26 insertions, 3 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 5041812..4215e97 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -443,7 +443,6 @@ SUBDIRS += \
qsharedmemory \
qsidebar \
qsizegrip \
- qsoftkeymanager \
qsqldriver \
qsystemsemaphore \
qtconcurrentfilter \
@@ -478,6 +477,10 @@ embedded:!wince* {
SUBDIRS += qtextpiecetable
}
+symbian {
+ SUBDIRS += qsoftkeymanager
+}
+
# Enable the tests specific to QtXmlPatterns. If you add a test, remember to
# update runQtXmlPatternsTests.sh too. Remember that this file, auto.pro, is
# not respected by some test system, they just have a script which loop over
diff --git a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
index d3087dc..ab110e6 100644
--- a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
+++ b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
@@ -146,7 +146,7 @@ void tst_QGraphicsLinearLayout::initTestCase()
{
// since the style will influence the results, we have to ensure
// that the tests are run using the same style on all platforms
-#ifdef Q_WS_S60
+#if defined( Q_WS_S60 )|| defined (Q_WS_WINCE)
QApplication::setStyle(new QWindowsStyle);
#else
QApplication::setStyle(new QPlastiqueStyle);
diff --git a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp
index f840ca6..cb4e103 100644
--- a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp
+++ b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp
@@ -2493,7 +2493,6 @@ void tst_QSqlDatabase::oci_tables()
QString systemTableName("system."+qTableName("mypassword"));
QVERIFY_SQL(q, exec("CREATE TABLE "+systemTableName+"(name VARCHAR(20))"));
QVERIFY(!db.tables().contains(systemTableName.toUpper()));
- qDebug() << db.tables(QSql::SystemTables);
QVERIFY(db.tables(QSql::SystemTables).contains(systemTableName.toUpper()));
}
diff --git a/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp b/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp
index 8d5f6e6..1c787e9 100644
--- a/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp
+++ b/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp
@@ -72,6 +72,8 @@ private slots:
void toStringHandle();
void castValueToQreal();
void nativeCall();
+ void translation_data();
+ void translation();
};
tst_QScriptEngine::tst_QScriptEngine()
@@ -259,5 +261,24 @@ 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\")";
+}
+
+void tst_QScriptEngine::translation()
+{
+ QFETCH(QString, text);
+ QScriptEngine engine;
+ engine.installTranslatorFunctions();
+
+ QBENCHMARK {
+ (void)engine.evaluate(text);
+ }
+}
+
QTEST_MAIN(tst_QScriptEngine)
#include "tst_qscriptengine.moc"