From 37533355fe87d01ea502ffa9fc1b53b9d96c824b Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 22 Mar 2013 16:05:46 +0100 Subject: [PATCH] also test leda if it is available --- .../Segment_Delaunay_graph_2/test_sdg_2_et.cpp | 16 +++++++++++++++- .../test_sdg_hierarchy_2_et.cpp | 14 +++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) 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;