diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-07-30 13:28:49 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-07-30 13:28:49 (GMT) |
commit | a08b3f5336e5c819b33d922d3a809b5203d728f3 (patch) | |
tree | 952f42304d50f28ed6651bace587ab7935b29cd0 /tests/auto/qxml | |
parent | 813fc3574a006cb2687715ccf7bdb984a485b173 (diff) | |
parent | 188ac02e2fb6cc6437b776f8c5b69a508728fbdb (diff) | |
download | Qt-a08b3f5336e5c819b33d922d3a809b5203d728f3.zip Qt-a08b3f5336e5c819b33d922d3a809b5203d728f3.tar.gz Qt-a08b3f5336e5c819b33d922d3a809b5203d728f3.tar.bz2 |
Merge commit 'qt/master-stable'
Conflicts:
demos/demos.pro
src/gui/graphicsview/qgraphicsitem_p.h
Diffstat (limited to 'tests/auto/qxml')
-rw-r--r-- | tests/auto/qxml/tst_qxml.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/auto/qxml/tst_qxml.cpp b/tests/auto/qxml/tst_qxml.cpp index 13de82f..1bc5ef5 100644 --- a/tests/auto/qxml/tst_qxml.cpp +++ b/tests/auto/qxml/tst_qxml.cpp @@ -57,6 +57,7 @@ Q_OBJECT private slots: void getSetCheck(); void interpretedAs0D() const; + void exception(); }; class MyXmlEntityResolver : public QXmlEntityResolver @@ -213,5 +214,30 @@ void tst_QXml::interpretedAs0D() const QCOMPARE(myHandler.attrName, QChar(0x010D) + QString::fromLatin1("reated-by")); } +void tst_QXml::exception() +{ +#ifndef QT_NO_EXCEPTIONS + QString message = QString::fromLatin1("message"); + int column = 3; + int line = 2; + QString publicId = QString::fromLatin1("publicId"); + QString systemId = QString::fromLatin1("systemId"); + + try { + QXmlParseException e(message, column, line, publicId, systemId); + throw e; + } + catch (QXmlParseException e) { + QCOMPARE(e.message(), message); + QCOMPARE(e.columnNumber(), column); + QCOMPARE(e.lineNumber(), line); + QCOMPARE(e.publicId(), publicId); + QCOMPARE(e.systemId(), systemId); + } +#else + QSKIP("Exceptions not available", SkipAll); +#endif +} + QTEST_MAIN(tst_QXml) #include "tst_qxml.moc" |