+
+struct no_strategy {};
+
+template <typename Geometry1, typename Geometry2, typename Strategy>
+bool call_intersects(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ Strategy const& strategy)
+{
+ return bg::intersects(geometry1, geometry2, strategy);
+}
+
+template <typename Geometry1, typename Geometry2>
+bool call_intersects(Geometry1 const& geometry1,
+ Geometry2 const& geometry2,
+ no_strategy)
+{
+ return bg::intersects(geometry1, geometry2);
+}
+
+template <typename G1, typename G2, typename Strategy>
+void check_intersects(std::string const& wkt1,
+ std::string const& wkt2,
+ G1 const& g1,
+ G2 const& g2,
+ bool expected,
+ Strategy const& strategy)
+{
+ bool detected = call_intersects(g1, g2, strategy);
+
+ BOOST_CHECK_MESSAGE(detected == expected,
+ "intersects: " << wkt1
+ << " with " << wkt2
+ << " -> Expected: " << expected
+ << " detected: " << detected);
+}
+