unittests_iterators.cc 662 Bytes
Newer Older
1
#include <gtest/gtest.h>
2

3
4
#include <Unittests/unittests_common.hh>

5
6
using namespace OpenVolumeMesh;

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
TEST_F(HexahedralMeshBase, HexVertexIterTest) {

    generateHexahedralMesh(mesh_);

    HexVertexIter hv_it = mesh_.hv_iter(CellHandle(0));

    EXPECT_TRUE(hv_it.valid());

    EXPECT_EQ(VertexHandle(0), *hv_it); ++hv_it;
    EXPECT_EQ(VertexHandle(1), *hv_it); ++hv_it;
    EXPECT_EQ(VertexHandle(2), *hv_it); ++hv_it;
    EXPECT_EQ(VertexHandle(3), *hv_it); ++hv_it;
    EXPECT_EQ(VertexHandle(4), *hv_it); ++hv_it;
    EXPECT_EQ(VertexHandle(7), *hv_it); ++hv_it;
    EXPECT_EQ(VertexHandle(6), *hv_it); ++hv_it;
    EXPECT_EQ(VertexHandle(5), *hv_it);
}
24