diff --git a/test/algorithms/set_operations/difference/difference_areal_linear.cpp b/test/algorithms/set_operations/difference/difference_areal_linear.cpp index f875b7fbc..f29d78054 100644 --- a/test/algorithms/set_operations/difference/difference_areal_linear.cpp +++ b/test/algorithms/set_operations/difference/difference_areal_linear.cpp @@ -3,8 +3,8 @@ // Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands. -// This file was modified by Oracle on 2015. -// Modifications copyright (c) 2015, Oracle and/or its affiliates. +// This file was modified by Oracle on 2015, 2017. +// Modifications copyright (c) 2015-2017, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -203,7 +203,6 @@ void test_areal_linear() "POLYGON((5 5,15 15,15 5,5 5))", 1, 2, 6 * std::sqrt(2.0)); -#ifdef BOOST_GEOMETRY_ENABLE_FAILING_TESTS test_one_lp("case37_1", "LINESTRING(1 1,2 2)", "POLYGON((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))", @@ -213,7 +212,26 @@ void test_areal_linear() "LINESTRING(1 1,2 2,3 3)", "POLYGON((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))", 1, 2, std::sqrt(2.0)); -#endif + + test_one_lp("case38", + "LINESTRING(0 0,1 1,2 2,3 3)", + "POLYGON((0 0,0 9,9 9,9 0,0 0),(0 0,2 1,2 2,1 2,0 0))", + 1, 3, 2 * std::sqrt(2.0)); + + // several linestrings are in the output, the result is geometrically correct + // still single linestring could be generated + test_one_lp("case39", + "LINESTRING(0 0,1 1,2 2,3 3)", + "POLYGON((0 0,0 9,9 9,9 0,0 0),(0 0,2 1,2 2,1 2,0 0),(2 2,3 2,3 3,2 3,2 2))", + 2, 5, 3 * std::sqrt(2.0)); + test_one_lp("case40", + "LINESTRING(0 0,1 1,2 2,4 4)", + "POLYGON((0 0,0 9,9 9,9 0,0 0),(0 0,2 1,2 2,1 2,0 0),(2 2,3 2,3 3,2 3,2 2))", + 2, 5, 3 * std::sqrt(2.0)); + test_one_lp("case41", + "LINESTRING(0 0,1 1,2 2,9 9)", + "POLYGON((0 0,0 9,9 9,9 0,0 0),(0 0,2 1,2 2,1 2,0 0),(2 2,3 2,3 3,2 3,2 2),(7 7,8 7,9 9,7 8,7 7))", + 3, 7, 5 * std::sqrt(2.0)); } template