|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r69336 - trunk/libs/geometry/test/algorithms
From: barend.gehrels_at_[hidden]
Date: 2011-02-27 11:28:22
Author: barendgehrels
Date: 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
New Revision: 69336
URL: http://svn.boost.org/trac/boost/changeset/69336
Log:
Added ttmath_big for:
append,assign,buffer,comparable_distance,convert,correct,disjoint,distance,envelope,for_each,make,reverse,simplify,transform,unique
plus all vcproj files
Text files modified:
trunk/libs/geometry/test/algorithms/append.cpp | 4 ++
trunk/libs/geometry/test/algorithms/append.vcproj | 6 +-
trunk/libs/geometry/test/algorithms/area.vcproj | 4 +-
trunk/libs/geometry/test/algorithms/assign.cpp | 11 ++++++
trunk/libs/geometry/test/algorithms/assign.vcproj | 13 +++++--
trunk/libs/geometry/test/algorithms/buffer.cpp | 3 +
trunk/libs/geometry/test/algorithms/buffer.vcproj | 13 +++++--
trunk/libs/geometry/test/algorithms/centroid.cpp | 4 ++
trunk/libs/geometry/test/algorithms/centroid.vcproj | 4 +-
trunk/libs/geometry/test/algorithms/combine.cpp | 2 +
trunk/libs/geometry/test/algorithms/combine.vcproj | 13 +++++--
trunk/libs/geometry/test/algorithms/comparable_distance.cpp | 27 ++++++++------
trunk/libs/geometry/test/algorithms/comparable_distance.vcproj | 4 +-
trunk/libs/geometry/test/algorithms/convert.cpp | 31 +++++++++--------
trunk/libs/geometry/test/algorithms/convert.vcproj | 13 +++++--
trunk/libs/geometry/test/algorithms/convex_hull.vcproj | 4 +-
trunk/libs/geometry/test/algorithms/correct.cpp | 4 ++
trunk/libs/geometry/test/algorithms/correct.vcproj | 4 +-
trunk/libs/geometry/test/algorithms/disjoint.cpp | 4 ++
trunk/libs/geometry/test/algorithms/disjoint.vcproj | 4 +-
trunk/libs/geometry/test/algorithms/distance.cpp | 4 ++
trunk/libs/geometry/test/algorithms/distance.vcproj | 13 +++++--
trunk/libs/geometry/test/algorithms/envelope.cpp | 6 +++
trunk/libs/geometry/test/algorithms/envelope.vcproj | 4 +-
trunk/libs/geometry/test/algorithms/equals.vcproj | 4 +-
trunk/libs/geometry/test/algorithms/for_each.cpp | 5 ++
trunk/libs/geometry/test/algorithms/for_each.vcproj | 4 +-
trunk/libs/geometry/test/algorithms/intersection.cpp | 2
trunk/libs/geometry/test/algorithms/intersection.vcproj | 4 +-
trunk/libs/geometry/test/algorithms/intersects.vcproj | 4 +-
trunk/libs/geometry/test/algorithms/length.vcproj | 4 +-
trunk/libs/geometry/test/algorithms/make.cpp | 24 ++++++++-----
trunk/libs/geometry/test/algorithms/make.vcproj | 13 +++++--
trunk/libs/geometry/test/algorithms/overlaps.vcproj | 4 +-
trunk/libs/geometry/test/algorithms/perimeter.vcproj | 4 +-
trunk/libs/geometry/test/algorithms/reverse.cpp | 4 ++
trunk/libs/geometry/test/algorithms/reverse.vcproj | 6 +-
trunk/libs/geometry/test/algorithms/simplify.cpp | 5 ++
trunk/libs/geometry/test/algorithms/simplify.vcproj | 4 +-
trunk/libs/geometry/test/algorithms/test_area.hpp | 10 +++--
trunk/libs/geometry/test/algorithms/test_centroid.hpp | 10 ++--
trunk/libs/geometry/test/algorithms/test_convex_hull.hpp | 2
trunk/libs/geometry/test/algorithms/test_difference.hpp | 23 ++++++++++++
trunk/libs/geometry/test/algorithms/test_distance.hpp | 2
trunk/libs/geometry/test/algorithms/test_envelope.hpp | 70 +++++++++++++++++++++++++--------------
trunk/libs/geometry/test/algorithms/test_for_each.hpp | 8 ++--
trunk/libs/geometry/test/algorithms/test_intersection.hpp | 8 ++-
trunk/libs/geometry/test/algorithms/test_length.hpp | 2
trunk/libs/geometry/test/algorithms/test_perimeter.hpp | 2
trunk/libs/geometry/test/algorithms/test_union.hpp | 16 ++++++++-
trunk/libs/geometry/test/algorithms/transform.cpp | 26 ++++++++++----
trunk/libs/geometry/test/algorithms/transform.vcproj | 4 +-
trunk/libs/geometry/test/algorithms/union.cpp | 5 ++
trunk/libs/geometry/test/algorithms/union.vcproj | 5 +-
trunk/libs/geometry/test/algorithms/unique.cpp | 4 ++
trunk/libs/geometry/test/algorithms/unique.vcproj | 6 +-
trunk/libs/geometry/test/algorithms/within.vcproj | 4 +-
57 files changed, 335 insertions(+), 162 deletions(-)
Modified: trunk/libs/geometry/test/algorithms/append.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/append.cpp (original)
+++ trunk/libs/geometry/test/algorithms/append.cpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -82,5 +82,9 @@
test_all<bg::model::point<float, 2, bg::cs::cartesian> >();
test_all<bg::model::point<double, 2, bg::cs::cartesian> >();
+#ifdef HAVE_TTMATH
+ test_all<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
+#endif
+
return 0;
}
Modified: trunk/libs/geometry/test/algorithms/append.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/append.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/append.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\append"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -43,8 +43,8 @@
Optimization="0"
AdditionalIncludeDirectories="../../../..;.."
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- RuntimeLibrary="1"
ExceptionHandling="2"
+ RuntimeLibrary="1"
UsePrecompiledHeader="0"
DebugInformationFormat="1"
/>
@@ -93,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\append"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
Modified: trunk/libs/geometry/test/algorithms/area.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/area.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/area.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\area"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -93,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\area"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
Modified: trunk/libs/geometry/test/algorithms/assign.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/assign.cpp (original)
+++ trunk/libs/geometry/test/algorithms/assign.cpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -172,6 +172,17 @@
test_assign_linestring_2d<bg::model::point<float, 2, bg::cs::cartesian> >();
test_assign_linestring_2d<bg::model::point<double, 2, bg::cs::cartesian> >();
+#ifdef HAVE_TTMATH
+ // Next 3 need extra traits for c-array with custom type:
+ // test_assign_point_2d<ttmath_big[2]>();
+ // test_assign_point_3d<ttmath_big[3]>();
+ // test_assign_box_2d<ttmath_big[2]>();
+
+ test_assign_point_2d<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
+ test_assign_point_3d<bg::model::point<ttmath_big, 3, bg::cs::cartesian> >();
+ test_assign_box_or_segment_2d<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
+ test_assign_linestring_2d<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
+#endif
return 0;
}
Modified: trunk/libs/geometry/test/algorithms/assign.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/assign.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/assign.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -6,7 +6,6 @@
ProjectGUID="{94BC6547-67C1-44DB-903D-526537A91E23}"
RootNamespace="assign"
Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
@@ -21,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\assign"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -44,8 +43,8 @@
Optimization="0"
AdditionalIncludeDirectories="../../../..;.."
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- RuntimeLibrary="1"
ExceptionHandling="2"
+ RuntimeLibrary="1"
UsePrecompiledHeader="0"
DebugInformationFormat="1"
/>
@@ -83,6 +82,9 @@
Name="VCAppVerifierTool"
/>
<Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
@@ -91,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\assign"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -152,6 +154,9 @@
Name="VCAppVerifierTool"
/>
<Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
Modified: trunk/libs/geometry/test/algorithms/buffer.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/buffer.cpp (original)
+++ trunk/libs/geometry/test/algorithms/buffer.cpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -42,5 +42,8 @@
test_all<bg::model::point<float, 2, bg::cs::cartesian> >();
test_all<bg::model::point<double, 2, bg::cs::cartesian> >();
+#ifdef HAVE_TTMATH
+ test_all<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
+#endif
return 0;
}
Modified: trunk/libs/geometry/test/algorithms/buffer.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/buffer.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/buffer.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -6,7 +6,6 @@
ProjectGUID="{C66E1F6F-84F6-44E2-B5E8-2B127065BE31}"
RootNamespace="buffer"
Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
@@ -21,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\buffer"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -44,8 +43,8 @@
Optimization="0"
AdditionalIncludeDirectories="../../../..;.."
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- RuntimeLibrary="1"
ExceptionHandling="2"
+ RuntimeLibrary="1"
UsePrecompiledHeader="0"
DebugInformationFormat="1"
/>
@@ -83,6 +82,9 @@
Name="VCAppVerifierTool"
/>
<Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
@@ -91,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\buffer"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -152,6 +154,9 @@
Name="VCAppVerifierTool"
/>
<Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
Modified: trunk/libs/geometry/test/algorithms/centroid.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/centroid.cpp (original)
+++ trunk/libs/geometry/test/algorithms/centroid.cpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -62,6 +62,10 @@
test_centroid<bg::model::box<P> >("POLYGON((1 2,3 4))", 2, 3);
test_centroid<P>("POINT(3 3)", 3, 3);
+
+ //test_centroid_exception<bg::model::linestring<P> >("LINESTRING EMPTY");
+/// test_centroid_exception<bg::model::polygon<P> >("POLYGON EMPTY");
+// test_centroid_exception<bg::model::ring<P> >("POLYGON EMPTY");
}
Modified: trunk/libs/geometry/test/algorithms/centroid.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/centroid.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/centroid.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\centroid"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -93,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\centroid"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
Modified: trunk/libs/geometry/test/algorithms/combine.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/combine.cpp (original)
+++ trunk/libs/geometry/test/algorithms/combine.cpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -136,6 +136,8 @@
#if defined(HAVE_TTMATH)
test_3d<bg::model::point<ttmath_big, 3, bg::cs::cartesian> >();
+ test_spherical_degree<bg::model::point<ttmath_big, 2, bg::cs::spherical<bg::degree> > >();
+ test_spherical_radian<bg::model::point<ttmath_big, 2, bg::cs::spherical<bg::radian> > >();
#endif
return 0;
Modified: trunk/libs/geometry/test/algorithms/combine.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/combine.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/combine.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -6,7 +6,6 @@
ProjectGUID="{5330DAB1-DF27-44FC-971B-3C5094F82FA3}"
RootNamespace="combine"
Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
@@ -21,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\combine"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -44,8 +43,8 @@
Optimization="0"
AdditionalIncludeDirectories="../../../..;.."
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- RuntimeLibrary="1"
ExceptionHandling="2"
+ RuntimeLibrary="1"
UsePrecompiledHeader="0"
DebugInformationFormat="1"
/>
@@ -83,6 +82,9 @@
Name="VCAppVerifierTool"
/>
<Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
@@ -91,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\combine"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -152,6 +154,9 @@
Name="VCAppVerifierTool"
/>
<Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
Modified: trunk/libs/geometry/test/algorithms/comparable_distance.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/comparable_distance.cpp (original)
+++ trunk/libs/geometry/test/algorithms/comparable_distance.cpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -37,9 +37,9 @@
distance_type dr13 = bg::comparable_distance(p1, p3);
distance_type dr23 = bg::comparable_distance(p2, p3);
- BOOST_CHECK_CLOSE(double(dr12), 9.000, 0.001);
- BOOST_CHECK_CLOSE(double(dr13), 16.000, 0.001);
- BOOST_CHECK_CLOSE(double(dr23), 25.000, 0.001);
+ BOOST_CHECK_CLOSE(dr12, 9.000, 0.001);
+ BOOST_CHECK_CLOSE(dr13, 16.000, 0.001);
+ BOOST_CHECK_CLOSE(dr23, 25.000, 0.001);
}
@@ -54,7 +54,7 @@
bg::set<0>(p2, 2);
bg::set<1>(p2, 2);
- double d = bg::comparable_distance(p1, p2);
+ typename bg::coordinate_type<P>::type d = bg::comparable_distance(p1, p2);
BOOST_CHECK_CLOSE(d, 2.0, 0.001);
}
@@ -75,15 +75,15 @@
bg::model::referring_segment<P const> const seg(s1, s2);
- double d1 = bg::comparable_distance(p1, seg); BOOST_CHECK_CLOSE(d1, 8.0, 0.001);
- double d2 = bg::comparable_distance(p2, seg); BOOST_CHECK_CLOSE(d2, 2.0, 0.001);
- double d3 = bg::comparable_distance(p3, seg); BOOST_CHECK_CLOSE(d3, 0.02, 0.001);
- double d4 = bg::comparable_distance(p4, seg); BOOST_CHECK_CLOSE(d4, 0.02, 0.001);
- double d5 = bg::comparable_distance(p5, seg); BOOST_CHECK_CLOSE(d5, 0.0, 0.001);
+ coordinate_type d1 = bg::comparable_distance(p1, seg); BOOST_CHECK_CLOSE(d1, 8.0, 0.001);
+ coordinate_type d2 = bg::comparable_distance(p2, seg); BOOST_CHECK_CLOSE(d2, 2.0, 0.001);
+ coordinate_type d3 = bg::comparable_distance(p3, seg); BOOST_CHECK_CLOSE(d3, 0.02, 0.001);
+ coordinate_type d4 = bg::comparable_distance(p4, seg); BOOST_CHECK_CLOSE(d4, 0.02, 0.001);
+ coordinate_type d5 = bg::comparable_distance(p5, seg); BOOST_CHECK_CLOSE(d5, 0.0, 0.001);
// Reverse case
- double dr1 = bg::comparable_distance(seg, p1); BOOST_CHECK_CLOSE(dr1, d1, 0.001);
- double dr2 = bg::comparable_distance(seg, p2); BOOST_CHECK_CLOSE(dr2, d2, 0.001);
+ coordinate_type dr1 = bg::comparable_distance(seg, p1); BOOST_CHECK_CLOSE(dr1, d1, 0.001);
+ coordinate_type dr2 = bg::comparable_distance(seg, p2); BOOST_CHECK_CLOSE(dr2, d2, 0.001);
}
template <typename P>
@@ -95,7 +95,7 @@
P p = bg::make<P>(2, 1);
- double d = bg::comparable_distance(p, points);
+ typename bg::coordinate_type<P>::type d = bg::comparable_distance(p, points);
BOOST_CHECK_CLOSE(d, 0.70710678, 0.001);
p = bg::make<P>(5, 5);
@@ -133,5 +133,8 @@
test_all<bg::model::d2::point_xy<float> >();
test_all<bg::model::d2::point_xy<double> >();
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
return 0;
}
Modified: trunk/libs/geometry/test/algorithms/comparable_distance.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/comparable_distance.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/comparable_distance.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\comparable_distance"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -93,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\comparable_distance"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
Modified: trunk/libs/geometry/test/algorithms/convert.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/convert.cpp (original)
+++ trunk/libs/geometry/test/algorithms/convert.cpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -31,10 +31,10 @@
box_type b;
bg::convert(p, b);
- BOOST_CHECK_CLOSE(double(bg::get<0, 0>(b)), 1.0, 0.001);
- BOOST_CHECK_CLOSE(double(bg::get<0, 1>(b)), 2.0, 0.001);
- BOOST_CHECK_CLOSE(double(bg::get<1, 0>(b)), 1.0, 0.001);
- BOOST_CHECK_CLOSE(double(bg::get<1, 1>(b)), 2.0, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<0, 0>(b)), 1.0, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<0, 1>(b)), 2.0, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<1, 0>(b)), 1.0, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<1, 1>(b)), 2.0, 0.001);
}
template <typename P>
@@ -59,20 +59,20 @@
//std::cout << bg::wkt(ring) << std::endl;
typename boost::range_const_iterator<ring_type>::type it = ring.begin();
- BOOST_CHECK_CLOSE(double(bg::get<0>(*it)), 1.0, 0.001);
- BOOST_CHECK_CLOSE(double(bg::get<1>(*it)), 2.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<0>(*it), 1.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(*it), 2.0, 0.001);
it++;
- BOOST_CHECK_CLOSE(double(bg::get<0>(*it)), 1.0, 0.001);
- BOOST_CHECK_CLOSE(double(bg::get<1>(*it)), 4.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<0>(*it), 1.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(*it), 4.0, 0.001);
it++;
- BOOST_CHECK_CLOSE(double(bg::get<0>(*it)), 3.0, 0.001);
- BOOST_CHECK_CLOSE(double(bg::get<1>(*it)), 4.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<0>(*it), 3.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(*it), 4.0, 0.001);
it++;
- BOOST_CHECK_CLOSE(double(bg::get<0>(*it)), 3.0, 0.001);
- BOOST_CHECK_CLOSE(double(bg::get<1>(*it)), 2.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<0>(*it), 3.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(*it), 2.0, 0.001);
it++;
- BOOST_CHECK_CLOSE(double(bg::get<0>(*it)), 1.0, 0.001);
- BOOST_CHECK_CLOSE(double(bg::get<1>(*it)), 2.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<0>(*it), 1.0, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(*it), 2.0, 0.001);
BOOST_CHECK_EQUAL(ring.size(), 5u);
@@ -92,5 +92,8 @@
test_std<bg::model::point<float, 2, bg::cs::cartesian> >();
test_std<bg::model::point<double, 2, bg::cs::cartesian> >();
+#ifdef HAVE_TTMATH
+ test_std<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
+#endif
return 0;
}
Modified: trunk/libs/geometry/test/algorithms/convert.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/convert.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/convert.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -6,7 +6,6 @@
ProjectGUID="{FABF1AA7-F695-49F8-92F6-AB6C4B0C088A}"
RootNamespace="convert"
Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
@@ -21,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\convert"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -44,8 +43,8 @@
Optimization="0"
AdditionalIncludeDirectories="../../../..;.."
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- RuntimeLibrary="1"
ExceptionHandling="2"
+ RuntimeLibrary="1"
UsePrecompiledHeader="0"
DebugInformationFormat="1"
/>
@@ -83,6 +82,9 @@
Name="VCAppVerifierTool"
/>
<Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
@@ -91,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\convert"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -152,6 +154,9 @@
Name="VCAppVerifierTool"
/>
<Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
Modified: trunk/libs/geometry/test/algorithms/convex_hull.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/convex_hull.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/convex_hull.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\convex_hull"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -93,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\convex_hull"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
Modified: trunk/libs/geometry/test/algorithms/correct.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/correct.cpp (original)
+++ trunk/libs/geometry/test/algorithms/correct.cpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -168,5 +168,9 @@
test_all<bg::model::d2::point_xy<float> >();
test_all<bg::model::d2::point_xy<double> >();
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
return 0;
}
Modified: trunk/libs/geometry/test/algorithms/correct.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/correct.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/correct.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\correct"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -93,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\correct"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
Modified: trunk/libs/geometry/test/algorithms/disjoint.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/disjoint.cpp (original)
+++ trunk/libs/geometry/test/algorithms/disjoint.cpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -117,5 +117,9 @@
test_all<bg::model::d2::point_xy<float> >();
test_all<bg::model::d2::point_xy<double> >();
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
return 0;
}
Modified: trunk/libs/geometry/test/algorithms/disjoint.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/disjoint.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/disjoint.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -93,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
Modified: trunk/libs/geometry/test/algorithms/distance.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/distance.cpp (original)
+++ trunk/libs/geometry/test/algorithms/distance.cpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -222,5 +222,9 @@
test_all<bg::model::d2::point_xy<float> >();
test_all<bg::model::d2::point_xy<double> >();
+#ifdef HAVE_TTMATH
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
return 0;
}
Modified: trunk/libs/geometry/test/algorithms/distance.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/distance.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/distance.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -6,7 +6,6 @@
ProjectGUID="{347D08A4-22E9-45B1-A55B-AE84AA2EAA53}"
RootNamespace="distance"
Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
@@ -21,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\distance"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -44,8 +43,8 @@
Optimization="0"
AdditionalIncludeDirectories="../../../..;.."
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- RuntimeLibrary="1"
ExceptionHandling="2"
+ RuntimeLibrary="1"
UsePrecompiledHeader="0"
DebugInformationFormat="1"
/>
@@ -83,6 +82,9 @@
Name="VCAppVerifierTool"
/>
<Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
@@ -91,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\distance"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -152,6 +154,9 @@
Name="VCAppVerifierTool"
/>
<Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
Modified: trunk/libs/geometry/test/algorithms/envelope.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/envelope.cpp (original)
+++ trunk/libs/geometry/test/algorithms/envelope.cpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -59,6 +59,12 @@
test_2d<bg::model::d2::point_xy<double> >();
test_3d<test::test_point>();
+ test_3d<boost::tuple<int, int, int> >();
+
+#ifdef HAVE_TTMATH
+ test_2d<bg::model::d2::point_xy<ttmath_big> >();
+ test_3d<boost::tuple<ttmath_big, ttmath_big, ttmath_big> >();
+#endif
return 0;
}
Modified: trunk/libs/geometry/test/algorithms/envelope.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/envelope.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/envelope.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\envelope"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -93,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\envelope"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
Modified: trunk/libs/geometry/test/algorithms/equals.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/equals.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/equals.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\equals"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -93,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\equals"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
Modified: trunk/libs/geometry/test/algorithms/for_each.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/for_each.cpp (original)
+++ trunk/libs/geometry/test/algorithms/for_each.cpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -70,5 +70,10 @@
int test_main(int, char* [])
{
test_all<bg::model::point<double, 2, bg::cs::cartesian> >();
+
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
+#endif
+
return 0;
}
Modified: trunk/libs/geometry/test/algorithms/for_each.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/for_each.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/for_each.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\for_each"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -93,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\for_each"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
Modified: trunk/libs/geometry/test/algorithms/intersection.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/intersection.cpp (original)
+++ trunk/libs/geometry/test/algorithms/intersection.cpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -197,7 +197,7 @@
Box box_out;
bool detected = bg::intersection(box1, box2, box_out);
- double area = bg::area(box_out);
+ typename bg::area_result<Box>::type area = bg::area(box_out);
BOOST_CHECK_EQUAL(detected, expected_result);
if (detected && expected_result)
Modified: trunk/libs/geometry/test/algorithms/intersection.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/intersection.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/intersection.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\intersection"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -93,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\intersection"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
Modified: trunk/libs/geometry/test/algorithms/intersects.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/intersects.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/intersects.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\intersects"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -93,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\intersects"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
Modified: trunk/libs/geometry/test/algorithms/length.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/length.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/length.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\length"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -93,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\length"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
Modified: trunk/libs/geometry/test/algorithms/make.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/make.cpp (original)
+++ trunk/libs/geometry/test/algorithms/make.cpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -23,17 +23,17 @@
void test_point_2d()
{
P p = bg::make<P>((T) 123, (T) 456);
- BOOST_CHECK_CLOSE( ((double) bg::get<0>(p)), (double) 123, 1.0e-6);
- BOOST_CHECK_CLOSE( ((double) bg::get<1>(p)), (double) 456, 1.0e-6);
+ BOOST_CHECK_CLOSE(bg::get<0>(p), 123.0, 1.0e-6);
+ BOOST_CHECK_CLOSE(bg::get<1>(p), 456.0, 1.0e-6);
}
template <typename T, typename P>
void test_point_3d()
{
P p = bg::make<P>((T) 123, (T) 456, (T) 789);
- BOOST_CHECK_CLOSE( ((double) bg::get<0>(p)), (double) 123, 1.0e-6);
- BOOST_CHECK_CLOSE( ((double) bg::get<1>(p)), (double) 456, 1.0e-6);
- BOOST_CHECK_CLOSE( ((double) bg::get<2>(p)), (double) 789, 1.0e-6);
+ BOOST_CHECK_CLOSE( bg::get<0>(p), 123.0, 1.0e-6);
+ BOOST_CHECK_CLOSE( bg::get<1>(p), 456.0, 1.0e-6);
+ BOOST_CHECK_CLOSE( bg::get<2>(p), 789.0, 1.0e-6);
}
template <typename T, typename P>
@@ -41,10 +41,10 @@
{
typedef bg::model::box<P> B;
B b = bg::make<B>((T) 123, (T) 456, (T) 789, (T) 1011);
- BOOST_CHECK_CLOSE( ((double) bg::get<bg::min_corner, 0>(b)), (double) 123, 1.0e-6);
- BOOST_CHECK_CLOSE( ((double) bg::get<bg::min_corner, 1>(b)), (double) 456, 1.0e-6);
- BOOST_CHECK_CLOSE( ((double) bg::get<bg::max_corner, 0>(b)), (double) 789, 1.0e-6);
- BOOST_CHECK_CLOSE( ((double) bg::get<bg::max_corner, 1>(b)), (double) 1011, 1.0e-6);
+ BOOST_CHECK_CLOSE( (bg::get<bg::min_corner, 0>(b)), 123.0, 1.0e-6);
+ BOOST_CHECK_CLOSE( (bg::get<bg::min_corner, 1>(b)), 456.0, 1.0e-6);
+ BOOST_CHECK_CLOSE( (bg::get<bg::max_corner, 0>(b)), 789.0, 1.0e-6);
+ BOOST_CHECK_CLOSE( (bg::get<bg::max_corner, 1>(b)), 1011.0, 1.0e-6);
b = bg::make_inverse<B>();
}
@@ -118,5 +118,11 @@
test_3d<bg::model::point<double, 3, bg::cs::cartesian> >();
+#if defined(HAVE_TTMATH)
+ test_2d<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
+ test_3d<bg::model::point<ttmath_big, 3, bg::cs::cartesian> >();
+#endif
+
+
return 0;
}
Modified: trunk/libs/geometry/test/algorithms/make.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/make.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/make.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -6,7 +6,6 @@
ProjectGUID="{BCD17F3E-8DF2-4B00-A75E-BF7372D2873B}"
RootNamespace="make"
Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
@@ -21,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\make"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -44,8 +43,8 @@
Optimization="0"
AdditionalIncludeDirectories="../../../..;.."
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- RuntimeLibrary="1"
ExceptionHandling="2"
+ RuntimeLibrary="1"
UsePrecompiledHeader="0"
DebugInformationFormat="1"
/>
@@ -83,6 +82,9 @@
Name="VCAppVerifierTool"
/>
<Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
@@ -91,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\make"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -152,6 +154,9 @@
Name="VCAppVerifierTool"
/>
<Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
Modified: trunk/libs/geometry/test/algorithms/overlaps.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/overlaps.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/overlaps.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\overlaps"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -93,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\overlaps"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
Modified: trunk/libs/geometry/test/algorithms/perimeter.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/perimeter.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/perimeter.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\perimeter"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -93,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\perimeter"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
Modified: trunk/libs/geometry/test/algorithms/reverse.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/reverse.cpp (original)
+++ trunk/libs/geometry/test/algorithms/reverse.cpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -64,5 +64,9 @@
test_all<bg::model::d2::point_xy<int> >();
test_all<bg::model::d2::point_xy<double> >();
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
return 0;
}
Modified: trunk/libs/geometry/test/algorithms/reverse.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/reverse.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/reverse.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="8,00"
+ Version="8.00"
Name="reverse"
ProjectGUID="{14B5DFC5-D511-4D8C-A231-EE90A05687E1}"
RootNamespace="reverse"
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\reverse"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -93,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\reverse"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
Modified: trunk/libs/geometry/test/algorithms/simplify.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/simplify.cpp (original)
+++ trunk/libs/geometry/test/algorithms/simplify.cpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -92,5 +92,10 @@
test_spherical<bg::model::point<double, 2, bg::cs::spherical<bg::degree> > >();
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+ test_spherical<bg::model::point<ttmath_big, 2, bg::cs::spherical<bg::degree> > >();
+#endif
+
return 0;
}
Modified: trunk/libs/geometry/test/algorithms/simplify.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/simplify.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/simplify.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\simplify"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -93,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\simplify"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
Modified: trunk/libs/geometry/test/algorithms/test_area.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/test_area.hpp (original)
+++ trunk/libs/geometry/test/algorithms/test_area.hpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -18,9 +18,10 @@
template <typename Geometry>
-void test_area(Geometry const& geometry, long double expected_area)
+void test_area(Geometry const& geometry,
+ typename bg::area_result<Geometry>::type expected_area)
{
- long double area = bg::area(geometry);
+ typename bg::area_result<Geometry>::type area = bg::area(geometry);
#ifdef GEOMETRY_TEST_DEBUG
std::ostringstream out;
@@ -46,7 +47,7 @@
bg::strategy::area::surveyor
<
typename bg::point_type<Geometry>::type,
- long double
+ typename bg::coordinate_type<Geometry>::type
> strategy2;
area = bg::area(geometry, strategy2);
@@ -54,7 +55,8 @@
}
template <typename Geometry>
-void test_geometry(std::string const& wkt, double expected_area)
+void test_geometry(std::string const& wkt,
+ typename bg::area_result<Geometry>::type expected_area)
{
Geometry geometry;
bg::read_wkt(wkt, geometry);
Modified: trunk/libs/geometry/test/algorithms/test_centroid.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/test_centroid.hpp (original)
+++ trunk/libs/geometry/test/algorithms/test_centroid.hpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -30,8 +30,8 @@
template <typename Point, typename T>
static void apply(Point const& p, T const& x, T const& y, T const&)
{
- BOOST_CHECK_CLOSE(double(bg::get<0>(p)), double(x), 0.001);
- BOOST_CHECK_CLOSE(double(bg::get<1>(p)), double(y), 0.001);
+ BOOST_CHECK_CLOSE(bg::get<0>(p), x, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(p), y, 0.001);
}
};
@@ -42,9 +42,9 @@
template <typename Point, typename T>
static void apply(Point const& p, T const& x, T const& y, T const& z)
{
- BOOST_CHECK_CLOSE(double(bg::get<0>(p)), double(x), 0.001);
- BOOST_CHECK_CLOSE(double(bg::get<1>(p)), double(y), 0.001);
- BOOST_CHECK_CLOSE(double(bg::get<2>(p)), double(z), 0.001);
+ BOOST_CHECK_CLOSE(bg::get<0>(p), x, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(p), y, 0.001);
+ BOOST_CHECK_CLOSE(bg::get<2>(p), z, 0.001);
}
};
Modified: trunk/libs/geometry/test/algorithms/test_convex_hull.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/test_convex_hull.hpp (original)
+++ trunk/libs/geometry/test/algorithms/test_convex_hull.hpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -41,7 +41,7 @@
BOOST_CHECK(bg::num_points(geometry) == size_original);
- double ah = bg::area(hull);
+ typename bg::area_result<Geometry>::type ah = bg::area(hull);
if (reverse)
{
ah = -ah;
Modified: trunk/libs/geometry/test/algorithms/test_difference.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/test_difference.hpp (original)
+++ trunk/libs/geometry/test/algorithms/test_difference.hpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -14,6 +14,8 @@
#include <boost/foreach.hpp>
#include <geometry_test_common.hpp>
+#include <boost/range/algorithm/copy.hpp>
+
#include <boost/geometry/algorithms/difference.hpp>
#include <boost/geometry/algorithms/sym_difference.hpp>
#include <boost/geometry/multi/algorithms/difference.hpp>
@@ -62,7 +64,7 @@
bg::difference(g1, g2, clip);
}
- double area = 0;
+ typename bg::area_result<G1>::type area = 0;
std::size_t n = 0;
for (typename std::vector<OutputType>::iterator it = clip.begin();
it != clip.end();
@@ -79,6 +81,25 @@
area += bg::area(*it);
}
+ {
+ // Test inserter functionality
+ // Test if inserter returns output-iterator (using Boost.Range copy)
+ std::vector<OutputType> inserted, array_with_one_empty_geometry;
+ array_with_one_empty_geometry.push_back(OutputType());
+ if (sym)
+ {
+ boost::copy(array_with_one_empty_geometry, bg::sym_difference_inserter<OutputType>(g1, g2, std::back_inserter(inserted)));
+ }
+ else
+ {
+ boost::copy(array_with_one_empty_geometry, bg::difference_inserter<OutputType>(g1, g2, std::back_inserter(inserted)));
+ }
+
+ BOOST_CHECK_EQUAL(boost::size(clip), boost::size(inserted) - 1);
+ }
+
+
+
#if ! defined(BOOST_GEOMETRY_NO_BOOST_TEST)
/*if (expected_point_count > 0)
Modified: trunk/libs/geometry/test/algorithms/test_distance.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/test_distance.hpp (original)
+++ trunk/libs/geometry/test/algorithms/test_distance.hpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -111,7 +111,7 @@
Geometry2 const& geometry2,
long double expected_distance)
{
- long double distance = bg::distance(geometry1, geometry2);
+ typename bg::distance_result<Geometry1>::type distance = bg::distance(geometry1, geometry2);
#ifdef GEOMETRY_TEST_DEBUG
std::ostringstream out;
Modified: trunk/libs/geometry/test/algorithms/test_envelope.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/test_envelope.hpp (original)
+++ trunk/libs/geometry/test/algorithms/test_envelope.hpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -18,39 +18,53 @@
#include <boost/geometry/extensions/gis/io/wkt/read_wkt.hpp>
-template<std::size_t DimensionCount>
+template<typename Box, std::size_t DimensionCount>
struct check_result
{};
-template <>
-struct check_result<2>
+template <typename Box>
+struct check_result<Box, 2>
{
- template <typename Box, typename T>
- static void apply(Box const& b, const T& x1, const T& y1, const T& z1,
- const T& x2, const T& y2, const T& z2)
+ typedef typename bg::coordinate_type<Box>::type ctype;
+ typedef typename boost::mpl::if_
+ <
+ boost::is_arithmetic<ctype>,
+ double,
+ ctype
+ >::type type;
+
+ static void apply(Box const& b, const type& x1, const type& y1, const type& z1,
+ const type& x2, const type& y2, const type& z2)
{
- BOOST_CHECK_CLOSE(double(bg::get<bg::min_corner, 0>(b)), double(x1), 0.001);
- BOOST_CHECK_CLOSE(double(bg::get<bg::min_corner, 1>(b)), double(y1), 0.001);
+ BOOST_CHECK_CLOSE((bg::get<bg::min_corner, 0>(b)), x1, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<bg::min_corner, 1>(b)), y1, 0.001);
- BOOST_CHECK_CLOSE(double(bg::get<bg::max_corner, 0>(b)), double(x2), 0.001);
- BOOST_CHECK_CLOSE(double(bg::get<bg::max_corner, 1>(b)), double(y2), 0.001);
+ BOOST_CHECK_CLOSE((bg::get<bg::max_corner, 0>(b)), x2, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<bg::max_corner, 1>(b)), y2, 0.001);
}
};
-template <>
-struct check_result<3>
+template <typename Box>
+struct check_result<Box, 3>
{
- template <typename Box, typename T>
- static void apply(Box const& b, const T& x1, const T& y1, const T& z1,
- const T& x2, const T& y2, const T& z2)
+ typedef typename bg::coordinate_type<Box>::type ctype;
+ typedef typename boost::mpl::if_
+ <
+ boost::is_arithmetic<ctype>,
+ double,
+ ctype
+ >::type type;
+
+ static void apply(Box const& b, const type& x1, const type& y1, const type& z1,
+ const type& x2, const type& y2, const type& z2)
{
- BOOST_CHECK_CLOSE(double(bg::get<bg::min_corner, 0>(b)), double(x1), 0.001);
- BOOST_CHECK_CLOSE(double(bg::get<bg::min_corner, 1>(b)), double(y1), 0.001);
- BOOST_CHECK_CLOSE(double(bg::get<bg::min_corner, 2>(b)), double(z1), 0.001);
-
- BOOST_CHECK_CLOSE(double(bg::get<bg::max_corner, 0>(b)), double(x2), 0.001);
- BOOST_CHECK_CLOSE(double(bg::get<bg::max_corner, 1>(b)), double(y2), 0.001);
- BOOST_CHECK_CLOSE(double(bg::get<bg::max_corner, 2>(b)), double(z2), 0.001);
+ BOOST_CHECK_CLOSE((bg::get<bg::min_corner, 0>(b)), x1, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<bg::min_corner, 1>(b)), y1, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<bg::min_corner, 2>(b)), z1, 0.001);
+
+ BOOST_CHECK_CLOSE((bg::get<bg::max_corner, 0>(b)), x2, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<bg::max_corner, 1>(b)), y2, 0.001);
+ BOOST_CHECK_CLOSE((bg::get<bg::max_corner, 2>(b)), z2, 0.001);
}
};
@@ -61,12 +75,14 @@
const T& y1, const T& y2,
const T& z1 = 0, const T& z2 = 0)
{
+ typedef bg::model::box<typename bg::point_type<Geometry>::type > box_type;
+
Geometry geometry;
bg::read_wkt(wkt, geometry);
- bg::model::box<typename bg::point_type<Geometry>::type > b;
+ box_type b;
bg::envelope(geometry, b);
- check_result<bg::dimension<Geometry>::type::value>::apply(b, x1, y1, z1, x2, y2, z2);
+ check_result<box_type, bg::dimension<Geometry>::type::value>::apply(b, x1, y1, z1, x2, y2, z2);
}
template <typename Geometry, typename T>
@@ -75,12 +91,14 @@
const T& y1, const T& y2,
const T& z1 = 0, const T& z2 = 0)
{
+ typedef bg::model::box<typename bg::point_type<Geometry>::type > box_type;
+
Geometry geometry;
bg::read_wkt(wkt, geometry);
- bg::model::box<typename bg::point_type<Geometry>::type > b;
+ box_type b;
bg::envelope(geometry, b);
- check_result<bg::dimension<Geometry>::type::value>::apply(b, x1, y1, z1, x2, y2, z2);
+ check_result<box_type, bg::dimension<Geometry>::type::value>::apply(b, x1, y1, z1, x2, y2, z2);
}
Modified: trunk/libs/geometry/test/algorithms/test_for_each.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/test_for_each.hpp (original)
+++ trunk/libs/geometry/test/algorithms/test_for_each.hpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -36,7 +36,7 @@
template<typename Point>
struct sum_x_functor
{
- int sum;
+ typename bg::coordinate_type<Point>::type sum;
sum_x_functor()
: sum(0)
@@ -44,7 +44,7 @@
inline void operator()(Point const& p)
{
- sum += int(bg::get<0>(p));
+ sum += bg::get<0>(p);
}
};
@@ -60,7 +60,7 @@
template<typename Segment>
struct sum_segment_length
{
- double sum;
+ typename bg::coordinate_type<Segment>::type sum;
sum_segment_length()
: sum(0)
@@ -156,7 +156,7 @@
sum_segment_length<bg::model::referring_segment<point_type const> > functor;
functor = bg::for_each_segment(geometry, functor);
- BOOST_CHECK_EQUAL(functor.sum, expected_length);
+ BOOST_CHECK_CLOSE(functor.sum, expected_length, 0.0001);
}
Modified: trunk/libs/geometry/test/algorithms/test_intersection.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/test_intersection.hpp (original)
+++ trunk/libs/geometry/test/algorithms/test_intersection.hpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -36,7 +36,8 @@
template <typename OutputType, typename CalculationType, typename G1, typename G2>
-double test_intersection(std::string const& caseid, G1 const& g1, G2 const& g2,
+typename bg::area_result<G1>::type test_intersection(std::string const& caseid,
+ G1 const& g1, G2 const& g2,
std::size_t expected_count = 0, std::size_t expected_point_count = 0,
double expected_length_or_area = 0,
double percentage = 0.0001,
@@ -68,7 +69,7 @@
bg::intersection_inserter<OutputType>(g1, g2, std::back_inserter(clip), strategy());
- double length_or_area = 0;
+ typename bg::area_result<G1>::type length_or_area = 0;
std::size_t n = 0;
for (typename std::vector<OutputType>::iterator it = clip.begin();
it != clip.end();
@@ -173,7 +174,8 @@
}
template <typename OutputType, typename G1, typename G2>
-double test_one(std::string const& caseid, std::string const& wkt1, std::string const& wkt2,
+typename bg::area_result<G1>::type test_one(std::string const& caseid,
+ std::string const& wkt1, std::string const& wkt2,
std::size_t expected_count = 0, std::size_t expected_point_count = 0,
double expected_length_or_area = 0,
double percentage = 0.0001,
Modified: trunk/libs/geometry/test/algorithms/test_length.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/test_length.hpp (original)
+++ trunk/libs/geometry/test/algorithms/test_length.hpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -18,7 +18,7 @@
template <typename Geometry>
void test_length(Geometry const& geometry, long double expected_length)
{
- long double length = bg::length(geometry);
+ typename bg::length_result<Geometry>::type length = bg::length(geometry);
#ifdef GEOMETRY_TEST_DEBUG
std::ostringstream out;
Modified: trunk/libs/geometry/test/algorithms/test_perimeter.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/test_perimeter.hpp (original)
+++ trunk/libs/geometry/test/algorithms/test_perimeter.hpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -21,7 +21,7 @@
template <typename Geometry>
void test_perimeter(Geometry const& geometry, long double expected_perimeter)
{
- long double perimeter = bg::perimeter(geometry);
+ typename bg::distance_result<Geometry>::type perimeter = bg::perimeter(geometry);
#ifdef GEOMETRY_TEST_DEBUG
std::ostringstream out;
Modified: trunk/libs/geometry/test/algorithms/test_union.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/test_union.hpp (original)
+++ trunk/libs/geometry/test/algorithms/test_union.hpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -12,6 +12,8 @@
#include <geometry_test_common.hpp>
+#include <boost/range/algorithm/copy.hpp>
+
#include <boost/geometry/algorithms/union.hpp>
#include <boost/geometry/algorithms/area.hpp>
@@ -41,9 +43,9 @@
{
typedef typename bg::coordinate_type<G1>::type coordinate_type;
std::vector<OutputType> clip;
- bg::union_inserter<OutputType>(g1, g2, std::back_inserter(clip));
+ bg::union_(g1, g2, clip);
- double area = 0;
+ typename bg::area_result<G1>::type area = 0;
std::size_t n = 0;
std::size_t holes = 0;
for (typename std::vector<OutputType>::iterator it = clip.begin();
@@ -59,6 +61,16 @@
n += bg::num_points(*it, true);
}
+ {
+ // Test inserter functionality
+ // Test if inserter returns output-iterator (using Boost.Range copy)
+ std::vector<OutputType> inserted, array_with_one_empty_geometry;
+ array_with_one_empty_geometry.push_back(OutputType());
+ boost::copy(array_with_one_empty_geometry, bg::union_inserter<OutputType>(g1, g2, std::back_inserter(inserted)));
+ BOOST_CHECK_EQUAL(boost::size(clip), boost::size(inserted) - 1);
+ }
+
+
/***
std::cout << "case: " << caseid
Modified: trunk/libs/geometry/test/algorithms/transform.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/transform.cpp (original)
+++ trunk/libs/geometry/test/algorithms/transform.cpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -23,7 +23,12 @@
#include <test_common/test_point.hpp>
template <typename P1, typename P2>
-void test_transform_point(double value)
+void test_transform_point(
+ typename bg::select_most_precise
+ <
+ typename bg::coordinate_type<P1>::type,
+ double
+ >::type value)
{
P1 p1;
bg::set<0>(p1, 1);
@@ -31,8 +36,8 @@
P2 p2;
BOOST_CHECK(bg::transform(p1, p2));
- BOOST_CHECK_CLOSE(value * bg::get<0>(p1), double(bg::get<0>(p2)), 0.001);
- BOOST_CHECK_CLOSE(value * bg::get<1>(p1), double(bg::get<1>(p2)), 0.001);
+ BOOST_CHECK_CLOSE(value * bg::get<0>(p1), bg::get<0>(p2), 0.001);
+ BOOST_CHECK_CLOSE(value * bg::get<1>(p1), bg::get<1>(p2), 0.001);
}
template <typename P1, typename P2>
@@ -75,8 +80,8 @@
spherical_type sph2;
BOOST_CHECK(transform(p, sph2));
- BOOST_CHECK_CLOSE(double(bg::get<0>(sph1)), double(bg::get<0>(sph2)), 0.001);
- BOOST_CHECK_CLOSE(double(bg::get<1>(sph1)), double(bg::get<1>(sph2)), 0.001);
+ BOOST_CHECK_CLOSE(bg::get<0>(sph1), bg::get<0>(sph2), 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(sph1), bg::get<1>(sph2), 0.001);
//std::cout << dsv(p) << std::endl;
//std::cout << dsv(sph2) << std::endl;
@@ -90,8 +95,8 @@
BOOST_CHECK(transform(sph1, p));
BOOST_CHECK(transform(p, sph2));
- BOOST_CHECK_CLOSE(double(bg::get<0>(sph1)), double(bg::get<0>(sph2)), 0.001);
- BOOST_CHECK_CLOSE(double(bg::get<1>(sph1)), double(bg::get<1>(sph2)), 0.001);
+ BOOST_CHECK_CLOSE(bg::get<0>(sph1), bg::get<0>(sph2), 0.001);
+ BOOST_CHECK_CLOSE(bg::get<1>(sph1), bg::get<1>(sph2), 0.001);
//std::cout << dsv(sph1) << " " << dsv(p) << " " << dsv(sph2) << std::endl;
}
@@ -117,5 +122,12 @@
test_transformations<float, bg::radian>(3 * bg::math::d2r, 51 * bg::math::d2r, 1);
test_transformations<double, bg::radian>(3 * bg::math::d2r, 51 * bg::math::d2r, 1);
+#if defined(HAVE_TTMATH)
+ typedef bg::model::d2::point_xy<ttmath_big > PT;
+ test_all<PT, PT>();
+ test_transformations<ttmath_big, bg::degree>(4, 52, 1);
+ test_transformations<ttmath_big, bg::radian>(3 * bg::math::d2r, 51 * bg::math::d2r, 1);
+#endif
+
return 0;
}
Modified: trunk/libs/geometry/test/algorithms/transform.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/transform.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/transform.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\transform"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -93,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\transform"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
Modified: trunk/libs/geometry/test/algorithms/union.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/union.cpp (original)
+++ trunk/libs/geometry/test/algorithms/union.cpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -24,8 +24,11 @@
test_one<Polygon, Polygon, Polygon>("star_ring", example_star, example_ring,
1, 0, 23, 5.67017141);
+ // This sample was selected because of the border case, and ttmath generates one point more.
test_one<Polygon, Polygon, Polygon>("star_poly", example_star, example_polygon,
- 1, 1, 27, 5.647949);
+ 1, 1,
+ boost::is_same<typename bg::coordinate_type<Ring>::type, ttmath_big>::value ? 28 : 27,
+ 5.647949);
// Pseudo-box as Polygon
// (note, internally, the intersection points is different, so yes,
Modified: trunk/libs/geometry/test/algorithms/union.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/union.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/union.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\union"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -40,6 +40,7 @@
/>
<Tool
Name="VCCLCompilerTool"
+ AdditionalOptions="/bigobj"
Optimization="0"
AdditionalIncludeDirectories="../../../..;.."
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NONDLL;_CRT_SECURE_NO_WARNINGS;TEST_WITH_SVG"
@@ -94,7 +95,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\union"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
Modified: trunk/libs/geometry/test/algorithms/unique.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/unique.cpp (original)
+++ trunk/libs/geometry/test/algorithms/unique.cpp 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -49,5 +49,9 @@
test_all<bg::model::d2::point_xy<int> >();
test_all<bg::model::d2::point_xy<double> >();
+#if defined(HAVE_TTMATH)
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
+#endif
+
return 0;
}
Modified: trunk/libs/geometry/test/algorithms/unique.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/unique.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/unique.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="8,00"
+ Version="8.00"
Name="unique"
ProjectGUID="{104D31F9-49BA-4A1A-B84F-0A3AEE3C4DB2}"
RootNamespace="unique"
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\unique"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -93,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\unique"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
Modified: trunk/libs/geometry/test/algorithms/within.vcproj
==============================================================================
--- trunk/libs/geometry/test/algorithms/within.vcproj (original)
+++ trunk/libs/geometry/test/algorithms/within.vcproj 2011-02-27 11:27:57 EST (Sun, 27 Feb 2011)
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\within"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
>
<Tool
@@ -93,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\within"
ConfigurationType="1"
- InheritedPropertySheets="..\boost.vsprops"
+ InheritedPropertySheets="..\boost.vsprops;..\ttmath.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
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