X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/2b895e7e2bd096e55faa1032ebc6a355a72c2325..9df6ef77aadbd2c142bc666d3c998d9ece47f7fe:/src/tests/kitemrangetest.cpp diff --git a/src/tests/kitemrangetest.cpp b/src/tests/kitemrangetest.cpp index 882cd66e7..93e22f6bc 100644 --- a/src/tests/kitemrangetest.cpp +++ b/src/tests/kitemrangetest.cpp @@ -1,42 +1,35 @@ -/*************************************************************************** - * Copyright (C) 2014 by Frank Reininghaus * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ +/* + * SPDX-FileCopyrightText: 2014 Frank Reininghaus + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemviews/kitemrange.h" +#include #include -#include -Q_DECLARE_METATYPE(QVector); -Q_DECLARE_METATYPE(KItemRangeList); +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(KItemRangeList) class KItemRangeTest : public QObject { Q_OBJECT -private slots: +private Q_SLOTS: + void initTestCase(); void testFromSortedContainer_data(); void testFromSortedContainer(); }; +void KItemRangeTest::initTestCase() +{ + QStandardPaths::setTestModeEnabled(true); +} + void KItemRangeTest::testFromSortedContainer_data() { - QTest::addColumn >("sortedNumbers"); + QTest::addColumn>("sortedNumbers"); QTest::addColumn("expected"); QTest::newRow("empty") << QVector{} << KItemRangeList(); @@ -69,6 +62,6 @@ void KItemRangeTest::testFromSortedContainer() QCOMPARE(expected, result); } -QTEST_MAIN(KItemRangeTest) +QTEST_GUILESS_MAIN(KItemRangeTest) #include "kitemrangetest.moc"