tests/auto/qhash/tst_qhash.cpp
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
--- a/tests/auto/qhash/tst_qhash.cpp	Tue Jul 06 15:10:48 2010 +0300
+++ b/tests/auto/qhash/tst_qhash.cpp	Wed Aug 18 10:37:55 2010 +0300
@@ -1154,6 +1154,26 @@
     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>