Skip to content
Snippets Groups Projects
Commit 9f35e628 authored by Tom Fischer's avatar Tom Fischer
Browse files

[T/GL] Test copy constructor of Polygon.

parent 557f49bf
No related branches found
No related tags found
No related merge requests found
...@@ -204,3 +204,14 @@ TEST_F(PolygonTest, isPolylineInPolygon) ...@@ -204,3 +204,14 @@ TEST_F(PolygonTest, isPolylineInPolygon)
for (std::size_t k(0); k<pnts.size(); k++) for (std::size_t k(0); k<pnts.size(); k++)
delete pnts[k]; delete pnts[k];
} }
TEST_F(PolygonTest, CopyConstructor)
{
GeoLib::Polygon polygon_copy(*_polygon);
ASSERT_EQ(_polygon->getNumberOfSegments(), polygon_copy.getNumberOfSegments());
// Check if all line segments of the original polygon are contained in the
// copy
for (auto const& segment : *_polygon)
ASSERT_TRUE(polygon_copy.containsSegment(segment));
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment