Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60552 - in sandbox/geometry/libs/geometry/test/multi: . algorithms
From: barend.gehrels_at_[hidden]
Date: 2010-03-13 07:56:08


Author: barendgehrels
Date: 2010-03-13 07:56:07 EST (Sat, 13 Mar 2010)
New Revision: 60552
URL: http://svn.boost.org/trac/boost/changeset/60552

Log:
Added tests for reverse/unique (multi)
Added:
   sandbox/geometry/libs/geometry/test/multi/algorithms/multi_reverse.cpp (contents, props changed)
   sandbox/geometry/libs/geometry/test/multi/algorithms/multi_reverse.vcproj (contents, props changed)
   sandbox/geometry/libs/geometry/test/multi/algorithms/multi_unique.cpp (contents, props changed)
   sandbox/geometry/libs/geometry/test/multi/algorithms/multi_unique.vcproj (contents, props changed)
Text files modified:
   sandbox/geometry/libs/geometry/test/multi/algorithms/Jamfile.v2 | 2 ++
   sandbox/geometry/libs/geometry/test/multi/multi_tests.sln | 12 ++++++++++++
   2 files changed, 14 insertions(+), 0 deletions(-)

Modified: sandbox/geometry/libs/geometry/test/multi/algorithms/Jamfile.v2
==============================================================================
--- sandbox/geometry/libs/geometry/test/multi/algorithms/Jamfile.v2 (original)
+++ sandbox/geometry/libs/geometry/test/multi/algorithms/Jamfile.v2 2010-03-13 07:56:07 EST (Sat, 13 Mar 2010)
@@ -18,6 +18,8 @@
     [ run multi_intersection.cpp ]
     [ run multi_length.cpp ]
     [ run multi_perimeter.cpp ]
+ [ run multi_reverse.cpp ]
     [ run multi_simplify.cpp ]
     [ run multi_union.cpp ]
+ [ run multi_unique.cpp ]
     ;

Added: sandbox/geometry/libs/geometry/test/multi/algorithms/multi_reverse.cpp
==============================================================================
--- (empty file)
+++ sandbox/geometry/libs/geometry/test/multi/algorithms/multi_reverse.cpp 2010-03-13 07:56:07 EST (Sat, 13 Mar 2010)
@@ -0,0 +1,51 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright Barend Gehrels, Geodan B.V. 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 <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/reverse.hpp>
+#include <boost/geometry/multi/algorithms/reverse.hpp>
+
+#include <boost/geometry/extensions/gis/io/wkt/wkt.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/multi/geometries/multi_point.hpp>
+#include <boost/geometry/multi/geometries/multi_linestring.hpp>
+#include <boost/geometry/multi/geometries/multi_polygon.hpp>
+
+#include <algorithms/test_reverse.hpp>
+
+
+template <typename P>
+void test_all()
+{
+ // Multi point, should happen nothing.
+ test_geometry<boost::geometry::multi_point<P> >(
+ "MULTIPOINT((0 0),(1 1))",
+ "MULTIPOINT((0 0),(1 1))");
+
+ test_geometry<boost::geometry::multi_linestring<boost::geometry::linestring<P> > >(
+ "MULTILINESTRING((0 0,1 1),(3 3,4 4))",
+ "MULTILINESTRING((1 1,0 0),(4 4,3 3))");
+
+ typedef boost::geometry::multi_polygon<boost::geometry::polygon<P> > mp;
+ test_geometry<mp>(
+ "MULTIPOLYGON(((4 0,8 2,8 7,4 9,0 7,0 2,2 1,4 0)))",
+ "MULTIPOLYGON(((4 0,2 1,0 2,0 7,4 9,8 7,8 2,4 0)))");
+ test_geometry<mp>(
+ "MULTIPOLYGON(((4 0,8 2,8 7,4 9,0 7,0 2,2 1,4 0),(7 3,7 6,1 6,1 3,4 3,7 3)))",
+ "MULTIPOLYGON(((4 0,2 1,0 2,0 7,4 9,8 7,8 2,4 0),(7 3,4 3,1 3,1 6,7 6,7 3)))");
+}
+
+int test_main( int , char* [] )
+{
+ test_all<boost::geometry::point_xy<int> >();
+ test_all<boost::geometry::point_xy<double> >();
+
+ return 0;
+}

