diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2009-09-15 09:13:23 (GMT) |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@nokia.com> | 2009-09-15 09:45:32 (GMT) |
commit | 86e1b289c8246befc37455e7caa101fc20e0bc97 (patch) | |
tree | 4ef67d3c9b0bc22cf08435efc8e6777cc0076082 /tests/auto/uic/tst_uic.cpp | |
parent | c8bf9bd17a4520eefe4306b7b1bb4f93fb296d80 (diff) | |
download | Qt-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/tst_uic.cpp')
-rw-r--r-- | tests/auto/uic/tst_uic.cpp | 18 |
1 files changed, 9 insertions, 9 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); } |