From c8316a013e67e044f8786311c84c4434f72b3c61 Mon Sep 17 00:00:00 2001 From: Martin Schultz Date: Tue, 29 Sep 2015 17:12:43 +0200 Subject: [PATCH] * added basic vvrange testcase that checks if a mesh with only one vertex has an empty vvrange. --- src/Unittests/unittests_cpp_11_features.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/Unittests/unittests_cpp_11_features.cc b/src/Unittests/unittests_cpp_11_features.cc index 935856f9..085e12cd 100644 --- a/src/Unittests/unittests_cpp_11_features.cc +++ b/src/Unittests/unittests_cpp_11_features.cc @@ -67,6 +67,25 @@ TEST_F(OpenMesh_Triangle, cpp11_initializer_test) { } +TEST_F(OpenMesh_Triangle, cpp11_vvrange_test) { + //check empty vvrange + mesh_.clear(); + Mesh::VertexHandle vh = mesh_.add_vertex(Mesh::Point(0, 1, 0)); + for(auto t : mesh_.vv_range(vh)) + { + FAIL() << "The vvrange for a single vertex is not empty"; + } +} + +TEST_F(OpenMesh_Poly, cpp11_vvrange_test) { + mesh_.clear(); + PolyMesh::VertexHandle vh = mesh_.add_vertex(PolyMesh::Point(0, 1, 0)); + for(auto t : mesh_.vv_range(vh)) + { + FAIL() << "The vvrange for a single vertex is not empty"; + } +} + #endif }