From 6ef7cdae7c0a501d50524b329f34e738589bfd4d Mon Sep 17 00:00:00 2001 From: Sebastian Morr Date: Thu, 12 Jun 2014 18:37:51 +0200 Subject: [PATCH] Verify result of the new minkowski_sum_2 as well To allow compilation, remove the VC++ workaround, which yielded failing static assertions with clang and g++ in the new code. --- .../Minkowski_sum_2/test_Minkowski_sum.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Minkowski_sum_2/test/Minkowski_sum_2/test_Minkowski_sum.cpp b/Minkowski_sum_2/test/Minkowski_sum_2/test_Minkowski_sum.cpp index 94ebc923ecc..a8da859e14e 100644 --- a/Minkowski_sum_2/test/Minkowski_sum_2/test_Minkowski_sum.cpp +++ b/Minkowski_sum_2/test/Minkowski_sum_2/test_Minkowski_sum.cpp @@ -21,10 +21,7 @@ #include -// instead of -//typedef CGAL::Cartesian Kernel; -// workaround for VC++ -struct Kernel : public CGAL::Cartesian {}; +typedef CGAL::Cartesian Kernel; typedef Kernel::Point_2 Point_2; typedef Kernel::Segment_2 Segment_2; @@ -98,6 +95,19 @@ int main (int argc, char **argv) std::cout << "Using the convolution method ... "; sum_conv = minkowski_sum_2 (pgn1, pgn2); std::cout << "Done." << std::endl; + + Polygon_with_holes_2 sum_conv_new; + std::cout << "Using the reduced convolution method ... "; + sum_conv_new = minkowski_sum_2_new (pgn1, pgn2); + if (are_equal (sum_conv, sum_conv_new)) + { + std::cout << "OK." << std::endl; + } + else + { + std::cout << "ERROR (different result)." << std::endl; + return 1; + } // Define auxiliary polygon-decomposition objects. CGAL::Small_side_angle_bisector_decomposition_2 ssab_decomp;