Boost test coverage of geometry classes

This commit is contained in:
Nyall Dawson 2017-09-22 15:20:47 +10:00
parent 395ed9307b
commit cbca7c97bc
7 changed files with 1484 additions and 308 deletions

View File

@ -626,12 +626,12 @@ void QgsCurvePolygon::removeInteriorRings( double minimumAllowedArea )
void QgsCurvePolygon::draw( QPainter &p ) const
{
if ( !mExteriorRing )
return;
if ( mInteriorRings.empty() )
{
if ( mExteriorRing )
{
mExteriorRing->drawAsPolygon( p );
}
mExteriorRing->drawAsPolygon( p );
}
else
{

File diff suppressed because it is too large Load Diff

View File

@ -4304,7 +4304,20 @@ class TestQgsGeometry(unittest.TestCase):
'wkt': 'CircularString (20 30, 50 30, 50 90)',
'reference_image': 'circularstring',
'as_polygon_reference_image': 'circularstring_aspolygon',
'use_pen': True}
'use_pen': True},
{'name': 'CurvePolygon',
'wkt': 'CurvePolygon(CircularString (20 30, 50 30, 50 90, 10 50, 20 30))',
'reference_image': 'curvepolygon_circularstring',
'use_pen': False},
{'name': 'CurvePolygonInteriorRings',
'wkt': 'CurvePolygon(CircularString (20 30, 50 30, 50 90, 10 50, 20 30),LineString(30 45, 55 45, 30 75, 30 45))',
'reference_image': 'curvepolygon_circularstring_interiorrings',
'use_pen': False},
{'name': 'CompoundCurve',
'wkt': 'CompoundCurve(CircularString (20 30, 50 30, 50 90),LineString(50 90, 10 90))',
'reference_image': 'compoundcurve',
'use_pen': True,
'as_polygon_reference_image': 'compoundcurve_aspolygon', }
]
for test in tests:

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B