diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2009-04-16 09:59:31 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2009-04-16 09:59:31 (GMT) |
commit | 2412e3c0fedb4eba5fecffb23c3b9a31ad803ea0 (patch) | |
tree | 4d48ece1b8ad6b5eca854d05f00eea82733af389 /tests/auto/qhash | |
parent | e37684d2899b8f2cbc14fa0ab19ab12ed23d495a (diff) | |
download | Qt-2412e3c0fedb4eba5fecffb23c3b9a31ad803ea0.zip Qt-2412e3c0fedb4eba5fecffb23c3b9a31ad803ea0.tar.gz Qt-2412e3c0fedb4eba5fecffb23c3b9a31ad803ea0.tar.bz2 |
Remove obsolete code from autotests.
Each version of Qt has its own set of autotests, therefore
preprocessor directives relating to obsolete QT_VERSION's
are not necessary.
Reviewed-by: Carlos Duclos
Diffstat (limited to 'tests/auto/qhash')
-rw-r--r-- | tests/auto/qhash/tst_qhash.cpp | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/tests/auto/qhash/tst_qhash.cpp b/tests/auto/qhash/tst_qhash.cpp index 9343504..f300eec 100644 --- a/tests/auto/qhash/tst_qhash.cpp +++ b/tests/auto/qhash/tst_qhash.cpp @@ -39,16 +39,10 @@ ** ****************************************************************************/ - #include <QtTest/QtTest> - -#if QT_VERSION >= 0x040000 #include <qhash.h> #include <qmap.h> -#endif - - //TESTED_CLASS= //TESTED_FILES= @@ -65,7 +59,7 @@ private slots: void insert1(); void erase(); void key(); - + void count(); // copied from tst_QMap void clear(); // copied from tst_QMap void empty(); // copied from tst_QMap @@ -80,9 +74,7 @@ private slots: void qmultihash_specific(); void compare(); -#if QT_VERSION > 0x040100 void compare2(); -#endif // QT_VERSION void iterators(); // sligthly modified from tst_QMap void keys_values_uniqueKeys(); // slightly modified from tst_QMap void noNeedlessRehashes(); @@ -799,7 +791,6 @@ void tst_QHash::compare() QVERIFY(hash1 != hash2); } -#if QT_VERSION > 0x040100 void tst_QHash::compare2() { QHash<int, int> a; @@ -838,7 +829,6 @@ void tst_QHash::compare2() QVERIFY(!(a == b)); QVERIFY(!(b == a)); } -#endif // QT_VERSION //sligthly modified from tst_QMap void tst_QHash::iterators() @@ -996,9 +986,6 @@ void tst_QHash::rehash_isnt_quadratic() class Bar { public: -#if QT_VERSION < 0x040100 - Bar() : j(0) {} -#endif Bar(int i) : j(i) {} int j; @@ -1180,37 +1167,27 @@ QList<T> sorted(const QList<T> &list) void tst_QHash::keys_values_uniqueKeys() { QHash<QString, int> hash; -#if QT_VERSION >= 0x040200 QVERIFY(hash.uniqueKeys().isEmpty()); -#endif QVERIFY(hash.keys().isEmpty()); QVERIFY(hash.values().isEmpty()); hash.insertMulti("alpha", 1); QVERIFY(sorted(hash.keys()) == (QList<QString>() << "alpha")); -#if QT_VERSION >= 0x040200 QVERIFY(hash.keys() == hash.uniqueKeys()); -#endif QVERIFY(hash.values() == (QList<int>() << 1)); hash.insertMulti("beta", -2); QVERIFY(sorted(hash.keys()) == (QList<QString>() << "alpha" << "beta")); -#if QT_VERSION >= 0x040200 QVERIFY(hash.keys() == hash.uniqueKeys()); -#endif QVERIFY(sorted(hash.values()) == sorted(QList<int>() << 1 << -2)); hash.insertMulti("alpha", 2); -#if QT_VERSION >= 0x040200 QVERIFY(sorted(hash.uniqueKeys()) == (QList<QString>() << "alpha" << "beta")); -#endif QVERIFY(sorted(hash.keys()) == (QList<QString>() << "alpha" << "alpha" << "beta")); QVERIFY(sorted(hash.values()) == sorted(QList<int>() << 2 << 1 << -2)); hash.insertMulti("beta", 4); -#if QT_VERSION >= 0x040200 QVERIFY(sorted(hash.uniqueKeys()) == (QList<QString>() << "alpha" << "beta")); -#endif QVERIFY(sorted(hash.keys()) == (QList<QString>() << "alpha" << "alpha" << "beta" << "beta")); QVERIFY(sorted(hash.values()) == sorted(QList<int>() << 2 << 1 << 4 << -2)); } |