tst_QtConcurrentMedian: compile with QT_NO_FOREACH
One trivial case: container newly marked as const. Task-number: QTBUG-115839 Change-Id: Ief788beab2f84b656e429ce3e96bbd691f6d4c71 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
ba96238600
commit
0766d55d22
@ -1,8 +1,6 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
|
||||
|
||||
#include <qtconcurrentmedian.h>
|
||||
|
||||
#include <QTest>
|
||||
@ -51,11 +49,11 @@ void tst_QtConcurrentMedian::median_data()
|
||||
|
||||
void tst_QtConcurrentMedian::median()
|
||||
{
|
||||
QFETCH(QList<double> , values);
|
||||
QFETCH(const QList<double> , values);
|
||||
QFETCH(double, expectedMedian);
|
||||
|
||||
QtConcurrent::Median m;
|
||||
foreach (double value, values)
|
||||
for (double value : values)
|
||||
m.addValue(value);
|
||||
QCOMPARE(m.median(), expectedMedian);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user