X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/9aee5d22513f0367febab54b38b3a7dc58d120bb..ee9ebf2b17724a161ccd4dccab0504f1082010b7:/src/tests/kitemrangetest.cpp diff --git a/src/tests/kitemrangetest.cpp b/src/tests/kitemrangetest.cpp index ce7b48012..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();