Commit ebbd41aa authored by Jan Möbius's avatar Jan Möbius

Added unittest for simple ply with encoding problems

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@462 fdac6126-5c0c-442c-9429-916003d36597
parent f76c9075
ply
format ascii 1.0
element vertex 10
property float x
property float y
property float z
property float nx
property float ny
property float nz
property uchar diffuse_red
property uchar diffuse_green
property uchar diffuse_blue
end_header
-0.774382 0.446049 -2.05893 0.386853 -0.197849 0.900667 76 52 41
-0.762621 0.446872 -2.06314 0.0431574 -0.643148 0.764525 77 58 46
-0.769175 0.436518 -2.0635 0.257818 -0.156835 0.95338 121 97 88
-1.07959 0.381204 -1.95964 0.948941 -0.303889 0.0846349 126 117 97
-1.05841 0.398189 -1.98803 0.230719 0.341539 0.911109 103 90 86
-1.04905 0.388091 -1.97944 -0.0175732 -0.131422 0.991171 72 62 70
-0.784233 0.428294 -2.06324 -0.0394355 0.268678 0.962422 167 93 80
-0.773624 0.429338 -2.06101 0.373176 -0.105125 0.921785 172 135 126
-0.779554 0.433575 -2.06273 -0.0113203 -0.243327 0.969878 165 102 90
-0.764714 0.428742 -2.06643 0.31292 -0.294884 0.902843 139 119 109
......@@ -46,4 +46,22 @@ TEST_F(OpenMeshLoader, LoadSimpleOFFFile) {
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
* the right number of entities has been loaded.
*/
TEST_F(OpenMeshLoader, LoadSimplePointPLYFileWithEncodingProblems) {
bool ok = OpenMesh::IO::read_mesh(mesh_, "pointCloudBadEncoding.ply");
EXPECT_TRUE(ok);
EXPECT_EQ(10, mesh_.n_vertices()) << "The number of loaded vertices is not correct!";
EXPECT_EQ(0, mesh_.n_edges()) << "The number of loaded edges is not correct!";
EXPECT_EQ(0, mesh_.n_faces()) << "The number of loaded faces is not correct!";
}
#endif // INCLUDE GUARD
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