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>
This commit is contained in:
parent
67a316be7c
commit
aaaba5da24
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user