Skip to content
Permalink
Browse files
test case for file filter formatter
  • Loading branch information
michaelkirk committed Jan 26, 2015
1 parent 1e936df commit 262a5b2b186336c8f5eff93cc79196629b135565
Showing with 37 additions and 0 deletions.
  1. +1 −0 tests/src/gui/CMakeLists.txt
  2. +36 −0 tests/src/gui/testqgsgui.cpp
@@ -117,6 +117,7 @@ ADD_QGIS_TEST(zoomtest testqgsmaptoolzoom.cpp)

#ADD_QGIS_TEST(histogramtest testqgsrasterhistogram.cpp)
ADD_QGIS_TEST(projectionissues testprojectionissues.cpp)
ADD_QGIS_TEST(qgsguitest testqgsgui.cpp)
ADD_QGIS_TEST(scalecombobox testqgsscalecombobox.cpp)
ADD_QGIS_TEST(dualviewtest testqgsdualview.cpp )
ADD_QGIS_TEST(doublespinbox testqgsdoublespinbox.cpp)
@@ -0,0 +1,36 @@
/***************************************************************************
testqgsgui.cpp
--------------------------------------
Date : 26.1.2015
Copyright : (C) 2015 Michael Kirk
Email : michael at jackpine dot me
***************************************************************************
* *
* 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. *
* *
***************************************************************************/

#include <QtTest/QtTest>
#include <qgisgui.h>

class TestQgsGui : public QObject
{
Q_OBJECT
private slots:
void createFileFilter();

};

void TestQgsGui::createFileFilter()
{
QString expected = "FOO format (*.foo *.FOO)";
QString actual = QgisGui::createFileFilter_("foo");;

QCOMPARE( actual, expected );
}

QTEST_MAIN( TestQgsGui )
#include "testqgsgui.moc"

0 comments on commit 262a5b2

Please sign in to comment.