Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/plugins/folder/autotests/positionertest.cpp
Show First 20 Lines • Show All 248 Lines • ▼ Show 20 Line(s) | 216 | { | |||
---|---|---|---|---|---|
249 | auto savedSource2ProxyScreen0 = expectedSource2ProxyScreen0; | 249 | auto savedSource2ProxyScreen0 = expectedSource2ProxyScreen0; | ||
250 | auto savedProxy2SourceScreen0 = expectedProxy2SourceScreen0; | 250 | auto savedProxy2SourceScreen0 = expectedProxy2SourceScreen0; | ||
251 | 251 | | |||
252 | auto verifyMapping = [](const QHash<int, int> &actual, const QHash<int, int> &expected) { | 252 | auto verifyMapping = [](const QHash<int, int> &actual, const QHash<int, int> &expected) { | ||
253 | 253 | | |||
254 | auto ensureUnique = [](const QHash<int, int> mapping) { | 254 | auto ensureUnique = [](const QHash<int, int> mapping) { | ||
255 | auto values = mapping.values(); | 255 | auto values = mapping.values(); | ||
256 | std::sort(values.begin(), values.end()); | 256 | std::sort(values.begin(), values.end()); | ||
257 | auto uniqueValues = values.toSet().toList(); | 257 | auto uniqueValues = values.toSet().values(); | ||
258 | std::sort(uniqueValues.begin(), uniqueValues.end()); | 258 | std::sort(uniqueValues.begin(), uniqueValues.end()); | ||
259 | QVERIFY(uniqueValues == values); | 259 | QVERIFY(uniqueValues == values); | ||
260 | }; | 260 | }; | ||
261 | 261 | | |||
262 | ensureUnique(actual); | 262 | ensureUnique(actual); | ||
263 | QCOMPARE(actual, expected); | 263 | QCOMPARE(actual, expected); | ||
264 | }; | 264 | }; | ||
265 | 265 | | |||
▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines |