diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2014-08-05 19:32:57 +0000 |
---|---|---|
committer | <> | 2014-10-07 10:01:33 +0000 |
commit | 1c3648bf5b7d17fcd4fe9bc95802b16fd9eee304 (patch) | |
tree | 03de66686a262696ec2ac408e62250dc1f0c01aa /libs/geometry/test/algorithms/test_reverse.hpp | |
parent | 8c4528713d907ee2cfd3bfcbbad272c749867f84 (diff) | |
download | boost-tarball-1c3648bf5b7d17fcd4fe9bc95802b16fd9eee304.tar.gz |
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_56_0.tar.bz2.boost_1_56_0
Diffstat (limited to 'libs/geometry/test/algorithms/test_reverse.hpp')
-rw-r--r-- | libs/geometry/test/algorithms/test_reverse.hpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/libs/geometry/test/algorithms/test_reverse.hpp b/libs/geometry/test/algorithms/test_reverse.hpp index 97e537f7b..101429251 100644 --- a/libs/geometry/test/algorithms/test_reverse.hpp +++ b/libs/geometry/test/algorithms/test_reverse.hpp @@ -1,4 +1,4 @@ -// Boost.Geometry (aka GGL, Generic Geometry Library) +// Boost.Geometry (aka GGL, Generic Geometry Library) // Unit Test // Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands. @@ -13,16 +13,13 @@ #include <geometry_test_common.hpp> #include <boost/geometry/algorithms/reverse.hpp> - #include <boost/geometry/io/wkt/wkt.hpp> +#include <boost/variant/variant.hpp> template <typename Geometry> -void test_geometry(std::string const& wkt, std::string const& expected) +void check_geometry(Geometry& geometry, std::string const& wkt, std::string const& expected) { - Geometry geometry; - - bg::read_wkt(wkt, geometry); bg::reverse(geometry); std::ostringstream out; @@ -34,5 +31,16 @@ void test_geometry(std::string const& wkt, std::string const& expected) << " got " << out.str()); } +template <typename Geometry> +void test_geometry(std::string const& wkt, std::string const& expected) +{ + Geometry geometry; + bg::read_wkt(wkt, geometry); + boost::variant<Geometry> v(geometry); + + check_geometry(geometry, wkt, expected); + check_geometry(v, wkt, expected); +} + #endif |