Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69914 - in trunk/libs/geometry/test: . domains domains/gis domains/gis/io domains/gis/io/wkt extensions/gis/io/wkt multi
From: barend.gehrels_at_[hidden]
Date: 2011-03-13 05:54:37


Author: barendgehrels
Date: 2011-03-13 05:54:34 EDT (Sun, 13 Mar 2011)
New Revision: 69914
URL: http://svn.boost.org/trac/boost/changeset/69914

Log:
Moved wkt-test to domains folder
Added:
   trunk/libs/geometry/test/domains/
   trunk/libs/geometry/test/domains/Jamfile.v2 (contents, props changed)
   trunk/libs/geometry/test/domains/gis/
   trunk/libs/geometry/test/domains/gis/Jamfile.v2 (contents, props changed)
   trunk/libs/geometry/test/domains/gis/io/
   trunk/libs/geometry/test/domains/gis/io/Jamfile.v2 (contents, props changed)
   trunk/libs/geometry/test/domains/gis/io/wkt/
   trunk/libs/geometry/test/domains/gis/io/wkt/Jamfile.v2 (contents, props changed)
   trunk/libs/geometry/test/domains/gis/io/wkt/io_wkt_tests.sln
      - copied unchanged from r69910, /trunk/libs/geometry/test/extensions/gis/io/wkt/io_wkt_tests.sln
   trunk/libs/geometry/test/domains/gis/io/wkt/multi_wkt.cpp
      - copied, changed from r69910, /trunk/libs/geometry/test/extensions/gis/io/wkt/multi_wkt.cpp
   trunk/libs/geometry/test/domains/gis/io/wkt/multi_wkt.vcproj
      - copied unchanged from r69910, /trunk/libs/geometry/test/extensions/gis/io/wkt/multi_wkt.vcproj
   trunk/libs/geometry/test/domains/gis/io/wkt/wkt.cpp
      - copied, changed from r69910, /trunk/libs/geometry/test/extensions/gis/io/wkt/wkt.cpp
   trunk/libs/geometry/test/domains/gis/io/wkt/wkt.vcproj
      - copied unchanged from r69910, /trunk/libs/geometry/test/extensions/gis/io/wkt/wkt.vcproj
Removed:
   trunk/libs/geometry/test/extensions/gis/io/wkt/io_wkt_tests.sln
   trunk/libs/geometry/test/extensions/gis/io/wkt/multi_wkt.cpp
   trunk/libs/geometry/test/extensions/gis/io/wkt/multi_wkt.vcproj
   trunk/libs/geometry/test/extensions/gis/io/wkt/wkt.cpp
   trunk/libs/geometry/test/extensions/gis/io/wkt/wkt.vcproj
Text files modified:
   trunk/libs/geometry/test/Jamfile.v2 | 1 +
   trunk/libs/geometry/test/domains/gis/io/wkt/multi_wkt.cpp | 2 +-
   trunk/libs/geometry/test/domains/gis/io/wkt/wkt.cpp | 7 ++++---
   trunk/libs/geometry/test/multi/Jamfile.v2 | 2 +-
   4 files changed, 7 insertions(+), 5 deletions(-)

Modified: trunk/libs/geometry/test/Jamfile.v2
==============================================================================
--- trunk/libs/geometry/test/Jamfile.v2 (original)
+++ trunk/libs/geometry/test/Jamfile.v2 2011-03-13 05:54:34 EDT (Sun, 13 Mar 2011)
@@ -29,3 +29,4 @@
 build-project util ;
 build-project views ;
 build-project multi ;
+build-project domains ;

Added: trunk/libs/geometry/test/domains/Jamfile.v2
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/test/domains/Jamfile.v2 2011-03-13 05:54:34 EDT (Sun, 13 Mar 2011)
@@ -0,0 +1,7 @@
+# Copyright (c) 2011 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)
+
+build-project gis ;
\ No newline at end of file

Added: trunk/libs/geometry/test/domains/gis/Jamfile.v2
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/test/domains/gis/Jamfile.v2 2011-03-13 05:54:34 EDT (Sun, 13 Mar 2011)
@@ -0,0 +1,7 @@
+# Copyright (c) 2011 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)
+
+build-project io ;
\ No newline at end of file

