diff options
Diffstat (limited to 'tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp')
-rw-r--r-- | tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp b/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp index 1478ae7e23..8001c199e4 100644 --- a/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp +++ b/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp @@ -141,7 +141,7 @@ class tst_QXmlSimpleReader : public QObject ~tst_QXmlSimpleReader(); private slots: - + void initTestCase(); void testGoodXmlFile(); void testGoodXmlFile_data(); void testBadXmlFile(); @@ -164,6 +164,7 @@ class tst_QXmlSimpleReader : public QObject private: static QDomDocument fromByteArray(const QString &title, const QByteArray &ba, bool *ok); XmlServer *server; + QString prefix; }; tst_QXmlSimpleReader::tst_QXmlSimpleReader() @@ -210,6 +211,14 @@ public: }; +void tst_QXmlSimpleReader::initTestCase() +{ + prefix = QFileInfo(QFINDTESTDATA("xmldocs")).absolutePath(); + if (prefix.isEmpty()) + QFAIL("Cannot find xmldocs testdata!"); + QDir::setCurrent(prefix); +} + void tst_QXmlSimpleReader::idsInParseException1() { MyErrorHandler handler; |