Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
unittests_iterators.cc
1 #include <gtest/gtest.h>
2
3 #include <Unittests/unittests_common.hh>
4
5 using namespace OpenVolumeMesh;
6
7 TEST_F(HexahedralMeshBase, HexVertexIterTest) {
8
9 generateHexahedralMesh(mesh_);
10
11 HexVertexIter hv_it = mesh_.hv_iter(CellHandle(0));
12
13 EXPECT_TRUE(hv_it.valid());
14
15 EXPECT_EQ(VertexHandle(0), *hv_it); ++hv_it;
16 EXPECT_EQ(VertexHandle(1), *hv_it); ++hv_it;
17 EXPECT_EQ(VertexHandle(2), *hv_it); ++hv_it;
18 EXPECT_EQ(VertexHandle(3), *hv_it); ++hv_it;
19 EXPECT_EQ(VertexHandle(4), *hv_it); ++hv_it;
20 EXPECT_EQ(VertexHandle(7), *hv_it); ++hv_it;
21 EXPECT_EQ(VertexHandle(6), *hv_it); ++hv_it;
22 EXPECT_EQ(VertexHandle(5), *hv_it);
23 }
24
OpenVolumeMesh::CellHandle
Definition: OpenVolumeMeshHandle.hh:101
OpenVolumeMesh::HexVertexIter
Iterate over all vertices of a hexahedron in a specific order.
Definition: HexahedralMeshIterators.hh:177
OpenVolumeMesh::VertexHandle
Definition: OpenVolumeMeshHandle.hh:98
OpenVolumeMesh
Definition: ColorAttrib.hh:53
HexahedralMeshBase
Definition: unittests_common.hh:54