summaryrefslogtreecommitdiffstats
path: root/tests/auto/qhash
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-04-24 16:03:55 +0200
committeraxis <qt-info@nokia.com>2009-04-27 09:09:01 +0200
commite74c8dc65e2feffb9a55d00aee5ca634fba41df8 (patch)
tree3a131f9235fb6a455793178d8313655e4fd0036e /tests/auto/qhash
parent8f427b2b914d5b575a4a7c0ed65d2fb8f45acc76 (diff)
parent211bea9838bcc2acd7f54b65468fe1be2d81b1e0 (diff)
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Configure.exe recompiled with MSVC6. Conflicts: configure.exe examples/network/network.pro src/gui/dialogs/qfiledialog_p.h src/gui/dialogs/qfilesystemmodel_p.h src/gui/kernel/qapplication.cpp tests/auto/_Categories/qmake.txt tests/auto/qfile/test/test.pro tests/auto/qfile/tst_qfile.cpp tests/auto/qlibrary/tst_qlibrary.cpp tests/auto/qline/tst_qline.cpp tests/auto/qstyle/tst_qstyle.cpp tests/auto/qtextstream/tst_qtextstream.cpp tests/auto/qtranslator/qtranslator.pro tests/auto/qwaitcondition/tst_qwaitcondition.cpp translations/qt_ja_JP.ts
Diffstat (limited to 'tests/auto/qhash')
-rw-r--r--tests/auto/qhash/tst_qhash.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/tests/auto/qhash/tst_qhash.cpp b/tests/auto/qhash/tst_qhash.cpp
index 73dfe07526..5d6b91a53d 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=
@@ -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));
}