diff --git a/include/boost/geometry/algorithms/expand.hpp b/include/boost/geometry/algorithms/expand.hpp index f29fd4a40..894ae7a62 100644 --- a/include/boost/geometry/algorithms/expand.hpp +++ b/include/boost/geometry/algorithms/expand.hpp @@ -3,6 +3,7 @@ // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. +// Copyright (c) 2014 Samuel Debionne, Grenoble, France. // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. @@ -336,7 +337,8 @@ inline void expand(Box& box, Geometry const& geometry, template inline void expand(Box& box, Geometry const& geometry) { - concept::check_concepts_and_equal_dimensions(); + concept::check(); + concept::check(); resolve_variant::expand::apply(box, geometry); } diff --git a/test/algorithms/expand.cpp b/test/algorithms/expand.cpp index a1322b87b..213e0b1d9 100644 --- a/test/algorithms/expand.cpp +++ b/test/algorithms/expand.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian) diff --git a/test/algorithms/test_expand.hpp b/test/algorithms/test_expand.hpp index 44581abf4..8f989397e 100644 --- a/test/algorithms/test_expand.hpp +++ b/test/algorithms/test_expand.hpp @@ -17,6 +17,16 @@ #include #include #include +#include + + +template +inline std::string to_dsv(const Box& box) +{ + std::ostringstream out; + out << bg::dsv(box, ",", "(", ")", ",", "", ""); + return out.str(); +} template @@ -29,10 +39,13 @@ void test_expand(Box& box, bg::expand(box, geometry); - std::ostringstream out; - out << bg::dsv(box, ",", "(", ")", ",", "", ""); + BOOST_CHECK_EQUAL(to_dsv(box), expected); - BOOST_CHECK_EQUAL(out.str(), expected); +#if !defined(GEOMETRY_TEST_DEBUG) + bg::expand(box, boost::variant(geometry)); + + BOOST_CHECK_EQUAL(to_dsv(box), expected); +#endif } template @@ -43,13 +56,15 @@ void test_expand_other_strategy(Box& box, Geometry geometry; bg::read_wkt(wkt, geometry); - bg::expand(box, geometry); - std::ostringstream out; - out << bg::dsv(box, ",", "(", ")", ",", "", ""); + BOOST_CHECK_EQUAL(to_dsv(box), expected); - BOOST_CHECK_EQUAL(out.str(), expected); +#if !defined(GEOMETRY_TEST_DEBUG) + bg::expand(box, boost::variant(geometry)); + + BOOST_CHECK_EQUAL(to_dsv(box), expected); +#endif }