diff --git a/src/Unittests/TestFiles/NonManifold.ovm b/src/Unittests/TestFiles/NonManifold.ovm new file mode 100644 index 0000000000000000000000000000000000000000..a5e770da2ebb56992af3b67b9c4432553660a836 --- /dev/null +++ b/src/Unittests/TestFiles/NonManifold.ovm @@ -0,0 +1,54 @@ +OVM +Vertices +12 +0 0 0 +1 0 0 +1 1 0 +0 1 0 +0 0 1 +1 0 1 +1 1 1 +0 1 1 +2 1 0 +2 1 1 +3 1 1 +-0.5 0.5 0.5 +Edges +20 +0 1 +1 2 +2 3 +3 0 +4 5 +5 6 +6 7 +7 4 +1 5 +4 0 +2 6 +7 3 +2 8 +8 9 +9 6 +9 10 +11 0 +11 3 +11 7 +4 11 +Faces +11 +4 0 2 4 6 +4 8 10 12 14 +4 16 10 21 3 +4 19 15 22 6 +4 0 16 9 18 +4 5 20 12 22 +4 24 26 28 21 +3 7 35 32 +3 23 37 34 +3 36 14 38 +3 18 33 39 +Polyhedra +2 +6 1 2 5 6 8 11 +5 15 17 19 21 7 diff --git a/src/Unittests/unittests_files.hh b/src/Unittests/unittests_files.hh index c8b23763b67f9bfb5b30a7cfcea596a834d7a738..4edd41de339cfa1260cff25dd189af35ce63af7a 100644 --- a/src/Unittests/unittests_files.hh +++ b/src/Unittests/unittests_files.hh @@ -18,6 +18,18 @@ TEST_F(PolyhedralMeshBase, LoadFile) { EXPECT_EQ(288u, mesh_.n_cells()); } +TEST_F(PolyhedralMeshBase, LoadNonManifoldMesh) { + + OpenVolumeMesh::IO::FileManager fileManager; + + ASSERT_TRUE(fileManager.readFile("NonManifold.ovm", mesh_)); + + EXPECT_EQ(12u, mesh_.n_vertices()); + EXPECT_EQ(20u, mesh_.n_edges()); + EXPECT_EQ(11u, mesh_.n_faces()); + EXPECT_EQ(2u, mesh_.n_cells()); +} + TEST_F(HexahedralMeshBase, LoadFile) { OpenVolumeMesh::IO::FileManager fileManager;