diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-08-04 08:33:52 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-08-04 09:02:17 (GMT) |
commit | 4aafbd6222e7aeafd59a4a4356ba8c53b2bfa1d1 (patch) | |
tree | b34985c5716d98f01b9f36fd4a98f2ac9710099f /tests/auto/qdom | |
parent | a0df97c03f26a38af17a42fb44ad6910536c8857 (diff) | |
parent | 2076f150995e541308b1d8da936b3e12ab68b886 (diff) | |
download | Qt-4aafbd6222e7aeafd59a4a4356ba8c53b2bfa1d1.zip Qt-4aafbd6222e7aeafd59a4a4356ba8c53b2bfa1d1.tar.gz Qt-4aafbd6222e7aeafd59a4a4356ba8c53b2bfa1d1.tar.bz2 |
Merge commit 'qt/master-stable'
Conflicts:
config.tests/unix/openssl/openssl.pri
demos/embedded/embedded.pro
examples/itemviews/chart/chart.pro
examples/network/network.pro
examples/painting/painterpaths/painterpaths.pro
examples/threads/mandelbrot/mandelbrot.pro
qmake/project.cpp
src/3rdparty/libtiff/libtiff/tif_config.h
src/corelib/arch/arch.pri
src/corelib/global/qglobal.cpp
src/corelib/kernel/kernel.pri
src/corelib/kernel/qcore_unix_p.h
src/corelib/kernel/qobject.cpp
src/corelib/thread/qthread_unix.cpp
src/corelib/tools/qsharedpointer_impl.h
src/corelib/tools/tools.pri
src/gui/kernel/qaction.h
src/gui/kernel/qapplication.cpp
src/gui/painting/qregion.h
src/gui/widgets/qlineedit.cpp
src/gui/widgets/qlineedit_p.h
src/network/socket/qnativesocketengine_unix.cpp
tests/auto/qdir/tst_qdir.cpp
tests/auto/qdiriterator/tst_qdiriterator.cpp
tests/auto/qhttp/qhttp.pro
tests/auto/qline/qline.pro
tests/auto/qnetworkreply/tst_qnetworkreply.cpp
tests/auto/qresourceengine/qresourceengine.pro
tests/auto/qsharedpointer/qsharedpointer.pro
tests/auto/qstring/qstring.pro
tests/auto/qtcpsocket/qtcpsocket.pro
tests/auto/qtcpsocket/tst_qtcpsocket.cpp
Diffstat (limited to 'tests/auto/qdom')
-rw-r--r-- | tests/auto/qdom/qdom.pro | 4 | ||||
-rw-r--r-- | tests/auto/qdom/tst_qdom.cpp | 54 |
2 files changed, 31 insertions, 27 deletions
diff --git a/tests/auto/qdom/qdom.pro b/tests/auto/qdom/qdom.pro index 9a9bcbb..84b721e 100644 --- a/tests/auto/qdom/qdom.pro +++ b/tests/auto/qdom/qdom.pro @@ -10,6 +10,10 @@ wince*|symbian*: { DEPLOYMENT += addFiles DEPLOYMENT_PLUGIN += qcncodecs qjpcodecs qkrcodecs qtwcodecs + DEFINES += SRCDIR=\\\"\\\" +} +else { + DEFINES += SRCDIR=\\\"$$PWD/\\\" } symbian: TARGET.EPOCHEAPSIZE="0x100000 0x1000000" diff --git a/tests/auto/qdom/tst_qdom.cpp b/tests/auto/qdom/tst_qdom.cpp index cea0bfb..5b4787f 100644 --- a/tests/auto/qdom/tst_qdom.cpp +++ b/tests/auto/qdom/tst_qdom.cpp @@ -290,17 +290,17 @@ void tst_QDom::toString_01_data() { QTest::addColumn<QString>("fileName"); - QTest::newRow( "01" ) << QString("testdata/toString_01/doc01.xml"); - QTest::newRow( "02" ) << QString("testdata/toString_01/doc02.xml"); - QTest::newRow( "03" ) << QString("testdata/toString_01/doc03.xml"); - QTest::newRow( "04" ) << QString("testdata/toString_01/doc04.xml"); - QTest::newRow( "05" ) << QString("testdata/toString_01/doc05.xml"); + QTest::newRow( "01" ) << QString(SRCDIR "testdata/toString_01/doc01.xml"); + QTest::newRow( "02" ) << QString(SRCDIR "testdata/toString_01/doc02.xml"); + QTest::newRow( "03" ) << QString(SRCDIR "testdata/toString_01/doc03.xml"); + QTest::newRow( "04" ) << QString(SRCDIR "testdata/toString_01/doc04.xml"); + QTest::newRow( "05" ) << QString(SRCDIR "testdata/toString_01/doc05.xml"); - QTest::newRow( "euc-jp" ) << QString("testdata/toString_01/doc_euc-jp.xml"); - QTest::newRow( "iso-2022-jp" ) << QString("testdata/toString_01/doc_iso-2022-jp.xml"); - QTest::newRow( "little-endian" ) << QString("testdata/toString_01/doc_little-endian.xml"); - QTest::newRow( "utf-16" ) << QString("testdata/toString_01/doc_utf-16.xml"); - QTest::newRow( "utf-8" ) << QString("testdata/toString_01/doc_utf-8.xml"); + QTest::newRow( "euc-jp" ) << QString(SRCDIR "testdata/toString_01/doc_euc-jp.xml"); + QTest::newRow( "iso-2022-jp" ) << QString(SRCDIR "testdata/toString_01/doc_iso-2022-jp.xml"); + QTest::newRow( "little-endian" ) << QString(SRCDIR "testdata/toString_01/doc_little-endian.xml"); + QTest::newRow( "utf-16" ) << QString(SRCDIR "testdata/toString_01/doc_utf-16.xml"); + QTest::newRow( "utf-8" ) << QString(SRCDIR "testdata/toString_01/doc_utf-8.xml"); } @@ -474,7 +474,7 @@ void tst_QDom::initTestCase() QSKIP("Our current test machine, arsia, is too slow for this auto test.", SkipAll); #endif - QFile file("testdata/excludedCodecs.txt"); + QFile file(SRCDIR "testdata/excludedCodecs.txt"); QVERIFY(file.open(QIODevice::ReadOnly|QIODevice::Text)); QByteArray codecName; @@ -550,18 +550,18 @@ void tst_QDom::saveWithSerialization_data() const { QTest::addColumn<QString>("fileName"); - QTest::newRow("doc01.xml") << QString("testdata/toString_01/doc01.xml"); - QTest::newRow("doc01.xml") << QString("testdata/toString_01/doc01.xml"); - QTest::newRow("doc02.xml") << QString("testdata/toString_01/doc02.xml"); - QTest::newRow("doc03.xml") << QString("testdata/toString_01/doc03.xml"); - QTest::newRow("doc04.xml") << QString("testdata/toString_01/doc04.xml"); - QTest::newRow("doc05.xml") << QString("testdata/toString_01/doc05.xml"); + QTest::newRow("doc01.xml") << QString(SRCDIR "testdata/toString_01/doc01.xml"); + QTest::newRow("doc01.xml") << QString(SRCDIR "testdata/toString_01/doc01.xml"); + QTest::newRow("doc02.xml") << QString(SRCDIR "testdata/toString_01/doc02.xml"); + QTest::newRow("doc03.xml") << QString(SRCDIR "testdata/toString_01/doc03.xml"); + QTest::newRow("doc04.xml") << QString(SRCDIR "testdata/toString_01/doc04.xml"); + QTest::newRow("doc05.xml") << QString(SRCDIR "testdata/toString_01/doc05.xml"); - QTest::newRow("doc_euc-jp.xml") << QString("testdata/toString_01/doc_euc-jp.xml"); - QTest::newRow("doc_iso-2022-jp.xml") << QString("testdata/toString_01/doc_iso-2022-jp.xml"); - QTest::newRow("doc_little-endian.xml") << QString("testdata/toString_01/doc_little-endian.xml"); - QTest::newRow("doc_utf-16.xml") << QString("testdata/toString_01/doc_utf-16.xml"); - QTest::newRow("doc_utf-8.xml") << QString("testdata/toString_01/doc_utf-8.xml"); + QTest::newRow("doc_euc-jp.xml") << QString(SRCDIR "testdata/toString_01/doc_euc-jp.xml"); + QTest::newRow("doc_iso-2022-jp.xml") << QString(SRCDIR "testdata/toString_01/doc_iso-2022-jp.xml"); + QTest::newRow("doc_little-endian.xml") << QString(SRCDIR "testdata/toString_01/doc_little-endian.xml"); + QTest::newRow("doc_utf-16.xml") << QString(SRCDIR "testdata/toString_01/doc_utf-16.xml"); + QTest::newRow("doc_utf-8.xml") << QString(SRCDIR "testdata/toString_01/doc_utf-8.xml"); } void tst_QDom::cloneNode_data() @@ -1386,7 +1386,7 @@ void tst_QDom::roundTripAttributes() const doc.save(stream, 0); stream.flush(); - const QByteArray expected("<localName xmlns=\"\" attr=\" 
	 \" />\n"); + const QByteArray expected("<localName xmlns=\"\" attr=\" 
	 \"/>\n"); QCOMPARE(QString::fromLatin1(serialized.constData()), QString::fromLatin1(expected.constData())); } @@ -1671,7 +1671,7 @@ void tst_QDom::appendDocumentNode() const doc.appendChild(elem); Q_ASSERT(!xml.isNull()); - const QString expected(QLatin1String("<document>\n<test_elem name=\"value\" />\n</document>\n")); + const QString expected(QLatin1String("<document>\n<test_elem name=\"value\"/>\n</document>\n")); elem.appendChild(xml); QCOMPARE(doc.childNodes().count(), 1); @@ -1780,7 +1780,7 @@ void tst_QDom::doubleNamespaceDeclarations() const { QDomDocument doc; - QFile file("doubleNamespaces.xml" ); + QFile file(SRCDIR "doubleNamespaces.xml" ); QVERIFY(file.open(QIODevice::ReadOnly)); QXmlSimpleReader reader; @@ -1788,8 +1788,8 @@ 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")); + 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")); } void tst_QDom::setContentQXmlReaderOverload() const |