summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/corelib/tools/qstring
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks/corelib/tools/qstring')
-rw-r--r--tests/benchmarks/corelib/tools/qstring/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qstring/qstring.pro6
2 files changed, 4 insertions, 6 deletions
diff --git a/tests/benchmarks/corelib/tools/qstring/main.cpp b/tests/benchmarks/corelib/tools/qstring/main.cpp
index 9d5c43c290..9b10e97f2b 100644
--- a/tests/benchmarks/corelib/tools/qstring/main.cpp
+++ b/tests/benchmarks/corelib/tools/qstring/main.cpp
@@ -1408,7 +1408,9 @@ void tst_QString::ucstrncmp() const
void tst_QString::fromUtf8() const
{
- QFile file(SRCDIR "utf-8.txt");
+ QString testFile = QFINDTESTDATA("utf-8.txt");
+ QVERIFY2(!testFile.isEmpty(), "cannot find test file utf-8.txt!");
+ QFile file(testFile);
if (!file.open(QFile::ReadOnly)) {
qFatal("Cannot open input file");
return;
diff --git a/tests/benchmarks/corelib/tools/qstring/qstring.pro b/tests/benchmarks/corelib/tools/qstring/qstring.pro
index 72300de9da..cf2ee24c6d 100644
--- a/tests/benchmarks/corelib/tools/qstring/qstring.pro
+++ b/tests/benchmarks/corelib/tools/qstring/qstring.pro
@@ -3,11 +3,7 @@ QT -= gui
QT += core-private testlib
SOURCES += main.cpp data.cpp fromlatin1.cpp fromutf8.cpp
-wince*:{
- DEFINES += SRCDIR=\\\"\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD/\\\"
-}
+TESTDATA = utf-8.txt
sse4:QMAKE_CXXFLAGS += -msse4
else:ssse3:QMAKE_FLAGS += -mssse3