Skip to content

Instantly share code, notes, and snippets.

@bo0ts
Created December 20, 2012 10:19
Show Gist options
  • Save bo0ts/4344440 to your computer and use it in GitHub Desktop.
Save bo0ts/4344440 to your computer and use it in GitHub Desktop.
diff --git a/Triangulation_2/test/Triangulation_2/test_infinite_vertex_coordinates_for_T2.cpp b/Triangulation_2/test/Triangulation_2/test_infinite_vertex_coordinates_for_T2.cpp
index 88b9deb..6857428 100644
--- a/Triangulation_2/test/Triangulation_2/test_infinite_vertex_coordinates_for_T2.cpp
+++ b/Triangulation_2/test/Triangulation_2/test_infinite_vertex_coordinates_for_T2.cpp
@@ -3,19 +3,20 @@
#include <CGAL/Regular_triangulation_euclidean_traits_2.h>
#include <CGAL/_test_types.h>
#include <CGAL/Simple_cartesian.h>
+#include <boost/math/special_functions/fpclassify.hpp>
#include <cmath>
typedef CGAL::Regular_triangulation_euclidean_traits_2<TestK> Regular_TestK;
int main() {
CGAL::Triangulation_2<TestK> t1;
- assert(std::isnan(t1.infinite_vertex()->point().x()));
+ assert((boost::math::isnan)(t1.infinite_vertex()->point().x()));
CGAL::Delaunay_triangulation_2<TestK> t2;
- assert(std::isnan(t2.infinite_vertex()->point().y()));
+ assert((boost::math::isnan)(t2.infinite_vertex()->point().y()));
CGAL::Regular_triangulation_2<Regular_TestK> t3;
- assert(std::isnan(t3.infinite_vertex()->point().x()));
+ assert((boost::math::isnan)(t3.infinite_vertex()->point().x()));
CGAL::Triangulation_2<Exact_kernel> t4;
assert(!std::numeric_limits<Exact_kernel::FT>::has_quiet_NaN);
@@ -24,13 +25,13 @@ int main() {
CGAL::Delaunay_triangulation_2<CGAL::Simple_cartesian<double> > t6(t5);
CGAL::Delaunay_triangulation_2<CGAL::Simple_cartesian<double> > t7;
t7 = t6;
- assert(std::isnan(t5.infinite_vertex()->point().x()));
- assert(std::isnan(t6.infinite_vertex()->point().y()));
- assert(std::isnan(t6.infinite_vertex()->point().x()));
- assert(std::isnan(t7.infinite_vertex()->point().y()));
+ assert((boost::math::isnan)(t5.infinite_vertex()->point().x()));
+ assert((boost::math::isnan)(t6.infinite_vertex()->point().y()));
+ assert((boost::math::isnan)(t6.infinite_vertex()->point().x()));
+ assert((boost::math::isnan)(t7.infinite_vertex()->point().y()));
CGAL::Delaunay_triangulation_2<CGAL::Simple_cartesian<double> > t8;
- assert(std::isnan(t8.infinite_vertex()->point().x()));
+ assert((boost::math::isnan)(t8.infinite_vertex()->point().x()));
t8.swap(t7);
- assert(std::isnan(t7.infinite_vertex()->point().x()));
- assert(std::isnan(t8.infinite_vertex()->point().y()));
+ assert((boost::math::isnan)(t7.infinite_vertex()->point().x()));
+ assert((boost::math::isnan)(t8.infinite_vertex()->point().y()));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment