Developer Documentation
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
OpenMesh::TriMesh_ArrayKernelT< CustomTraits >
OpenMesh::DefaultTraits
Definition:
Traits.hh:121
OpenMeshBase
Definition:
unittests_common.hh:26
OpenMesh::PolyMesh_ArrayKernelT
Definition:
PolyMesh_ArrayKernelT.hh:94
PolyMesh
OpenMesh::PolyMesh_ArrayKernelT< PolyTraits > PolyMesh
Simple Name for Mesh.
Definition:
PolyMeshTypes.hh:84
CustomTraits
Definition:
BSP_test.cc:49
OpenMeshBasePoly
Definition:
unittests_common.hh:50
OpenFlipper
libs_required
OpenMesh
src
Unittests
unittests_common.hh
Generated on Tue Mar 5 2019 16:53:49 for Developer Documentation by
1.8.13