Added: trunk/libs/geometry/test/domains/gis/io/Jamfile.v2
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/test/domains/gis/io/Jamfile.v2 2011-03-13 05:54:34 EDT (Sun, 13 Mar 2011)
@@ -0,0 +1,7 @@
+# Copyright (c) 2011 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)
+
+build-project wkt ;
\ No newline at end of file

Added: trunk/libs/geometry/test/domains/gis/io/wkt/Jamfile.v2
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/test/domains/gis/io/wkt/Jamfile.v2 2011-03-13 05:54:34 EDT (Sun, 13 Mar 2011)
@@ -0,0 +1,12 @@
+# Copyright (c) 2011 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-domains-gis-io-wkt
+ :
+ [ run wkt.cpp ]
+ [ run multi_wkt.cpp ]
+ ;
+

Copied: trunk/libs/geometry/test/domains/gis/io/wkt/multi_wkt.cpp (from r69910, /trunk/libs/geometry/test/extensions/gis/io/wkt/multi_wkt.cpp)
==============================================================================
--- /trunk/libs/geometry/test/extensions/gis/io/wkt/multi_wkt.cpp (original)
+++ trunk/libs/geometry/test/domains/gis/io/wkt/multi_wkt.cpp 2011-03-13 05:54:34 EDT (Sun, 13 Mar 2011)
@@ -39,7 +39,7 @@
 
 // Include the single test
 #define GEOMETRY_TEST_MULTI
-#include "extensions/gis/io/wkt/wkt.cpp"
+#include "domains/gis/io/wkt/wkt.cpp"
 
 
 

Copied: trunk/libs/geometry/test/domains/gis/io/wkt/wkt.cpp (from r69910, /trunk/libs/geometry/test/extensions/gis/io/wkt/wkt.cpp)
==============================================================================
--- /trunk/libs/geometry/test/extensions/gis/io/wkt/wkt.cpp (original)
+++ trunk/libs/geometry/test/domains/gis/io/wkt/wkt.cpp 2011-03-13 05:54:34 EDT (Sun, 13 Mar 2011)
@@ -29,7 +29,7 @@
 
 
 template <typename G>
-void test_wkt(std::string const& wkt, int n, double len = 0,
+void test_wkt(std::string const& wkt, std::size_t n, double len = 0,
             double ar = 0, double peri = 0)
 {
     G geometry;
@@ -176,8 +176,9 @@
         test_wkt<P>("POINT(1.1 2.1)", 1);
     }
 
- test_wkt_output_iterator<bg::model::linestring<P> >("LINESTRING(1 1,2 2,3 3)");
- test_wkt_output_iterator<bg::model::ring<P> >("POLYGON((1 1,2 2,3 3))");
+ // Deprecated:
+ // test_wkt_output_iterator<bg::model::linestring<P> >("LINESTRING(1 1,2 2,3 3)");
+ // test_wkt_output_iterator<bg::model::ring<P> >("POLYGON((1 1,2 2,3 3))");
 }
 #endif
 

Deleted: trunk/libs/geometry/test/extensions/gis/io/wkt/io_wkt_tests.sln
==============================================================================
--- trunk/libs/geometry/test/extensions/gis/io/wkt/io_wkt_tests.sln 2011-03-13 05:54:34 EDT (Sun, 13 Mar 2011)
+++ (empty file)
@@ -1,29 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual C++ Express 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wkt", "wkt.vcproj", "{1FA2ADE2-F649-4245-951E-A8F5935E7127}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "multi_wkt", "multi_wkt.vcproj", "{CA8D5E44-7D8F-44A1-900C-35C28890299B}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {1FA2ADE2-F649-4245-951E-A8F5935E7127}.Debug|Win32.ActiveCfg = Debug|Win32
- {1FA2ADE2-F649-4245-951E-A8F5935E7127}.Debug|Win32.Build.0 = Debug|Win32
- {1FA2ADE2-F649-4245-951E-A8F5935E7127}.Release|Win32.ActiveCfg = Release|Win32
- {1FA2ADE2-F649-4245-951E-A8F5935E7127}.Release|Win32.Build.0 = Release|Win32
- {F2A680B0-F6FC-479E-9988-24CF6851C13C}.Debug|Win32.ActiveCfg = Debug|Win32
- {F2A680B0-F6FC-479E-9988-24CF6851C13C}.Debug|Win32.Build.0 = Debug|Win32
- {F2A680B0-F6FC-479E-9988-24CF6851C13C}.Release|Win32.ActiveCfg = Release|Win32
- {F2A680B0-F6FC-479E-9988-24CF6851C13C}.Release|Win32.Build.0 = Release|Win32
- {CA8D5E44-7D8F-44A1-900C-35C28890299B}.Debug|Win32.ActiveCfg = Debug|Win32
- {CA8D5E44-7D8F-44A1-900C-35C28890299B}.Debug|Win32.Build.0 = Debug|Win32
- {CA8D5E44-7D8F-44A1-900C-35C28890299B}.Release|Win32.ActiveCfg = Release|Win32
- {CA8D5E44-7D8F-44A1-900C-35C28890299B}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal

