summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-01-11 12:48:27 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-01-12 11:17:21 (GMT)
commit83e3c4677a71d8f890f9506360b95b7f9ac9bd84 (patch)
treed8f0a805c8a1feed0d0d7c509476635859fbeff5 /tests
parentefa02e66655a4b2a2833fa9615e2d470f22fd2d2 (diff)
downloadQt-83e3c4677a71d8f890f9506360b95b7f9ac9bd84.zip
Qt-83e3c4677a71d8f890f9506360b95b7f9ac9bd84.tar.gz
Qt-83e3c4677a71d8f890f9506360b95b7f9ac9bd84.tar.bz2
print actual rather than expected output for matching text
the expected may contain regular expressions.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/linguist/lupdate/tst_lupdate.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/linguist/lupdate/tst_lupdate.cpp b/tests/auto/linguist/lupdate/tst_lupdate.cpp
index 80c8f4f..ff3ab68 100644
--- a/tests/auto/linguist/lupdate/tst_lupdate.cpp
+++ b/tests/auto/linguist/lupdate/tst_lupdate.cpp
@@ -120,7 +120,7 @@ void tst_lupdate::doCompare(const QStringList &actual, const QString &expectedFn
}
QByteArray diff;
for (int j = qMax(0, i - 3); j < i; j++)
- diff += expected.at(j) + '\n';
+ diff += actual.at(j) + '\n';
diff += "<<<<<<< got\n";
for (int j = i; j < gi; j++) {
diff += actual.at(j) + '\n';
@@ -138,8 +138,8 @@ void tst_lupdate::doCompare(const QStringList &actual, const QString &expectedFn
}
}
diff += ">>>>>>> expected\n";
- for (int j = ei; j < qMin(ei + 3, expected.size()); j++)
- diff += expected.at(j) + '\n';
+ for (int j = gi; j < qMin(gi + 3, actual.size()); j++)
+ diff += actual.at(j) + '\n';
QFAIL(qPrintable((err ? "Output for " : "Result for ") + expectedFn + " does not meet expectations:\n" + diff));
}