Ejemplo n.º 1
0
/**
 * \brief Execute the unit tests of the HexGrid
 */
void execute_hex_grid_unit_tests() {
	test_neighbors(2);
	test_neighbors(3);
	test_neighbors(6);
	test_neighbors(11);

	test_load_save();

	debug("--> HexGrid Tests passed !\n");
}
Ejemplo n.º 2
0
void
test_coords_and_neighbors( const Triangul& T, const  typename
			   Triangul::Geom_traits::Point_3& p,
			   const typename Triangul::Geom_traits::Vector_3& n,
			   const typename  Triangul::Geom_traits::FT&
			   tolerance, const int& version )
{
  CGAL::Set_ieee_double_precision pfr;

  typedef std::pair<typename Triangul::Geom_traits::Point_3,
                    typename Triangul::Geom_traits::FT >    Point_coord_pair;

  std::vector<Point_coord_pair  >  coords;
  typename Triangul::Geom_traits::FT  norm;
  norm = test_coords(T, p, n,version, std::back_inserter(coords)).second;
  assert(test_norm( coords.begin(), coords.end(),norm));
  assert(test_barycenter(coords.begin(), coords.end(),norm,p,
			 tolerance));
  //All function testing surface neighbors are
  // grouped together:
  std::vector< typename Triangul::Geom_traits::Point_3 >  neighbors;
  test_neighbors(T, p, n,version, std::back_inserter(neighbors));
  assert(compare_neighbors(coords.begin(),
			   coords.end(),neighbors.begin(),
			   neighbors.end(), T.geom_traits()));
  //done
}