2011-09-01 10:33:58 +00:00
|
|
|
#ifndef INCLUDE_UNITTESTS_COMMON_HH
|
|
|
|
|
#define INCLUDE_UNITTESTS_COMMON_HH
|
|
|
|
|
|
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
|
#include <OpenMesh/Core/IO/MeshIO.hh>
|
|
|
|
|
|
|
|
|
|
#include <OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh>
|
2012-06-21 07:55:12 +00:00
|
|
|
#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
|
2011-09-01 10:33:58 +00:00
|
|
|
|
|
|
|
|
struct CustomTraits : public OpenMesh::DefaultTraits {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
typedef OpenMesh::TriMesh_ArrayKernelT<CustomTraits> Mesh;
|
|
|
|
|
|
2012-06-21 07:55:12 +00:00
|
|
|
typedef OpenMesh::PolyMesh_ArrayKernelT<CustomTraits> PolyMesh;
|
|
|
|
|
|
2011-09-01 10:33:58 +00:00
|
|
|
/*
|
|
|
|
|
* Simple test setting.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
class OpenMeshBase : public testing::Test {
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
// This function is called before each test is run
|
|
|
|
|
virtual void SetUp() {
|
|
|
|
|
|
|
|
|
|
// Do some initial stuff with the member data here...
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// This function is called after all tests are through
|
|
|
|
|
virtual void TearDown() {
|
|
|
|
|
|
|
|
|
|
// Do some final stuff with the member data here...
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// This member will be accessible in all tests
|
|
|
|
|
Mesh mesh_;
|
|
|
|
|
};
|
|
|
|
|
|
2012-06-21 07:55:12 +00:00
|
|
|
/*
|
|
|
|
|
* Simple test setting.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
class OpenMeshBasePoly : public testing::Test {
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
// This function is called before each test is run
|
|
|
|
|
virtual void SetUp() {
|
|
|
|
|
|
|
|
|
|
// Do some initial stuff with the member data here...
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// This function is called after all tests are through
|
|
|
|
|
virtual void TearDown() {
|
|
|
|
|
|
|
|
|
|
// Do some final stuff with the member data here...
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// This member will be accessible in all tests
|
|
|
|
|
PolyMesh mesh_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-01 10:33:58 +00:00
|
|
|
#endif // INCLUDE GUARD
|