summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAleksandar Sasha Babic <aleksandar.babic@nokia.com>2010-01-29 17:05:39 (GMT)
committerAleksandar Sasha Babic <aleksandar.babic@nokia.com>2010-01-29 17:12:28 (GMT)
commitf512c8a279518e992ae59c13c17453ac2769359e (patch)
treef3f97cb2fee3832d7bb690df05d4903c0d9350c9 /tests
parent94e5195c84cbe0e7b37550af3eb1540b22bf2b4a (diff)
downloadQt-f512c8a279518e992ae59c13c17453ac2769359e.zip
Qt-f512c8a279518e992ae59c13c17453ac2769359e.tar.gz
Qt-f512c8a279518e992ae59c13c17453ac2769359e.tar.bz2
Fixing benchmark for Symbian
The bidi.txt has to be deployed in proper way. Reviewed-by: TrustMe
Diffstat (limited to 'tests')
-rw-r--r--tests/benchmarks/qtext/main.cpp10
-rw-r--r--tests/benchmarks/qtext/qtext.pro9
2 files changed, 18 insertions, 1 deletions
diff --git a/tests/benchmarks/qtext/main.cpp b/tests/benchmarks/qtext/main.cpp
index 9854a9f..d4f3165 100644
--- a/tests/benchmarks/qtext/main.cpp
+++ b/tests/benchmarks/qtext/main.cpp
@@ -51,6 +51,12 @@
#include <QBuffer>
#include <qtest.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+// Application private dir is default serach path for files, so SRCDIR can be set to empty
+#define SRCDIR ""
+#endif
+
Q_DECLARE_METATYPE(QTextDocument*)
class tst_QText: public QObject
@@ -129,7 +135,11 @@ void tst_QText::shaping_data()
QTest::newRow("lorem") << m_lorem;
QTest::newRow("short") << QString::fromLatin1("Lorem ipsum dolor sit amet");
+#if !defined(Q_OS_SYMBIAN)
QFile file(QString::fromLatin1(SRCDIR) + QLatin1String("/bidi.txt"));
+#else
+ QFile file( SRCDIR "bidi.txt" );
+#endif
QVERIFY(file.open(QFile::ReadOnly));
QByteArray data = file.readAll();
QVERIFY(data.count() > 1000);
diff --git a/tests/benchmarks/qtext/qtext.pro b/tests/benchmarks/qtext/qtext.pro
index ce4f604..9e8860f 100644
--- a/tests/benchmarks/qtext/qtext.pro
+++ b/tests/benchmarks/qtext/qtext.pro
@@ -4,4 +4,11 @@ TARGET = tst_QText
SOURCES += main.cpp
-DEFINES += SRCDIR=\\\"$$PWD/\\\"
+symbian* {
+ TARGET.CAPABILITY = ALL -TCB
+ addFiles.sources = bidi.txt
+ addFiles.path = .
+ DEPLOYMENT += addFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD/\\\"
+} \ No newline at end of file