Developer Documentation

unittests_mesh_type.cc
1 #include <gtest/gtest.h>
2
3 #include <Unittests/unittests_common.hh>
4
5
6 namespace {
7
8
9 class OpenMeshTypeTest_Poly : public OpenMeshBasePoly {
10
11 protected:
12
13 // This function is called before each test is run
14 virtual void SetUp() {
15
16 // Do some initial stuff with the member data here...
17 }
18
19 // This function is called after all tests are through
20 virtual void TearDown() {
21
22 // Do some final stuff with the member data here...
23 }
24 };
25
26 class OpenMeshTypeTest_Triangle : public OpenMeshBase {
27
28 protected:
29
30 // This function is called before each test is run
31 virtual void SetUp() {
32
33 // Do some initial stuff with the member data here...
34 }
35
36 // This function is called after all tests are through
37 virtual void TearDown() {
38
39 // Do some final stuff with the member data here...
40 }
41
42 };
43
44
45 /*
46 * ====================================================================
47 * Define tests below
48 * ====================================================================
49 */
50
51 TEST_F(OpenMeshTypeTest_Triangle, testTypeFunctions) {
52
53
54 EXPECT_TRUE(mesh_.is_trimesh()) << "Type Error!";
55 EXPECT_FALSE(mesh_.is_polymesh()) << "Type Error!";
56 }
57
58
59 TEST_F(OpenMeshTypeTest_Poly, testTypeFunctions) {
60
61
62 EXPECT_FALSE(mesh_.is_trimesh()) << "Type Error!";
63 EXPECT_TRUE(mesh_.is_polymesh()) << "Type Error!";
64 }
65
66
67 }
OpenMesh::TriMeshT::is_trimesh
static constexpr bool is_trimesh()
Determine whether this is a PolyMeshT or TriMeshT (This function does not check the per face vertex c...
Definition: TriMeshT.hh:104
OpenMeshBasePoly
Definition: unittests_common.hh:53
OpenMeshBase
Definition: unittests_common.hh:29
OpenMesh::TriMeshT::is_polymesh
static constexpr bool is_polymesh()
Determine whether this is a PolyMeshT or TriMeshT (This function does not check the per face vertex c...
Definition: TriMeshT.hh:103