summaryrefslogtreecommitdiffstats
path: root/tests/auto/xml/dom/qdom/tst_qdom.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2012-04-17 13:01:20 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-17 13:09:29 +0200
commit576a8e152ec36e7465bfdc8ad63998cffbab4091 (patch)
tree07472de61c7542a90f675869e480b99076c5b439 /tests/auto/xml/dom/qdom/tst_qdom.cpp
parentfb7f30d2bad0c84ffea4db862a71ba2e03d855d0 (diff)
parent64255ef6502b1144f7b0aa4b2bf62803e0d4788b (diff)
Merge "Merge remote-tracking branch 'origin/api_changes'" into refs/staging/master
Diffstat (limited to 'tests/auto/xml/dom/qdom/tst_qdom.cpp')
-rw-r--r--tests/auto/xml/dom/qdom/tst_qdom.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/auto/xml/dom/qdom/tst_qdom.cpp b/tests/auto/xml/dom/qdom/tst_qdom.cpp
index 3633975896..bfd6ff0810 100644
--- a/tests/auto/xml/dom/qdom/tst_qdom.cpp
+++ b/tests/auto/xml/dom/qdom/tst_qdom.cpp
@@ -1792,8 +1792,15 @@ void tst_QDom::doubleNamespaceDeclarations() const
QXmlInputSource source(&file);
QVERIFY(doc.setContent(&source, &reader));
- QVERIFY(doc.toString(0) == QString::fromLatin1("<a>\n<b p:c=\"\" xmlns:p=\"NS\" p:d=\"\"/>\n</a>\n") ||
- doc.toString(0) == QString::fromLatin1("<a>\n<b p:c=\"\" p:d=\"\" xmlns:p=\"NS\"/>\n</a>\n"));
+ // tst_QDom relies on a specific QHash ordering, see QTBUG-25071
+ QString docAsString = doc.toString(0);
+ QVERIFY(docAsString == QString::fromLatin1("<a>\n<b p:c=\"\" xmlns:p=\"NS\" p:d=\"\"/>\n</a>\n") ||
+ docAsString == QString::fromLatin1("<a>\n<b p:c=\"\" p:d=\"\" xmlns:p=\"NS\"/>\n</a>\n") ||
+ docAsString == QString::fromLatin1("<a>\n<b p:d=\"\" p:c=\"\" xmlns:p=\"NS\"/>\n</a>\n") ||
+ docAsString == QString::fromLatin1("<a>\n<b p:d=\"\" xmlns:p=\"NS\" p:c=\"\"/>\n</a>\n") ||
+ docAsString == QString::fromLatin1("<a>\n<b xmlns:p=\"NS\" p:c=\"\" p:d=\"\"/>\n</a>\n") ||
+ docAsString == QString::fromLatin1("<a>\n<b xmlns:p=\"NS\" p:d=\"\" p:c=\"\"/>\n</a>\n")
+ );
}
void tst_QDom::setContentQXmlReaderOverload() const
@@ -1922,7 +1929,7 @@ void tst_QDom::cloneDTD_QTBUG8398() const
QVERIFY(domDocument.setContent(dtd));
QDomDocument domDocument2 = domDocument.cloneNode(true).toDocument();
- // for some reason, our DOM implementation reverts the order of entities
+ // this string is relying on a specific QHash ordering, QTBUG-25071
QString expected("<?xml version='1.0' encoding='UTF-8'?>\n"
"<!DOCTYPE first [\n"
"<!ENTITY thirdFile SYSTEM 'third.xml'>\n"
@@ -1932,7 +1939,8 @@ void tst_QDom::cloneDTD_QTBUG8398() const
QString output;
QTextStream stream(&output);
domDocument2.save(stream, 0);
- QCOMPARE(output, expected);
+ // check against the original string and the expected one, QTBUG-25071
+ QVERIFY(output == dtd || output == expected);
}
void tst_QDom::DTDNotationDecl()