- fix crash, if obj file contains degenerated faces
- added unittest for this case closes #2382 git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1236 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -47,6 +47,22 @@ TEST_F(OpenMeshReadWriteOBJ, LoadSimpleOBJ) {
|
||||
EXPECT_EQ(12u , mesh_.n_faces()) << "The number of loaded faces is not correct!";
|
||||
}
|
||||
|
||||
/*
|
||||
* Just load a obj file of a cube with degenerated faces
|
||||
*/
|
||||
TEST_F(OpenMeshReadWriteOBJ, LoadDegeneratedOBJ) {
|
||||
|
||||
mesh_.clear();
|
||||
|
||||
bool ok = OpenMesh::IO::read_mesh(mesh_, "cube-minimal.obj");
|
||||
|
||||
EXPECT_TRUE(ok) << "Unable to load cube-minimal.obj";
|
||||
|
||||
EXPECT_EQ(8u , mesh_.n_vertices()) << "The number of loaded vertices is not correct!";
|
||||
EXPECT_EQ(18u , mesh_.n_edges()) << "The number of loaded edges is not correct!";
|
||||
EXPECT_EQ(12u , mesh_.n_faces()) << "The number of loaded faces is not correct!";
|
||||
}
|
||||
|
||||
/*
|
||||
* Just load a obj file of a cube and checks the halfedge and vertex normals
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user