diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-11-04 20:18:14 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-11-04 20:18:14 +0100 |
commit | 4159ee840549df11287294f0928e90f35f3e06ff (patch) | |
tree | 4a3947e37d54bdb78b4042e9ced20dbf181b5a2c /tests/auto/xml | |
parent | 59dbf1786f22ec4ac88d8f9d38cac5cfb82acaea (diff) | |
parent | c8c39ecc37c156ac2677de09a26548dfc274b564 (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
config.tests/unix/ptrsize.test
configure
src/corelib/global/qnamespace.h
src/network/socket/qabstractsocket.cpp
tests/auto/other/networkselftest/networkselftest.pro
Change-Id: Ic78abb4a34f9068567cea876861d4220f5a07672
Diffstat (limited to 'tests/auto/xml')
-rw-r--r-- | tests/auto/xml/dom/qdom/tst_qdom.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/xml/dom/qdom/tst_qdom.cpp b/tests/auto/xml/dom/qdom/tst_qdom.cpp index a4a3f1f6b3..04cd0b300f 100644 --- a/tests/auto/xml/dom/qdom/tst_qdom.cpp +++ b/tests/auto/xml/dom/qdom/tst_qdom.cpp @@ -119,6 +119,7 @@ private slots: void cloneDTD_QTBUG8398() const; void DTDNotationDecl(); void DTDEntityDecl(); + void QTBUG49113_dontCrashWithNegativeIndex() const; void cleanupTestCase() const; @@ -1979,5 +1980,13 @@ void tst_QDom::DTDEntityDecl() QCOMPARE(doctype.namedItem(QString("logo")).toEntity().notationName(), QString("gif")); } +void tst_QDom::QTBUG49113_dontCrashWithNegativeIndex() const +{ + QDomDocument doc; + QDomElement elem = doc.appendChild(doc.createElement("root")).toElement(); + QDomNode node = elem.attributes().item(-1); + QVERIFY(node.isNull()); +} + QTEST_MAIN(tst_QDom) #include "tst_qdom.moc" |