Fix the testsuite of Constraint_hierarchy_2.

This commit is contained in:
Laurent Rineau 2010-03-11 09:41:11 +00:00
parent c2d00a4274
commit 1c9dd58b76
1 changed files with 13 additions and 3 deletions

View File

@ -1,7 +1,17 @@
#include <CGAL/Constraint_hierarchy_2.h>
class Vertex {
int i;
public:
int point() const {
return i;
}
Vertex(const int i) {
this->i = i;
}
};
typedef int Vh;
typedef Vertex* Vh;
typedef bool Data;
typedef CGAL::Constraint_hierarchy_2<Vh, Data> Hierarchy;
typedef Hierarchy::H_constraint H_constraint;
@ -19,7 +29,7 @@ void
_test_cls_hierarchy_2()
{
Vh v[10];
for(int i=0; i <10; i++) {v[i] = i;}
for(int i=0; i <10; i++) { v[i] = new Vertex(i);}
Hierarchy h;
h.insert_constraint(v[1],v[2]);