diff options
author | Kurt Korbatits <kurt.korbatits@nokia.com> | 2012-03-12 14:24:02 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-19 01:18:20 +0100 |
commit | 0f929bfa9aa76d7db54a62c6a571e97224384ec1 (patch) | |
tree | a816ba9a293ba7b56c91be4c3b85ea4e56013f1d /tests/benchmarks/gui/text | |
parent | 36513264daaa0748d32326421732b9e5f212c2b5 (diff) |
Fixed benchmarks to work from install directory
- Changed benchmarks to use TESTDATA and QFINDTESTDATA
- Fixed up targets all use tst_bench_ syntax
Change-Id: I5c2936702e248478f5df225ce38893158ee22d7f
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/benchmarks/gui/text')
-rw-r--r-- | tests/benchmarks/gui/text/qtext/main.cpp | 4 | ||||
-rw-r--r-- | tests/benchmarks/gui/text/qtext/qtext.pro | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/benchmarks/gui/text/qtext/main.cpp b/tests/benchmarks/gui/text/qtext/main.cpp index d4acfce821..5a4745fbc7 100644 --- a/tests/benchmarks/gui/text/qtext/main.cpp +++ b/tests/benchmarks/gui/text/qtext/main.cpp @@ -129,7 +129,9 @@ void tst_QText::shaping_data() QTest::newRow("lorem") << m_lorem; QTest::newRow("short") << QString::fromLatin1("Lorem ipsum dolor sit amet"); - QFile file(QString::fromLatin1(SRCDIR) + QLatin1String("/bidi.txt")); + QString testFile = QFINDTESTDATA("bidi.txt"); + QVERIFY2(!testFile.isEmpty(), "cannot find test file bidi.txt!"); + QFile file(testFile); QVERIFY(file.open(QFile::ReadOnly)); QByteArray data = file.readAll(); QVERIFY(data.count() > 1000); diff --git a/tests/benchmarks/gui/text/qtext/qtext.pro b/tests/benchmarks/gui/text/qtext/qtext.pro index ef91a97493..084cf858fd 100644 --- a/tests/benchmarks/gui/text/qtext/qtext.pro +++ b/tests/benchmarks/gui/text/qtext/qtext.pro @@ -6,4 +6,4 @@ TARGET = tst_bench_QText SOURCES += main.cpp -DEFINES += SRCDIR=\\\"$$PWD/\\\" +TESTDATA = bidi.txt |