Tests: Do not use deprecated Qt algorithms

Change-Id: I3ca177b69df3540729a98d8d3b6287df36a47ea0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Orgad Shaneh
2016-08-12 18:06:49 +03:00
committed by Orgad Shaneh
parent c8e40f5b56
commit 98a0c816f7
2 changed files with 6 additions and 6 deletions

View File

@@ -204,7 +204,7 @@ void tst_MapReduce::map()
).waitForFinished();
// Utils::map is "ordered" by default, but that means that result reporting is ordered,
// the map function is still called out-of-order
qSort(results);
Utils::sort(results);
QCOMPARE(results, QList<int>({1, 2, 5}));
}
{
@@ -224,7 +224,7 @@ void tst_MapReduce::map()
QLatin1String("bar"), QLatin1String("blah")}),
[](const QString &s) { return s.size(); });
QList<int> vals = sizes.toList();
qSort(vals);
Utils::sort(vals);
QCOMPARE(vals, QList<int>({3, 4}));
}
{
@@ -232,7 +232,7 @@ void tst_MapReduce::map()
const QSet<int> sizes = Utils::mapped<QSet>(list.cbegin(), list.cend(),
[](const QString &s) { return s.size(); });
QList<int> vals = sizes.toList();
qSort(vals);
Utils::sort(vals);
QCOMPARE(vals, QList<int>({3, 4}));
}
}