Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
test case for file filter formatter
- Loading branch information
1 parent
1e936df
commit 262a5b2
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |