summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-07-20 11:51:58 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-07-20 11:51:58 (GMT)
commit1a632e1bc677fce4b8d5450ce4a971fdde3ed42f (patch)
tree222c48a9d90097b3ea61cb2839b6541eff185c3a /tests
parent9bd8df2b405ef517d2d1b209b8004aaaa4994242 (diff)
parent3d6381b47a6048d04dbfc7b6984cae81c02d4fe6 (diff)
downloadQt-1a632e1bc677fce4b8d5450ce4a971fdde3ed42f.zip
Qt-1a632e1bc677fce4b8d5450ce4a971fdde3ed42f.tar.gz
Qt-1a632e1bc677fce4b8d5450ce4a971fdde3ed42f.tar.bz2
Merge commit 'origin/4.5'
Conflicts: src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp src/3rdparty/webkit/WebCore/page/DOMWindow.idl src/corelib/io/qdiriterator.cpp src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h tests/auto/qxmlquery/tst_qxmlquery.cpp tools/linguist/lconvert/main.cpp
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/linguist/lconvert/data/test-broken-utf8.po.out2
-rw-r--r--tests/auto/qdiriterator/tst_qdiriterator.cpp31
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp1
-rw-r--r--tests/auto/qxmlquery/tst_qxmlquery.cpp18
4 files changed, 41 insertions, 11 deletions
diff --git a/tests/auto/linguist/lconvert/data/test-broken-utf8.po.out b/tests/auto/linguist/lconvert/data/test-broken-utf8.po.out
index c00fd19..0a9f4c8 100644
--- a/tests/auto/linguist/lconvert/data/test-broken-utf8.po.out
+++ b/tests/auto/linguist/lconvert/data/test-broken-utf8.po.out
@@ -6,4 +6,4 @@ msgid "this works"
msgstr "das geht: ä"
msgid "this is broken"
-msgstr "das ist kaputt: i"
+msgstr "das ist kaputt: �i"
diff --git a/tests/auto/qdiriterator/tst_qdiriterator.cpp b/tests/auto/qdiriterator/tst_qdiriterator.cpp
index e916e8b..2d5758e 100644
--- a/tests/auto/qdiriterator/tst_qdiriterator.cpp
+++ b/tests/auto/qdiriterator/tst_qdiriterator.cpp
@@ -183,17 +183,28 @@ void tst_QDirIterator::iterateRelativeDirectory()
QFETCH(QStringList, entries);
QDirIterator it(dirName, nameFilters, filters, flags);
- QStringList iteratorList;
- while (it.hasNext())
- iteratorList << it.next();
-
- // The order of QDirIterator returning items differs on some platforms.
- // Thus it is not guaranteed that all paths will be returned relative
- // and we need to assure we have two valid StringLists to compare. So
- // we make all entries absolute for comparison.
QStringList list;
- foreach(QString item, iteratorList)
- list.append(QFileInfo(item).canonicalFilePath());
+ while (it.hasNext()) {
+ QString next = it.next();
+
+ QString fileName = it.fileName();
+ QString filePath = it.filePath();
+ QString path = it.path();
+
+ QFileInfo info = it.fileInfo();
+
+ QCOMPARE(path, dirName);
+ QCOMPARE(next, filePath);
+
+ QCOMPARE(info, QFileInfo(next));
+ QCOMPARE(fileName, info.fileName());
+ QCOMPARE(filePath, info.filePath());
+
+ // Using canonical file paths for final comparison
+ list << info.canonicalFilePath();
+ }
+
+ // The order of items returned by QDirIterator is not guaranteed.
list.sort();
QStringList sortedEntries;
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index f2bfb1f..b67c727 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -3763,6 +3763,7 @@ public slots:
}
void bytesWrittenSlot(qint64 amount) {
+ Q_UNUSED(amount);
if (dataSent == dataSize && client) {
// close eventually
diff --git a/tests/auto/qxmlquery/tst_qxmlquery.cpp b/tests/auto/qxmlquery/tst_qxmlquery.cpp
index fe9efae..5c14329 100644
--- a/tests/auto/qxmlquery/tst_qxmlquery.cpp
+++ b/tests/auto/qxmlquery/tst_qxmlquery.cpp
@@ -222,6 +222,7 @@ private Q_SLOTS:
void bindVariableQXmlNameQXmlQuerySignature() const;
void bindVariableQXmlNameQXmlQuery() const;
void bindVariableQXmlQueryInvalidate() const;
+ void unknownSourceLocation() const;
void identityConstraintSuccess() const;
void identityConstraintFailure() const;
@@ -3281,6 +3282,23 @@ void tst_QXmlQuery::bindVariableQXmlQueryInvalidate() const
QVERIFY(!query.isValid());
}
+void tst_QXmlQuery::unknownSourceLocation() const
+{
+ QBuffer b;
+ b.setData("<a><b/><b/></a>");
+ b.open(QIODevice::ReadOnly);
+
+ MessageSilencer silencer;
+ QXmlQuery query;
+ query.bindVariable(QLatin1String("inputDocument"), &b);
+ query.setMessageHandler(&silencer);
+
+ query.setQuery(QLatin1String("doc($inputDocument)/a/(let $v := b/string() return if ($v) then $v else ())"));
+
+ QString output;
+ query.evaluateTo(&output);
+}
+
void tst_QXmlQuery::identityConstraintSuccess() const
{
QXmlQuery::QueryLanguage queryLanguage = QXmlQuery::XmlSchema11IdentityConstraintSelector;