Skip to content

Commit

Permalink
indent
Browse files Browse the repository at this point in the history
  • Loading branch information
lbartoletti committed Aug 24, 2020
1 parent d327222 commit 5fe0ee7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/core/geometry/qgsgeometryutils.cpp
Expand Up @@ -1301,7 +1301,7 @@ QPair<QgsWkbTypes::Type, QString> QgsGeometryUtils::wktReadBlock( const QString
QString wktParsed = wkt;
QString contents;
if ( wktParsed.count( '(' ) != wktParsed.count( ')' ) ) // if unbalanced parenthesis will returns false
contents = QStringLiteral("NULL");
contents = QStringLiteral( "NULL" );
else if ( wkt.contains( QString( "EMPTY" ), Qt::CaseInsensitive ) )
{
QRegularExpression wktRegEx( QStringLiteral( "^\\s*(\\w+)\\s+(\\w+)\\s*$" ) );
Expand Down
28 changes: 14 additions & 14 deletions tests/src/core/testqgsgeometry.cpp
Expand Up @@ -18102,20 +18102,20 @@ void TestQgsGeometry::testRandomPointsInPolygon()
void TestQgsGeometry::wktParser()
{
// unbalanced parenthesis
QVERIFY(! QgsPoint().fromWkt("POINT((0, 1)"));
QVERIFY(! QgsPoint().fromWkt("POINT(0, 1) )"));
QVERIFY(! QgsPoint().fromWkt("POINT ((0, 1)"));
QVERIFY(! QgsPoint().fromWkt("POINT (0, 1) )"));
QVERIFY(! QgsLineString().fromWkt("LineString(0, 1) )"));
QVERIFY(! QgsLineString().fromWkt("LineString(0 1, 1 2) )"));
QVERIFY(! QgsLineString().fromWkt("LineString (0, 1) )"));
QVERIFY(! QgsLineString().fromWkt("LineString (0 1, 1 2) )"));
QVERIFY(! QgsMultiLineString().fromWkt("MULTILINESTRING ((((1 2, 2 4, 4 5))"));
QVERIFY(! QgsMultiLineString().fromWkt("MULTILINESTRING((((1 2, 2 4, 4 5))"));
QVERIFY(! QgsLineString().fromWkt("Triangle(0 1, 1 2, 3 3) )"));
QVERIFY(! QgsLineString().fromWkt("Triangle (0 1, 1 2, 3 3) )"));
QVERIFY(! QgsLineString().fromWkt("Triangle( (0 1, 1 2, 3 3) )) "));
QVERIFY(! QgsLineString().fromWkt("Triangle ( (0 1, 1 2, 3 3) )) "));
QVERIFY( ! QgsPoint().fromWkt( "POINT((0, 1)" ) );
QVERIFY( ! QgsPoint().fromWkt( "POINT(0, 1) )" ) );
QVERIFY( ! QgsPoint().fromWkt( "POINT ((0, 1)" ) );
QVERIFY( ! QgsPoint().fromWkt( "POINT (0, 1) )" ) );
QVERIFY( ! QgsLineString().fromWkt( "LineString(0, 1) )" ) );
QVERIFY( ! QgsLineString().fromWkt( "LineString(0 1, 1 2) )" ) );
QVERIFY( ! QgsLineString().fromWkt( "LineString (0, 1) )" ) );
QVERIFY( ! QgsLineString().fromWkt( "LineString (0 1, 1 2) )" ) );
QVERIFY( ! QgsMultiLineString().fromWkt( "MULTILINESTRING ((((1 2, 2 4, 4 5))" ) );
QVERIFY( ! QgsMultiLineString().fromWkt( "MULTILINESTRING((((1 2, 2 4, 4 5))" ) );
QVERIFY( ! QgsLineString().fromWkt( "Triangle(0 1, 1 2, 3 3) )" ) );
QVERIFY( ! QgsLineString().fromWkt( "Triangle (0 1, 1 2, 3 3) )" ) );
QVERIFY( ! QgsLineString().fromWkt( "Triangle( (0 1, 1 2, 3 3) )) " ) );
QVERIFY( ! QgsLineString().fromWkt( "Triangle ( (0 1, 1 2, 3 3) )) " ) );
}
QGSTEST_MAIN( TestQgsGeometry )
#include "testqgsgeometry.moc"

0 comments on commit 5fe0ee7

Please sign in to comment.