From 175939f879bc9e1e404fbf1010d47682764948ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 12 Sep 2012 10:52:15 +0000 Subject: [PATCH] Added new but unused and unsupported unittest for faceless meshes git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@671 fdac6126-5c0c-442c-9429-916003d36597 --- src/Unittests/unittests.cc | 1 + src/Unittests/unittests_faceless_mesh.hh | 69 ++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 src/Unittests/unittests_faceless_mesh.hh diff --git a/src/Unittests/unittests.cc b/src/Unittests/unittests.cc index 95a6fcab..44ec6240 100644 --- a/src/Unittests/unittests.cc +++ b/src/Unittests/unittests.cc @@ -13,6 +13,7 @@ #include "unittests_trimesh_normal_calculations.hh" #include "unittests_trimesh_others.hh" #include "unittests_add_face.hh" +#include "unittests_faceless_mesh.hh" #include "unittests_trimesh_garbage_collection.hh" int main(int _argc, char** _argv) { diff --git a/src/Unittests/unittests_faceless_mesh.hh b/src/Unittests/unittests_faceless_mesh.hh new file mode 100644 index 00000000..95c6a7ca --- /dev/null +++ b/src/Unittests/unittests_faceless_mesh.hh @@ -0,0 +1,69 @@ +#ifndef INCLUDE_UNITTESTS_OpenMeshFacelessTriangleMesh_HH +#define INCLUDE_UNITTESTS_OpenMeshFacelessTriangleMesh_HH + +#include +#include +#include + +class OpenMeshFacelessMesh : public OpenMeshBase { + + protected: + + // This function is called before each test is run + virtual void SetUp() { + + // Do some initial stuff with the member data here... + } + + // This function is called after all tests are through + virtual void TearDown() { + + // Do some final stuff with the member data here... + } + + // Member already defined in OpenMeshBase + //Mesh mesh_; +}; + +///* +// * ==================================================================== +// * Define tests below +// * ==================================================================== +// */ +// +// */ +//TEST_F(OpenMeshFacelessMesh, TestCirculatorsAndIterators) { +// +// This setup is not supported by OpenMesh, we keep this test, if somebody creates +// a connectivity class for faceless graph setup. +//// mesh_.clear(); +//// +//// // Add some vertices +//// Mesh::VertexHandle vhandle[4]; +//// +//// vhandle[0] = mesh_.add_vertex(Mesh::Point(0, 0, 0)); +//// vhandle[1] = mesh_.add_vertex(Mesh::Point(0, 1, 0)); +//// vhandle[2] = mesh_.add_vertex(Mesh::Point(1, 1, 0)); +//// vhandle[3] = mesh_.add_vertex(Mesh::Point(1, 0, 0)); +//// +//// +//// Mesh::HalfedgeHandle heh00 = mesh_.new_edge(vhandle[0], vhandle[1]); +//// Mesh::HalfedgeHandle heh10 = mesh_.new_edge(vhandle[1], vhandle[2]); +//// +//// +//// // Halfedge Handles do not work in this setting! +//// Mesh::HalfedgeHandle invalid_heh = mesh_.next_halfedge_handle(heh00); +// +//// //second he circulators does not work +//// +//// auto invalid_heh_circ = mesh_.cvoh_iter(vh1); +//// +//// //third, and most important, split_edge fails +//// +//// Mesh::VertexHandle vh12 = mesh_.new_vertex(Mesh::Point(1.5, 0, 0)); +//// mesh_.split_edge(mesh_.edge_handle(heh10), vh12); //runtime error +// +//} + + +#endif // INCLUDE GUARD