Add assertions

This commit is contained in:
Laurent Rineau 2022-03-30 15:19:26 +02:00
parent a1b8f81af6
commit 269a7c7b5d
1 changed files with 3 additions and 1 deletions

View File

@ -47,13 +47,15 @@ int main( )
//Mark facets that are inside the domain bounded by the polygon //Mark facets that are inside the domain bounded by the polygon
CGAL::mark_domain_in_triangulation(cdt, in_domain); CGAL::mark_domain_in_triangulation(cdt, in_domain);
int count=0; unsigned int count=0;
for (Face_handle f : cdt.finite_face_handles()) for (Face_handle f : cdt.finite_face_handles())
{ {
if ( get(in_domain, f) ) ++count; if ( get(in_domain, f) ) ++count;
} }
std::cout << "There are " << count << " faces in the domain." << std::endl; std::cout << "There are " << count << " faces in the domain." << std::endl;
assert(count > 0);
assert(count < cdt.number_of_faces());
CGAL::draw(cdt, in_domain); CGAL::draw(cdt, in_domain);
return 0; return 0;