Skip to content

Commit ca7fa30

Browse files
committed
Fix for app paths not found by test
1 parent 9e73629 commit ca7fa30

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/src/core/testqgsexpression.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <QObject>
1717
#include <QString>
1818
#include <QObject>
19+
#include <qgsapplication.h>
1920
//header for class being tested
2021
#include <qgsexpression.h>
2122
#include <qgsfeature.h>
@@ -31,6 +32,17 @@ class TestQgsExpression: public QObject
3132
Q_OBJECT;
3233
private slots:
3334

35+
void initTestCase()
36+
{
37+
//
38+
// Runs once before any tests are run
39+
//
40+
// init QGIS's paths - true means that all path will be inited from prefix
41+
QgsApplication::init();
42+
QgsApplication::initQgis();
43+
QgsApplication::showSettings();
44+
}
45+
3446
void parsing_data()
3547
{
3648
QTest::addColumn<QString>( "string" );

0 commit comments

Comments
 (0)