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/qicoimageformat | |
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/qicoimageformat')
-rw-r--r-- | tests/auto/qicoimageformat/qicoimageformat.pro | 2 | ||||
-rw-r--r-- | tests/auto/qicoimageformat/tst_qicoimageformat.cpp (renamed from tests/auto/qicoimageformat/tst_qticoimageformat.cpp) | 49 |
2 files changed, 26 insertions, 25 deletions
diff --git a/tests/auto/qicoimageformat/qicoimageformat.pro b/tests/auto/qicoimageformat/qicoimageformat.pro index 19c13b7..9a347d7 100644 --- a/tests/auto/qicoimageformat/qicoimageformat.pro +++ b/tests/auto/qicoimageformat/qicoimageformat.pro @@ -1,5 +1,5 @@ load(qttest_p4) -SOURCES+= tst_qticoimageformat.cpp +SOURCES+= tst_qicoimageformat.cpp wince*: { DEFINES += SRCDIR=\\\".\\\" diff --git a/tests/auto/qicoimageformat/tst_qticoimageformat.cpp b/tests/auto/qicoimageformat/tst_qicoimageformat.cpp index 51ee4aa..799a20b 100644 --- a/tests/auto/qicoimageformat/tst_qticoimageformat.cpp +++ b/tests/auto/qicoimageformat/tst_qicoimageformat.cpp @@ -42,13 +42,13 @@ #include <QtGui> #include <QtCore> -class tst_QtIcoImageFormat : public QObject +class tst_QIcoImageFormat : public QObject { Q_OBJECT public: - tst_QtIcoImageFormat(); - virtual ~tst_QtIcoImageFormat(); + tst_QIcoImageFormat(); + virtual ~tst_QIcoImageFormat(); public slots: @@ -76,45 +76,45 @@ private: }; -tst_QtIcoImageFormat::tst_QtIcoImageFormat() +tst_QIcoImageFormat::tst_QIcoImageFormat() { m_IconPath = QLatin1String(SRCDIR) + "/icons"; qDebug() << m_IconPath; } -tst_QtIcoImageFormat::~tst_QtIcoImageFormat() +tst_QIcoImageFormat::~tst_QIcoImageFormat() { } -void tst_QtIcoImageFormat::init() +void tst_QIcoImageFormat::init() { } -void tst_QtIcoImageFormat::cleanup() +void tst_QIcoImageFormat::cleanup() { } -void tst_QtIcoImageFormat::initTestCase() +void tst_QIcoImageFormat::initTestCase() { } -void tst_QtIcoImageFormat::cleanupTestCase() +void tst_QIcoImageFormat::cleanupTestCase() { } -void tst_QtIcoImageFormat::format() +void tst_QIcoImageFormat::format() { QImageReader reader(m_IconPath + "/valid/35FLOPPY.ICO", "ico"); QByteArray fmt = reader.format(); QCOMPARE(const_cast<const char*>(fmt.data()), "ico" ); } -void tst_QtIcoImageFormat::canRead_data() +void tst_QIcoImageFormat::canRead_data() { QTest::addColumn<QString>("fileName"); QTest::addColumn<int>("isValid"); @@ -132,7 +132,7 @@ void tst_QtIcoImageFormat::canRead_data() QTest::newRow("includes 32BPP w/alpha") << "valid/semitransparent.ico" << 1; } -void tst_QtIcoImageFormat::canRead() +void tst_QIcoImageFormat::canRead() { QFETCH(QString, fileName); QFETCH(int, isValid); @@ -154,7 +154,7 @@ public: }; -void tst_QtIcoImageFormat::SequentialFile_data() +void tst_QIcoImageFormat::SequentialFile_data() { QTest::addColumn<QString>("fileName"); QTest::addColumn<int>("isValid"); @@ -166,7 +166,7 @@ void tst_QtIcoImageFormat::SequentialFile_data() } -void tst_QtIcoImageFormat::SequentialFile() +void tst_QIcoImageFormat::SequentialFile() { QFETCH(QString, fileName); QFETCH(int, isValid); @@ -184,7 +184,7 @@ void tst_QtIcoImageFormat::SequentialFile() } -void tst_QtIcoImageFormat::imageCount_data() +void tst_QIcoImageFormat::imageCount_data() { QTest::addColumn<QString>("fileName"); QTest::addColumn<int>("count"); @@ -202,7 +202,7 @@ void tst_QtIcoImageFormat::imageCount_data() } -void tst_QtIcoImageFormat::imageCount() +void tst_QIcoImageFormat::imageCount() { QFETCH(QString, fileName); QFETCH(int, count); @@ -212,7 +212,7 @@ void tst_QtIcoImageFormat::imageCount() } -void tst_QtIcoImageFormat::jumpToNextImage_data() +void tst_QIcoImageFormat::jumpToNextImage_data() { QTest::addColumn<QString>("fileName"); QTest::addColumn<int>("count"); @@ -228,7 +228,7 @@ void tst_QtIcoImageFormat::jumpToNextImage_data() QTest::newRow("includes 32BPP w/alpha") << "valid/semitransparent.ico" << 9; } -void tst_QtIcoImageFormat::jumpToNextImage() +void tst_QIcoImageFormat::jumpToNextImage() { QFETCH(QString, fileName); QFETCH(int, count); @@ -242,7 +242,7 @@ void tst_QtIcoImageFormat::jumpToNextImage() QCOMPARE(count, 0); } -void tst_QtIcoImageFormat::loopCount_data() +void tst_QIcoImageFormat::loopCount_data() { QTest::addColumn<QString>("fileName"); QTest::addColumn<int>("count"); @@ -251,7 +251,7 @@ void tst_QtIcoImageFormat::loopCount_data() QTest::newRow("invalid floppy (first 8 bytes = 0xff)") << "invalid/35floppy.ico" << 0; } -void tst_QtIcoImageFormat::loopCount() +void tst_QIcoImageFormat::loopCount() { QFETCH(QString, fileName); QFETCH(int, count); @@ -260,7 +260,7 @@ void tst_QtIcoImageFormat::loopCount() QCOMPARE(reader.loopCount(), count); } -void tst_QtIcoImageFormat::nextImageDelay_data() +void tst_QIcoImageFormat::nextImageDelay_data() { QTest::addColumn<QString>("fileName"); QTest::addColumn<int>("count"); @@ -277,7 +277,7 @@ void tst_QtIcoImageFormat::nextImageDelay_data() QTest::newRow("includes 32BPP w/alpha") << "valid/semitransparent.ico" << 9; } -void tst_QtIcoImageFormat::nextImageDelay() +void tst_QIcoImageFormat::nextImageDelay() { QFETCH(QString, fileName); QFETCH(int, count); @@ -294,5 +294,6 @@ void tst_QtIcoImageFormat::nextImageDelay() } } -QTEST_MAIN(tst_QtIcoImageFormat) -#include "tst_qticoimageformat.moc" +QTEST_MAIN(tst_QIcoImageFormat) +#include "tst_qicoimageformat.moc" + |