unittests_common.hh 1.47 KB
Newer Older
Jan Möbius's avatar
Jan Möbius committed
1 2 3 4 5 6 7
#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>
8
#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
Jan Möbius's avatar
Jan Möbius committed
9 10 11 12 13 14

struct CustomTraits : public OpenMesh::DefaultTraits {
};

typedef OpenMesh::TriMesh_ArrayKernelT<CustomTraits> Mesh;

15 16
typedef OpenMesh::PolyMesh_ArrayKernelT<CustomTraits> PolyMesh;

Jan Möbius's avatar
Jan Möbius committed
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
/*
 * 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_;  
};

41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
/*
 * 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_;  
};



Jan Möbius's avatar
Jan Möbius committed
67
#endif // INCLUDE GUARD