unittests_faceless_mesh.cc 1.89 KB
Newer Older
1 2 3 4 5

#include <gtest/gtest.h>
#include <Unittests/unittests_common.hh>
#include <iostream>

6 7
namespace {

8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 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 67
class OpenMeshFacelessMesh : public OpenMeshBase {

    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...
        }

    // Member already defined in OpenMeshBase
    //Mesh mesh_;  
};

///*
// * ====================================================================
// * Define tests below
// * ====================================================================
// */
//
// */
//TEST_F(OpenMeshFacelessMesh, TestCirculatorsAndIterators) {
//
// This setup is not supported by OpenMesh, we keep this test, if somebody creates
// a connectivity class for faceless graph setup.
////  mesh_.clear();
////
////  // Add some vertices
////  Mesh::VertexHandle vhandle[4];
////
////  vhandle[0] = mesh_.add_vertex(Mesh::Point(0, 0, 0));
////  vhandle[1] = mesh_.add_vertex(Mesh::Point(0, 1, 0));
////  vhandle[2] = mesh_.add_vertex(Mesh::Point(1, 1, 0));
////  vhandle[3] = mesh_.add_vertex(Mesh::Point(1, 0, 0));
////
////
////  Mesh::HalfedgeHandle heh00 = mesh_.new_edge(vhandle[0], vhandle[1]);
////  Mesh::HalfedgeHandle heh10 = mesh_.new_edge(vhandle[1], vhandle[2]);
////
////
////  // Halfedge Handles do not work in this setting!
////  Mesh::HalfedgeHandle invalid_heh = mesh_.next_halfedge_handle(heh00);
//
////  //second he circulators does not work
////
////  auto invalid_heh_circ = mesh_.cvoh_iter(vh1);
////
////  //third, and most important, split_edge fails
////
////  Mesh::VertexHandle vh12 = mesh_.new_vertex(Mesh::Point(1.5, 0, 0));
////  mesh_.split_edge(mesh_.edge_handle(heh10), vh12); //runtime error
//
//}

68
}