From a477775edea6e680169c8a7ac4d0f168b7fed1a3 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Tue, 14 Jun 2022 00:52:11 +0200 Subject: [PATCH] [test][relate][within] Enable previously failing test cases Add failing L/L case unrelated to GC support --- test/algorithms/relate/relate_gc.cpp | 29 ++++++++++++++++--- .../relate/relate_linear_linear.cpp | 15 ++++++++++ test/algorithms/within/within_gc.cpp | 5 ++-- 3 files changed, 42 insertions(+), 7 deletions(-) diff --git a/test/algorithms/relate/relate_gc.cpp b/test/algorithms/relate/relate_gc.cpp index 18c4f103b..5471c6c04 100644 --- a/test/algorithms/relate/relate_gc.cpp +++ b/test/algorithms/relate/relate_gc.cpp @@ -24,7 +24,6 @@ using var_t = boost::variant; //using var_t = boost::variant2::variant; using gc_t = bg::model::geometry_collection; - void test_gc_gc() { test_geometry("GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,10 0,0 0)), LINESTRING(5 10, 10 11, 15 10))", @@ -60,10 +59,32 @@ void test_gc_gc() "GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)), LINESTRING(1 1, 7 7))", "10F0FF212"); - // ERROR IN RELATE - /*test_geometry("GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)), LINESTRING(1 4, 4 1))", + test_geometry("GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)), LINESTRING(1 4, 4 1))", "GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)), LINESTRING(1 1, 6 6))", - "2FFF1F102");*/ + "2FFF1F102"); + + test_geometry("GEOMETRYCOLLECTION(LINESTRING(0 0,5 5))", + "GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)), LINESTRING(1 1, 6 6))", + "1FFF0F212"); + + test_geometry("GEOMETRYCOLLECTION(LINESTRING(0 0,5 5), POINT(6 6))", + "GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)), POINT(6 6))", + "1FFF0F212"); + + // Error in detail::relate::linear_linear +#ifdef BOOST_GEOMETRY_TEST_ENABLE_FAILING + test_geometry("GEOMETRYCOLLECTION(LINESTRING(0 0,5 5))", + "GEOMETRYCOLLECTION(LINESTRING(0 0,5 5), LINESTRING(5 5, 6 6))", + "1FF00F102"); +#endif + + test_geometry("GEOMETRYCOLLECTION(LINESTRING(0 0,5 5))", + "GEOMETRYCOLLECTION(LINESTRING(0 0,6 6))", + "1FF00F102"); + + test_geometry("GEOMETRYCOLLECTION(POLYGON((0 0,0 10,9 10,9 0,0 0)), LINESTRING(5 10, 10 11, 15 10))", + "GEOMETRYCOLLECTION(POLYGON((10 0,10 10,20 10,20 0,10 0)), POINT(15 5))", + "FF2F01212"); } void test_g_gc() diff --git a/test/algorithms/relate/relate_linear_linear.cpp b/test/algorithms/relate/relate_linear_linear.cpp index 772ce1ec3..9e955faa5 100644 --- a/test/algorithms/relate/relate_linear_linear.cpp +++ b/test/algorithms/relate/relate_linear_linear.cpp @@ -376,6 +376,21 @@ void test_linestring_multi_linestring() test_geometry("LINESTRING(5 5,4 4)", "MULTILINESTRING((5 0,5 5,5 10))", "FF10F0102"); + + test_geometry("LINESTRING(0 0,5 5)", + "MULTILINESTRING((0 0,5 5),(5 5,6 6))", + "1FF00F102"); +#ifdef BOOST_GEOMETRY_TEST_ENABLE_FAILING + test_geometry("LINESTRING(0 0,5 5)", + "MULTILINESTRING((5 5,6 6),(0 0,5 5))", + "1FF00F102"); +#endif + test_geometry("LINESTRING(0 0,5 5)", + "MULTILINESTRING((6 6,5 5),(0 0,5 5))", + "1FF00F102"); + test_geometry("LINESTRING(0 0,5 5)", + "MULTILINESTRING((6 6,5 5),(5 5,0 0))", + "1FF00F102"); } template diff --git a/test/algorithms/within/within_gc.cpp b/test/algorithms/within/within_gc.cpp index d0779d801..927460fea 100644 --- a/test/algorithms/within/within_gc.cpp +++ b/test/algorithms/within/within_gc.cpp @@ -29,10 +29,9 @@ void test_gc() test_geometry("GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)), LINESTRING(1 1, 6 6))", "GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)), LINESTRING(1 4, 4 1))", false); - // ERROR IN RELATE - /*test_geometry("GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)), LINESTRING(1 4, 4 1))", + test_geometry("GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)), LINESTRING(1 4, 4 1))", "GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)), LINESTRING(1 1, 6 6))", - true);*/ + true); test_geometry("GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)), LINESTRING(1 1, 6 6))", "GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)), LINESTRING(5 5, 6 6))", true);