Merge pull request #441 from maxGimeno/CGAL_Assert_fix-GF

Cgal assert fix gf
This commit is contained in:
Sebastien Loriot 2015-10-29 13:10:26 +01:00
commit 00c85ba0a9
4 changed files with 6 additions and 5 deletions

View File

@ -25,6 +25,7 @@
#endif
#include <CGAL/gl.h>
#include <CGAL/basic.h>
namespace CGAL {
@ -221,7 +222,7 @@ Image_3::read_vtk_image_data(vtkImageData* vtk_image)
std::cerr << "GetNumberOfTuples()=" << vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples()
<< "\nimage->size()=" << dims[0]*dims[1]*dims[2]
<< "\nwdim=" << image->wdim << '\n';
assert(vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples() == dims[0]*dims[1]*dims[2]);
CGAL_assertion(vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples() == dims[0]*dims[1]*dims[2]);
vtk_image->GetPointData()->GetScalars()->ExportToVoidPointer(image->data);
return this->private_read(image);

View File

@ -295,7 +295,7 @@ namespace CGAL {
boost::property_tree::ptree cmap_save_darts
(const CMap& amap, std::map<typename CMap::Dart_const_handle, typename CMap::size_type>& myDarts)
{
assert( myDarts.empty() );
CGAL_assertion( myDarts.empty() );
// First we numbered each dart by using the std::map.
typename CMap::Dart_range::const_iterator it(amap.darts().begin());

View File

@ -70,7 +70,7 @@ void test_root_of_traits(){
Root_of_2 rr = ftd(CGAL::make_root_of_2(T(1),T(0),T(-2),false)); //+sqrt(2)
assert(r == rl);
assert(rl != rr);
assert( ftd(r * Root_of_1(2)) == ftd(CGAL::make_root_of_2(T(0),T(-2),T(2))));
assert( ftd(r * T(2)) == ftd(CGAL::make_root_of_2(T(0),T(-2),T(2))));
}
@ -110,7 +110,7 @@ void test_root_of_traits(){
{
std::vector<Root_of_2> roots;
CGAL::compute_roots_of_2(T(1),T(0),T(-2),std::back_inserter(roots));
assert(roots.size()==2);
assert(roots.size()==2);
assert(roots[0]==-CGAL::make_sqrt(T(2)) || is_not_exact );
assert(roots[1]== CGAL::make_sqrt(T(2)) || is_not_exact );
}

View File

@ -712,7 +712,7 @@ detect_bubbles(FT border_angle) {
{
unsigned int i0 = (i + j + 1)%4;
unsigned int i1 = (i + (j+1)%3 + 1)%4;
assert (i0 != i && i1 != i);
CGAL_assertion (i0 != i && i1 != i);
Edge edge (c, i0, i1);
if (_shape->classify (edge) != Shape::REGULAR)