summaryrefslogtreecommitdiffstats
path: root/tests/auto/qmap/tst_qmap.cpp
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2010-11-23 11:26:54 (GMT)
committerJoão Abecasis <joao.abecasis@nokia.com>2010-11-23 11:26:54 (GMT)
commit802498fcd43558a10bb7477d3957cdd27fd8ec09 (patch)
treec40ddd859b032ffa7ed9c6df1173312c0bb1947d /tests/auto/qmap/tst_qmap.cpp
parent901fee7e610ec53f744416aeeca89c4605923120 (diff)
parent538e7b8ddf45936bb274ed3230b591b3459edfa7 (diff)
downloadQt-802498fcd43558a10bb7477d3957cdd27fd8ec09.zip
Qt-802498fcd43558a10bb7477d3957cdd27fd8ec09.tar.gz
Qt-802498fcd43558a10bb7477d3957cdd27fd8ec09.tar.bz2
Merge remote branch 'qt/master' into file-engine-refactor
Conflicts: demos/declarative/minehunt/minehunt.pro src/corelib/io/io.pri src/corelib/io/qfsfileengine.cpp src/corelib/io/qfsfileengine_unix.cpp src/corelib/io/qfsfileengine_win.cpp src/s60installs/bwins/QtCoreu.def src/s60installs/bwins/QtDeclarativeu.def src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtCoreu.def src/s60installs/eabi/QtDeclarativeu.def src/s60installs/eabi/QtGuiu.def tests/auto/qapplication/test/test.pro tests/auto/qaudioinput/qaudioinput.pro tests/auto/qaudiooutput/qaudiooutput.pro tests/auto/qchar/qchar.pro tests/auto/qdiriterator/qdiriterator.pro tests/auto/qsound/qsound.pro
Diffstat (limited to 'tests/auto/qmap/tst_qmap.cpp')
-rw-r--r--tests/auto/qmap/tst_qmap.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qmap/tst_qmap.cpp b/tests/auto/qmap/tst_qmap.cpp
index a1b8de7..311b0b6 100644
--- a/tests/auto/qmap/tst_qmap.cpp
+++ b/tests/auto/qmap/tst_qmap.cpp
@@ -65,6 +65,8 @@ private slots:
void beginEnd();
void key();
+ void swap();
+
void operator_eq();
void empty();
@@ -392,6 +394,16 @@ void tst_QMap::key()
}
}
+void tst_QMap::swap()
+{
+ QMap<int,QString> m1, m2;
+ m1[0] = "m1[0]";
+ m2[1] = "m2[1]";
+ m1.swap(m2);
+ QCOMPARE(m1.value(1),QLatin1String("m2[1]"));
+ QCOMPARE(m2.value(0),QLatin1String("m1[0]"));
+}
+
void tst_QMap::operator_eq()
{
{