summaryrefslogtreecommitdiffstats
path: root/tests/auto/uic
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@nokia.com>2009-09-15 09:13:23 (GMT)
committerPaul Olav Tvete <paul.tvete@nokia.com>2009-09-15 09:45:32 (GMT)
commit86e1b289c8246befc37455e7caa101fc20e0bc97 (patch)
tree4ef67d3c9b0bc22cf08435efc8e6777cc0076082 /tests/auto/uic
parentc8bf9bd17a4520eefe4306b7b1bb4f93fb296d80 (diff)
downloadQt-86e1b289c8246befc37455e7caa101fc20e0bc97.zip
Qt-86e1b289c8246befc37455e7caa101fc20e0bc97.tar.gz
Qt-86e1b289c8246befc37455e7caa101fc20e0bc97.tar.bz2
Make the test work with shadow builds.
Reviewed-by: Jesper
Diffstat (limited to 'tests/auto/uic')
-rw-r--r--tests/auto/uic/tst_uic.cpp18
-rw-r--r--tests/auto/uic/uic.pro2
2 files changed, 10 insertions, 10 deletions
diff --git a/tests/auto/uic/tst_uic.cpp b/tests/auto/uic/tst_uic.cpp
index c4759e2..60367b9 100644
--- a/tests/auto/uic/tst_uic.cpp
+++ b/tests/auto/uic/tst_uic.cpp
@@ -55,16 +55,16 @@ class tst_uic : public QObject
public:
tst_uic();
-
+
private Q_SLOTS:
void initTestCase();
-
+
void run();
void run_data() const;
void compare();
void compare_data() const;
-
+
void cleanupTestCase();
private:
@@ -105,8 +105,8 @@ void tst_uic::initTestCase()
qDebug() << msg;
process.terminate();
- QCOMPARE(QFileInfo(QLatin1String("baseline")).exists(), true);
- QCOMPARE(QFileInfo(QLatin1String("generated_ui")).exists(), true);
+ QCOMPARE(QFileInfo(QLatin1String(SRCDIR "baseline")).exists(), true);
+ QCOMPARE(QFileInfo(QLatin1String(SRCDIR "generated_ui")).exists(), true);
}
void tst_uic::run()
@@ -163,23 +163,23 @@ void tst_uic::compare()
QFile genFile(generatedFile);
if (!orgFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
- QString err(QLatin1String("Could not read file: %1..."));
+ QString err(QLatin1String("Could not read file: %1..."));
QFAIL(err.arg(orgFile.fileName()).toUtf8());
}
if (!genFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
- QString err(QLatin1String("Could not read file: %1..."));
+ QString err(QLatin1String("Could not read file: %1..."));
QFAIL(err.arg(genFile.fileName()).toUtf8());
}
originalFile = orgFile.readAll();
originalFile.replace(QRegExp(QLatin1String("Created:.{0,25}[\\d]{4,4}")), "");
originalFile.replace(QRegExp(QLatin1String("by: Qt User Interface Compiler version [.\\d]{5,5}")), "");
-
+
generatedFile = genFile.readAll();
generatedFile.replace(QRegExp(QLatin1String("Created:.{0,25}[\\d]{4,4}")), "");
generatedFile.replace(QRegExp(QLatin1String("by: Qt User Interface Compiler version [.\\d]{5,5}")), "");
-
+
QCOMPARE(generatedFile, originalFile);
}
diff --git a/tests/auto/uic/uic.pro b/tests/auto/uic/uic.pro
index 411a993..355cb56 100644
--- a/tests/auto/uic/uic.pro
+++ b/tests/auto/uic/uic.pro
@@ -5,4 +5,4 @@ SOURCES += tst_uic.cpp
TARGET = tst_uic
# This test is not run on wince (I think)
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+DEFINES += SRCDIR=\\\"$$PWD/\\\"