OpenMesh: Unittests/unittests_common.hh Source File

| OpenMesh

unittests_common.hh
1 #ifndef INCLUDE_UNITTESTS_COMMON_HH
2 #define INCLUDE_UNITTESTS_COMMON_HH
3
4 #include <gtest/gtest.h>
5 #include <OpenMesh/Core/IO/MeshIO.hh>
6
7 #include <OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh>
8 #include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
9
10 #ifdef TEST_CUSTOM_TRAITS
11 #include <Unittests/unittests_common_customtraits.hh>
12 #else
13 struct CustomTraits : public OpenMesh::DefaultTraits {
14 };
15 #endif
16
17
18 typedef OpenMesh::TriMesh_ArrayKernelT<CustomTraits> Mesh;
19
20 typedef OpenMesh::PolyMesh_ArrayKernelT<CustomTraits> PolyMesh;
21
22 /*
23 * Simple test setting.
24 */
25
26 class OpenMeshBase : public testing::Test {
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 // This member will be accessible in all tests
43 Mesh mesh_;
44 };
45
46 /*
47 * Simple test setting.
48 */
49
50 class OpenMeshBasePoly : public testing::Test {
51
52 protected:
53
54 // This function is called before each test is run
55 virtual void SetUp() {
56
57 // Do some initial stuff with the member data here...
58 }
59
60 // This function is called after all tests are through
61 virtual void TearDown() {
62
63 // Do some final stuff with the member data here...
64 }
65
66 // This member will be accessible in all tests
67 PolyMesh mesh_;
68 };
69
70
71
72 #endif // INCLUDE GUARD
CustomTraits
Definition: unittests_common.hh:13
OpenMeshBasePoly
Definition: unittests_common.hh:50
OpenMesh::TriMesh_ArrayKernelT
Triangle mesh based on the ArrayKernel.
Definition: PolyMesh_ArrayKernelT.hh:78
OpenMesh::PolyMesh_ArrayKernelT
Polygonal mesh based on the ArrayKernel.
Definition: PolyMesh_ArrayKernelT.hh:99
OpenMesh::DefaultTraits
Base class for all traits.
Definition: Traits.hh:126
OpenMeshBase
Definition: unittests_common.hh:26