Skip to content

Commit

Permalink
test cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed May 6, 2012
1 parent c5ea708 commit db1c3d9
Show file tree
Hide file tree
Showing 19 changed files with 22 additions and 469 deletions.
2 changes: 0 additions & 2 deletions tests/bench/main.cpp
Expand Up @@ -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>
Expand Down
13 changes: 3 additions & 10 deletions tests/src/analysis/testqgsvectoranalyzer.cpp
Expand Up @@ -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...
Expand Down Expand Up @@ -91,7 +88,6 @@ void TestQgsVectorAnalyzer::cleanup()
{

}

void TestQgsVectorAnalyzer::singleToMulti( )
{

Expand All @@ -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( )
Expand All @@ -137,4 +131,3 @@ void TestQgsVectorAnalyzer::layerExtent( )

QTEST_MAIN( TestQgsVectorAnalyzer )
#include "moc_testqgsvectoranalyzer.cxx"

8 changes: 2 additions & 6 deletions tests/src/core/regression1141.cpp
Expand Up @@ -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";
Expand Down Expand Up @@ -149,6 +147,4 @@ void Regression1141::diacriticalTest()


QTEST_MAIN( Regression1141 )

#include "moc_regression1141.cxx"

3 changes: 1 addition & 2 deletions tests/src/core/regression992.cpp
Expand Up @@ -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...
Expand Down Expand Up @@ -132,4 +132,3 @@ void Regression992::regression992()

QTEST_MAIN( Regression992 )
#include "moc_regression992.cxx"

41 changes: 0 additions & 41 deletions tests/src/core/runtests.sh

This file was deleted.

188 changes: 0 additions & 188 deletions tests/src/core/test_builder.pl

This file was deleted.

24 changes: 0 additions & 24 deletions tests/src/core/test_suite_builder.sh

This file was deleted.

4 changes: 2 additions & 2 deletions tests/src/core/testqgsapplication.cpp
Expand Up @@ -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() );
};

Expand Down
4 changes: 2 additions & 2 deletions tests/src/core/testqgsgeometry.cpp
Expand Up @@ -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";
Expand Down
3 changes: 1 addition & 2 deletions tests/src/core/testqgsmaplayer.cpp
Expand Up @@ -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...
Expand All @@ -71,4 +71,3 @@ void TestQgsMapLayer::isValid()

QTEST_MAIN( TestQgsMapLayer )
#include "moc_testqgsmaplayer.cxx"

2 changes: 1 addition & 1 deletion tests/src/core/testqgsmaprenderer.cpp
Expand Up @@ -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";
Expand Down
3 changes: 1 addition & 2 deletions tests/src/core/testqgspoint.cpp
Expand Up @@ -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";
}
Expand Down

0 comments on commit db1c3d9

Please sign in to comment.