summaryrefslogtreecommitdiffstats
path: root/tests/auto/selftests
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-01-26 13:59:14 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-01-26 14:00:46 (GMT)
commit67a39e0eb04069e216b76672f45e7709fb076577 (patch)
treef2cae7a9896d1d6b0f519aca08216427bbfd39be /tests/auto/selftests
parent88719423de4fc3d36a5aab1eb13744984c8f5194 (diff)
downloadQt-67a39e0eb04069e216b76672f45e7709fb076577.zip
Qt-67a39e0eb04069e216b76672f45e7709fb076577.tar.gz
Qt-67a39e0eb04069e216b76672f45e7709fb076577.tar.bz2
Autotest: make the test valid for multiple Qt versions
Reviewed-by: TrustMe
Diffstat (limited to 'tests/auto/selftests')
-rw-r--r--tests/auto/selftests/expected_xunit.txt4
-rw-r--r--tests/auto/selftests/tst_selftests.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/selftests/expected_xunit.txt b/tests/auto/selftests/expected_xunit.txt
index 5ec4668..3c014e3 100644
--- a/tests/auto/selftests/expected_xunit.txt
+++ b/tests/auto/selftests/expected_xunit.txt
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite errors="5" failures="3" tests="9" name="tst_Xunit">
<properties>
- <property value="4.6.2" name="QTestVersion"/>
- <property value="4.6.2" name="QtVersion"/>
+ <property value="<INSERT_QT_VERSION_HERE>" name="QTestVersion"/>
+ <property value="<INSERT_QT_VERSION_HERE>" name="QtVersion"/>
</properties>
<testcase result="pass" name="initTestCase"/>
<testcase result="pass" name="testFunc1">
diff --git a/tests/auto/selftests/tst_selftests.cpp b/tests/auto/selftests/tst_selftests.cpp
index 89ece0f..0b9cee0 100644
--- a/tests/auto/selftests/tst_selftests.cpp
+++ b/tests/auto/selftests/tst_selftests.cpp
@@ -248,7 +248,7 @@ void tst_Selftests::doRunSubTest(QString &subdir, QStringList &arguments )
continue;
const QString output(QString::fromLatin1(line));
- const QString expected(QString::fromLatin1(exp.at(i)));
+ const QString expected(QString::fromLatin1(exp.at(i)).replace("<INSERT_QT_VERSION_HERE>", QT_VERSION_STR));
if (line.contains("ASSERT") && output != expected)
QEXPECT_FAIL("assert", "QTestLib prints out the absolute path.", Continue);