Skip to content

Commit

Permalink
test fixes on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Apr 24, 2012
1 parent ee84248 commit 0b915ba
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/src/core/regression1141.cpp
Expand Up @@ -41,7 +41,7 @@
/** \ingroup UnitTests
* This is a regression test ticket 1141.
* broken Polish characters support since r8592
* https://trac.osgeo.org/qgis/ticket/1141
* http://hub.qgis.org/issues/1141
*
*/
class Regression1141: public QObject
Expand Down
14 changes: 11 additions & 3 deletions tests/src/core/regression992.cpp
Expand Up @@ -63,10 +63,14 @@ class Regression992: public QObject
//runs before all tests
void Regression992::initTestCase()
{
mpMapRenderer = 0;

// init QGIS's paths - true means that all path will be inited from prefix
QgsApplication::init();
QgsApplication::showSettings();
QgsProviderRegistry::instance( QgsApplication::pluginPath() );
// QgsApplication::skipGdalDriver( "JP2ECW" );
// QgsApplication::skipGdalDriver( "JP2MrSID" );
QgsProviderRegistry::instance( QgsApplication::pluginPath() );

//create some objects that will be used in all tests...
//create a raster layer that will be used in all tests...
Expand All @@ -79,6 +83,10 @@ void Regression992::initTestCase()
{
QSKIP( "This test requires the JPEG2000 GDAL driver", SkipAll );
}
else
{
qDebug() << mpRasterLayer->dataProvider()->metadata();
}

// Register the layer with the registry
QList<QgsMapLayer *> myList;
Expand All @@ -90,8 +98,8 @@ void Regression992::initTestCase()
myLayers << mpRasterLayer->id();
mpMapRenderer->setLayerSet( myLayers );
mReport += "<h1>Regression 992 Test</h1>\n";
mReport += "<p>See <a href=\"https://trac.osgeo.org/qgis/ticket/992\">"
"trac ticket 992</a> for more details.</p>";
mReport += "<p>See <a href=\"http://hub.qgis.org/issues/992\">"
"redmine ticket 992</a> for more details.</p>";
}
//runs after all tests
void Regression992::cleanupTestCase()
Expand Down
1 change: 1 addition & 0 deletions tests/src/core/testqgsmaprenderer.cpp
Expand Up @@ -95,6 +95,7 @@ void TestQgsMapRenderer::initTestCase()
QString myFileName = myTmpDir + "maprender_testdata.shp";
//copy over the default qml for our generated layer
QString myQmlFileName = myTestDataDir + "maprender_testdata.qml";
QFile::remove( myTmpDir + "maprender_testdata.qml" );
QVERIFY( QFile::copy( myQmlFileName, myTmpDir + "maprender_testdata.qml" ) );
qDebug( "Checking test dataset exists...\n%s", myFileName.toLocal8Bit().constData() );
if ( !QFile::exists( myFileName ) )
Expand Down
2 changes: 2 additions & 0 deletions tests/src/core/testqgsrasterlayer.cpp
Expand Up @@ -86,9 +86,11 @@ void TestQgsRasterLayer::initTestCase()
QFileInfo myRasterFileInfo( myFileName );
mpRasterLayer = new QgsRasterLayer( myRasterFileInfo.filePath(),
myRasterFileInfo.completeBaseName() );
qDebug() << "tenbyteraster metadata: " << mpRasterLayer->dataProvider()->metadata();
QFileInfo myLandsatRasterFileInfo( myLandsatFileName );
mpLandsatRasterLayer = new QgsRasterLayer( myLandsatRasterFileInfo.filePath(),
myLandsatRasterFileInfo.completeBaseName() );
qDebug() << "landsat metadata: " << mpLandsatRasterLayer->dataProvider()->metadata();
// Register the layer with the registry
QgsMapLayerRegistry::instance()->addMapLayers(
QList<QgsMapLayer *>() << mpRasterLayer );
Expand Down

0 comments on commit 0b915ba

Please sign in to comment.