Fixed the test-suite so it can run even if GMP is not installed.

This commit is contained in:
Ron Wein 2006-03-12 10:53:32 +00:00
parent a56b61093b
commit 33be9f003d
4 changed files with 72 additions and 25 deletions

View File

@ -1,22 +1,33 @@
#include <CGAL/basic.h>
#ifdef CGAL_USE_GMP
#include <CGAL/Gmpq.h>
typedef CGAL::Gmpq Number_type;
#else
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
#endif
#include <iostream>
#include <fstream>
#include <CGAL/Simple_cartesian.h> #include <CGAL/Simple_cartesian.h>
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
#include <CGAL/Gmpq.h>
#include <CGAL/Polygon_2.h> #include <CGAL/Polygon_2.h>
#include <CGAL/Polygon_with_holes_2.h> #include <CGAL/Polygon_with_holes_2.h>
#include <CGAL/Boolean_set_operations_2.h> #include <CGAL/Boolean_set_operations_2.h>
#include <CGAL/iterator.h>
#include <vector> #include <vector>
#include <iterator> #include <iterator>
#include <algorithm> #include <algorithm>
#include <CGAL/iterator.h>
#include <cstdlib> #include <cstdlib>
#include <iostream>
#include <fstream>
//typedef CGAL::Quotient<CGAL::MP_Float> Number_type; typedef CGAL::Simple_cartesian<Number_type> Kernel;
typedef CGAL::Gmpq Number_type;
typedef CGAL::Simple_cartesian<Number_type> Kernel;
typedef CGAL::Polygon_2<Kernel> Polygon_2; typedef CGAL::Polygon_2<Kernel> Polygon_2;
typedef CGAL::Polygon_with_holes_2<Kernel> Polygon_with_holes_2; typedef CGAL::Polygon_with_holes_2<Kernel> Polygon_with_holes_2;

View File

@ -1,21 +1,33 @@
#include <CGAL/basic.h>
#ifdef CGAL_USE_GMP
#include <CGAL/Gmpq.h>
typedef CGAL::Gmpq Number_type;
#else
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
#endif
#include <iostream>
#include <fstream>
#include <CGAL/Simple_cartesian.h> #include <CGAL/Simple_cartesian.h>
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
#include <CGAL/Polygon_2.h> #include <CGAL/Polygon_2.h>
#include <CGAL/Polygon_with_holes_2.h> #include <CGAL/Polygon_with_holes_2.h>
#include <CGAL/Boolean_set_operations_2.h> #include <CGAL/Boolean_set_operations_2.h>
#include <CGAL/iterator.h>
#include <vector> #include <vector>
#include <iterator> #include <iterator>
#include <algorithm> #include <algorithm>
#include <CGAL/iterator.h>
#include <cstdlib> #include <cstdlib>
#include <iostream>
#include <fstream>
typedef CGAL::Simple_cartesian<Number_type> Kernel;
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
typedef CGAL::Simple_cartesian<Number_type> Kernel;
typedef CGAL::Polygon_2<Kernel> Polygon_2; typedef CGAL::Polygon_2<Kernel> Polygon_2;
typedef CGAL::Polygon_with_holes_2<Kernel> Polygon_with_holes_2; typedef CGAL::Polygon_with_holes_2<Kernel> Polygon_with_holes_2;

View File

@ -1,3 +1,19 @@
#include <CGAL/basic.h>
#ifdef CGAL_USE_GMP
#include <CGAL/Gmpq.h>
typedef CGAL::Gmpq Number_type;
#else
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
#endif
#include <string> #include <string>
#include <CGAL/Simple_cartesian.h> #include <CGAL/Simple_cartesian.h>
@ -8,15 +24,11 @@
#include <CGAL/Arr_segment_traits_2.h> #include <CGAL/Arr_segment_traits_2.h>
#include <CGAL/Gps_traits_2.h> #include <CGAL/Gps_traits_2.h>
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
#include <CGAL/Boolean_set_operations_2.h> #include <CGAL/Boolean_set_operations_2.h>
#include <CGAL/General_polygon_set_2.h> #include <CGAL/General_polygon_set_2.h>
#include <CGAL/Polygon_set_2.h> #include <CGAL/Polygon_set_2.h>
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
typedef CGAL::Simple_cartesian<Number_type> Kernel; typedef CGAL::Simple_cartesian<Number_type> Kernel;
typedef CGAL::Polygon_2<Kernel> Polygon_2; typedef CGAL::Polygon_2<Kernel> Polygon_2;

View File

@ -1,3 +1,19 @@
#include <CGAL/basic.h>
#ifdef CGAL_USE_GMP
#include <CGAL/Gmpq.h>
typedef CGAL::Gmpq Number_type;
#else
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
#endif
#include <string> #include <string>
#include <CGAL/Simple_cartesian.h> #include <CGAL/Simple_cartesian.h>
@ -8,15 +24,11 @@
#include <CGAL/Arr_segment_traits_2.h> #include <CGAL/Arr_segment_traits_2.h>
#include <CGAL/Gps_traits_2.h> #include <CGAL/Gps_traits_2.h>
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
#include <CGAL/Boolean_set_operations_2.h> #include <CGAL/Boolean_set_operations_2.h>
#include <CGAL/General_polygon_set_2.h> #include <CGAL/General_polygon_set_2.h>
#include <CGAL/Polygon_set_2.h> #include <CGAL/Polygon_set_2.h>
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
typedef CGAL::Simple_cartesian<Number_type> Kernel; typedef CGAL::Simple_cartesian<Number_type> Kernel;
typedef CGAL::Polygon_2<Kernel> Polygon_2; typedef CGAL::Polygon_2<Kernel> Polygon_2;