diff --git a/Segment_Delaunay_graph_2/test/Segment_Delaunay_graph_2/test_sdg_2_et.cpp b/Segment_Delaunay_graph_2/test/Segment_Delaunay_graph_2/test_sdg_2_et.cpp index 13b1668d707..322f9d468f2 100644 --- a/Segment_Delaunay_graph_2/test/Segment_Delaunay_graph_2/test_sdg_2_et.cpp +++ b/Segment_Delaunay_graph_2/test/Segment_Delaunay_graph_2/test_sdg_2_et.cpp @@ -5,7 +5,21 @@ #include // choose number type -#ifdef CGAL_USE_GMP + +// choose number type +#ifdef CGAL_USE_LEDA + +# include +typedef leda_rational exact_ring_t; +typedef leda_rational exact_field_t; + +namespace CGAL { +// needed for the drawing methods +leda_rational sqrt(const leda_rational& x) { + return leda_rational( CGAL::sqrt( CGAL::to_double(x) ) ); +} +} +#elif defined( CGAL_USE_GMP ) # include typedef CGAL::Gmpq exact_ring_t; diff --git a/Segment_Delaunay_graph_2/test/Segment_Delaunay_graph_2/test_sdg_hierarchy_2_et.cpp b/Segment_Delaunay_graph_2/test/Segment_Delaunay_graph_2/test_sdg_hierarchy_2_et.cpp index 30cf2507dce..b872a1261b3 100644 --- a/Segment_Delaunay_graph_2/test/Segment_Delaunay_graph_2/test_sdg_hierarchy_2_et.cpp +++ b/Segment_Delaunay_graph_2/test/Segment_Delaunay_graph_2/test_sdg_hierarchy_2_et.cpp @@ -5,7 +5,19 @@ #include // choose number type -#ifdef CGAL_USE_GMP +#ifdef CGAL_USE_LEDA + +# include +typedef leda_rational exact_ring_t; +typedef leda_rational exact_field_t; + +namespace CGAL { +// needed for the drawing methods +leda_rational sqrt(const leda_rational& x) { + return leda_rational( CGAL::sqrt( CGAL::to_double(x) ) ); +} +} +#elif defined( CGAL_USE_GMP ) # include typedef CGAL::Gmpq exact_ring_t;