Deleted: trunk/libs/geometry/test/extensions/gis/io/wkt/multi_wkt.cpp
==============================================================================
--- trunk/libs/geometry/test/extensions/gis/io/wkt/multi_wkt.cpp 2011-03-13 05:54:34 EDT (Sun, 13 Mar 2011)
+++ (empty file)
@@ -1,82 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library) test file
-//
-// Copyright Barend Gehrels 2007-2009, Geodan, Amsterdam, the Netherlands
-// Copyright Bruno Lalande 2008-2009
-// 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 <iostream>
-#include <sstream>
-#include <string>
-
-#include <boost/algorithm/string.hpp>
-#include <boost/concept/requires.hpp>
-
-#include <boost/test/floating_point_comparison.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
-
-#include <boost/geometry/geometries/geometries.hpp>
-
-
-#include <boost/geometry/multi/algorithms/area.hpp>
-#include <boost/geometry/multi/algorithms/length.hpp>
-#include <boost/geometry/multi/algorithms/num_points.hpp>
-#include <boost/geometry/multi/algorithms/perimeter.hpp>
-#include <boost/geometry/multi/core/point_type.hpp>
-#include <boost/geometry/multi/core/topological_dimension.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 <boost/geometry/domains/gis/io/wkt/read_wkt_multi.hpp>
-#include <boost/geometry/domains/gis/io/wkt/write_wkt_multi.hpp>
-
-
-template <typename T>
-void test_all();
-
-
-// Include the single test
-#define GEOMETRY_TEST_MULTI
-#include "extensions/gis/io/wkt/wkt.cpp"
-
-
-
-template <typename T>
-void test_all()
-{
- using namespace boost::geometry;
- typedef bg::model::point<T, 2, bg::cs::cartesian> P;
-
- test_wkt<bg::model::multi_point<P> >("multipoint((1 2),(3 4))", 2);
- test_wkt<bg::model::multi_linestring<bg::model::linestring<P> > >("multilinestring((1 1,2 2,3 3),(4 4,5 5,6 6))", 6, 4 * sqrt(2.0));
- test_wkt<bg::model::multi_polygon<bg::model::polygon<P> > >("multipolygon(((0 0,0 2,2 2,2 0,0 0),(1 1,1 2,2 2,2 1,1 1)),((0 0,0 4,4 4,4 0,0 0)))", 15, 0, 21, 28);
-
- test_wrong_wkt<bg::model::multi_polygon<bg::model::polygon<P> > >(
- "MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0),(1 1,1 2,2 2,2 1,1 1)),(0 0,0 4,4 4,4 0,0 0)))",
- "expected '('");
-}
-
-
-
-/*
-
-... see comments in "wkt.cpp"
-
-union select 13,'# mpoint',npoints(geomfromtext('MULTIPOINT((1 2),(3 4))'))
-union select 14,'length mpoint',length(geomfromtext('MULTIPOINT((1 2),(3 4))'))
-union select 15,'peri mpoint',perimeter(geomfromtext('MULTIPOINT((1 2),(3 4))'))
-union select 16,'area mpoint',area(geomfromtext('MULTIPOINT((1 2),(3 4))'))
-
-union select 17,'# mls',npoints(geomfromtext('MULTILINESTRING((1 1,2 2,3 3),(4 4,5 5,6 6))'))
-union select 18,'length mls',length(geomfromtext('MULTILINESTRING((1 1,2 2,3 3),(4 4,5 5,6 6))'))
-union select 19,'peri mls',perimeter(geomfromtext('MULTILINESTRING((1 1,2 2,3 3),(4 4,5 5,6 6))'))
-union select 20,'area mls',area(geomfromtext('MULTILINESTRING((1 1,2 2,3 3),(4 4,5 5,6 6))'))
-
-union select 21,'# mpoly',npoints(geomfromtext('MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0),(1 1,1 2,2 2,2 1,1 1)),((0 0,0 4,4 4,4 0,0 0)))'))
-union select 22,'length mpoly',length(geomfromtext('MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0),(1 1,1 2,2 2,2 1,1 1)),((0 0,0 4,4 4,4 0,0 0)))'))
-union select 23,'peri mpoly',perimeter(geomfromtext('MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0),(1 1,1 2,2 2,2 1,1 1)),((0 0,0 4,4 4,4 0,0 0)))'))
-union select 24,'area mpoly',area(geomfromtext('MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0),(1 1,1 2,2 2,2 1,1 1)),((0 0,0 4,4 4,4 0,0 0)))'))
-
-*/

