|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r67310 - in sandbox/geometry/libs/geometry/test: . util views
From: barend.gehrels_at_[hidden]
Date: 2010-12-18 16:40:30
Author: barendgehrels
Date: 2010-12-18 16:40:27 EST (Sat, 18 Dec 2010)
New Revision: 67310
URL: http://svn.boost.org/trac/boost/changeset/67310
Log:
Updates in test to reflect move of views from util to views
Added:
sandbox/geometry/libs/geometry/test/views/
sandbox/geometry/libs/geometry/test/views/Jamfile.v2 (contents, props changed)
sandbox/geometry/libs/geometry/test/views/closeable_view.cpp
- copied, changed from r67286, /sandbox/geometry/libs/geometry/test/util/closeable_view.cpp
sandbox/geometry/libs/geometry/test/views/closeable_view.vcproj
- copied unchanged from r67286, /sandbox/geometry/libs/geometry/test/util/closeable_view.vcproj
sandbox/geometry/libs/geometry/test/views/reversible_closeable.cpp
- copied, changed from r67286, /sandbox/geometry/libs/geometry/test/util/reversible_closeable.cpp
sandbox/geometry/libs/geometry/test/views/reversible_closeable.vcproj
- copied unchanged from r67286, /sandbox/geometry/libs/geometry/test/util/reversible_closeable.vcproj
sandbox/geometry/libs/geometry/test/views/reversible_view.cpp
- copied, changed from r67286, /sandbox/geometry/libs/geometry/test/util/reversible_view.cpp
sandbox/geometry/libs/geometry/test/views/reversible_view.vcproj
- copied unchanged from r67286, /sandbox/geometry/libs/geometry/test/util/reversible_view.vcproj
sandbox/geometry/libs/geometry/test/views/views.sln (contents, props changed)
Removed:
sandbox/geometry/libs/geometry/test/util/closeable_view.cpp
sandbox/geometry/libs/geometry/test/util/closeable_view.vcproj
sandbox/geometry/libs/geometry/test/util/reversible_closeable.cpp
sandbox/geometry/libs/geometry/test/util/reversible_closeable.vcproj
sandbox/geometry/libs/geometry/test/util/reversible_view.cpp
sandbox/geometry/libs/geometry/test/util/reversible_view.vcproj
Text files modified:
sandbox/geometry/libs/geometry/test/Jamfile.v2 | 1 +
sandbox/geometry/libs/geometry/test/util/Jamfile.v2 | 5 +----
sandbox/geometry/libs/geometry/test/util/util_tests.sln | 18 ------------------
sandbox/geometry/libs/geometry/test/views/closeable_view.cpp | 2 +-
sandbox/geometry/libs/geometry/test/views/reversible_closeable.cpp | 8 ++++----
sandbox/geometry/libs/geometry/test/views/reversible_view.cpp | 2 +-
6 files changed, 8 insertions(+), 28 deletions(-)
Modified: sandbox/geometry/libs/geometry/test/Jamfile.v2
==============================================================================
--- sandbox/geometry/libs/geometry/test/Jamfile.v2 (original)
+++ sandbox/geometry/libs/geometry/test/Jamfile.v2 2010-12-18 16:40:27 EST (Sat, 18 Dec 2010)
@@ -27,4 +27,5 @@
build-project strategies ;
build-project policies ;
build-project util ;
+build-project views ;
build-project multi ;
Modified: sandbox/geometry/libs/geometry/test/util/Jamfile.v2
==============================================================================
--- sandbox/geometry/libs/geometry/test/util/Jamfile.v2 (original)
+++ sandbox/geometry/libs/geometry/test/util/Jamfile.v2 2010-12-18 16:40:27 EST (Sat, 18 Dec 2010)
@@ -6,13 +6,10 @@
# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
-test-suite ggl-util
+test-suite boost-geometry-util
:
[ run copy.cpp ]
[ run for_each_coordinate.cpp ]
[ run select_most_precise.cpp ]
[ run write_dsv.cpp ]
- [ run reversible_view.cpp ]
- [ run closeable_view.cpp ]
- [ run reversible_closeable.cpp ]
;
Deleted: sandbox/geometry/libs/geometry/test/util/closeable_view.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/test/util/closeable_view.cpp 2010-12-18 16:40:27 EST (Sat, 18 Dec 2010)
+++ (empty file)
@@ -1,130 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library) test file
-//
-// Copyright Barend Gehrels 2010, Geodan, Amsterdam, the Netherlands
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <algorithm>
-#include <iterator>
-#include <sstream>
-#include <string>
-
-#include <geometry_test_common.hpp>
-
-#include <boost/geometry/util/closeable_view.hpp>
-
-#include <boost/geometry/extensions/gis/io/wkt/read_wkt.hpp>
-#include <boost/geometry/util/write_dsv.hpp>
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/geometries/adapted/tuple_cartesian.hpp>
-
-
-
-
-// The closeable view should also work on normal std:: containers
-void test_non_geometry()
-{
- typedef bg::closeable_view
- <
- std::vector<int> const, bg::open
- >::type view_type;
-
- std::vector<int> v;
- v.push_back(1);
- v.push_back(2);
- v.push_back(3);
-
- view_type view(v);
-
- typedef boost::range_iterator<view_type const>::type iterator;
- iterator it = boost::begin(view);
- iterator end = boost::end(view);
-
- std::ostringstream out;
- for ( ; it != end; ++it)
- {
- out << *it;
- }
- BOOST_CHECK_EQUAL(out.str(), "1231");
-
- // Check operators =, ++, --, +=, -=
- it = boost::begin(view);
- BOOST_CHECK_EQUAL(*it, 1);
- it += 2;
- BOOST_CHECK_EQUAL(*it, 3);
- it -= 2;
- BOOST_CHECK_EQUAL(*it, 1);
- it++;
- BOOST_CHECK_EQUAL(*it, 2);
- it--;
- BOOST_CHECK_EQUAL(*it, 1);
-
- // Also check them in the last regions
- it = boost::begin(view) + 3;
- BOOST_CHECK_EQUAL(*it, 1);
- it--;
- BOOST_CHECK_EQUAL(*it, 3);
- it++;
- BOOST_CHECK_EQUAL(*it, 1);
- it -= 2;
- BOOST_CHECK_EQUAL(*it, 2);
- it += 2;
- BOOST_CHECK_EQUAL(*it, 1);
-
- BOOST_CHECK_EQUAL(boost::size(view), 4);
-}
-
-
-template <bg::closure_selector Closure, typename Range>
-void test_optionally_closing(Range const& range, std::string const& expected)
-{
- typedef typename bg::closeable_view<Range const, Closure>::type view_type;
- typedef typename boost::range_iterator<view_type const>::type iterator;
-
- view_type view(range);
-
- bool first = true;
- std::ostringstream out;
- iterator end = boost::end(view);
- for (iterator it = boost::begin(view); it != end; ++it, first = false)
- {
- out << (first ? "" : " ") << bg::dsv(*it);
- }
- BOOST_CHECK_EQUAL(out.str(), expected);
-}
-
-
-template <typename Geometry>
-void test_geometry(std::string const& wkt,
- std::string const& expected_false,
- std::string const& expected_true)
-{
- Geometry geo;
- bg::read_wkt(wkt, geo);
-
- test_optionally_closing<bg::closed>(geo, expected_false);
- test_optionally_closing<bg::open>(geo, expected_true);
-}
-
-
-template <typename P>
-void test_all()
-{
- test_geometry<bg::model::linear_ring<P> >(
- "POLYGON((1 1,1 4,4 4,4 1))",
- "(1, 1) (1, 4) (4, 4) (4, 1)",
- "(1, 1) (1, 4) (4, 4) (4, 1) (1, 1)");
-}
-
-
-int test_main(int, char* [])
-{
- test_non_geometry();
-
- test_all<bg::model::d2::point_xy<double> >();
- test_all<bg::model::point<int, 2, bg::cs::cartesian> >();
- test_all<boost::tuple<double, double> >();
-
- return 0;
-}
Deleted: sandbox/geometry/libs/geometry/test/util/closeable_view.vcproj
==============================================================================
--- sandbox/geometry/libs/geometry/test/util/closeable_view.vcproj 2010-12-18 16:40:27 EST (Sat, 18 Dec 2010)
+++ (empty file)
@@ -1,176 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="closeable_view"
- ProjectGUID="{5C40995A-B6FC-4C94-B552-0D80EC9E2049}"
- RootNamespace="closeable_view"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)\closeable_view"
- ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../..;.."
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- ExceptionHandling="2"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)\closeable_view"
- ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="../../../..;.."
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- ExceptionHandling="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <File
- RelativePath=".\closeable_view.cpp"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
Deleted: sandbox/geometry/libs/geometry/test/util/reversible_closeable.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/test/util/reversible_closeable.cpp 2010-12-18 16:40:27 EST (Sat, 18 Dec 2010)
+++ (empty file)
@@ -1,160 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library) test file
-//
-// Copyright Barend Gehrels 2010, Geodan, Amsterdam, the Netherlands
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-
-#include <algorithm>
-#include <iterator>
-#include <sstream>
-#include <string>
-
-#include <geometry_test_common.hpp>
-
-#include <boost/geometry/util/closeable_view.hpp>
-#include <boost/geometry/util/reversible_view.hpp>
-
-#include <boost/geometry/extensions/gis/io/wkt/read_wkt.hpp>
-#include <boost/geometry/util/write_dsv.hpp>
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/geometries/adapted/tuple_cartesian.hpp>
-
-
-template <typename View>
-void test_option(View const& view, std::string const& expected)
-{
-
- bool first = true;
- std::ostringstream out;
-
- typedef typename boost::range_iterator<View const>::type iterator;
-
- iterator end = boost::end(view);
- for (iterator it = boost::begin(view); it != end; ++it, first = false)
- {
- out << (first ? "" : " ") << bg::dsv(*it);
- }
- BOOST_CHECK_EQUAL(out.str(), expected);
-}
-
-template <bg::closure_selector Closure, bg::iterate_direction Direction, typename Range>
-void test_close_reverse(Range const& range, std::string const& expected)
-{
- typedef typename bg::reversible_view<Range const, Direction>::type rview;
- typedef typename bg::closeable_view<rview const, Closure>::type cview;
-
- rview view1(range);
- cview view2(view1);
-
- test_option(view2, expected);
-}
-
-
-template <bg::iterate_direction Direction, bg::closure_selector Closure, typename Range>
-void test_reverse_close(Range const& range, std::string const& expected)
-{
- typedef typename bg::closeable_view<Range const, Closure>::type cview;
- typedef typename bg::reversible_view<cview const, Direction>::type rview;
-
- cview view1(range);
- rview view2(view1);
- test_option(view2, expected);
-}
-
-
-template
-<
- bg::iterate_direction Direction1,
- bg::iterate_direction Direction2,
- typename Range
->
-void test_reverse_reverse(Range const& range, std::string const& expected)
-{
- typedef typename bg::reversible_view<Range const, Direction1>::type rview1;
- typedef typename bg::reversible_view<rview1 const, Direction2>::type rview2;
-
- rview1 view1(range);
- rview2 view2(view1);
- test_option(view2, expected);
-}
-
-template
-<
- bg::closure_selector Closure1,
- bg::closure_selector Closure2,
- typename Range
->
-void test_close_close(Range const& range, std::string const& expected)
-{
- typedef typename bg::closeable_view<Range const, Closure1>::type cview1;
- typedef typename bg::closeable_view<cview1 const, Closure2>::type cview2;
-
- cview1 view1(range);
- cview2 view2(view1);
- test_option(view2, expected);
-}
-
-
-template <typename Geometry>
-void test_geometry(std::string const& wkt,
- std::string const& expected_n,
- std::string const& expected_r,
- std::string const& closing,
- std::string const& rclosing
- )
-{
- std::string expected;
- Geometry geo;
- bg::read_wkt(wkt, geo);
-
- test_close_reverse<bg::closed, bg::iterate_forward>(geo, expected_n);
- test_close_reverse<bg::open, bg::iterate_forward>(geo, expected_n + closing);
- test_close_reverse<bg::closed, bg::iterate_reverse>(geo, expected_r);
-
- // 13-12-2010, this case was problematic in MSVC
- // SOLVED: caused by IMPLICIT constructor! It is now explicit and should be kept like that.
- test_close_reverse<bg::open, bg::iterate_reverse>(geo, expected_r + rclosing);
-
- test_reverse_close<bg::iterate_forward, bg::closed>(geo, expected_n);
- test_reverse_close<bg::iterate_forward, bg::open>(geo, expected_n + closing);
- test_reverse_close<bg::iterate_reverse, bg::closed>(geo, expected_r);
-
- // first closed, then reversed:
- expected = boost::trim_copy(closing + " " + expected_r);
- test_reverse_close<bg::iterate_reverse, bg::open>(geo, expected);
-
- test_reverse_reverse<bg::iterate_forward, bg::iterate_forward>(geo, expected_n);
- test_reverse_reverse<bg::iterate_reverse, bg::iterate_reverse>(geo, expected_n);
- test_reverse_reverse<bg::iterate_forward, bg::iterate_reverse>(geo, expected_r);
- test_reverse_reverse<bg::iterate_reverse, bg::iterate_forward>(geo, expected_r);
-
- test_close_close<bg::closed, bg::closed>(geo, expected_n);
- test_close_close<bg::open, bg::closed>(geo, expected_n + closing);
- test_close_close<bg::closed, bg::open>(geo, expected_n + closing);
- test_close_close<bg::open, bg::open>(geo, expected_n + closing + closing);
-}
-
-
-template <typename P>
-void test_all()
-{
- test_geometry<bg::model::linear_ring<P> >(
- "POLYGON((1 1,1 4,4 4,4 1))",
- "(1, 1) (1, 4) (4, 4) (4, 1)",
- "(4, 1) (4, 4) (1, 4) (1, 1)",
- " (1, 1)", // closing
- " (4, 1)" // rclosing
- );
-}
-
-
-int test_main(int, char* [])
-{
- test_all<bg::model::d2::point_xy<double> >();
- test_all<bg::model::point<int, 2, bg::cs::cartesian> >();
- test_all<boost::tuple<double, double> >();
-
- return 0;
-}
Deleted: sandbox/geometry/libs/geometry/test/util/reversible_closeable.vcproj
==============================================================================
--- sandbox/geometry/libs/geometry/test/util/reversible_closeable.vcproj 2010-12-18 16:40:27 EST (Sat, 18 Dec 2010)
+++ (empty file)
@@ -1,176 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="reversible_closeable"
- ProjectGUID="{AAA72638-34CD-4A34-8329-984DFC766E24}"
- RootNamespace="reversible_closeable"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)\reversible_closeable"
- ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../..;.."
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- ExceptionHandling="2"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)\reversible_closeable"
- ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="../../../..;.."
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- ExceptionHandling="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <File
- RelativePath=".\reversible_closeable.cpp"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
Deleted: sandbox/geometry/libs/geometry/test/util/reversible_view.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/test/util/reversible_view.cpp 2010-12-18 16:40:27 EST (Sat, 18 Dec 2010)
+++ (empty file)
@@ -1,75 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library) test file
-//
-// Copyright Barend Gehrels 2010, Geodan, Amsterdam, the Netherlands
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <algorithm>
-#include <iterator>
-#include <sstream>
-#include <string>
-
-#include <geometry_test_common.hpp>
-
-#include <boost/geometry/util/reversible_view.hpp>
-
-#include <boost/geometry/extensions/gis/io/wkt/wkt.hpp>
-#include <boost/geometry/util/write_dsv.hpp>
-#include <boost/geometry/geometries/geometries.hpp>
-#include <boost/geometry/geometries/adapted/tuple_cartesian.hpp>
-
-template <bg::iterate_direction Direction, typename Range>
-void test_forward_or_reverse(Range const& range, std::string const& expected)
-{
- typedef typename bg::reversible_view
- <
- Range const,
- Direction
- >::type view_type;
-
- view_type view(range);
-
- bool first = true;
- std::ostringstream out;
- for (typename boost::range_iterator<view_type const>::type
- it = boost::begin(view);
- it != boost::end(view);
- ++it, first = false)
- {
- out << (first ? "" : " ") << bg::dsv(*it);
- }
- BOOST_CHECK_EQUAL(out.str(), expected);
-}
-
-
-
-template <typename Geometry>
-void test_geometry(std::string const& wkt,
- std::string const& expected_forward, std::string const& expected_reverse)
-{
- Geometry geo;
- bg::read_wkt(wkt, geo);
-
- test_forward_or_reverse<bg::iterate_forward>(geo, expected_forward);
- test_forward_or_reverse<bg::iterate_reverse>(geo, expected_reverse);
-}
-
-template <typename P>
-void test_all()
-{
- test_geometry<bg::model::linestring<P> >(
- "linestring(1 1,2 2,3 3)",
- "(1, 1) (2, 2) (3, 3)",
- "(3, 3) (2, 2) (1, 1)");
-}
-
-
-int test_main(int, char* [])
-{
- test_all<bg::model::d2::point_xy<double> >();
- test_all<bg::model::point<int, 2, bg::cs::cartesian> >();
- test_all<boost::tuple<double, double> >();
-
- return 0;
-}
Deleted: sandbox/geometry/libs/geometry/test/util/reversible_view.vcproj
==============================================================================
--- sandbox/geometry/libs/geometry/test/util/reversible_view.vcproj 2010-12-18 16:40:27 EST (Sat, 18 Dec 2010)
+++ (empty file)
@@ -1,176 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="reversible_view"
- ProjectGUID="{BFB08FEE-76D6-4F3D-9184-BE03CC3F7968}"
- RootNamespace="reversible_view"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)\reversible_view"
- ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../..;.."
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- ExceptionHandling="2"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)\reversible_view"
- ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="../../../..;.."
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- ExceptionHandling="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <File
- RelativePath=".\reversible_view.cpp"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
Modified: sandbox/geometry/libs/geometry/test/util/util_tests.sln
==============================================================================
--- sandbox/geometry/libs/geometry/test/util/util_tests.sln (original)
+++ sandbox/geometry/libs/geometry/test/util/util_tests.sln 2010-12-18 16:40:27 EST (Sat, 18 Dec 2010)
@@ -10,12 +10,6 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "as_range", "as_range.vcproj", "{A36D8426-67EB-405C-B6E8-3FBB3374A59B}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reversible_view", "reversible_view.vcproj", "{BFB08FEE-76D6-4F3D-9184-BE03CC3F7968}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "closeable_view", "closeable_view.vcproj", "{5C40995A-B6FC-4C94-B552-0D80EC9E2049}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reversible_closeable", "reversible_closeable.vcproj", "{AAA72638-34CD-4A34-8329-984DFC766E24}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -42,18 +36,6 @@
{A36D8426-67EB-405C-B6E8-3FBB3374A59B}.Debug|Win32.Build.0 = Debug|Win32
{A36D8426-67EB-405C-B6E8-3FBB3374A59B}.Release|Win32.ActiveCfg = Release|Win32
{A36D8426-67EB-405C-B6E8-3FBB3374A59B}.Release|Win32.Build.0 = Release|Win32
- {BFB08FEE-76D6-4F3D-9184-BE03CC3F7968}.Debug|Win32.ActiveCfg = Debug|Win32
- {BFB08FEE-76D6-4F3D-9184-BE03CC3F7968}.Debug|Win32.Build.0 = Debug|Win32
- {BFB08FEE-76D6-4F3D-9184-BE03CC3F7968}.Release|Win32.ActiveCfg = Release|Win32
- {BFB08FEE-76D6-4F3D-9184-BE03CC3F7968}.Release|Win32.Build.0 = Release|Win32
- {5C40995A-B6FC-4C94-B552-0D80EC9E2049}.Debug|Win32.ActiveCfg = Debug|Win32
- {5C40995A-B6FC-4C94-B552-0D80EC9E2049}.Debug|Win32.Build.0 = Debug|Win32
- {5C40995A-B6FC-4C94-B552-0D80EC9E2049}.Release|Win32.ActiveCfg = Release|Win32
- {5C40995A-B6FC-4C94-B552-0D80EC9E2049}.Release|Win32.Build.0 = Release|Win32
- {AAA72638-34CD-4A34-8329-984DFC766E24}.Debug|Win32.ActiveCfg = Debug|Win32
- {AAA72638-34CD-4A34-8329-984DFC766E24}.Debug|Win32.Build.0 = Debug|Win32
- {AAA72638-34CD-4A34-8329-984DFC766E24}.Release|Win32.ActiveCfg = Release|Win32
- {AAA72638-34CD-4A34-8329-984DFC766E24}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Added: sandbox/geometry/libs/geometry/test/views/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/geometry/libs/geometry/test/views/Jamfile.v2 2010-12-18 16:40:27 EST (Sat, 18 Dec 2010)
@@ -0,0 +1,14 @@
+# test/iterators/Jamfile.v2
+#
+# Copyright (c) 2010 Barend Gehrels
+#
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+test-suite boost-geometry-views
+ :
+ [ run reversible_view.cpp ]
+ [ run closeable_view.cpp ]
+ [ run reversible_closeable.cpp ]
+ ;
Copied: sandbox/geometry/libs/geometry/test/views/closeable_view.cpp (from r67286, /sandbox/geometry/libs/geometry/test/util/closeable_view.cpp)
==============================================================================
--- /sandbox/geometry/libs/geometry/test/util/closeable_view.cpp (original)
+++ sandbox/geometry/libs/geometry/test/views/closeable_view.cpp 2010-12-18 16:40:27 EST (Sat, 18 Dec 2010)
@@ -12,7 +12,7 @@
#include <geometry_test_common.hpp>
-#include <boost/geometry/util/closeable_view.hpp>
+#include <boost/geometry/views/closeable_view.hpp>
#include <boost/geometry/extensions/gis/io/wkt/read_wkt.hpp>
#include <boost/geometry/util/write_dsv.hpp>
Copied: sandbox/geometry/libs/geometry/test/views/reversible_closeable.cpp (from r67286, /sandbox/geometry/libs/geometry/test/util/reversible_closeable.cpp)
==============================================================================
--- /sandbox/geometry/libs/geometry/test/util/reversible_closeable.cpp (original)
+++ sandbox/geometry/libs/geometry/test/views/reversible_closeable.cpp 2010-12-18 16:40:27 EST (Sat, 18 Dec 2010)
@@ -13,8 +13,8 @@
#include <geometry_test_common.hpp>
-#include <boost/geometry/util/closeable_view.hpp>
-#include <boost/geometry/util/reversible_view.hpp>
+#include <boost/geometry/views/closeable_view.hpp>
+#include <boost/geometry/views/reversible_view.hpp>
#include <boost/geometry/extensions/gis/io/wkt/read_wkt.hpp>
#include <boost/geometry/util/write_dsv.hpp>
@@ -121,8 +121,8 @@
test_reverse_close<bg::iterate_forward, bg::open>(geo, expected_n + closing);
test_reverse_close<bg::iterate_reverse, bg::closed>(geo, expected_r);
- // first closed, then reversed:
- expected = boost::trim_copy(closing + " " + expected_r);
+ // first closed, then reversed:
+ expected = boost::trim_copy(closing + " " + expected_r);
test_reverse_close<bg::iterate_reverse, bg::open>(geo, expected);
test_reverse_reverse<bg::iterate_forward, bg::iterate_forward>(geo, expected_n);
Copied: sandbox/geometry/libs/geometry/test/views/reversible_view.cpp (from r67286, /sandbox/geometry/libs/geometry/test/util/reversible_view.cpp)
==============================================================================
--- /sandbox/geometry/libs/geometry/test/util/reversible_view.cpp (original)
+++ sandbox/geometry/libs/geometry/test/views/reversible_view.cpp 2010-12-18 16:40:27 EST (Sat, 18 Dec 2010)
@@ -12,7 +12,7 @@
#include <geometry_test_common.hpp>
-#include <boost/geometry/util/reversible_view.hpp>
+#include <boost/geometry/views/reversible_view.hpp>
#include <boost/geometry/extensions/gis/io/wkt/wkt.hpp>
#include <boost/geometry/util/write_dsv.hpp>
Added: sandbox/geometry/libs/geometry/test/views/views.sln
==============================================================================
--- (empty file)
+++ sandbox/geometry/libs/geometry/test/views/views.sln 2010-12-18 16:40:27 EST (Sat, 18 Dec 2010)
@@ -0,0 +1,31 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual C++ Express 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "closeable_view", "closeable_view.vcproj", "{5C40995A-B6FC-4C94-B552-0D80EC9E2049}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reversible_closeable", "reversible_closeable.vcproj", "{AAA72638-34CD-4A34-8329-984DFC766E24}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reversible_view", "reversible_view.vcproj", "{BFB08FEE-76D6-4F3D-9184-BE03CC3F7968}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5C40995A-B6FC-4C94-B552-0D80EC9E2049}.Debug|Win32.ActiveCfg = Debug|Win32
+ {5C40995A-B6FC-4C94-B552-0D80EC9E2049}.Debug|Win32.Build.0 = Debug|Win32
+ {5C40995A-B6FC-4C94-B552-0D80EC9E2049}.Release|Win32.ActiveCfg = Release|Win32
+ {5C40995A-B6FC-4C94-B552-0D80EC9E2049}.Release|Win32.Build.0 = Release|Win32
+ {AAA72638-34CD-4A34-8329-984DFC766E24}.Debug|Win32.ActiveCfg = Debug|Win32
+ {AAA72638-34CD-4A34-8329-984DFC766E24}.Debug|Win32.Build.0 = Debug|Win32
+ {AAA72638-34CD-4A34-8329-984DFC766E24}.Release|Win32.ActiveCfg = Release|Win32
+ {AAA72638-34CD-4A34-8329-984DFC766E24}.Release|Win32.Build.0 = Release|Win32
+ {BFB08FEE-76D6-4F3D-9184-BE03CC3F7968}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BFB08FEE-76D6-4F3D-9184-BE03CC3F7968}.Debug|Win32.Build.0 = Debug|Win32
+ {BFB08FEE-76D6-4F3D-9184-BE03CC3F7968}.Release|Win32.ActiveCfg = Release|Win32
+ {BFB08FEE-76D6-4F3D-9184-BE03CC3F7968}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk