Commit 2abb9cba authored by Isaak Lim's avatar Isaak Lim
Browse files

added unittests for ascii and binary stl files

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@584 fdac6126-5c0c-442c-9429-916003d36597
parent a3c8369a
This diff is collapsed.
...@@ -49,6 +49,45 @@ TEST_F(OpenMeshLoader, LoadSimpleOFFFile) { ...@@ -49,6 +49,45 @@ TEST_F(OpenMeshLoader, LoadSimpleOFFFile) {
} }
/*
* Just load a simple mesh file in stla format and count whether
* the right number of entities has been loaded.
*/
TEST_F(OpenMeshLoader, LoadSimpleSTLFile) {
mesh_.clear();
bool ok = OpenMesh::IO::read_mesh(mesh_, "cube1.stl");
EXPECT_TRUE(ok);
EXPECT_EQ(7526, mesh_.n_vertices()) << "The number of loaded vertices is not correct!";
EXPECT_EQ(22572, mesh_.n_edges()) << "The number of loaded edges is not correct!";
EXPECT_EQ(15048, mesh_.n_faces()) << "The number of loaded faces is not correct!";
}
/*
* Just load a simple mesh file in stlb format and count whether
* the right number of entities has been loaded.
*/
TEST_F(OpenMeshLoader, LoadSimpleSTLBinaryFile) {
mesh_.clear();
bool ok = OpenMesh::IO::read_mesh(mesh_, "cube1Binary.stl");
EXPECT_TRUE(ok);
EXPECT_EQ(7526, mesh_.n_vertices()) << "The number of loaded vertices is not correct!";
EXPECT_EQ(22572, mesh_.n_edges()) << "The number of loaded edges is not correct!";
EXPECT_EQ(15048, mesh_.n_faces()) << "The number of loaded faces is not correct!";
}
/* /*
* Just load a point file in ply format and count whether * Just load a point file in ply format and count whether
* the right number of entities has been loaded. * the right number of entities has been loaded.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment