diff --git a/BGL/test/BGL/test_Euler_operations.cpp b/BGL/test/BGL/test_Euler_operations.cpp index bce3ece8c72..3a720f4e677 100644 --- a/BGL/test/BGL/test_Euler_operations.cpp +++ b/BGL/test/BGL/test_Euler_operations.cpp @@ -139,10 +139,35 @@ add_vertex_and_face_to_border_test() CGAL_GRAPH_TRAITS_MEMBERS(T); Surface_fixture_5 f; + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + halfedge_descriptor h1 = f.h1, h2 = f.h2; + const T& m = f.m; - CGAL::Euler::add_vertex_and_face_to_border(f.h1, f.h2, f.m); + int dist=0; + halfedge_descriptor hd = h1; + while(hd != h2){ + ++dist; + hd = next(hd,m); + } + assert(dist == 2); + int blength = 0; + BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(h1,m)){ + blength++; + } + + halfedge_descriptor res = CGAL::Euler::add_vertex_and_face_to_border(f.h1, f.h2, f.m); assert(CGAL::is_valid(f.m)); + + assert(! is_border(res,m)); + assert(is_border(opposite(res,m),m)); + res = opposite(res,m); + BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(res,m)){ + blength--; + } + assert(blength == 0); + + }