summaryrefslogtreecommitdiffstats
path: root/tests/auto/qhash/tst_qhash.cpp
diff options
context:
space:
mode:
authorLorn Potter <lopotter@ljp-linux-vm.localdomain>2010-06-17 04:11:33 (GMT)
committerLorn Potter <lopotter@ljp-linux-vm.localdomain>2010-06-17 04:11:33 (GMT)
commit8335adf60299b728c0bf7a346a5afd94a3d56712 (patch)
treea8057969ac369ddffec9fa2b92e10cdf1fc319eb /tests/auto/qhash/tst_qhash.cpp
parent0948de26bca9a68a354b436895bdf9e2db9c4288 (diff)
parent30c8d1e3dccc83499ac3d76284cfb2e8d860808a (diff)
downloadQt-8335adf60299b728c0bf7a346a5afd94a3d56712.zip
Qt-8335adf60299b728c0bf7a346a5afd94a3d56712.tar.gz
Qt-8335adf60299b728c0bf7a346a5afd94a3d56712.tar.bz2
Merge branch '4.7' of git://gitorious.org/qt/qt into 4.7
Diffstat (limited to 'tests/auto/qhash/tst_qhash.cpp')
-rw-r--r--tests/auto/qhash/tst_qhash.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/qhash/tst_qhash.cpp b/tests/auto/qhash/tst_qhash.cpp
index 59576d9..3a7b54a 100644
--- a/tests/auto/qhash/tst_qhash.cpp
+++ b/tests/auto/qhash/tst_qhash.cpp
@@ -1154,6 +1154,26 @@ void tst_QHash::qmultihash_specific()
QVERIFY(i.key() == 9);
QVERIFY(i.value() == 98);
}
+
+ {
+ QMultiHash<int, int> map1;
+ map1.insert(42, 1);
+ map1.insert(10, 2);
+ map1.insert(48, 3);
+ QMultiHash<int, int> map2;
+ map2.insert(8, 4);
+ map2.insert(42, 5);
+ map2.insert(95, 12);
+
+ map1+=map2;
+ map2.insert(42, 1);
+ map2.insert(10, 2);
+ map2.insert(48, 3);
+ QCOMPARE(map1.count(), map2.count());
+ QVERIFY(map1.remove(42,5));
+ QVERIFY(map2.remove(42,5));
+ QVERIFY(map1 == map2);
+ }
}
template <typename T>