summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2014-07-25 14:46:41 +0200
committerMarc Mutz <marc.mutz@kdab.com>2014-07-25 14:53:25 +0200
commitaaaba5da2400402c1c739ebd45e3d392eb8dfb86 (patch)
tree03d950f17092a721c47580c3b42008325da8144c
parent67a316be7cf9b9e7c2c7cc1845bee2dcf63f38ba (diff)
tst_QSet: verify that {}-style initialization drops duplicates
No actual reason for this test, except my curiority. Then again, it's good to have this check, too. Change-Id: I815fce7e4dbe76e21cac29beb1dbfc1083191d24 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
-rw-r--r--tests/auto/corelib/tools/qset/tst_qset.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/qset/tst_qset.cpp b/tests/auto/corelib/tools/qset/tst_qset.cpp
index eaa1c018ba..5ef1b44b6f 100644
--- a/tests/auto/corelib/tools/qset/tst_qset.cpp
+++ b/tests/auto/corelib/tools/qset/tst_qset.cpp
@@ -922,7 +922,7 @@ void tst_QSet::makeSureTheComfortFunctionsCompile()
void tst_QSet::initializerList()
{
#ifdef Q_COMPILER_INITIALIZER_LISTS
- QSet<int> set{1, 2, 3, 4, 5};
+ QSet<int> set = {1, 1, 2, 3, 4, 5};
QCOMPARE(set.count(), 5);
QVERIFY(set.contains(1));
QVERIFY(set.contains(2));