From fb399d960a47d8475af1c381669ba7dcea8508b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20M=C3=B6ller?= Date: Thu, 23 Aug 2012 10:09:13 +0000 Subject: [PATCH] removed some new unit tests git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@654 fdac6126-5c0c-442c-9429-916003d36597 --- src/Unittests/unittests_decimater.hh | 47 --------------------- src/Unittests/unittests_mc_decimater.hh | 48 --------------------- src/Unittests/unittests_mixed_decimater.hh | 49 ---------------------- 3 files changed, 144 deletions(-) diff --git a/src/Unittests/unittests_decimater.hh b/src/Unittests/unittests_decimater.hh index 7da994c2..2bc6ca03 100644 --- a/src/Unittests/unittests_decimater.hh +++ b/src/Unittests/unittests_decimater.hh @@ -59,52 +59,5 @@ TEST_F(OpenMeshDecimater, DecimateMesh) { EXPECT_EQ(9996u, mesh_.n_faces()) << "The number of faces after decimation is not correct!"; } -TEST_F(OpenMeshDecimater, DecimateMeshToFaceVerticesLimit) { - - bool ok = OpenMesh::IO::read_mesh(mesh_, "cube1.off"); - - ASSERT_TRUE(ok); - - typedef OpenMesh::Decimater::DecimaterT< Mesh > Decimater; - typedef OpenMesh::Decimater::ModQuadricT< Mesh >::Handle HModQuadric; - typedef OpenMesh::Decimater::ModNormalFlippingT< Mesh >::Handle HModNormal; - - Decimater decimaterDBG(mesh_); - HModQuadric hModQuadricDBG; - decimaterDBG.add( hModQuadricDBG ); - decimaterDBG.initialize(); - int removedVertices = 0; - removedVertices = decimaterDBG.decimate_to_faces(5000, 8000); - decimaterDBG.mesh().garbage_collection(); - - EXPECT_EQ(2526, removedVertices) << "The number of remove vertices is not correct!"; - EXPECT_EQ(5000u, mesh_.n_vertices()) << "The number of vertices after decimation is not correct!"; - EXPECT_EQ(14994u, mesh_.n_edges()) << "The number of edges after decimation is not correct!"; - EXPECT_EQ(9996u, mesh_.n_faces()) << "The number of faces after decimation is not correct!"; -} - -TEST_F(OpenMeshDecimater, DecimateMeshToFaceFaceLimit) { - - bool ok = OpenMesh::IO::read_mesh(mesh_, "cube1.off"); - - ASSERT_TRUE(ok); - - typedef OpenMesh::Decimater::DecimaterT< Mesh > Decimater; - typedef OpenMesh::Decimater::ModQuadricT< Mesh >::Handle HModQuadric; - typedef OpenMesh::Decimater::ModNormalFlippingT< Mesh >::Handle HModNormal; - - Decimater decimaterDBG(mesh_); - HModQuadric hModQuadricDBG; - decimaterDBG.add( hModQuadricDBG ); - decimaterDBG.initialize(); - int removedVertices = 0; - removedVertices = decimaterDBG.decimate_to_faces(4500, 9996); - decimaterDBG.mesh().garbage_collection(); - - EXPECT_EQ(2526, removedVertices) << "The number of remove vertices is not correct!"; - EXPECT_EQ(5000u, mesh_.n_vertices()) << "The number of vertices after decimation is not correct!"; - EXPECT_EQ(14994u, mesh_.n_edges()) << "The number of edges after decimation is not correct!"; - EXPECT_EQ(9996u, mesh_.n_faces()) << "The number of faces after decimation is not correct!"; -} #endif // INCLUDE GUARD diff --git a/src/Unittests/unittests_mc_decimater.hh b/src/Unittests/unittests_mc_decimater.hh index 3f7e7d06..9cc89e78 100644 --- a/src/Unittests/unittests_mc_decimater.hh +++ b/src/Unittests/unittests_mc_decimater.hh @@ -59,52 +59,4 @@ TEST_F(OpenMeshMultipleChoiceDecimater, DecimateMesh) { EXPECT_EQ(9996u, mesh_.n_faces()) << "The number of faces after decimation is not correct!"; } -TEST_F(OpenMeshMultipleChoiceDecimater, DecimateMeshToFaceVerticesLimit) { - - bool ok = OpenMesh::IO::read_mesh(mesh_, "cube1.off"); - - ASSERT_TRUE(ok); - - typedef OpenMesh::Decimater::McDecimaterT< Mesh > Decimater; - typedef OpenMesh::Decimater::ModQuadricT< Mesh >::Handle HModQuadric; - typedef OpenMesh::Decimater::ModNormalFlippingT< Mesh >::Handle HModNormal; - - Decimater decimaterDBG(mesh_); - HModQuadric hModQuadricDBG; - decimaterDBG.add( hModQuadricDBG ); - decimaterDBG.initialize(); - int removedVertices = 0; - removedVertices = decimaterDBG.decimate_to_faces(5000, 8000); - decimaterDBG.mesh().garbage_collection(); - - EXPECT_EQ(2526, removedVertices) << "The number of remove vertices is not correct!"; - EXPECT_EQ(5000u, mesh_.n_vertices()) << "The number of vertices after decimation is not correct!"; - EXPECT_EQ(14994u, mesh_.n_edges()) << "The number of edges after decimation is not correct!"; - EXPECT_EQ(9996u, mesh_.n_faces()) << "The number of faces after decimation is not correct!"; -} - -TEST_F(OpenMeshMultipleChoiceDecimater, DecimateMeshToFaceFaceLimit) { - - bool ok = OpenMesh::IO::read_mesh(mesh_, "cube1.off"); - - ASSERT_TRUE(ok); - - typedef OpenMesh::Decimater::McDecimaterT< Mesh > Decimater; - typedef OpenMesh::Decimater::ModQuadricT< Mesh >::Handle HModQuadric; - typedef OpenMesh::Decimater::ModNormalFlippingT< Mesh >::Handle HModNormal; - - Decimater decimaterDBG(mesh_); - HModQuadric hModQuadricDBG; - decimaterDBG.add( hModQuadricDBG ); - decimaterDBG.initialize(); - int removedVertices = 0; - removedVertices = decimaterDBG.decimate_to_faces(4500, 9996); - decimaterDBG.mesh().garbage_collection(); - - EXPECT_EQ(2526, removedVertices) << "The number of remove vertices is not correct!"; - EXPECT_EQ(5000u, mesh_.n_vertices()) << "The number of vertices after decimation is not correct!"; - EXPECT_EQ(14994u, mesh_.n_edges()) << "The number of edges after decimation is not correct!"; - EXPECT_EQ(9996u, mesh_.n_faces()) << "The number of faces after decimation is not correct!"; -} - #endif // INCLUDE GUARD diff --git a/src/Unittests/unittests_mixed_decimater.hh b/src/Unittests/unittests_mixed_decimater.hh index 6846337d..1c05c01a 100644 --- a/src/Unittests/unittests_mixed_decimater.hh +++ b/src/Unittests/unittests_mixed_decimater.hh @@ -58,53 +58,4 @@ TEST_F(OpenMeshMixedDecimater, DecimateMesh80PercentMc) { EXPECT_EQ(14994u, mesh_.n_edges()) << "The number of edges after decimation is not correct!"; EXPECT_EQ(9996u, mesh_.n_faces()) << "The number of faces after decimation is not correct!"; } - -TEST_F(OpenMeshMixedDecimater, DecimateMeshToFaceVerticesLimit) { - - bool ok = OpenMesh::IO::read_mesh(mesh_, "cube1.off"); - - ASSERT_TRUE(ok); - - typedef OpenMesh::Decimater::MixedDecimaterT< Mesh > Decimater; - typedef OpenMesh::Decimater::ModQuadricT< Mesh >::Handle HModQuadric; - typedef OpenMesh::Decimater::ModNormalFlippingT< Mesh >::Handle HModNormal; - - Decimater decimaterDBG(mesh_); - HModQuadric hModQuadricDBG; - decimaterDBG.add( hModQuadricDBG ); - decimaterDBG.initialize(); - int removedVertices = 0; - removedVertices = decimaterDBG.decimate_to_faces(5000, 8000, 0.7); - decimaterDBG.mesh().garbage_collection(); - - EXPECT_EQ(2526, removedVertices) << "The number of remove vertices is not correct!"; - EXPECT_EQ(5000u, mesh_.n_vertices()) << "The number of vertices after decimation is not correct!"; - EXPECT_EQ(14994u, mesh_.n_edges()) << "The number of edges after decimation is not correct!"; - EXPECT_EQ(9996u, mesh_.n_faces()) << "The number of faces after decimation is not correct!"; -} - -TEST_F(OpenMeshMixedDecimater, DecimateMeshToFaceFaceLimit) { - - bool ok = OpenMesh::IO::read_mesh(mesh_, "cube1.off"); - - ASSERT_TRUE(ok); - - typedef OpenMesh::Decimater::MixedDecimaterT< Mesh > Decimater; - typedef OpenMesh::Decimater::ModQuadricT< Mesh >::Handle HModQuadric; - typedef OpenMesh::Decimater::ModNormalFlippingT< Mesh >::Handle HModNormal; - - Decimater decimaterDBG(mesh_); - HModQuadric hModQuadricDBG; - decimaterDBG.add( hModQuadricDBG ); - decimaterDBG.initialize(); - int removedVertices = 0; - removedVertices = decimaterDBG.decimate_to_faces(4500, 9996, 0.7); - decimaterDBG.mesh().garbage_collection(); - - EXPECT_EQ(2526, removedVertices) << "The number of remove vertices is not correct!"; - EXPECT_EQ(5000u, mesh_.n_vertices()) << "The number of vertices after decimation is not correct!"; - EXPECT_EQ(14994u, mesh_.n_edges()) << "The number of edges after decimation is not correct!"; - EXPECT_EQ(9996u, mesh_.n_faces()) << "The number of faces after decimation is not correct!"; -} - #endif // INCLUDE GUARD