Skip to content

Commit ab98858

Browse files
committed
Fix build failure due to dabc3b1
1 parent f3bbf89 commit ab98858

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

tests/src/core/testqgsmaptopixelgeometrysimplifier.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,11 @@ void TestQgsMapToPixelGeometrySimplifier::testWkbDimensionMismatch()
174174
// NOTE: wkb onwership transferred to QgsGeometry
175175
g12416.fromWkb( wkb, size );
176176
QString wkt = g12416.exportToWkt();
177-
QCOMPARE( wkt, QString( "MultiLineString ((0 0 0, 1 1 0, 2 0 0, 3 1 0, 10 0 -0.000001),(0 0 0, 0 0 0.000001))" ) );
177+
QCOMPARE( wkt, QString( "MultiLineStringZ ((0 0 0, 1 1 0, 2 0 0, 3 1 0, 10 0 -0.000001),(0 0 0, 0 0 0.000001))" ) );
178178

179179
int fl = QgsMapToPixelSimplifier::SimplifyGeometry;
180180
int ret = QgsMapToPixelSimplifier::simplifyGeometry( &g12416, fl, 20.0 );
181-
// NOTE: currently false due to thrown exception, but fixing the
182-
// simplification code might actually give a success
183-
QVERIFY( ! ret );
181+
QVERIFY( ret );
184182
}
185183

186184
QTEST_MAIN( TestQgsMapToPixelGeometrySimplifier )

tests/src/python/test_qgsgeometry.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3310,23 +3310,23 @@ def testMisc(self):
33103310
multipolygon = QgsMultiPolygonV2()
33113311
cp = QgsCurvePolygonV2()
33123312
cp.fromWkt("CurvePolygon ((0 0,0 1,1 1,0 0))")
3313-
assert not multipolygon.addGeometry( cp )
3313+
assert not multipolygon.addGeometry(cp)
33143314

33153315
# Test that importing an invalid WKB (a MultiPolygon with a CurvePolygon) fails
33163316
geom = QgsGeometry.fromWkt('MultiSurface(((0 0,0 1,1 1,0 0)), CurvePolygon ((0 0,0 1,1 1,0 0)))')
33173317
wkb = geom.asWkb()
33183318
wkb = bytearray(wkb)
33193319
if wkb[1] == QgsWKBTypes.MultiSurface:
3320-
wkb[1] = QgsWKBTypes.MultiPolygon
3321-
elif wkb[1+4] == QgsWKBTypes.MultiSurface:
3322-
wkb[1+4] = QgsWKBTypes.MultiPolygon
3320+
wkb[1] = QgsWKBTypes.MultiPolygon
3321+
elif wkb[1 + 4] == QgsWKBTypes.MultiSurface:
3322+
wkb[1 + 4] = QgsWKBTypes.MultiPolygon
33233323
else:
3324-
self.assertTrue(False)
3324+
self.assertTrue(False)
33253325
geom = QgsGeometry()
33263326
geom.fromWkb(wkb)
33273327
self.assertEqual(geom.exportToWkt(), QgsMultiPolygonV2().asWkt())
33283328

3329-
# Test that fromWkt() on a GeometryCollection works with all possible geometries
3329+
# Test that fromWkt() on a GeometryCollection works with all possible geometries
33303330
wkt = "GeometryCollection( "
33313331
wkt += "Point(0 1)"
33323332
wkt += ","
@@ -3360,6 +3360,5 @@ def testMisc(self):
33603360
wkb2 = geom.asWkb()
33613361
self.assertEqual(wkb1, wkb2)
33623362

3363-
33643363
if __name__ == '__main__':
33653364
unittest.main()

0 commit comments

Comments
 (0)