Skip to content
Permalink
Browse files
test cleanups
  • Loading branch information
jef-n committed May 6, 2012
1 parent c5ea708 commit db1c3d9f4ec7f2c0933d0d74d8a2ef59bc2bdd6f
@@ -50,9 +50,7 @@ typedef SInt32 SRefCon;
#endif
#endif

//#include "qgspluginregistry.h"
#include "qgsbench.h"
//#include "qgsmapcanvas.h"
#include "qgsapplication.h"
#include <qgsconfig.h>
#include <qgsversion.h>
@@ -50,12 +50,9 @@ void TestQgsVectorAnalyzer::initTestCase()
// Runs once before any tests are run
//
// init QGIS's paths - true means that all path will be inited from prefix
QString qgisPath = QCoreApplication::applicationDirPath();
QgsApplication::init( INSTALL_PREFIX );
QgsApplication::initQgis( );
QgsApplication::init();
QgsApplication::initQgis();
QgsApplication::showSettings();
// Instantiate the plugin directory so that providers are loaded
QgsProviderRegistry::instance( QgsApplication::pluginPath() );

//create some objects that will be used in all tests...
//create a map layer that will be used in all tests...
@@ -91,7 +88,6 @@ void TestQgsVectorAnalyzer::cleanup()
{

}

void TestQgsVectorAnalyzer::singleToMulti( )
{

@@ -116,9 +112,7 @@ void TestQgsVectorAnalyzer::simplifyGeometry( )
{
QString myTmpDir = QDir::tempPath() + QDir::separator() ;
QString myFileName = myTmpDir + "simplify_layer.shp";
QVERIFY( mAnalyzer.simplify( mpLineLayer,
myFileName,
1.0 ) );
QVERIFY( mAnalyzer.simplify( mpLineLayer, myFileName, 1.0 ) );
}

void TestQgsVectorAnalyzer::polygonCentroids( )
@@ -137,4 +131,3 @@ void TestQgsVectorAnalyzer::layerExtent( )

QTEST_MAIN( TestQgsVectorAnalyzer )
#include "moc_testqgsvectoranalyzer.cxx"

@@ -71,11 +71,9 @@ void Regression1141::initTestCase()
// Runs once before any tests are run
//
// init QGIS's paths - true means that all path will be inited from prefix
QString qgisPath = QCoreApplication::applicationDirPath();
QgsApplication::setPrefixPath( INSTALL_PREFIX, true );
QgsApplication::init();
QgsApplication::initQgis();
QgsApplication::showSettings();
// Instantiate the plugin directory so that providers are loaded
QgsProviderRegistry::instance( QgsApplication::pluginPath() );
// compute our test file name:
QString myTmpDir = QDir::tempPath() + QDir::separator() ;
mFileName = myTmpDir + "ąęćń.shp";
@@ -149,6 +147,4 @@ void Regression1141::diacriticalTest()


QTEST_MAIN( Regression1141 )

#include "moc_regression1141.cxx"

@@ -70,7 +70,7 @@ void Regression992::initTestCase()
QgsApplication::showSettings();
// QgsApplication::skipGdalDriver( "JP2ECW" );
// QgsApplication::skipGdalDriver( "JP2MrSID" );
QgsProviderRegistry::instance( QgsApplication::pluginPath() );
QgsApplication::initQgis();

//create some objects that will be used in all tests...
//create a raster layer that will be used in all tests...
@@ -132,4 +132,3 @@ void Regression992::regression992()

QTEST_MAIN( Regression992 )
#include "moc_regression992.cxx"

This file was deleted.

This file was deleted.

This file was deleted.

@@ -41,8 +41,8 @@ void TestQgsApplication::initTestCase()
// Runs once before any tests are run
//
// init QGIS's paths - true means that all path will be inited from prefix
//QString qgisPath = QCoreApplication::applicationDirPath();
QgsApplication::init( INSTALL_PREFIX );
QgsApplication::init();
QgsApplication::initQgis();
qDebug( "%s", QgsApplication::showSettings().toUtf8().constData() );
};

@@ -185,8 +185,8 @@ void TestQgsGeometry::initTestCase()
// Runs once before any tests are run
//
// init QGIS's paths - true means that all path will be inited from prefix
QString qgisPath = QCoreApplication::applicationDirPath();
QgsApplication::setPrefixPath( INSTALL_PREFIX, true );
QgsApplication::init();
QgsApplication::initQgis();
QgsApplication::showSettings();
mReport += "<h1>Geometry Tests</h1>\n";
mReport += "<p><font color=\"green\">Green = polygonA</font></p>\n";
@@ -52,8 +52,8 @@ void TestQgsMapLayer::initTestCase()
//
// init QGIS's paths - true means that all path will be inited from prefix
QgsApplication::init();
QgsApplication::initQgis();
QgsApplication::showSettings();
QgsProviderRegistry::instance( QgsApplication::pluginPath() );

//create some objects that will be used in all tests...
//create a map layer that will be used in all tests...
@@ -71,4 +71,3 @@ void TestQgsMapLayer::isValid()

QTEST_MAIN( TestQgsMapLayer )
#include "moc_testqgsmaplayer.cxx"

@@ -78,8 +78,8 @@ void TestQgsMapRenderer::initTestCase()
// Runs once before any tests are run
//
QgsApplication::init();
QgsApplication::initQgis();
QgsApplication::showSettings();
QgsProviderRegistry::instance( QgsApplication::pluginPath() );

//create some objects that will be used in all tests...
mEncoding = "UTF-8";
@@ -72,8 +72,7 @@ void TestQgsPoint::initTestCase()
// Runs once before any tests are run
//
// init QGIS's paths - true means that all path will be inited from prefix
QString qgisPath = QCoreApplication::applicationDirPath();
QgsApplication::init( INSTALL_PREFIX );
QgsApplication::init();
QgsApplication::showSettings();
mReport += "<h1>Point Tests</h1>\n";
}
Loading

0 comments on commit db1c3d9

Please sign in to comment.