Skip to content

Commit

Permalink
use epsg and fix circularstring test on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
lbartoletti committed Aug 30, 2018
1 parent e72879e commit a7b6bdb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/src/app/testqgsmaptoolreverseline.cpp
Expand Up @@ -58,7 +58,7 @@ void TestQgsMapToolReverseLine::initTestCase()
mQgisApp = new QgisApp();

mCanvas = new QgsMapCanvas();
//mCanvas->setDestinationCrs( QgsCoordinateReferenceSystem( QStringLiteral( "EPSG:27700" ) ) );
mCanvas->setDestinationCrs( QgsCoordinateReferenceSystem( QStringLiteral( "EPSG:3946" ) ) );

}

Expand All @@ -70,13 +70,13 @@ void TestQgsMapToolReverseLine::cleanupTestCase()
void TestQgsMapToolReverseLine::testReverseCurve()
{
//create a temporary layer
std::unique_ptr< QgsVectorLayer > memoryLayer( new QgsVectorLayer( QStringLiteral( "LineStringZ?field=pk:int" ), QStringLiteral( "vl" ), QStringLiteral( "memory" ) ) );
std::unique_ptr< QgsVectorLayer > memoryLayer( new QgsVectorLayer( QStringLiteral( "LineString?crs=EPSG:3946&field=pk:int" ), QStringLiteral( "vl" ), QStringLiteral( "memory" ) ) );
QVERIFY( memoryLayer->isValid() );
QgsFeature curve( memoryLayer->dataProvider()->fields(), 1 );

curve.setAttribute( QStringLiteral( "pk" ), 1 );
curve.setGeometry( QgsGeometry::fromWkt( QStringLiteral(
"CircularStringZ(0 0 0, 10 10 10, 5 5 5)" ) ) );
"CircularString(10 10, 5 5)" ) ) );

memoryLayer->dataProvider()->addFeatures( QgsFeatureList() << curve );

Expand All @@ -97,7 +97,7 @@ void TestQgsMapToolReverseLine::testReverseCurve()
tool->canvasReleaseEvent( event.get() );
QgsFeature f = memoryLayer->getFeature( 1 );

QString wkt = "CircularStringZ (5 5 5, 10 10 10, 0 0 0)";
QString wkt = "CircularString (5 5, 10 10)";
QCOMPARE( f.geometry().asWkt(), wkt );
memoryLayer->rollBack();

Expand All @@ -106,7 +106,7 @@ void TestQgsMapToolReverseLine::testReverseCurve()
void TestQgsMapToolReverseLine::testReverseLineString()
{
//create a temporary layer
std::unique_ptr< QgsVectorLayer > memoryLayer( new QgsVectorLayer( QStringLiteral( "LineStringZ?field=pk:int" ), QStringLiteral( "vl" ), QStringLiteral( "memory" ) ) );
std::unique_ptr< QgsVectorLayer > memoryLayer( new QgsVectorLayer( QStringLiteral( "LineStringZ?crs=EPSG:3946&field=pk:int" ), QStringLiteral( "vl" ), QStringLiteral( "memory" ) ) );
QVERIFY( memoryLayer->isValid() );
QgsFeature line( memoryLayer->dataProvider()->fields(), 1 );

Expand Down Expand Up @@ -142,7 +142,7 @@ void TestQgsMapToolReverseLine::testReverseLineString()
void TestQgsMapToolReverseLine::testReverseMultiLineString()
{
//create a temporary layer
std::unique_ptr< QgsVectorLayer > memoryLayer( new QgsVectorLayer( QStringLiteral( "MultiLineStringZ?field=pk:int" ), QStringLiteral( "vl" ), QStringLiteral( "memory" ) ) );
std::unique_ptr< QgsVectorLayer > memoryLayer( new QgsVectorLayer( QStringLiteral( "MultiLineStringZ?crs=EPSG:3946&field=pk:int" ), QStringLiteral( "vl" ), QStringLiteral( "memory" ) ) );
QVERIFY( memoryLayer->isValid() );
QgsFeature multi( memoryLayer->dataProvider()->fields(), 1 );

Expand Down

0 comments on commit a7b6bdb

Please sign in to comment.