summaryrefslogtreecommitdiffstats
path: root/tests/auto/xml/sax
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-10-04 13:23:23 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-05 06:15:00 +0200
commit253497b7446c7d723aa3bdd7152e25d6852f2604 (patch)
treee91eb9fdb94aae121fa587ab5f54f3917a6c1d55 /tests/auto/xml/sax
parent3f88da82b1bdf79fe4c89640838b0b69c8a89d8b (diff)
Avoid using QSKIP in lieu of compile-time checks
QSKIP is intended to be used to skip test functions that are found at run-time to be inapplicable or unsafe. If a test function can be determined to be inapplicable at compile-time, the entire test function should be omitted instead of replacing the body of the test function with a QSKIP, which only serves to slow down test runs and to inflate test run-rates with empty, inapplicable tests. Task-number: QTQAINFRA-278 Change-Id: I582732e3dd657df834f9a98fd52d7ee368f2f29b Reviewed-on: http://codereview.qt-project.org/5946 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/xml/sax')
-rw-r--r--tests/auto/xml/sax/qxml/tst_qxml.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/xml/sax/qxml/tst_qxml.cpp b/tests/auto/xml/sax/qxml/tst_qxml.cpp
index 7b62b3deb8..5fd8793f19 100644
--- a/tests/auto/xml/sax/qxml/tst_qxml.cpp
+++ b/tests/auto/xml/sax/qxml/tst_qxml.cpp
@@ -57,7 +57,9 @@ Q_OBJECT
private slots:
void getSetCheck();
void interpretedAs0D() const;
+#ifndef QT_NO_EXCEPTIONS
void exception();
+#endif
};
class MyXmlEntityResolver : public QXmlEntityResolver
@@ -214,9 +216,9 @@ void tst_QXml::interpretedAs0D() const
QCOMPARE(myHandler.attrName, QChar(0x010D) + QString::fromLatin1("reated-by"));
}
+#ifndef QT_NO_EXCEPTIONS
void tst_QXml::exception()
{
-#ifndef QT_NO_EXCEPTIONS
QString message = QString::fromLatin1("message");
int column = 3;
int line = 2;
@@ -234,10 +236,8 @@ void tst_QXml::exception()
QCOMPARE(e.publicId(), publicId);
QCOMPARE(e.systemId(), systemId);
}
-#else
- QSKIP("Exceptions not available", SkipAll);
-#endif
}
+#endif
QTEST_MAIN(tst_QXml)
#include "tst_qxml.moc"