Deleted: trunk/libs/geometry/test/extensions/gis/io/wkt/multi_wkt.vcproj
==============================================================================
--- trunk/libs/geometry/test/extensions/gis/io/wkt/multi_wkt.vcproj 2011-03-13 05:54:34 EDT (Sun, 13 Mar 2011)
+++ (empty file)
@@ -1,174 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="multi_wkt"
- ProjectGUID="{CA8D5E44-7D8F-44A1-900C-35C28890299B}"
- RootNamespace="multi_wkt"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)\multi_wkt"
- 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"
- 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)\multi_wkt"
- 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"
- />
- <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=".\multi_wkt.cpp"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>

Deleted: trunk/libs/geometry/test/extensions/gis/io/wkt/wkt.cpp
==============================================================================
--- trunk/libs/geometry/test/extensions/gis/io/wkt/wkt.cpp 2011-03-13 05:54:34 EDT (Sun, 13 Mar 2011)
+++ (empty file)
@@ -1,225 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library) test file
-//
-// Copyright Barend Gehrels 2007-2009, Geodan, Amsterdam, the Netherlands
-// Copyright Bruno Lalande 2008-2009
-// 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 <iostream>
-#include <sstream>
-#include <string>
-
-#include <boost/algorithm/string.hpp>
-
-#include <geometry_test_common.hpp>
-
-
-#include <boost/geometry/geometries/geometries.hpp>
-
-#include <boost/geometry/algorithms/area.hpp>
-#include <boost/geometry/algorithms/length.hpp>
-#include <boost/geometry/algorithms/num_points.hpp>
-#include <boost/geometry/algorithms/perimeter.hpp>
-#include <boost/geometry/strategies/strategies.hpp>
-#include <boost/geometry/core/point_type.hpp>
-#include <boost/geometry/core/topological_dimension.hpp>
-#include <boost/geometry/domains/gis/io/wkt/read_wkt.hpp>
-#include <boost/geometry/domains/gis/io/wkt/write_wkt.hpp>
-
-
-template <typename G>
-void test_wkt(std::string const& wkt, int n, double len = 0,
- double ar = 0, double peri = 0)
-{
- G geometry;
-
- bg::read_wkt(wkt, geometry);
-
- /*
- std::cout << "n=" << bg::num_points(geometry)
- << " dim=" << bg::topological_dimension<G>::value
- << " length=" << bg::length(geometry)
- << " area=" << bg::area(geometry)
- << " perimeter=" << bg::perimeter(geometry)
- << std::endl << "\t\tgeometry=" << dsv(geometry)
- << std::endl;
- */
-
- BOOST_CHECK_EQUAL(bg::num_points(geometry), n);
- BOOST_CHECK_CLOSE(double(bg::length(geometry)), len, 0.0001);
- BOOST_CHECK_CLOSE(double(bg::area(geometry)), ar, 0.0001);
- BOOST_CHECK_CLOSE(double(bg::perimeter(geometry)), peri, 0.0001);
-
- // String comparison: only for int/double/float etc
- // GMP/CLN add +e01, L0, etc
- if (boost::is_fundamental
- <
- typename bg::coordinate_type<G>::type
- >::type::value)
- {
- std::ostringstream out;
- out << bg::wkt(geometry);
- BOOST_CHECK_EQUAL(boost::to_upper_copy(out.str()),
- boost::to_upper_copy(wkt));
- }
-}
-
-template <typename G>
-void test_relaxed_wkt(std::string const& wkt, std::string const& expected)
-{
- if (boost::is_fundamental
- <
- typename bg::coordinate_type<G>::type
- >::type::value)
- {
- std::string e;
- G geometry;
- bg::read_wkt(wkt, geometry);
- std::ostringstream out;
- out << bg::wkt(geometry);
-
- BOOST_CHECK_EQUAL(boost::to_upper_copy(out.str()), boost::to_upper_copy(expected));
- }
-}
-
-
-
-template <typename G>
-void test_wrong_wkt(std::string const& wkt, std::string const& start)
-{
- std::string e("no exception");
- G geometry;
- try
- {
- bg::read_wkt(wkt, geometry);
- }
- catch(bg::read_wkt_exception const& ex)
- {
- e = ex.what();
- boost::to_lower(e);
- }
- BOOST_CHECK_MESSAGE(boost::starts_with(e, start), " Expected:"
- << start << " Got:" << e << " with WKT: " << wkt);
-}
-
-template <typename G>
-void test_wkt_output_iterator(std::string const& wkt)
-{
- G geometry;
- bg::read_wkt<G>(wkt, std::back_inserter(geometry));
-}
-
-
-
-#ifndef GEOMETRY_TEST_MULTI
-template <typename T>
-void test_all()
-{
- using namespace boost::geometry;
- typedef bg::model::point<T, 2, bg::cs::cartesian> P;
-
- test_wkt<P >("POINT(1 2)", 1);
- test_wkt<bg::model::linestring<P> >("LINESTRING(1 1,2 2,3 3)", 3, 2 * sqrt(2.0));
- test_wkt<bg::model::polygon<P> >("POLYGON((0 0,0 4,4 4,4 0,0 0)"
- ",(1 1,1 2,2 2,2 1,1 1),(1 1,1 2,2 2,2 1,1 1))", 15, 0, 18, 24);
-
- // Non OGC: a box defined by a polygon
- //test_wkt<box<P> >("POLYGON((0 0,0 1,1 1,1 0,0 0))", 4, 0, 1, 4);
- test_wkt<bg::model::ring<P> >("POLYGON((0 0,0 1,1 1,1 0,0 0))", 5, 0, 1, 4);
-
- // We accept empty sequences as well (much better than EMPTY)...
- // ...or even POINT() (see below)
- test_wkt<bg::model::linestring<P> >("LINESTRING()", 0, 0);
- test_wkt<bg::model::polygon<P> >("POLYGON(())", 0);
- // ... or even with empty holes
- test_wkt<bg::model::polygon<P> >("POLYGON((),(),())", 0);
- // which all make no valid geometries, but they can exist.
-
- // These WKT's are incomplete or abnormal but they are considered OK
- test_relaxed_wkt<P>("POINT(1)", "POINT(1 0)");
- test_relaxed_wkt<P>("POINT()", "POINT(0 0)");
- test_relaxed_wkt<bg::model::linestring<P> >("LINESTRING(1,2,3)",
- "LINESTRING(1 0,2 0,3 0)");
- test_relaxed_wkt<P>("POINT ( 1 2) ", "POINT(1 2)");
- test_relaxed_wkt<P>("POINT M ( 1 2)", "POINT(1 2)");
- test_relaxed_wkt<bg::model::box<P> >("BOX(1 1,2 2)", "POLYGON((1 1,1 2,2 2,2 1,1 1))");
-
- test_relaxed_wkt<bg::model::linestring<P> >("LINESTRING EMPTY", "LINESTRING()");
-
- test_relaxed_wkt<bg::model::polygon<P> >("POLYGON( ( ) , ( ) , ( ) )",
- "POLYGON((),(),())");
-
- // Wrong WKT's
- test_wrong_wkt<P>("POINT(1 2", "expected ')'");
- test_wrong_wkt<P>("POINT 1 2)", "expected '('");
- test_wrong_wkt<P>("POINT(1 2,)", "expected ')'");
- test_wrong_wkt<P>("POINT(1 2)foo", "too much tokens at 'foo'");
- test_wrong_wkt<P>("POINT(1 2 3)", "expected ')'");
- test_wrong_wkt<P>("POINT(a 2 3)", "bad lexical cast");
- test_wrong_wkt<P>("POINT 2 3", "expected '('");
- test_wrong_wkt<P>("POINT Z (1 2 3)", "z only allowed");
-
- test_wrong_wkt<P>("PIONT (1 2)", "should start with 'point'");
-
- test_wrong_wkt<bg::model::linestring<P> >("LINESTRING())", "too much tokens");
-
- test_wrong_wkt<bg::model::polygon<P> >("POLYGON((1 1,1 4,4 4,4 1,1 1)"
- ",((2 2,2 3,3 3,3 2,2 2))", "bad lexical cast");
-
- test_wrong_wkt<bg::model::box<P> >("BOX(1 1,2 2,3 3)", "box should have 2");
- test_wrong_wkt<bg::model::box<P> >("BOX(1 1,2 2) )", "too much tokens");
-
- if (boost::is_floating_point<T>::type::value
- || ! boost::is_fundamental<T>::type::value)
- {
- test_wkt<P>("POINT(1.1 2.1)", 1);
- }
-
- test_wkt_output_iterator<bg::model::linestring<P> >("LINESTRING(1 1,2 2,3 3)");
- test_wkt_output_iterator<bg::model::ring<P> >("POLYGON((1 1,2 2,3 3))");
-}
-#endif
-
-
-int test_main(int, char* [])
-{
- test_all<double>();
- test_all<int>();
-
-#if defined(HAVE_TTMATH)
- test_all<ttmath_big>();
-#endif
-
- return 0;
-}
-
-/*
-
-Results can be checked in PostGIS by query below,
-or by MySQL (but replace length by glength and remove the perimeter)
-
-Note:
-- PostGIS gives "3" for a numpoints of a multi-linestring of 6 points in total (!)
- --> "npoints" should be taken for all geometries
-- SQL Server 2008 gives "6"
- select geometry::STGeomFromText('MULTILINESTRING((1 1,2 2,3 3),(4 4,5 5,6 6))',0).STNumPoints()
-- MySQL gives "NULL"
-
-select 1 as code,'np p' as header,npoints(geomfromtext('POINT(1 2)')) as contents
-union select 2,'length point', length(geomfromtext('POINT(1 2)'))
-union select 3,'peri point', perimeter(geomfromtext('POINT(1 2)'))
-union select 4,'area point',area(geomfromtext('POINT(1 2)'))
-
-
-union select 5,'# ls',npoints(geomfromtext('LINESTRING(1 1,2 2,3 3)'))
-union select 6,'length ls',length(geomfromtext('LINESTRING(1 1,2 2,3 3)'))
-union select 7,'peri ls',perimeter(geomfromtext('LINESTRING(1 1,2 2,3 3)'))
-union select 8,'aera ls',area(geomfromtext('LINESTRING(1 1,2 2,3 3)'))
-
-union select 9,'# poly',npoints(geomfromtext('POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,1 2,2 2,2 1,1 1),(1 1,1 2,2 2,2 1,1 1))'))
-union select 10,'length poly',length(geomfromtext('POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,1 2,2 2,2 1,1 1),(1 1,1 2,2 2,2 1,1 1))'))
-union select 11,'peri poly',perimeter(geomfromtext('POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,1 2,2 2,2 1,1 1),(1 1,1 2,2 2,2 1,1 1))'))
-union select 12,'area poly',area(geomfromtext('POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,1 2,2 2,2 1,1 1),(1 1,1 2,2 2,2 1,1 1))'))
-
-*/

Deleted: trunk/libs/geometry/test/extensions/gis/io/wkt/wkt.vcproj
==============================================================================
--- trunk/libs/geometry/test/extensions/gis/io/wkt/wkt.vcproj 2011-03-13 05:54:34 EDT (Sun, 13 Mar 2011)
+++ (empty file)
@@ -1,174 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="wkt"
- ProjectGUID="{1FA2ADE2-F649-4245-951E-A8F5935E7127}"
- RootNamespace="wkt"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)\wkt"
- 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"
- 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)\wkt"
- 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"
- />
- <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=".\wkt.cpp"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>

Modified: trunk/libs/geometry/test/multi/Jamfile.v2
==============================================================================
--- trunk/libs/geometry/test/multi/Jamfile.v2 (original)
+++ trunk/libs/geometry/test/multi/Jamfile.v2 2011-03-13 05:54:34 EDT (Sun, 13 Mar 2011)
@@ -1,4 +1,4 @@
-# test/arithmetic/Jamfile.v2
+# test/multi/Jamfile.v2
 #
 # Copyright (c) 2009 Barend Gehrels
 #


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