From bdcca2b903610699932656637ca95bc6969e7c45 Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Mon, 29 Nov 2010 21:15:35 +0000 Subject: Add a unit test for the basic selection-related functionality of DolphinView. The main testing code is inside an abstract base class. Three classes inherit this base class and do the actual testing in one view mode each. svn path=/trunk/KDE/kdebase/apps/; revision=1202157 --- src/tests/dolphinviewtest_columns.cpp | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/tests/dolphinviewtest_columns.cpp (limited to 'src/tests/dolphinviewtest_columns.cpp') diff --git a/src/tests/dolphinviewtest_columns.cpp b/src/tests/dolphinviewtest_columns.cpp new file mode 100644 index 000000000..398446fca --- /dev/null +++ b/src/tests/dolphinviewtest_columns.cpp @@ -0,0 +1,42 @@ +/*************************************************************************** + * Copyright (C) 2010 by Frank Reininghaus (frank78ac@googlemail.com) * + * * + * 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 * + ***************************************************************************/ + +#include + +#include "dolphinviewtest_allviewmodes.h" + +class DolphinViewTest_Columns : public DolphinViewTest_AllViewModes +{ + Q_OBJECT + +public: + + virtual DolphinView::Mode mode() const { + return DolphinView::ColumnView; + } + + virtual bool verifyCorrectViewMode() const { + return (m_view->mode() == DolphinView::ColumnView); + } + +}; + +QTEST_KDEMAIN(DolphinViewTest_Columns, GUI) + +#include "dolphinviewtest_columns.moc" -- cgit v1.3