Added: sandbox/geometry/libs/geometry/test/multi/algorithms/multi_reverse.vcproj
==============================================================================
--- (empty file)
+++ sandbox/geometry/libs/geometry/test/multi/algorithms/multi_reverse.vcproj 2010-03-13 07:56:07 EST (Sat, 13 Mar 2010)
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="multi_reverse"
+ ProjectGUID="{698BE05D-43E2-4BF5-B7FD-48BE3EE7BC21}"
+ RootNamespace="multi_reverse"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)\multi_reverse"
+ 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"
+ MinimalRebuild="true"
+ ExceptionHandling="2"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="kernel32.lib $(NoInherit)"
+ LinkIncremental="2"
+ 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)\multi_reverse"
+ 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"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="kernel32.lib $(NoInherit)"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ 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=".\multi_reverse.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/geometry/libs/geometry/test/multi/algorithms/multi_unique.cpp
==============================================================================
--- (empty file)
+++ sandbox/geometry/libs/geometry/test/multi/algorithms/multi_unique.cpp 2010-03-13 07:56:07 EST (Sat, 13 Mar 2010)
@@ -0,0 +1,54 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright Barend Gehrels, Geodan B.V. 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 <geometry_test_common.hpp>
+
+#include <boost/geometry/algorithms/unique.hpp>
+#include <boost/geometry/multi/algorithms/unique.hpp>
+
+#include <boost/geometry/extensions/gis/io/wkt/wkt.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/multi/geometries/multi_point.hpp>
+#include <boost/geometry/multi/geometries/multi_linestring.hpp>
+#include <boost/geometry/multi/geometries/multi_polygon.hpp>
+
+#include <algorithms/test_unique.hpp>
+
+
+template <typename P>
+void test_all()
+{
+ // Multi point, should happen nothing, even if there are duplicate points
+ test_geometry<boost::geometry::multi_point<P> >(
+ "MULTIPOINT((0 0),(0 0),(1 1))",
+ "MULTIPOINT((0 0),(0 0),(1 1))");
+
+ test_geometry<boost::geometry::multi_linestring<boost::geometry::linestring<P> > >(
+ "MULTILINESTRING((0 0,1 1,1 1),(3 3,3 3,4 4))",
+ "MULTILINESTRING((0 0,1 1),(3 3,4 4))");
+
+ typedef boost::geometry::multi_polygon<boost::geometry::polygon<P> > mp;
+ test_geometry<mp>(
+ "MULTIPOLYGON(((0 0,0 1,1 1,1 1,1 1,1 0,0 0,0 0)))",
+ "MULTIPOLYGON(((0 0,0 1,1 1,1 0,0 0)))");
+
+ // With holes
+ test_geometry<mp>(
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 10,10 10,10 0,0 0,0 0)))",
+ "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))");
+
+}
+
+int test_main( int , char* [] )
+{
+ test_all<boost::geometry::point_xy<int> >();
+ test_all<boost::geometry::point_xy<double> >();
+
+ return 0;
+}

Added: sandbox/geometry/libs/geometry/test/multi/algorithms/multi_unique.vcproj
==============================================================================
--- (empty file)
+++ sandbox/geometry/libs/geometry/test/multi/algorithms/multi_unique.vcproj 2010-03-13 07:56:07 EST (Sat, 13 Mar 2010)
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="multi_unique"
+ ProjectGUID="{71879D37-84A8-4949-8CDB-212982F81D80}"
+ RootNamespace="multi_unique"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)\multi_unique"
+ 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"
+ MinimalRebuild="true"
+ ExceptionHandling="2"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="kernel32.lib $(NoInherit)"
+ LinkIncremental="2"
+ 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)\multi_unique"
+ 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"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="kernel32.lib $(NoInherit)"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ 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=".\multi_unique.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Modified: sandbox/geometry/libs/geometry/test/multi/multi_tests.sln
==============================================================================
--- sandbox/geometry/libs/geometry/test/multi/multi_tests.sln (original)
+++ sandbox/geometry/libs/geometry/test/multi/multi_tests.sln 2010-03-13 07:56:07 EST (Sat, 13 Mar 2010)
@@ -28,6 +28,10 @@
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "multi_equals", "algorithms\multi_equals.vcproj", "{AA0EFD64-E034-421A-BD4A-E5A336D95C30}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "multi_reverse", "algorithms\multi_reverse.vcproj", "{698BE05D-43E2-4BF5-B7FD-48BE3EE7BC21}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "multi_unique", "algorithms\multi_unique.vcproj", "{71879D37-84A8-4949-8CDB-212982F81D80}"
+EndProject
 Global
         GlobalSection(SolutionConfigurationPlatforms) = preSolution
                 Debug|Win32 = Debug|Win32
@@ -90,6 +94,14 @@
                 {AA0EFD64-E034-421A-BD4A-E5A336D95C30}.Debug|Win32.Build.0 = Debug|Win32
                 {AA0EFD64-E034-421A-BD4A-E5A336D95C30}.Release|Win32.ActiveCfg = Release|Win32
                 {AA0EFD64-E034-421A-BD4A-E5A336D95C30}.Release|Win32.Build.0 = Release|Win32
+ {698BE05D-43E2-4BF5-B7FD-48BE3EE7BC21}.Debug|Win32.ActiveCfg = Debug|Win32
+ {698BE05D-43E2-4BF5-B7FD-48BE3EE7BC21}.Debug|Win32.Build.0 = Debug|Win32
+ {698BE05D-43E2-4BF5-B7FD-48BE3EE7BC21}.Release|Win32.ActiveCfg = Release|Win32
+ {698BE05D-43E2-4BF5-B7FD-48BE3EE7BC21}.Release|Win32.Build.0 = Release|Win32
+ {71879D37-84A8-4949-8CDB-212982F81D80}.Debug|Win32.ActiveCfg = Debug|Win32
+ {71879D37-84A8-4949-8CDB-212982F81D80}.Debug|Win32.Build.0 = Debug|Win32
+ {71879D37-84A8-4949-8CDB-212982F81D80}.Release|Win32.ActiveCfg = Release|Win32
+ {71879D37-84A8-4949-8CDB-212982F81D80}.Release|Win32.Build.0 = Release|Win32
         EndGlobalSection
         GlobalSection(SolutionProperties) = preSolution
                 HideSolutionNode = FALSE


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