From 1c8d4fb59bf6d46a8b3dcab5b52bd8d332029173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 7 Aug 2013 09:28:18 +0000 Subject: [PATCH] Use new dereferencing in unittests git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@897 fdac6126-5c0c-442c-9429-916003d36597 --- src/Unittests/unittests_property.hh | 2 +- .../unittests_trimesh_circulator_face_edge.hh | 32 +++---- .../unittests_trimesh_circulator_face_face.hh | 28 +++--- ...ttests_trimesh_circulator_face_halfedge.hh | 16 ++-- ...nittests_trimesh_circulator_face_vertex.hh | 16 ++-- ...nittests_trimesh_circulator_vertex_edge.hh | 28 +++--- ...nittests_trimesh_circulator_vertex_face.hh | 32 +++---- ...sts_trimesh_circulator_vertex_ihalfedge.hh | 34 +++---- ...sts_trimesh_circulator_vertex_ohalfedge.hh | 34 +++---- ...ttests_trimesh_circulator_vertex_vertex.hh | 22 ++--- src/Unittests/unittests_trimesh_collapse.hh | 60 ++++++------- src/Unittests/unittests_trimesh_iterators.hh | 88 +++++++++---------- 12 files changed, 196 insertions(+), 196 deletions(-) diff --git a/src/Unittests/unittests_property.hh b/src/Unittests/unittests_property.hh index 8f651767..3a3b416f 100644 --- a/src/Unittests/unittests_property.hh +++ b/src/Unittests/unittests_property.hh @@ -262,7 +262,7 @@ TEST_F(OpenMeshProperties, VertexPropertyCopypropertiesInt) { // Fill property for ( Mesh::VertexIter v_it = mesh_.vertices_begin() ; v_it != mesh_.vertices_end(); ++v_it ) { - mesh_.property(intHandle,v_it) = v_it.handle().idx(); + mesh_.property(intHandle,v_it) = v_it->idx(); } // Check if property it is ok. diff --git a/src/Unittests/unittests_trimesh_circulator_face_edge.hh b/src/Unittests/unittests_trimesh_circulator_face_edge.hh index e345caee..d757a7fd 100644 --- a/src/Unittests/unittests_trimesh_circulator_face_edge.hh +++ b/src/Unittests/unittests_trimesh_circulator_face_edge.hh @@ -97,32 +97,32 @@ TEST_F(OpenMeshTrimeshCirculatorFaceEdge, FaceEdgeIterWithoutHolesIncrement) { Mesh::FaceEdgeIter fe_it = mesh_.fe_begin(mesh_.face_handle(1)); Mesh::FaceEdgeIter fe_end = mesh_.fe_end(mesh_.face_handle(1)); - EXPECT_EQ(4, fe_it.handle().idx() ) << "Index wrong in FaceEdgeIter at initialization"; + EXPECT_EQ(4, fe_it->idx() ) << "Index wrong in FaceEdgeIter at initialization"; EXPECT_TRUE(fe_it) << "Iterator invalid in FaceEdgeIter at initialization"; ++fe_it; - EXPECT_EQ(1, fe_it.handle().idx() ) << "Index wrong in FaceEdgeIter at step 1"; + EXPECT_EQ(1, fe_it->idx() ) << "Index wrong in FaceEdgeIter at step 1"; EXPECT_TRUE(fe_it) << "Iterator invalid in FaceEdgeIter at step 1"; ++fe_it; - EXPECT_EQ(3, fe_it.handle().idx() ) << "Index wrong in FaceEdgeIter at step 2"; + EXPECT_EQ(3, fe_it->idx() ) << "Index wrong in FaceEdgeIter at step 2"; EXPECT_TRUE(fe_it) << "Iterator invalid in FaceEdgeIter at step 2"; ++fe_it; - EXPECT_EQ(4, fe_it.handle().idx() ) << "Index wrong in FaceEdgeIter at end"; + EXPECT_EQ(4, fe_it->idx() ) << "Index wrong in FaceEdgeIter at end"; EXPECT_FALSE(fe_it) << "Iterator invalid in FaceEdgeIter at end"; EXPECT_TRUE( fe_it == fe_end ) << "End iterator for FaceEdgeIter not matching"; Mesh::ConstFaceEdgeIter cfe_it = mesh_.cfe_begin(mesh_.face_handle(1)); Mesh::ConstFaceEdgeIter cfe_end = mesh_.cfe_end(mesh_.face_handle(1)); - EXPECT_EQ(4, cfe_it.handle().idx() ) << "Index wrong in ConstFaceEdgeIter at initialization"; + EXPECT_EQ(4, cfe_it->idx() ) << "Index wrong in ConstFaceEdgeIter at initialization"; EXPECT_TRUE(cfe_it) << "Iterator invalid in ConstFaceEdgeIter at initialization"; ++cfe_it; - EXPECT_EQ(1, cfe_it.handle().idx() ) << "Index wrong in ConstFaceEdgeIter at step 1"; + EXPECT_EQ(1, cfe_it->idx() ) << "Index wrong in ConstFaceEdgeIter at step 1"; EXPECT_TRUE(cfe_it) << "Iterator invalid in ConstFaceEdgeIter at step 1"; ++cfe_it; - EXPECT_EQ(3, cfe_it.handle().idx() ) << "Index wrong in ConstFaceEdgeIter at step 2"; + EXPECT_EQ(3, cfe_it->idx() ) << "Index wrong in ConstFaceEdgeIter at step 2"; EXPECT_TRUE(cfe_it) << "Iterator invalid in ConstFaceEdgeIter at step 2"; ++cfe_it; - EXPECT_EQ(4, cfe_it.handle().idx() ) << "Index wrong in ConstFaceEdgeIter at end"; + EXPECT_EQ(4, cfe_it->idx() ) << "Index wrong in ConstFaceEdgeIter at end"; EXPECT_FALSE(cfe_it) << "Iterator invalid in ConstFaceEdgeIter at end"; EXPECT_TRUE( cfe_it == cfe_end ) << "End iterator for ConstFaceEdgeIter not matching"; @@ -194,32 +194,32 @@ TEST_F(OpenMeshTrimeshCirculatorFaceEdge, FaceEdgeIterWithoutHolesDecrement) { Mesh::FaceEdgeIter fe_it = mesh_.fe_begin(mesh_.face_handle(1)); Mesh::FaceEdgeIter fe_end = mesh_.fe_end(mesh_.face_handle(1)); - EXPECT_EQ(4, fe_it.handle().idx() ) << "Index wrong in FaceEdgeIter at initialization"; + EXPECT_EQ(4, fe_it->idx() ) << "Index wrong in FaceEdgeIter at initialization"; EXPECT_TRUE(fe_it) << "Iterator invalid in FaceEdgeIter at initialization"; --fe_it; - EXPECT_EQ(1, fe_it.handle().idx() ) << "Index wrong in FaceEdgeIter at step 1"; + EXPECT_EQ(1, fe_it->idx() ) << "Index wrong in FaceEdgeIter at step 1"; EXPECT_TRUE(fe_it) << "Iterator invalid in FaceEdgeIter at step 1"; --fe_it; - EXPECT_EQ(3, fe_it.handle().idx() ) << "Index wrong in FaceEdgeIter at step 2"; + EXPECT_EQ(3, fe_it->idx() ) << "Index wrong in FaceEdgeIter at step 2"; EXPECT_TRUE(fe_it) << "Iterator invalid in FaceEdgeIter at step 2"; --fe_it; - EXPECT_EQ(4, fe_it.handle().idx() ) << "Index wrong in FaceEdgeIter at end"; + EXPECT_EQ(4, fe_it->idx() ) << "Index wrong in FaceEdgeIter at end"; EXPECT_FALSE(fe_it) << "Iterator invalid in FaceEdgeIter at end"; EXPECT_TRUE( fe_it == fe_end ) << "End iterator for FaceEdgeIter not matching"; Mesh::ConstFaceEdgeIter cfe_it = mesh_.cfe_begin(mesh_.face_handle(1)); Mesh::ConstFaceEdgeIter cfe_end = mesh_.cfe_end(mesh_.face_handle(1)); - EXPECT_EQ(4, cfe_it.handle().idx() ) << "Index wrong in ConstFaceEdgeIter at initialization"; + EXPECT_EQ(4, cfe_it->idx() ) << "Index wrong in ConstFaceEdgeIter at initialization"; EXPECT_TRUE(cfe_it) << "Iterator invalid in ConstFaceEdgeIter at initialization"; --cfe_it; - EXPECT_EQ(1, cfe_it.handle().idx() ) << "Index wrong in ConstFaceEdgeIter at step 1"; + EXPECT_EQ(1, cfe_it->idx() ) << "Index wrong in ConstFaceEdgeIter at step 1"; EXPECT_TRUE(cfe_it) << "Iterator invalid in ConstFaceEdgeIter at step 1"; --cfe_it; - EXPECT_EQ(3, cfe_it.handle().idx() ) << "Index wrong in ConstFaceEdgeIter at step 2"; + EXPECT_EQ(3, cfe_it->idx() ) << "Index wrong in ConstFaceEdgeIter at step 2"; EXPECT_TRUE(cfe_it) << "Iterator invalid in ConstFaceEdgeIter at step 2"; --cfe_it; - EXPECT_EQ(4, cfe_it.handle().idx() ) << "Index wrong in ConstFaceEdgeIter at end"; + EXPECT_EQ(4, cfe_it->idx() ) << "Index wrong in ConstFaceEdgeIter at end"; EXPECT_FALSE(cfe_it) << "Iterator invalid in ConstFaceEdgeIter at end"; EXPECT_TRUE( cfe_it == cfe_end ) << "End iterator for ConstFaceEdgeIter not matching"; diff --git a/src/Unittests/unittests_trimesh_circulator_face_face.hh b/src/Unittests/unittests_trimesh_circulator_face_face.hh index 155a6a2b..bdbbfd0f 100644 --- a/src/Unittests/unittests_trimesh_circulator_face_face.hh +++ b/src/Unittests/unittests_trimesh_circulator_face_face.hh @@ -83,26 +83,26 @@ TEST_F(OpenMeshTrimeshCirculatorFaceFace, FaceFaceIterWithHoles) { Mesh::FaceFaceIter ff_it = mesh_.ff_begin(mesh_.face_handle(1)); Mesh::FaceFaceIter ff_end = mesh_.ff_end(mesh_.face_handle(1)); - EXPECT_EQ(2, ff_it.handle().idx() ) << "Index wrong in FaceFaceIter at initialization"; + EXPECT_EQ(2, ff_it->idx() ) << "Index wrong in FaceFaceIter at initialization"; EXPECT_TRUE(ff_it) << "Iterator invalid in FaceFaceIter at initialization"; ++ff_it; - EXPECT_EQ(0, ff_it.handle().idx() ) << "Index wrong in FaceFaceIter at step 1"; + EXPECT_EQ(0, ff_it->idx() ) << "Index wrong in FaceFaceIter at step 1"; EXPECT_TRUE(ff_it) << "Iterator invalid in FaceFaceIter at step 1"; ++ff_it; - EXPECT_EQ(2, ff_it.handle().idx() ) << "Index wrong in FaceFaceIter at end"; + EXPECT_EQ(2, ff_it->idx() ) << "Index wrong in FaceFaceIter at end"; EXPECT_FALSE(ff_it) << "Iterator invalid in FaceFaceIter at end"; EXPECT_TRUE( ff_it == ff_end ) << "End iterator for FaceFaceIter not matching"; Mesh::ConstFaceFaceIter cff_it = mesh_.cff_begin(mesh_.face_handle(1)); Mesh::ConstFaceFaceIter cff_end = mesh_.cff_end(mesh_.face_handle(1)); - EXPECT_EQ(2, cff_it.handle().idx() ) << "Index wrong in ConstFaceFaceIter at initialization"; + EXPECT_EQ(2, cff_it->idx() ) << "Index wrong in ConstFaceFaceIter at initialization"; EXPECT_TRUE(cff_it) << "Iterator invalid in ConstFaceFaceIter at initialization"; ++cff_it; - EXPECT_EQ(0, cff_it.handle().idx() ) << "Index wrong in ConstFaceFaceIter at step 1"; + EXPECT_EQ(0, cff_it->idx() ) << "Index wrong in ConstFaceFaceIter at step 1"; EXPECT_TRUE(cff_it) << "Iterator invalid in ConstFaceFaceIter at step 1"; ++cff_it; - EXPECT_EQ(2, cff_it.handle().idx() ) << "Index wrong in ConstFaceFaceIter at end"; + EXPECT_EQ(2, cff_it->idx() ) << "Index wrong in ConstFaceFaceIter at end"; EXPECT_FALSE(cff_it) << "Iterator invalid in ConstFaceFaceIter at end"; EXPECT_TRUE( cff_it == cff_end ) << "End iterator for ConstFaceFaceIter not matching"; @@ -174,32 +174,32 @@ TEST_F(OpenMeshTrimeshCirculatorFaceFace, FaceFaceIterWithoutHoles) { Mesh::FaceFaceIter ff_it = mesh_.ff_begin(mesh_.face_handle(1)); Mesh::FaceFaceIter ff_end = mesh_.ff_end(mesh_.face_handle(1)); - EXPECT_EQ(2, ff_it.handle().idx() ) << "Index wrong in FaceFaceIter at initialization"; + EXPECT_EQ(2, ff_it->idx() ) << "Index wrong in FaceFaceIter at initialization"; EXPECT_TRUE(ff_it) << "Iterator invalid in FaceFaceIter at initialization"; ++ff_it; - EXPECT_EQ(0, ff_it.handle().idx() ) << "Index wrong in FaceFaceIter at step 1"; + EXPECT_EQ(0, ff_it->idx() ) << "Index wrong in FaceFaceIter at step 1"; EXPECT_TRUE(ff_it) << "Iterator invalid in FaceFaceIter at step 1"; ++ff_it; - EXPECT_EQ(3, ff_it.handle().idx() ) << "Index wrong in FaceFaceIter at step 2"; + EXPECT_EQ(3, ff_it->idx() ) << "Index wrong in FaceFaceIter at step 2"; EXPECT_TRUE(ff_it) << "Iterator invalid in FaceFaceIter at step 2"; ++ff_it; - EXPECT_EQ(2, ff_it.handle().idx() ) << "Index wrong in FaceFaceIter at end"; + EXPECT_EQ(2, ff_it->idx() ) << "Index wrong in FaceFaceIter at end"; EXPECT_FALSE(ff_it) << "Iterator invalid in FaceFaceIter at end"; EXPECT_TRUE( ff_it == ff_end ) << "End iterator for FaceFaceIter not matching"; Mesh::ConstFaceFaceIter cff_it = mesh_.cff_begin(mesh_.face_handle(1)); Mesh::ConstFaceFaceIter cff_end = mesh_.cff_end(mesh_.face_handle(1)); - EXPECT_EQ(2, cff_it.handle().idx() ) << "Index wrong in ConstFaceFaceIter at initialization"; + EXPECT_EQ(2, cff_it->idx() ) << "Index wrong in ConstFaceFaceIter at initialization"; EXPECT_TRUE(cff_it) << "Iterator invalid in ConstFaceFaceIter at initialization"; ++cff_it; - EXPECT_EQ(0, cff_it.handle().idx() ) << "Index wrong in ConstFaceFaceIter at step 1"; + EXPECT_EQ(0, cff_it->idx() ) << "Index wrong in ConstFaceFaceIter at step 1"; EXPECT_TRUE(cff_it) << "Iterator invalid in ConstFaceFaceIter at step 1"; ++cff_it; - EXPECT_EQ(3, cff_it.handle().idx() ) << "Index wrong in ConstFaceFaceIter at step 2"; + EXPECT_EQ(3, cff_it->idx() ) << "Index wrong in ConstFaceFaceIter at step 2"; EXPECT_TRUE(cff_it) << "Iterator invalid in ConstFaceFaceIter at step 2"; ++cff_it; - EXPECT_EQ(2, cff_it.handle().idx() ) << "Index wrong in ConstFaceFaceIter at end"; + EXPECT_EQ(2, cff_it->idx() ) << "Index wrong in ConstFaceFaceIter at end"; EXPECT_FALSE(cff_it) << "Iterator invalid in ConstFaceFaceIter at end"; EXPECT_TRUE( cff_it == cff_end ) << "End iterator for ConstFaceFaceIter not matching"; diff --git a/src/Unittests/unittests_trimesh_circulator_face_halfedge.hh b/src/Unittests/unittests_trimesh_circulator_face_halfedge.hh index ca9f6c77..3d9b901d 100644 --- a/src/Unittests/unittests_trimesh_circulator_face_halfedge.hh +++ b/src/Unittests/unittests_trimesh_circulator_face_halfedge.hh @@ -96,32 +96,32 @@ TEST_F(OpenMeshTrimeshCirculatorFaceHalfEdge, FaceHalfedgeIterWithoutHolesIncrem Mesh::FaceHalfedgeIter fh_it = mesh_.fh_begin(mesh_.face_handle(1)); Mesh::FaceHalfedgeIter fh_end = mesh_.fh_end(mesh_.face_handle(1)); - EXPECT_EQ(8, fh_it.handle().idx() ) << "Index wrong in FaceHalfedgeIter at initialization"; + EXPECT_EQ(8, fh_it->idx() ) << "Index wrong in FaceHalfedgeIter at initialization"; EXPECT_TRUE(fh_it) << "Iterator invalid in FaceHalfedgeIter at initialization"; ++fh_it; - EXPECT_EQ(3, fh_it.handle().idx() ) << "Index wrong in FaceHalfedgeIter at step 1"; + EXPECT_EQ(3, fh_it->idx() ) << "Index wrong in FaceHalfedgeIter at step 1"; EXPECT_TRUE(fh_it) << "Iterator invalid in FaceHalfedgeIter at step 1"; ++fh_it; - EXPECT_EQ(6, fh_it.handle().idx() ) << "Index wrong in FaceHalfedgeIter at step 2"; + EXPECT_EQ(6, fh_it->idx() ) << "Index wrong in FaceHalfedgeIter at step 2"; EXPECT_TRUE(fh_it) << "Iterator invalid in FaceHalfedgeIter at step 2"; ++fh_it; - EXPECT_EQ(8, fh_it.handle().idx() ) << "Index wrong in FaceHalfedgeIter at end"; + EXPECT_EQ(8, fh_it->idx() ) << "Index wrong in FaceHalfedgeIter at end"; EXPECT_FALSE(fh_it) << "Iterator invalid in FaceHalfedgeIter at end"; EXPECT_TRUE( fh_it == fh_end ) << "End iterator for FaceHalfedgeIter not matching"; Mesh::ConstFaceHalfedgeIter cfh_it = mesh_.cfh_begin(mesh_.face_handle(1)); Mesh::ConstFaceHalfedgeIter cfh_end = mesh_.cfh_end(mesh_.face_handle(1)); - EXPECT_EQ(8, cfh_it.handle().idx() ) << "Index wrong in ConstFaceHalfedgeIter at initialization"; + EXPECT_EQ(8, cfh_it->idx() ) << "Index wrong in ConstFaceHalfedgeIter at initialization"; EXPECT_TRUE(cfh_it) << "Iterator invalid in ConstFaceHalfedgeIter at initialization"; ++cfh_it; - EXPECT_EQ(3, cfh_it.handle().idx() ) << "Index wrong in ConstFaceHalfedgeIter at step 1"; + EXPECT_EQ(3, cfh_it->idx() ) << "Index wrong in ConstFaceHalfedgeIter at step 1"; EXPECT_TRUE(cfh_it) << "Iterator invalid in ConstFaceHalfedgeIter at step 1"; ++cfh_it; - EXPECT_EQ(6, cfh_it.handle().idx() ) << "Index wrong in ConstFaceHalfedgeIter at step 2"; + EXPECT_EQ(6, cfh_it->idx() ) << "Index wrong in ConstFaceHalfedgeIter at step 2"; EXPECT_TRUE(cfh_it) << "Iterator invalid in ConstFaceHalfedgeIter at step 2"; ++cfh_it; - EXPECT_EQ(8, cfh_it.handle().idx() ) << "Index wrong in ConstFaceHalfedgeIter at end"; + EXPECT_EQ(8, cfh_it->idx() ) << "Index wrong in ConstFaceHalfedgeIter at end"; EXPECT_FALSE(cfh_it) << "Iterator invalid in ConstFaceHalfedgeIter at end"; EXPECT_TRUE( cfh_it == cfh_end ) << "End iterator for ConstFaceHalfedgeIter not matching"; diff --git a/src/Unittests/unittests_trimesh_circulator_face_vertex.hh b/src/Unittests/unittests_trimesh_circulator_face_vertex.hh index 703aac29..47932f62 100644 --- a/src/Unittests/unittests_trimesh_circulator_face_vertex.hh +++ b/src/Unittests/unittests_trimesh_circulator_face_vertex.hh @@ -92,32 +92,32 @@ TEST_F(OpenMeshTrimeshCirculatorFaceVertex, FaceVertexIterWithoutIncrement) { // Iterate around vertex 1 at the middle (with holes in between) Mesh::FaceVertexIter fv_it = mesh_.fv_begin(fh0); Mesh::FaceVertexIter fv_end = mesh_.fv_end(fh0); - EXPECT_EQ(0, fv_it.handle().idx() ) << "Index wrong in FaceVertexIter at initialization"; + EXPECT_EQ(0, fv_it->idx() ) << "Index wrong in FaceVertexIter at initialization"; EXPECT_TRUE(fv_it) << "Iterator invalid in FaceVertexIter at initialization"; ++fv_it ; - EXPECT_EQ(1, fv_it.handle().idx() ) << "Index wrong in FaceVertexIter at step 1"; + EXPECT_EQ(1, fv_it->idx() ) << "Index wrong in FaceVertexIter at step 1"; EXPECT_TRUE(fv_it) << "Iterator invalid in FaceVertexIter at step 1"; ++fv_it ; - EXPECT_EQ(2, fv_it.handle().idx() ) << "Index wrong in FaceVertexIter at step 2"; + EXPECT_EQ(2, fv_it->idx() ) << "Index wrong in FaceVertexIter at step 2"; EXPECT_TRUE(fv_it) << "Iterator invalid in FaceVertexIter at step 2"; ++fv_it ; - EXPECT_EQ(0, fv_it.handle().idx() ) << "Index wrong in FaceVertexIter at step 3"; + EXPECT_EQ(0, fv_it->idx() ) << "Index wrong in FaceVertexIter at step 3"; EXPECT_FALSE(fv_it) << "Iterator invalid in FaceVertexIter at step 3"; EXPECT_TRUE( fv_it == fv_end ) << "End iterator for FaceVertexIter not matching"; // Iterate around vertex 1 at the middle (with holes in between) with const iterator Mesh::ConstFaceVertexIter cfv_it = mesh_.cfv_begin(fh0); Mesh::ConstFaceVertexIter cfv_end = mesh_.cfv_end(fh0); - EXPECT_EQ(0, cfv_it.handle().idx() ) << "Index wrong in ConstFaceVertexIter at initialization"; + EXPECT_EQ(0, cfv_it->idx() ) << "Index wrong in ConstFaceVertexIter at initialization"; EXPECT_TRUE(cfv_it) << "Iterator invalid in ConstFaceVertexIter at initialization"; ++cfv_it ; - EXPECT_EQ(1, cfv_it.handle().idx() ) << "Index wrong in ConstFaceVertexIter at step 1"; + EXPECT_EQ(1, cfv_it->idx() ) << "Index wrong in ConstFaceVertexIter at step 1"; EXPECT_TRUE(cfv_it) << "Iterator invalid in ConstFaceVertexIter at step 1"; ++cfv_it ; - EXPECT_EQ(2, cfv_it.handle().idx() ) << "Index wrong in ConstFaceVertexIter at step 2"; + EXPECT_EQ(2, cfv_it->idx() ) << "Index wrong in ConstFaceVertexIter at step 2"; EXPECT_TRUE(cfv_it) << "Iterator invalid in ConstFaceVertexIter at step 2"; ++cfv_it ; - EXPECT_EQ(0, cfv_it.handle().idx() ) << "Index wrong in ConstFaceVertexIter at step 3"; + EXPECT_EQ(0, cfv_it->idx() ) << "Index wrong in ConstFaceVertexIter at step 3"; EXPECT_FALSE(cfv_it) << "Iterator invalid in ConstFaceVertexIter at step 3"; EXPECT_TRUE( cfv_it == cfv_end ) << "End iterator for ConstFaceVertexIter not matching"; diff --git a/src/Unittests/unittests_trimesh_circulator_vertex_edge.hh b/src/Unittests/unittests_trimesh_circulator_vertex_edge.hh index 573ff6e6..0a1f9bca 100644 --- a/src/Unittests/unittests_trimesh_circulator_vertex_edge.hh +++ b/src/Unittests/unittests_trimesh_circulator_vertex_edge.hh @@ -89,38 +89,38 @@ TEST_F(OpenMeshTrimeshCirculatorVertexEdge, VertexEdgeIterWithoutHolesIncrement) // Iterate around vertex 1 at the middle (with holes in between) Mesh::VertexEdgeIter ve_it = mesh_.ve_begin(vhandle[1]); Mesh::VertexEdgeIter ve_end = mesh_.ve_end(vhandle[1]); - EXPECT_EQ(5, ve_it.handle().idx() ) << "Index wrong in VertexEdgeIter at initialization"; + EXPECT_EQ(5, ve_it->idx() ) << "Index wrong in VertexEdgeIter at initialization"; EXPECT_TRUE(ve_it) << "Iterator invalid in VertexEdgeIter at initialization"; ++ve_it ; - EXPECT_EQ(3, ve_it.handle().idx() ) << "Index wrong in VertexEdgeIter at step 1"; + EXPECT_EQ(3, ve_it->idx() ) << "Index wrong in VertexEdgeIter at step 1"; EXPECT_TRUE(ve_it) << "Iterator invalid in VertexEdgeIter at step 1"; ++ve_it ; - EXPECT_EQ(0, ve_it.handle().idx() ) << "Index wrong in VertexEdgeIter at step 2"; + EXPECT_EQ(0, ve_it->idx() ) << "Index wrong in VertexEdgeIter at step 2"; EXPECT_TRUE(ve_it) << "Iterator invalid in VertexEdgeIter at step 2"; ++ve_it ; - EXPECT_EQ(1, ve_it.handle().idx() ) << "Index wrong in VertexEdgeIter at step 3"; + EXPECT_EQ(1, ve_it->idx() ) << "Index wrong in VertexEdgeIter at step 3"; EXPECT_TRUE(ve_it) << "Iterator invalid in VertexEdgeIter at step 3"; ++ve_it ; - EXPECT_EQ(5, ve_it.handle().idx() ) << "Index wrong in VertexEdgeIter at end"; + EXPECT_EQ(5, ve_it->idx() ) << "Index wrong in VertexEdgeIter at end"; EXPECT_FALSE(ve_it) << "Iterator not invalid in VertexEdgeIter at end"; EXPECT_TRUE( ve_it == ve_end ) << "End iterator for VertexEdgeIter not matching"; // Iterate around vertex 1 at the middle (with holes in between) with const iterator Mesh::ConstVertexEdgeIter cve_it = mesh_.cve_begin(vhandle[1]); Mesh::ConstVertexEdgeIter cve_end = mesh_.cve_end(vhandle[1]); - EXPECT_EQ(5, cve_it.handle().idx() ) << "Index wrong in ConstVertexEdgeIter at initialization"; + EXPECT_EQ(5, cve_it->idx() ) << "Index wrong in ConstVertexEdgeIter at initialization"; EXPECT_TRUE(cve_it) << "Iterator invalid in ConstVertexEdgeIter at initialization"; ++cve_it ; - EXPECT_EQ(3, cve_it.handle().idx() ) << "Index wrong in ConstVertexEdgeIter at step 1"; + EXPECT_EQ(3, cve_it->idx() ) << "Index wrong in ConstVertexEdgeIter at step 1"; EXPECT_TRUE(cve_it) << "Iterator invalid in ConstVertexEdgeIter at step 1"; ++cve_it ; - EXPECT_EQ(0, cve_it.handle().idx() ) << "Index wrong in ConstVertexEdgeIter at step 2"; + EXPECT_EQ(0, cve_it->idx() ) << "Index wrong in ConstVertexEdgeIter at step 2"; EXPECT_TRUE(cve_it) << "Iterator invalid in ConstVertexEdgeIter at step 2"; ++cve_it ; - EXPECT_EQ(1, cve_it.handle().idx() ) << "Index wrong in ConstVertexEdgeIter at step 3"; + EXPECT_EQ(1, cve_it->idx() ) << "Index wrong in ConstVertexEdgeIter at step 3"; EXPECT_TRUE(cve_it) << "Iterator invalid in ConstVertexEdgeIter at step 3"; ++cve_it ; - EXPECT_EQ(5, cve_it.handle().idx() ) << "Index wrong in ConstVertexEdgeIter at end"; + EXPECT_EQ(5, cve_it->idx() ) << "Index wrong in ConstVertexEdgeIter at end"; EXPECT_FALSE(cve_it) << "Iterator not invalid in VertexEdgeIter at end"; EXPECT_TRUE( cve_it == cve_end ) << "End iterator for ConstVertexEdgeIter not matching"; } @@ -182,16 +182,16 @@ TEST_F(OpenMeshTrimeshCirculatorVertexEdge, VertexEdgeIterBoundaryIncrement) { // Iterate around vertex 1 at the middle (with holes in between) Mesh::VertexEdgeIter ve_it = mesh_.ve_begin(vhandle[2]); Mesh::VertexEdgeIter ve_end = mesh_.ve_end(vhandle[2]); - EXPECT_EQ(7, ve_it.handle().idx() ) << "Index wrong in VertexEdgeIter at initialization"; + EXPECT_EQ(7, ve_it->idx() ) << "Index wrong in VertexEdgeIter at initialization"; EXPECT_TRUE(ve_it) << "Iterator invalid in VertexEdgeIter at initialization"; ++ve_it ; - EXPECT_EQ(1, ve_it.handle().idx() ) << "Index wrong in VertexEdgeIter at step 1"; + EXPECT_EQ(1, ve_it->idx() ) << "Index wrong in VertexEdgeIter at step 1"; EXPECT_TRUE(ve_it) << "Iterator invalid in VertexEdgeIter at step 1"; ++ve_it ; - EXPECT_EQ(2, ve_it.handle().idx() ) << "Index wrong in VertexEdgeIter at step 2"; + EXPECT_EQ(2, ve_it->idx() ) << "Index wrong in VertexEdgeIter at step 2"; EXPECT_TRUE(ve_it) << "Iterator invalid in VertexEdgeIter at step 2"; ++ve_it ; - EXPECT_EQ(7, ve_it.handle().idx() ) << "Index wrong in VertexEdgeIter at step 3"; + EXPECT_EQ(7, ve_it->idx() ) << "Index wrong in VertexEdgeIter at step 3"; EXPECT_FALSE(ve_it) << "Iterator not invalid in VertexEdgeIter at end"; EXPECT_TRUE( ve_it == ve_end ) << "End iterator for VertexEdgeIter not matching"; diff --git a/src/Unittests/unittests_trimesh_circulator_vertex_face.hh b/src/Unittests/unittests_trimesh_circulator_vertex_face.hh index bc5f79c6..63ba73c8 100644 --- a/src/Unittests/unittests_trimesh_circulator_vertex_face.hh +++ b/src/Unittests/unittests_trimesh_circulator_vertex_face.hh @@ -76,10 +76,10 @@ TEST_F(OpenMeshTrimeshCirculatorVertexFace, VertexFaceIterWithHolesIncrement) { // Iterate around vertex 1 at the middle (with holes in between) Mesh::VertexFaceIter vf_it = mesh_.vf_begin(vhandle[1]); Mesh::VertexFaceIter vf_end = mesh_.vf_end(vhandle[1]); - EXPECT_EQ(0, vf_it.handle().idx() ) << "Index wrong in VertexFaceIter at initialization"; + EXPECT_EQ(0, vf_it->idx() ) << "Index wrong in VertexFaceIter at initialization"; EXPECT_TRUE(vf_it) << "Iterator invalid in VertexFaceIter at initialization"; ++vf_it ; - EXPECT_EQ(1, vf_it.handle().idx() ) << "Index wrong in VertexFaceIter at step 1"; + EXPECT_EQ(1, vf_it->idx() ) << "Index wrong in VertexFaceIter at step 1"; EXPECT_TRUE(vf_it) << "Iterator invalid in VertexFaceIter at step 1"; ++vf_it ; EXPECT_FALSE(vf_it.is_valid() ) << "Index wrong in VertexFaceIter at end"; @@ -89,10 +89,10 @@ TEST_F(OpenMeshTrimeshCirculatorVertexFace, VertexFaceIterWithHolesIncrement) { // Iterate around vertex 1 at the middle (with holes in between) with const iterator Mesh::ConstVertexFaceIter cvf_it = mesh_.cvf_begin(vhandle[1]); Mesh::ConstVertexFaceIter cvf_end = mesh_.cvf_end(vhandle[1]); - EXPECT_EQ(0, cvf_it.handle().idx() ) << "Index wrong in ConstVertexFaceIter at initialization"; + EXPECT_EQ(0, cvf_it->idx() ) << "Index wrong in ConstVertexFaceIter at initialization"; EXPECT_TRUE(cvf_it) << "Iterator invalid in ConstVertexFaceIter at initialization"; ++cvf_it ; - EXPECT_EQ(1, cvf_it.handle().idx() ) << "Index wrong in ConstVertexFaceIter at step one"; + EXPECT_EQ(1, cvf_it->idx() ) << "Index wrong in ConstVertexFaceIter at step one"; EXPECT_TRUE(cvf_it) << "Iterator invalid in ConstVertexFaceIter at step one"; ++cvf_it ; EXPECT_FALSE(cvf_it.is_valid() ) << "Index wrong in ConstVertexFaceIter at end"; @@ -162,38 +162,38 @@ TEST_F(OpenMeshTrimeshCirculatorVertexFace, VertexFaceIterWithoutHolesIncrement) // Iterate around vertex 1 at the middle (with holes in between) Mesh::VertexFaceIter vf_it = mesh_.vf_begin(vhandle[1]); Mesh::VertexFaceIter vf_end = mesh_.vf_end(vhandle[1]); - EXPECT_EQ(3, vf_it.handle().idx() ) << "Index wrong in VertexFaceIter at initialization"; + EXPECT_EQ(3, vf_it->idx() ) << "Index wrong in VertexFaceIter at initialization"; EXPECT_TRUE(vf_it) << "Iterator invalid in VertexFaceIter at initialization"; ++vf_it ; - EXPECT_EQ(1, vf_it.handle().idx() ) << "Index wrong in VertexFaceIter at step 1"; + EXPECT_EQ(1, vf_it->idx() ) << "Index wrong in VertexFaceIter at step 1"; EXPECT_TRUE(vf_it) << "Iterator invalid in VertexFaceIter at step 1"; ++vf_it ; - EXPECT_EQ(2, vf_it.handle().idx() ) << "Index wrong in VertexFaceIter at step 2"; + EXPECT_EQ(2, vf_it->idx() ) << "Index wrong in VertexFaceIter at step 2"; EXPECT_TRUE(vf_it) << "Iterator invalid in VertexFaceIter at step 2"; ++vf_it ; - EXPECT_EQ(0, vf_it.handle().idx() ) << "Index wrong in VertexFaceIter at step 3"; + EXPECT_EQ(0, vf_it->idx() ) << "Index wrong in VertexFaceIter at step 3"; EXPECT_TRUE(vf_it) << "Iterator invalid in VertexFaceIter at step 3"; ++vf_it ; - EXPECT_EQ(3, vf_it.handle().idx() ) << "Index wrong in VertexFaceIter at end"; + EXPECT_EQ(3, vf_it->idx() ) << "Index wrong in VertexFaceIter at end"; EXPECT_FALSE(vf_it) << "Iterator not invalid in VertexFaceIter at end"; EXPECT_TRUE( vf_it == vf_end ) << "End iterator for VertexFaceIter not matching"; // Iterate around vertex 1 at the middle (with holes in between) with const iterator Mesh::ConstVertexFaceIter cvf_it = mesh_.cvf_begin(vhandle[1]); Mesh::ConstVertexFaceIter cvf_end = mesh_.cvf_end(vhandle[1]); - EXPECT_EQ(3, cvf_it.handle().idx() ) << "Index wrong in ConstVertexFaceIter at initialization"; + EXPECT_EQ(3, cvf_it->idx() ) << "Index wrong in ConstVertexFaceIter at initialization"; EXPECT_TRUE(cvf_it) << "Iterator invalid in ConstVertexFaceIter at initialization"; ++cvf_it ; - EXPECT_EQ(1, cvf_it.handle().idx() ) << "Index wrong in ConstVertexFaceIter at step 1"; + EXPECT_EQ(1, cvf_it->idx() ) << "Index wrong in ConstVertexFaceIter at step 1"; EXPECT_TRUE(cvf_it) << "Iterator invalid in ConstVertexFaceIter at step 1"; ++cvf_it ; - EXPECT_EQ(2, cvf_it.handle().idx() ) << "Index wrong in ConstVertexFaceIter at step 2"; + EXPECT_EQ(2, cvf_it->idx() ) << "Index wrong in ConstVertexFaceIter at step 2"; EXPECT_TRUE(cvf_it) << "Iterator invalid in ConstVertexFaceIter at step 2"; ++cvf_it ; - EXPECT_EQ(0, cvf_it.handle().idx() ) << "Index wrong in ConstVertexFaceIter at step 3"; + EXPECT_EQ(0, cvf_it->idx() ) << "Index wrong in ConstVertexFaceIter at step 3"; EXPECT_TRUE(cvf_it) << "Iterator invalid in ConstVertexFaceIter at step 3"; ++cvf_it ; - EXPECT_EQ(3, cvf_it.handle().idx() ) << "Index wrong in ConstVertexFaceIter at end"; + EXPECT_EQ(3, cvf_it->idx() ) << "Index wrong in ConstVertexFaceIter at end"; EXPECT_FALSE(cvf_it) << "Iterator not invalid in VertexFaceIter at end"; EXPECT_TRUE( cvf_it == cvf_end ) << "End iterator for ConstVertexFaceIter not matching"; @@ -257,10 +257,10 @@ TEST_F(OpenMeshTrimeshCirculatorVertexFace, VertexFaceIterBoundaryIncrement) { // Iterate around vertex 1 at the middle (with holes in between) Mesh::VertexFaceIter vf_it = mesh_.vf_begin(vhandle[2]); Mesh::VertexFaceIter vf_end = mesh_.vf_end(vhandle[2]); - EXPECT_EQ(3, vf_it.handle().idx() ) << "Index wrong in VertexFaceIter at initialization"; + EXPECT_EQ(3, vf_it->idx() ) << "Index wrong in VertexFaceIter at initialization"; EXPECT_TRUE(vf_it) << "Iterator invalid in VertexFaceIter at initialization"; ++vf_it ; - EXPECT_EQ(0, vf_it.handle().idx() ) << "Index wrong in VertexFaceIter at step 1"; + EXPECT_EQ(0, vf_it->idx() ) << "Index wrong in VertexFaceIter at step 1"; EXPECT_TRUE(vf_it) << "Iterator invalid in VertexFaceIter at step 1"; ++vf_it ; EXPECT_FALSE(vf_it.is_valid()) << "Iterator invalid in VertexFaceIter at step 2"; diff --git a/src/Unittests/unittests_trimesh_circulator_vertex_ihalfedge.hh b/src/Unittests/unittests_trimesh_circulator_vertex_ihalfedge.hh index 28ea30ba..97bd93bf 100644 --- a/src/Unittests/unittests_trimesh_circulator_vertex_ihalfedge.hh +++ b/src/Unittests/unittests_trimesh_circulator_vertex_ihalfedge.hh @@ -90,32 +90,32 @@ TEST_F(OpenMeshTrimeshCirculatorVertexIHalfEdge, VertexIncomingHalfedgeWithoutHo Mesh::VertexIHalfedgeIter vih_it = mesh_.vih_begin(vhandle[1]); Mesh::VertexIHalfedgeIter vih_end = mesh_.vih_end(vhandle[1]); - EXPECT_EQ(10, vih_it.handle().idx() ) << "Index wrong in VertexIHalfedgeIter begin at initialization"; - EXPECT_EQ(10, vih_end.handle().idx() ) << "Index wrong in VertexIHalfedgeIter end at initialization"; + EXPECT_EQ(10, vih_it->idx() ) << "Index wrong in VertexIHalfedgeIter begin at initialization"; + EXPECT_EQ(10, vih_end->idx() ) << "Index wrong in VertexIHalfedgeIter end at initialization"; EXPECT_EQ(1, mesh_.face_handle(vih_it.handle()).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter begin at initialization"; EXPECT_TRUE(vih_it) << "Iterator invalid in VertexIHalfedgeIter at initialization"; ++vih_it ; - EXPECT_EQ(7, vih_it.handle().idx() ) << "Index wrong in VertexIHalfedgeIter step 1"; + EXPECT_EQ(7, vih_it->idx() ) << "Index wrong in VertexIHalfedgeIter step 1"; EXPECT_EQ(2, mesh_.face_handle(vih_it.handle()).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter step 1"; EXPECT_TRUE(vih_it) << "Iterator invalid in VertexIHalfedgeIter at step 1"; ++vih_it ; - EXPECT_EQ(0, vih_it.handle().idx() ) << "Index wrong in VertexIHalfedgeIter step 2"; + EXPECT_EQ(0, vih_it->idx() ) << "Index wrong in VertexIHalfedgeIter step 2"; EXPECT_EQ(0, mesh_.face_handle(vih_it.handle()).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter step 2"; EXPECT_TRUE(vih_it) << "Iterator invalid in VertexIHalfedgeIter at step 2"; ++vih_it ; - EXPECT_EQ(3, vih_it.handle().idx() ) << "Index wrong in VertexIHalfedgeIter step 3"; + EXPECT_EQ(3, vih_it->idx() ) << "Index wrong in VertexIHalfedgeIter step 3"; EXPECT_EQ(3, mesh_.face_handle(vih_it.handle()).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter step 3"; EXPECT_TRUE(vih_it) << "Iterator invalid in VertexIHalfedgeIter at step 3"; ++vih_it ; - EXPECT_EQ(10, vih_it.handle().idx() ) << "Index wrong in VertexIHalfedgeIter step 4"; + EXPECT_EQ(10, vih_it->idx() ) << "Index wrong in VertexIHalfedgeIter step 4"; EXPECT_EQ(1, mesh_.face_handle(vih_it.handle()).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter step 4"; EXPECT_FALSE(vih_it) << "Iterator still valid in VertexIHalfedgeIter at step 4"; EXPECT_TRUE( vih_it == vih_end ) << "Miss matched end iterator"; @@ -125,32 +125,32 @@ TEST_F(OpenMeshTrimeshCirculatorVertexIHalfEdge, VertexIncomingHalfedgeWithoutHo Mesh::ConstVertexIHalfedgeIter cvih_it = mesh_.cvih_begin(vhandle[1]); Mesh::ConstVertexIHalfedgeIter cvoh_end = mesh_.cvih_end(vhandle[1]); - EXPECT_EQ(10, cvih_it.handle().idx() ) << "Index wrong in ConstVertexIHalfedgeIter begin at initialization"; - EXPECT_EQ(10, cvoh_end.handle().idx() ) << "Index wrong in ConstVertexIHalfedgeIter end at initialization"; + EXPECT_EQ(10, cvih_it->idx() ) << "Index wrong in ConstVertexIHalfedgeIter begin at initialization"; + EXPECT_EQ(10, cvoh_end->idx() ) << "Index wrong in ConstVertexIHalfedgeIter end at initialization"; EXPECT_EQ(1, mesh_.face_handle(cvih_it.handle()).idx() ) << "Corresponding face Index wrong in ConstVertexIHalfedgeIter begin at initialization"; EXPECT_TRUE(cvih_it) << "Iterator invalid in ConstVertexIHalfedgeIter at initialization"; ++cvih_it ; - EXPECT_EQ(7, cvih_it.handle().idx() ) << "Index wrong in ConstVertexIHalfedgeIter step 1"; + EXPECT_EQ(7, cvih_it->idx() ) << "Index wrong in ConstVertexIHalfedgeIter step 1"; EXPECT_EQ(2, mesh_.face_handle(cvih_it.handle()).idx() ) << "Corresponding face Index wrong in ConstVertexIHalfedgeIter step 1"; EXPECT_TRUE(cvih_it) << "Iterator invalid in ConstVertexIHalfedgeIter at step 1"; ++cvih_it ; - EXPECT_EQ(0, cvih_it.handle().idx() ) << "Index wrong in ConstVertexIHalfedgeIter step 2"; + EXPECT_EQ(0, cvih_it->idx() ) << "Index wrong in ConstVertexIHalfedgeIter step 2"; EXPECT_EQ(0, mesh_.face_handle(cvih_it.handle()).idx() ) << "Corresponding face Index wrong in ConstVertexIHalfedgeIter step 2"; EXPECT_TRUE(cvih_it) << "Iterator invalid in ConstVertexIHalfedgeIter at step 2"; ++cvih_it ; - EXPECT_EQ(3, cvih_it.handle().idx() ) << "Index wrong in ConstVertexIHalfedgeIter step 3"; + EXPECT_EQ(3, cvih_it->idx() ) << "Index wrong in ConstVertexIHalfedgeIter step 3"; EXPECT_EQ(3, mesh_.face_handle(cvih_it.handle()).idx() ) << "Corresponding face Index wrong in ConstVertexIHalfedgeIter step 3"; EXPECT_TRUE(cvih_it) << "Iterator invalid in ConstVertexIHalfedgeIter at step 3"; ++cvih_it ; - EXPECT_EQ(10, cvih_it.handle().idx() ) << "Index wrong in ConstVertexIHalfedgeIter step 4"; + EXPECT_EQ(10, cvih_it->idx() ) << "Index wrong in ConstVertexIHalfedgeIter step 4"; EXPECT_EQ(1, mesh_.face_handle(cvih_it.handle()).idx() ) << "Corresponding face Index wrong in ConstVertexIHalfedgeIter step 4"; EXPECT_FALSE(cvih_it) << "Iterator still valid in ConstVertexIHalfedgeIter at step 4"; EXPECT_TRUE( cvih_it == cvoh_end ) << "Miss matched end iterator"; @@ -217,26 +217,26 @@ TEST_F(OpenMeshTrimeshCirculatorVertexIHalfEdge, VertexOIncomingHalfedgeBoundary Mesh::VertexIHalfedgeIter vih_it = mesh_.vih_begin(vhandle[2]); Mesh::VertexIHalfedgeIter vih_end = mesh_.vih_end(vhandle[2]); - EXPECT_EQ(14, vih_it.handle().idx() ) << "Index wrong in VertexIHalfedgeIter begin at initialization"; - EXPECT_EQ(14, vih_end.handle().idx() ) << "Index wrong in VertexIHalfedgeIter end at initialization"; + EXPECT_EQ(14, vih_it->idx() ) << "Index wrong in VertexIHalfedgeIter begin at initialization"; + EXPECT_EQ(14, vih_end->idx() ) << "Index wrong in VertexIHalfedgeIter end at initialization"; EXPECT_EQ(3, mesh_.face_handle(vih_it.handle()).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter begin at initialization"; EXPECT_TRUE(vih_it) << "Iterator invalid in VertexIHalfedgeIter at initialization"; ++vih_it ; - EXPECT_EQ(2, vih_it.handle().idx() ) << "Index wrong in VertexIHalfedgeIter step 1"; + EXPECT_EQ(2, vih_it->idx() ) << "Index wrong in VertexIHalfedgeIter step 1"; EXPECT_EQ(0, mesh_.face_handle(vih_it.handle()).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter step 1"; EXPECT_TRUE(vih_it) << "Iterator invalid in VertexIHalfedgeIter at step 1"; ++vih_it ; - EXPECT_EQ(5, vih_it.handle().idx() ) << "Index wrong in VertexIHalfedgeIter step 2"; + EXPECT_EQ(5, vih_it->idx() ) << "Index wrong in VertexIHalfedgeIter step 2"; EXPECT_EQ(-1, mesh_.face_handle(vih_it.handle()).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter step 2"; EXPECT_TRUE(vih_it) << "Iterator invalid in VertexIHalfedgeIter at step 2"; ++vih_it ; - EXPECT_EQ(14, vih_it.handle().idx() ) << "Index wrong in VertexIHalfedgeIter step 3"; + EXPECT_EQ(14, vih_it->idx() ) << "Index wrong in VertexIHalfedgeIter step 3"; EXPECT_EQ(3, mesh_.face_handle(vih_it.handle()).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter step 3"; EXPECT_FALSE(vih_it) << "Iterator still valid in VertexIHalfedgeIter at step 3"; EXPECT_TRUE( vih_it == vih_end ) << "Miss matched end iterator"; diff --git a/src/Unittests/unittests_trimesh_circulator_vertex_ohalfedge.hh b/src/Unittests/unittests_trimesh_circulator_vertex_ohalfedge.hh index 1ffff45d..a9fe0994 100644 --- a/src/Unittests/unittests_trimesh_circulator_vertex_ohalfedge.hh +++ b/src/Unittests/unittests_trimesh_circulator_vertex_ohalfedge.hh @@ -91,32 +91,32 @@ TEST_F(OpenMeshTrimeshCirculatorVertexOHalfEdge, VertexOutgoingHalfedgeWithoutHo Mesh::VertexOHalfedgeIter voh_it = mesh_.voh_begin(vhandle[1]); Mesh::VertexOHalfedgeIter voh_end = mesh_.voh_end(vhandle[1]); - EXPECT_EQ(11, voh_it.handle().idx() ) << "Index wrong in VertexOHalfedgeIter begin at initialization"; - EXPECT_EQ(11, voh_end.handle().idx() ) << "Index wrong in VertexOHalfedgeIter end at initialization"; + EXPECT_EQ(11, voh_it->idx() ) << "Index wrong in VertexOHalfedgeIter begin at initialization"; + EXPECT_EQ(11, voh_end->idx() ) << "Index wrong in VertexOHalfedgeIter end at initialization"; EXPECT_EQ(3, mesh_.face_handle(voh_it.handle()).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter begin at initialization"; EXPECT_TRUE(voh_it) << "Iterator invalid in VertexOHalfedgeIter at initialization"; ++voh_it ; - EXPECT_EQ(6, voh_it.handle().idx() ) << "Index wrong in VertexOHalfedgeIter step 1"; + EXPECT_EQ(6, voh_it->idx() ) << "Index wrong in VertexOHalfedgeIter step 1"; EXPECT_EQ(1, mesh_.face_handle(voh_it.handle()).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 1"; EXPECT_TRUE(voh_it) << "Iterator invalid in VertexOHalfedgeIter at step 1"; ++voh_it ; - EXPECT_EQ(1, voh_it.handle().idx() ) << "Index wrong in VertexOHalfedgeIter step 2"; + EXPECT_EQ(1, voh_it->idx() ) << "Index wrong in VertexOHalfedgeIter step 2"; EXPECT_EQ(2, mesh_.face_handle(voh_it.handle()).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 2"; EXPECT_TRUE(voh_it) << "Iterator invalid in VertexOHalfedgeIter at step 2"; ++voh_it ; - EXPECT_EQ(2, voh_it.handle().idx() ) << "Index wrong in VertexOHalfedgeIter step 3"; + EXPECT_EQ(2, voh_it->idx() ) << "Index wrong in VertexOHalfedgeIter step 3"; EXPECT_EQ(0, mesh_.face_handle(voh_it.handle()).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 3"; EXPECT_TRUE(voh_it) << "Iterator invalid in VertexOHalfedgeIter at step 3"; ++voh_it ; - EXPECT_EQ(11, voh_it.handle().idx() ) << "Index wrong in VertexOHalfedgeIter step 4"; + EXPECT_EQ(11, voh_it->idx() ) << "Index wrong in VertexOHalfedgeIter step 4"; EXPECT_EQ(3, mesh_.face_handle(voh_it.handle()).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 4"; EXPECT_FALSE(voh_it) << "Iterator still valid in VertexOHalfedgeIter at step 4"; EXPECT_TRUE( voh_it == voh_end ) << "Miss matched end iterator"; @@ -125,32 +125,32 @@ TEST_F(OpenMeshTrimeshCirculatorVertexOHalfEdge, VertexOutgoingHalfedgeWithoutHo Mesh::ConstVertexOHalfedgeIter cvoh_it = mesh_.cvoh_begin(vhandle[1]); Mesh::ConstVertexOHalfedgeIter cvoh_end = mesh_.cvoh_end(vhandle[1]); - EXPECT_EQ(11, cvoh_it.handle().idx() ) << "Index wrong in ConstVertexOHalfedgeIter begin at initialization"; - EXPECT_EQ(11, cvoh_end.handle().idx() ) << "Index wrong in ConstVertexOHalfedgeIter end at initialization"; + EXPECT_EQ(11, cvoh_it->idx() ) << "Index wrong in ConstVertexOHalfedgeIter begin at initialization"; + EXPECT_EQ(11, cvoh_end->idx() ) << "Index wrong in ConstVertexOHalfedgeIter end at initialization"; EXPECT_EQ(3, mesh_.face_handle(cvoh_it.handle()).idx() ) << "Corresponding face Index wrong in ConstVertexOHalfedgeIter begin at initialization"; EXPECT_TRUE(cvoh_it) << "Iterator invalid in ConstVertexOHalfedgeIter at initialization"; ++cvoh_it ; - EXPECT_EQ(6, cvoh_it.handle().idx() ) << "Index wrong in ConstVertexOHalfedgeIter step 1"; + EXPECT_EQ(6, cvoh_it->idx() ) << "Index wrong in ConstVertexOHalfedgeIter step 1"; EXPECT_EQ(1, mesh_.face_handle(cvoh_it.handle()).idx() ) << "Corresponding face Index wrong in ConstVertexOHalfedgeIter step 1"; EXPECT_TRUE(cvoh_it) << "Iterator invalid in ConstVertexOHalfedgeIter at step 1"; ++cvoh_it ; - EXPECT_EQ(1, cvoh_it.handle().idx() ) << "Index wrong in ConstVertexOHalfedgeIter step 2"; + EXPECT_EQ(1, cvoh_it->idx() ) << "Index wrong in ConstVertexOHalfedgeIter step 2"; EXPECT_EQ(2, mesh_.face_handle(cvoh_it.handle()).idx() ) << "Corresponding face Index wrong in ConstVertexOHalfedgeIter step 2"; EXPECT_TRUE(cvoh_it) << "Iterator invalid in ConstVertexOHalfedgeIter at step 2"; ++cvoh_it ; - EXPECT_EQ(2, cvoh_it.handle().idx() ) << "Index wrong in ConstVertexOHalfedgeIter step 3"; + EXPECT_EQ(2, cvoh_it->idx() ) << "Index wrong in ConstVertexOHalfedgeIter step 3"; EXPECT_EQ(0, mesh_.face_handle(cvoh_it.handle()).idx() ) << "Corresponding face Index wrong in ConstVertexOHalfedgeIter step 3"; EXPECT_TRUE(cvoh_it) << "Iterator invalid in ConstVertexOHalfedgeIter at step 3"; ++cvoh_it ; - EXPECT_EQ(11, cvoh_it.handle().idx() ) << "Index wrong in ConstVertexOHalfedgeIter step 4"; + EXPECT_EQ(11, cvoh_it->idx() ) << "Index wrong in ConstVertexOHalfedgeIter step 4"; EXPECT_EQ(3, mesh_.face_handle(cvoh_it.handle()).idx() ) << "Corresponding face Index wrong in ConstVertexOHalfedgeIter step 4"; EXPECT_FALSE(cvoh_it) << "Iterator still valid in ConstVertexOHalfedgeIter at step 4"; EXPECT_TRUE( cvoh_it == cvoh_end ) << "Miss matched end iterator"; @@ -217,26 +217,26 @@ TEST_F(OpenMeshTrimeshCirculatorVertexOHalfEdge, VertexOutgoingHalfedgeBoundaryI Mesh::VertexOHalfedgeIter voh_it = mesh_.voh_begin(vhandle[2]); Mesh::VertexOHalfedgeIter voh_end = mesh_.voh_end(vhandle[2]); - EXPECT_EQ(15, voh_it.handle().idx() ) << "Index wrong in VertexOHalfedgeIter begin at initialization"; - EXPECT_EQ(15, voh_end.handle().idx() ) << "Index wrong in VertexOHalfedgeIter end at initialization"; + EXPECT_EQ(15, voh_it->idx() ) << "Index wrong in VertexOHalfedgeIter begin at initialization"; + EXPECT_EQ(15, voh_end->idx() ) << "Index wrong in VertexOHalfedgeIter end at initialization"; EXPECT_EQ(-1, mesh_.face_handle(voh_it.handle()).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter begin at initialization"; EXPECT_TRUE(voh_it) << "Iterator invalid in VertexOHalfedgeIter at initialization"; ++voh_it ; - EXPECT_EQ(3, voh_it.handle().idx() ) << "Index wrong in VertexOHalfedgeIter step 1"; + EXPECT_EQ(3, voh_it->idx() ) << "Index wrong in VertexOHalfedgeIter step 1"; EXPECT_EQ(3, mesh_.face_handle(voh_it.handle()).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 1"; EXPECT_TRUE(voh_it) << "Iterator invalid in VertexOHalfedgeIter at step 1"; ++voh_it ; - EXPECT_EQ(4, voh_it.handle().idx() ) << "Index wrong in VertexOHalfedgeIter step 2"; + EXPECT_EQ(4, voh_it->idx() ) << "Index wrong in VertexOHalfedgeIter step 2"; EXPECT_EQ(0, mesh_.face_handle(voh_it.handle()).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 2"; EXPECT_TRUE(voh_it) << "Iterator invalid in VertexOHalfedgeIter at step 2"; ++voh_it ; - EXPECT_EQ(15, voh_it.handle().idx() ) << "Index wrong in VertexOHalfedgeIter step 3"; + EXPECT_EQ(15, voh_it->idx() ) << "Index wrong in VertexOHalfedgeIter step 3"; EXPECT_EQ(-1, mesh_.face_handle(voh_it.handle()).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 3"; EXPECT_FALSE(voh_it) << "Iterator still valid in VertexOHalfedgeIter at step 3"; EXPECT_TRUE( voh_it == voh_end ) << "Miss matched end iterator"; diff --git a/src/Unittests/unittests_trimesh_circulator_vertex_vertex.hh b/src/Unittests/unittests_trimesh_circulator_vertex_vertex.hh index a3492901..52bd1b12 100644 --- a/src/Unittests/unittests_trimesh_circulator_vertex_vertex.hh +++ b/src/Unittests/unittests_trimesh_circulator_vertex_vertex.hh @@ -92,28 +92,28 @@ TEST_F(OpenMeshTrimeshCirculatorVertexVertex, VertexVertexIncrement) { Mesh::VertexVertexIter vv_it = mesh_.vv_begin(vhandle[1]); Mesh::VertexVertexIter vv_end = mesh_.vv_end(vhandle[1]); - EXPECT_EQ(4, vv_it.handle().idx() ) << "Index wrong in VertexVertexIter begin at initialization"; - EXPECT_EQ(4, vv_end.handle().idx() ) << "Index wrong in VertexVertexIter end at initialization"; + EXPECT_EQ(4, vv_it->idx() ) << "Index wrong in VertexVertexIter begin at initialization"; + EXPECT_EQ(4, vv_end->idx() ) << "Index wrong in VertexVertexIter end at initialization"; EXPECT_TRUE(vv_it) << "Iterator invalid in VertexVertexIter at initialization"; ++vv_it ; - EXPECT_EQ(3, vv_it.handle().idx() ) << "Index wrong in VertexVertexIter step 1"; + EXPECT_EQ(3, vv_it->idx() ) << "Index wrong in VertexVertexIter step 1"; EXPECT_TRUE(vv_it) << "Iterator invalid in VertexVertexIter at step 1"; ++vv_it ; - EXPECT_EQ(0, vv_it.handle().idx() ) << "Index wrong in VertexVertexIter step 2"; + EXPECT_EQ(0, vv_it->idx() ) << "Index wrong in VertexVertexIter step 2"; EXPECT_TRUE(vv_it) << "Iterator invalid in VertexVertexIter at step 2"; ++vv_it ; - EXPECT_EQ(2, vv_it.handle().idx() ) << "Index wrong in VertexVertexIter step 3"; + EXPECT_EQ(2, vv_it->idx() ) << "Index wrong in VertexVertexIter step 3"; EXPECT_TRUE(vv_it) << "Iterator invalid in VertexVertexIter at step 3"; ++vv_it ; - EXPECT_EQ(4, vv_it.handle().idx() ) << "Index wrong in VertexVertexIter step 4"; + EXPECT_EQ(4, vv_it->idx() ) << "Index wrong in VertexVertexIter step 4"; EXPECT_FALSE(vv_it) << "Iterator still valid in VertexVertexIter at step 4"; EXPECT_TRUE( vv_it == vv_end ) << "Miss matched end iterator"; @@ -179,23 +179,23 @@ TEST_F(OpenMeshTrimeshCirculatorVertexVertex, VertexVertexBoundaryIncrement) { Mesh::VertexVertexIter vv_it = mesh_.vv_begin(vhandle[2]); Mesh::VertexVertexIter vv_end = mesh_.vv_end(vhandle[2]); - EXPECT_EQ(4, vv_it.handle().idx() ) << "Index wrong in VertexVertexIter begin at initialization"; - EXPECT_EQ(4, vv_end.handle().idx() ) << "Index wrong in VertexVertexIter end at initialization"; + EXPECT_EQ(4, vv_it->idx() ) << "Index wrong in VertexVertexIter begin at initialization"; + EXPECT_EQ(4, vv_end->idx() ) << "Index wrong in VertexVertexIter end at initialization"; EXPECT_TRUE(vv_it) << "Iterator invalid in VertexVertexIter at initialization"; ++vv_it ; - EXPECT_EQ(1, vv_it.handle().idx() ) << "Index wrong in VertexVertexIter step 1"; + EXPECT_EQ(1, vv_it->idx() ) << "Index wrong in VertexVertexIter step 1"; EXPECT_TRUE(vv_it) << "Iterator invalid in VertexVertexIter at step 1"; ++vv_it ; - EXPECT_EQ(0, vv_it.handle().idx() ) << "Index wrong in VertexVertexIter step 2"; + EXPECT_EQ(0, vv_it->idx() ) << "Index wrong in VertexVertexIter step 2"; EXPECT_TRUE(vv_it) << "Iterator invalid in VertexVertexIter at step 2"; ++vv_it ; - EXPECT_EQ(4, vv_it.handle().idx() ) << "Index wrong in VertexVertexIter step 3"; + EXPECT_EQ(4, vv_it->idx() ) << "Index wrong in VertexVertexIter step 3"; EXPECT_FALSE(vv_it) << "Iterator invalid in VertexVertexIter at step 3"; EXPECT_TRUE( vv_it == vv_end ) << "Miss matched end iterator"; diff --git a/src/Unittests/unittests_trimesh_collapse.hh b/src/Unittests/unittests_trimesh_collapse.hh index e60e64ae..3610265a 100644 --- a/src/Unittests/unittests_trimesh_collapse.hh +++ b/src/Unittests/unittests_trimesh_collapse.hh @@ -245,18 +245,18 @@ TEST_F(OpenMeshCollapse, CollapseTetrahedronComplex) { Mesh::FaceVertexIter fv_it = mesh_.fv_begin(fh_1); - EXPECT_EQ(1 , fv_it.handle().idx() ) << "Index wrong for Vertex 1 of face 1"; + EXPECT_EQ(1 , fv_it->idx() ) << "Index wrong for Vertex 1 of face 1"; ++fv_it; - EXPECT_EQ(2 , fv_it.handle().idx() ) << "Index wrong for Vertex 2 of face 1"; + EXPECT_EQ(2 , fv_it->idx() ) << "Index wrong for Vertex 2 of face 1"; ++fv_it; - EXPECT_EQ(3 , fv_it.handle().idx() ) << "Index wrong for Vertex 3 of face 1"; + EXPECT_EQ(3 , fv_it->idx() ) << "Index wrong for Vertex 3 of face 1"; fv_it = mesh_.fv_begin(fh_2); - EXPECT_EQ(2 , fv_it.handle().idx() ) << "Index wrong for Vertex 1 of face 2"; + EXPECT_EQ(2 , fv_it->idx() ) << "Index wrong for Vertex 1 of face 2"; ++fv_it; - EXPECT_EQ(1 , fv_it.handle().idx() ) << "Index wrong for Vertex 2 of face 2"; + EXPECT_EQ(1 , fv_it->idx() ) << "Index wrong for Vertex 2 of face 2"; ++fv_it; - EXPECT_EQ(3 , fv_it.handle().idx() ) << "Index wrong for Vertex 3 of face 2"; + EXPECT_EQ(3 , fv_it->idx() ) << "Index wrong for Vertex 3 of face 2"; // Get the first halfedge of face 1 Mesh::HalfedgeHandle fh_1_he = mesh_.halfedge_handle(fh_1); @@ -288,27 +288,27 @@ TEST_F(OpenMeshCollapse, CollapseTetrahedronComplex) { // Vertex 1 outgoing Mesh::VertexOHalfedgeIter voh_it = mesh_.voh_begin(mesh_.vertex_handle(1)); - EXPECT_EQ(10 , voh_it.handle().idx() ) << "Index wrong for first outgoing halfedge of vertex 1"; + EXPECT_EQ(10 , voh_it->idx() ) << "Index wrong for first outgoing halfedge of vertex 1"; ++voh_it; - EXPECT_EQ(2 , voh_it.handle().idx() ) << "Index wrong for second outgoing halfedge of vertex 1"; + EXPECT_EQ(2 , voh_it->idx() ) << "Index wrong for second outgoing halfedge of vertex 1"; ++voh_it; - EXPECT_EQ(10 , voh_it.handle().idx() ) << "Index wrong for third(one lap) outgoing halfedge of vertex 1"; + EXPECT_EQ(10 , voh_it->idx() ) << "Index wrong for third(one lap) outgoing halfedge of vertex 1"; // Vertex 2 outgoing voh_it = mesh_.voh_begin(mesh_.vertex_handle(2)); - EXPECT_EQ(3 , voh_it.handle().idx() ) << "Index wrong for first outgoing halfedge of vertex 2"; + EXPECT_EQ(3 , voh_it->idx() ) << "Index wrong for first outgoing halfedge of vertex 2"; ++voh_it; - EXPECT_EQ(6 , voh_it.handle().idx() ) << "Index wrong for second outgoing halfedge of vertex 2"; + EXPECT_EQ(6 , voh_it->idx() ) << "Index wrong for second outgoing halfedge of vertex 2"; ++voh_it; - EXPECT_EQ(3 , voh_it.handle().idx() ) << "Index wrong for third(one lap) outgoing halfedge of vertex 2"; + EXPECT_EQ(3 , voh_it->idx() ) << "Index wrong for third(one lap) outgoing halfedge of vertex 2"; // Vertex 3 outgoing voh_it = mesh_.voh_begin(mesh_.vertex_handle(3)); - EXPECT_EQ(11 , voh_it.handle().idx() ) << "Index wrong for first outgoing halfedge of vertex 3"; + EXPECT_EQ(11 , voh_it->idx() ) << "Index wrong for first outgoing halfedge of vertex 3"; ++voh_it; - EXPECT_EQ(7 , voh_it.handle().idx() ) << "Index wrong for second outgoing halfedge of vertex 3"; + EXPECT_EQ(7 , voh_it->idx() ) << "Index wrong for second outgoing halfedge of vertex 3"; ++voh_it; - EXPECT_EQ(11 , voh_it.handle().idx() ) << "Index wrong for third(one lap) outgoing halfedge of vertex 3"; + EXPECT_EQ(11 , voh_it->idx() ) << "Index wrong for third(one lap) outgoing halfedge of vertex 3"; // =================================================================== // Cleanup @@ -341,18 +341,18 @@ TEST_F(OpenMeshCollapse, CollapseTetrahedronComplex) { fv_it = mesh_.fv_begin(fh_0); - EXPECT_EQ(2 , fv_it.handle().idx() ) << "Index wrong for Vertex 1 of face 0 after garbage collection"; + EXPECT_EQ(2 , fv_it->idx() ) << "Index wrong for Vertex 1 of face 0 after garbage collection"; ++fv_it; - EXPECT_EQ(1 , fv_it.handle().idx() ) << "Index wrong for Vertex 2 of face 0 after garbage collection"; + EXPECT_EQ(1 , fv_it->idx() ) << "Index wrong for Vertex 2 of face 0 after garbage collection"; ++fv_it; - EXPECT_EQ(0 , fv_it.handle().idx() ) << "Index wrong for Vertex 3 of face 0 after garbage collection"; + EXPECT_EQ(0 , fv_it->idx() ) << "Index wrong for Vertex 3 of face 0 after garbage collection"; fv_it = mesh_.fv_begin(fh_1); - EXPECT_EQ(1 , fv_it.handle().idx() ) << "Index wrong for Vertex 1 of face 1 after garbage collection"; + EXPECT_EQ(1 , fv_it->idx() ) << "Index wrong for Vertex 1 of face 1 after garbage collection"; ++fv_it; - EXPECT_EQ(2 , fv_it.handle().idx() ) << "Index wrong for Vertex 2 of face 1 after garbage collection"; + EXPECT_EQ(2 , fv_it->idx() ) << "Index wrong for Vertex 2 of face 1 after garbage collection"; ++fv_it; - EXPECT_EQ(0 , fv_it.handle().idx() ) << "Index wrong for Vertex 3 of face 1 after garbage collection"; + EXPECT_EQ(0 , fv_it->idx() ) << "Index wrong for Vertex 3 of face 1 after garbage collection"; // Get the first halfedge of face 1 Mesh::HalfedgeHandle fh_0_he = mesh_.halfedge_handle(fh_0); @@ -385,27 +385,27 @@ TEST_F(OpenMeshCollapse, CollapseTetrahedronComplex) { // Vertex 0 outgoing voh_it = mesh_.voh_begin(mesh_.vertex_handle(0)); - EXPECT_EQ(1 , voh_it.handle().idx() ) << "Index wrong for first outgoing halfedge of vertex 0"; + EXPECT_EQ(1 , voh_it->idx() ) << "Index wrong for first outgoing halfedge of vertex 0"; ++voh_it; - EXPECT_EQ(5 , voh_it.handle().idx() ) << "Index wrong for second outgoing halfedge of vertex 0"; + EXPECT_EQ(5 , voh_it->idx() ) << "Index wrong for second outgoing halfedge of vertex 0"; ++voh_it; - EXPECT_EQ(1 , voh_it.handle().idx() ) << "Index wrong for third(one lap) outgoing halfedge of vertex 0"; + EXPECT_EQ(1 , voh_it->idx() ) << "Index wrong for third(one lap) outgoing halfedge of vertex 0"; // Vertex 1 outgoing voh_it = mesh_.voh_begin(mesh_.vertex_handle(1)); - EXPECT_EQ(0 , voh_it.handle().idx() ) << "Index wrong for first outgoing halfedge of vertex 1"; + EXPECT_EQ(0 , voh_it->idx() ) << "Index wrong for first outgoing halfedge of vertex 1"; ++voh_it; - EXPECT_EQ(2 , voh_it.handle().idx() ) << "Index wrong for second outgoing halfedge of vertex 1"; + EXPECT_EQ(2 , voh_it->idx() ) << "Index wrong for second outgoing halfedge of vertex 1"; ++voh_it; - EXPECT_EQ(0 , voh_it.handle().idx() ) << "Index wrong for third(one lap) outgoing halfedge of vertex 1"; + EXPECT_EQ(0 , voh_it->idx() ) << "Index wrong for third(one lap) outgoing halfedge of vertex 1"; // Vertex 2 outgoing voh_it = mesh_.voh_begin(mesh_.vertex_handle(2)); - EXPECT_EQ(3 , voh_it.handle().idx() ) << "Index wrong for first outgoing halfedge of vertex 2"; + EXPECT_EQ(3 , voh_it->idx() ) << "Index wrong for first outgoing halfedge of vertex 2"; ++voh_it; - EXPECT_EQ(4 , voh_it.handle().idx() ) << "Index wrong for second outgoing halfedge of vertex 2"; + EXPECT_EQ(4 , voh_it->idx() ) << "Index wrong for second outgoing halfedge of vertex 2"; ++voh_it; - EXPECT_EQ(3 , voh_it.handle().idx() ) << "Index wrong for third(one lap) outgoing halfedge of vertex 2"; + EXPECT_EQ(3 , voh_it->idx() ) << "Index wrong for third(one lap) outgoing halfedge of vertex 2"; EXPECT_FALSE( mesh_.is_collapse_ok(mesh_.halfedge_handle(0)) ) << "Collapse should be not ok for halfedge 0"; EXPECT_FALSE( mesh_.is_collapse_ok(mesh_.halfedge_handle(1)) ) << "Collapse should be not ok for halfedge 1"; diff --git a/src/Unittests/unittests_trimesh_iterators.hh b/src/Unittests/unittests_trimesh_iterators.hh index aa5f54e0..9643b299 100644 --- a/src/Unittests/unittests_trimesh_iterators.hh +++ b/src/Unittests/unittests_trimesh_iterators.hh @@ -70,18 +70,18 @@ TEST_F(OpenMeshIterators, VertexIter) { Mesh::VertexIter v_it = mesh_.vertices_begin(); Mesh::VertexIter v_end = mesh_.vertices_end(); - EXPECT_EQ(0, v_it.handle().idx()) << "Index wrong for vertex iterator vertices_begin()"; + EXPECT_EQ(0, v_it->idx()) << "Index wrong for vertex iterator vertices_begin()"; ++v_it; - EXPECT_EQ(1, v_it.handle().idx()) << "Index wrong in vertex iterator"; + EXPECT_EQ(1, v_it->idx()) << "Index wrong in vertex iterator"; ++v_it; - EXPECT_EQ(2, v_it.handle().idx()) << "Index wrong in vertex iterator"; + EXPECT_EQ(2, v_it->idx()) << "Index wrong in vertex iterator"; ++v_it; - EXPECT_EQ(3, v_it.handle().idx()) << "Index wrong in vertex iterator"; + EXPECT_EQ(3, v_it->idx()) << "Index wrong in vertex iterator"; ++v_it; - EXPECT_EQ(4, v_it.handle().idx()) << "Index wrong in vertex iterator"; + EXPECT_EQ(4, v_it->idx()) << "Index wrong in vertex iterator"; // Check end iterator - EXPECT_EQ(4, v_end.handle().idx()) << "Index wrong in vertex iterator for vertices_end()"; + EXPECT_EQ(4, v_end->idx()) << "Index wrong in vertex iterator for vertices_end()"; // Second iterator test to start at a specific position @@ -128,14 +128,14 @@ TEST_F(OpenMeshIterators, VertexIterStartPosition) { Mesh::VertexIter v_it = Mesh::VertexIter(mesh_,mesh_.vertex_handle(2)); Mesh::VertexIter v_end = mesh_.vertices_end(); - EXPECT_EQ(2, v_it.handle().idx()) << "Index wrong in vertex iterator"; + EXPECT_EQ(2, v_it->idx()) << "Index wrong in vertex iterator"; ++v_it; - EXPECT_EQ(3, v_it.handle().idx()) << "Index wrong in vertex iterator"; + EXPECT_EQ(3, v_it->idx()) << "Index wrong in vertex iterator"; ++v_it; - EXPECT_EQ(4, v_it.handle().idx()) << "Index wrong in vertex iterator"; + EXPECT_EQ(4, v_it->idx()) << "Index wrong in vertex iterator"; // Check end iterator - EXPECT_EQ(4, v_end.handle().idx()) << "Index wrong in vertex iterator for vertices_end()"; + EXPECT_EQ(4, v_end->idx()) << "Index wrong in vertex iterator for vertices_end()"; } @@ -181,8 +181,8 @@ TEST_F(OpenMeshIterators, EdgeIter) { Mesh::EdgeIter e_it = mesh_.edges_begin(); Mesh::EdgeIter e_end = mesh_.edges_end(); - EXPECT_EQ(0, e_it.handle().idx()) << "Wrong start index in edge iterator"; - EXPECT_EQ(5, e_end.handle().idx()) << "Wrong end index in edge iterator"; + EXPECT_EQ(0, e_it->idx()) << "Wrong start index in edge iterator"; + EXPECT_EQ(5, e_end->idx()) << "Wrong end index in edge iterator"; EXPECT_EQ(1, mesh_.to_vertex_handle(mesh_.halfedge_handle(e_it,0)).idx() ) << "1: Wrong to vertex handle of halfedge 0"; EXPECT_EQ(2, mesh_.from_vertex_handle(mesh_.halfedge_handle(e_it,0)).idx() ) << "1: Wrong from vertex handle of halfedge 0"; @@ -190,7 +190,7 @@ TEST_F(OpenMeshIterators, EdgeIter) { EXPECT_EQ(1, mesh_.from_vertex_handle(mesh_.halfedge_handle(e_it,1)).idx() ) << "1: Wrong from vertex handle of halfedge 1"; ++e_it; - EXPECT_EQ(1, e_it.handle().idx()) << "Wrong index in edge iterator"; + EXPECT_EQ(1, e_it->idx()) << "Wrong index in edge iterator"; EXPECT_EQ(0, mesh_.to_vertex_handle(mesh_.halfedge_handle(e_it,0)).idx() ) << "2: Wrong to vertex handle of halfedge 0"; EXPECT_EQ(1, mesh_.from_vertex_handle(mesh_.halfedge_handle(e_it,0)).idx() ) << "2: Wrong from vertex handle of halfedge 0"; @@ -199,7 +199,7 @@ TEST_F(OpenMeshIterators, EdgeIter) { ++e_it; - EXPECT_EQ(2, e_it.handle().idx()) << "Wrong index in edge iterator"; + EXPECT_EQ(2, e_it->idx()) << "Wrong index in edge iterator"; EXPECT_EQ(2, mesh_.to_vertex_handle(mesh_.halfedge_handle(e_it,0)).idx() ) << "3: Wrong to vertex handle of halfedge 0"; EXPECT_EQ(0, mesh_.from_vertex_handle(mesh_.halfedge_handle(e_it,0)).idx() ) << "3: Wrong from vertex handle of halfedge 0"; @@ -208,7 +208,7 @@ TEST_F(OpenMeshIterators, EdgeIter) { ++e_it; - EXPECT_EQ(3, e_it.handle().idx()) << "Wrong index in edge iterator"; + EXPECT_EQ(3, e_it->idx()) << "Wrong index in edge iterator"; EXPECT_EQ(3, mesh_.to_vertex_handle(mesh_.halfedge_handle(e_it,0)).idx() ) << "4: Wrong to vertex handle of halfedge 0"; EXPECT_EQ(0, mesh_.from_vertex_handle(mesh_.halfedge_handle(e_it,0)).idx() ) << "4: Wrong from vertex handle of halfedge 0"; @@ -217,7 +217,7 @@ TEST_F(OpenMeshIterators, EdgeIter) { ++e_it; - EXPECT_EQ(4, e_it.handle().idx()) << "Wrong index in edge iterator"; + EXPECT_EQ(4, e_it->idx()) << "Wrong index in edge iterator"; EXPECT_EQ(2, mesh_.to_vertex_handle(mesh_.halfedge_handle(e_it,0)).idx() ) << "5: Wrong to vertex handle of halfedge 0"; EXPECT_EQ(3, mesh_.from_vertex_handle(mesh_.halfedge_handle(e_it,0)).idx() ) << "5: Wrong from vertex handle of halfedge 0"; @@ -374,8 +374,8 @@ TEST_F(OpenMeshIterators, HalfedgeIterSkipping) { Mesh::HalfedgeIter he_it = mesh_.halfedges_sbegin(); Mesh::HalfedgeIter he_end = mesh_.halfedges_end(); - EXPECT_EQ(0, he_it.handle().idx()) << "Wrong start index in halfedge iterator"; - EXPECT_EQ(36, he_end.handle().idx()) << "Wrong end index in halfedge iterator"; + EXPECT_EQ(0, he_it->idx()) << "Wrong start index in halfedge iterator"; + EXPECT_EQ(36, he_end->idx()) << "Wrong end index in halfedge iterator"; // ===================================================== @@ -387,10 +387,10 @@ TEST_F(OpenMeshIterators, HalfedgeIterSkipping) { unsigned int count = 0; while (he_it != he_end) { - if ( he_it.handle().idx() == 4 ) + if ( he_it->idx() == 4 ) ok_4 = false; - if ( he_it.handle().idx() == 5 ) + if ( he_it->idx() == 5 ) ok_5 = false; ++he_it; @@ -411,10 +411,10 @@ TEST_F(OpenMeshIterators, HalfedgeIterSkipping) { ok_5 = false; while (he_it != he_end) { - if ( he_it.handle().idx() == 4 ) + if ( he_it->idx() == 4 ) ok_4 = true; - if ( he_it.handle().idx() == 5 ) + if ( he_it->idx() == 5 ) ok_5 = true; @@ -571,8 +571,8 @@ TEST_F(OpenMeshIterators, HalfedgeIterSkippingLowLevel) { Mesh::HalfedgeIter he_it = mesh_.halfedges_sbegin(); Mesh::HalfedgeIter he_end = mesh_.halfedges_end(); - EXPECT_EQ(0, he_it.handle().idx()) << "Wrong start index in halfedge iterator"; - EXPECT_EQ(36, he_end.handle().idx()) << "Wrong end index in halfedge iterator"; + EXPECT_EQ(0, he_it->idx()) << "Wrong start index in halfedge iterator"; + EXPECT_EQ(36, he_end->idx()) << "Wrong end index in halfedge iterator"; // ===================================================== // Try to add low level edge with invalid incidents and @@ -590,10 +590,10 @@ TEST_F(OpenMeshIterators, HalfedgeIterSkippingLowLevel) { bool found_37 = false; while (he_it != he_end) { - if ( he_it.handle().idx() == 36 ) + if ( he_it->idx() == 36 ) found_36 = true; - if ( he_it.handle().idx() == 37 ) + if ( he_it->idx() == 37 ) found_37 = true; ++he_it; @@ -623,16 +623,16 @@ TEST_F(OpenMeshIterators, HalfedgeIterSkippingLowLevel) { while (he_it != he_end) { - if ( he_it.handle().idx() == 4 ) + if ( he_it->idx() == 4 ) found_4 = true; - if ( he_it.handle().idx() == 5 ) + if ( he_it->idx() == 5 ) found_5 = true; - if ( he_it.handle().idx() == 36 ) + if ( he_it->idx() == 36 ) found_36 = true; - if ( he_it.handle().idx() == 37 ) + if ( he_it->idx() == 37 ) found_37 = true; ++he_it; @@ -664,16 +664,16 @@ TEST_F(OpenMeshIterators, HalfedgeIterSkippingLowLevel) { while (he_it != he_end) { - if ( he_it.handle().idx() == 4 ) + if ( he_it->idx() == 4 ) found_4 = true; - if ( he_it.handle().idx() == 5 ) + if ( he_it->idx() == 5 ) found_5 = true; - if ( he_it.handle().idx() == 36 ) + if ( he_it->idx() == 36 ) found_36 = true; - if ( he_it.handle().idx() == 37 ) + if ( he_it->idx() == 37 ) found_37 = true; ++he_it; @@ -729,23 +729,23 @@ TEST_F(OpenMeshIterators, FaceIterEmptyMeshOneDeletedFace) { Mesh::FaceIter f_it = mesh_.faces_begin(); Mesh::FaceIter f_end = mesh_.faces_end(); - EXPECT_EQ(0, f_it.handle().idx()) << "Wrong start index in FaceIterator"; + EXPECT_EQ(0, f_it->idx()) << "Wrong start index in FaceIterator"; - EXPECT_EQ(1, f_end.handle().idx()) << "Wrong end index in FaceIterator"; + EXPECT_EQ(1, f_end->idx()) << "Wrong end index in FaceIterator"; ++f_it; - EXPECT_EQ(1, f_it.handle().idx()) << "Wrong end index in FaceIterator after one step"; + EXPECT_EQ(1, f_it->idx()) << "Wrong end index in FaceIterator after one step"; EXPECT_TRUE(f_it == f_end ) << "Iterator not at end for FaceIterator after one step"; Mesh::ConstFaceIter cf_it = mesh_.faces_begin(); Mesh::ConstFaceIter cf_end = mesh_.faces_end(); - EXPECT_EQ(0, cf_it.handle().idx()) << "Wrong start index in ConstFaceIterator"; + EXPECT_EQ(0, cf_it->idx()) << "Wrong start index in ConstFaceIterator"; - EXPECT_EQ(1, cf_end.handle().idx()) << "Wrong end index in ConstFaceIterator"; + EXPECT_EQ(1, cf_end->idx()) << "Wrong end index in ConstFaceIterator"; ++cf_it; - EXPECT_EQ(1, cf_it.handle().idx()) << "Wrong end index in ConstFaceIterator after one step"; + EXPECT_EQ(1, cf_it->idx()) << "Wrong end index in ConstFaceIterator after one step"; EXPECT_TRUE(cf_it == cf_end ) << "Iterator not at end for ConstFaceIterator after one step"; @@ -753,9 +753,9 @@ TEST_F(OpenMeshIterators, FaceIterEmptyMeshOneDeletedFace) { f_it = mesh_.faces_sbegin(); f_end = mesh_.faces_end(); - EXPECT_EQ(1, f_it.handle().idx()) << "Wrong start index in FaceIterator with skipping"; + EXPECT_EQ(1, f_it->idx()) << "Wrong start index in FaceIterator with skipping"; - EXPECT_EQ(1, f_end.handle().idx()) << "Wrong end index in FaceIterator with skipping"; + EXPECT_EQ(1, f_end->idx()) << "Wrong end index in FaceIterator with skipping"; EXPECT_TRUE(f_it == f_end ) << "Iterator not at end for FaceIterator with skipping"; @@ -763,9 +763,9 @@ TEST_F(OpenMeshIterators, FaceIterEmptyMeshOneDeletedFace) { cf_it = mesh_.faces_sbegin(); cf_end = mesh_.faces_end(); - EXPECT_EQ(1, cf_it.handle().idx()) << "Wrong start index in ConstFaceIterator with skipping"; + EXPECT_EQ(1, cf_it->idx()) << "Wrong start index in ConstFaceIterator with skipping"; - EXPECT_EQ(1, cf_end.handle().idx()) << "Wrong end index in ConstFaceIterator with skipping"; + EXPECT_EQ(1, cf_end->idx()) << "Wrong end index in ConstFaceIterator with skipping"; EXPECT_TRUE(cf_it == cf_end ) << "Iterator not at end for ConstFaceIterator with skipping";