diff options
author | Rohan McGovern <rohan.mcgovern@nokia.com> | 2009-08-06 01:04:23 (GMT) |
---|---|---|
committer | Rohan McGovern <rohan.mcgovern@nokia.com> | 2009-08-06 03:39:12 (GMT) |
commit | 56b349951a70f3ab95e334e41e37f017e91cf481 (patch) | |
tree | 76c37ddbf800b6a5186bda53aa7e00ebd768322c /tests/auto/qresourceengine | |
parent | 90480b9a25568858d1383e0aab6f5708a7dabd4f (diff) | |
download | Qt-56b349951a70f3ab95e334e41e37f017e91cf481.zip Qt-56b349951a70f3ab95e334e41e37f017e91cf481.tar.gz Qt-56b349951a70f3ab95e334e41e37f017e91cf481.tar.bz2 |
Cleaned up test naming and platform-specific tests.
When an autotest fails to compile, there's no way to determine which
testcase(s) have been prevented from running.
Our results parsing tools have been guessing, under the assumption that
a directory called `qdogwalker' always contains a testcase named
`tst_qdogwalker'. That wasn't true for all our tests, so let's make it
true.
Also changed the platform-specific tests so that qmake will simply skip
those tests on unsupported platforms, instead of wasting time compiling
a useless QTEST_NOOP_MAIN test.
Diffstat (limited to 'tests/auto/qresourceengine')
-rw-r--r-- | tests/auto/qresourceengine/qresourceengine.pro | 2 | ||||
-rw-r--r-- | tests/auto/qresourceengine/tst_qresourceengine.cpp (renamed from tests/auto/qresourceengine/tst_resourceengine.cpp) | 25 |
2 files changed, 14 insertions, 13 deletions
diff --git a/tests/auto/qresourceengine/qresourceengine.pro b/tests/auto/qresourceengine/qresourceengine.pro index cdbbbd2..f897d60 100644 --- a/tests/auto/qresourceengine/qresourceengine.pro +++ b/tests/auto/qresourceengine/qresourceengine.pro @@ -6,7 +6,7 @@ load(qttest_p4) load(resources) # Input -SOURCES += tst_resourceengine.cpp +SOURCES += tst_qresourceengine.cpp RESOURCES += testqrc/test.qrc runtime_resource.target = runtime_resource.rcc diff --git a/tests/auto/qresourceengine/tst_resourceengine.cpp b/tests/auto/qresourceengine/tst_qresourceengine.cpp index a5e701a..d446562 100644 --- a/tests/auto/qresourceengine/tst_resourceengine.cpp +++ b/tests/auto/qresourceengine/tst_qresourceengine.cpp @@ -43,7 +43,7 @@ #include <QtTest/QtTest> #include <QtCore> -class tst_ResourceEngine: public QObject +class tst_QResourceEngine: public QObject { Q_OBJECT @@ -66,7 +66,7 @@ private: Q_DECLARE_METATYPE(QLocale) Q_DECLARE_METATYPE(qlonglong) -void tst_ResourceEngine::initTestCase() +void tst_QResourceEngine::initTestCase() { QVERIFY(QResource::registerResource("runtime_resource.rcc")); QVERIFY(QResource::registerResource("runtime_resource.rcc", "/secondary_root/")); @@ -79,7 +79,7 @@ void tst_ResourceEngine::initTestCase() } } -void tst_ResourceEngine::cleanupTestCase() +void tst_QResourceEngine::cleanupTestCase() { if (!builddir.isEmpty()) { QDir::setCurrent(builddir); @@ -90,7 +90,7 @@ void tst_ResourceEngine::cleanupTestCase() QVERIFY(QResource::unregisterResource("runtime_resource.rcc", "/secondary_root/")); } -void tst_ResourceEngine::checkStructure_data() +void tst_QResourceEngine::checkStructure_data() { QTest::addColumn<QString>("pathName"); QTest::addColumn<QString>("contents"); @@ -306,7 +306,7 @@ void tst_ResourceEngine::checkStructure_data() } } -void tst_ResourceEngine::checkStructure() +void tst_QResourceEngine::checkStructure() { QFETCH(QString, pathName); QFETCH(QString, contents); @@ -376,7 +376,7 @@ void tst_ResourceEngine::checkStructure() QLocale::setDefault(QLocale::system()); } -void tst_ResourceEngine::searchPath_data() +void tst_QResourceEngine::searchPath_data() { QTest::addColumn<QString>("searchPath"); QTest::addColumn<QString>("file"); @@ -396,7 +396,7 @@ void tst_ResourceEngine::searchPath_data() << QByteArray("path2\n"); } -void tst_ResourceEngine::searchPath() +void tst_QResourceEngine::searchPath() { QFETCH(QString, searchPath); QFETCH(QString, file); @@ -414,7 +414,7 @@ void tst_ResourceEngine::searchPath() qf.close(); } -void tst_ResourceEngine::checkUnregisterResource_data() +void tst_QResourceEngine::checkUnregisterResource_data() { QTest::addColumn<QString>("rcc_file"); QTest::addColumn<QString>("root"); @@ -426,7 +426,7 @@ void tst_ResourceEngine::checkUnregisterResource_data() << (int)QFileInfo("testqrc/currentdir.txt").size(); } -void tst_ResourceEngine::checkUnregisterResource() +void tst_QResourceEngine::checkUnregisterResource() { QFETCH(QString, rcc_file); QFETCH(QString, root); @@ -450,12 +450,13 @@ void tst_ResourceEngine::checkUnregisterResource() QCOMPARE((int)fileInfo.size(), size); } -void tst_ResourceEngine::doubleSlashInRoot() +void tst_QResourceEngine::doubleSlashInRoot() { QVERIFY(QFile::exists(":/secondary_root/runtime_resource/search_file.txt")); QVERIFY(QFile::exists("://secondary_root/runtime_resource/search_file.txt")); } -QTEST_MAIN(tst_ResourceEngine) +QTEST_MAIN(tst_QResourceEngine) + +#include "tst_qresourceengine.moc" -#include "tst_resourceengine.moc" |