Merge pull request #66 from mkaravel/feature/debug_macro

Feature/debug macro
This commit is contained in:
Adam Wulkiewicz 2014-06-22 15:29:16 +02:00
commit 17f08e3ac4
49 changed files with 248 additions and 242 deletions

View File

@ -10,7 +10,7 @@
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_SIMPLE_DEBUG_LINEAR_HPP
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_SIMPLE_DEBUG_LINEAR_HPP
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
#include <algorithm>
#include <iostream>
#include <vector>
@ -37,10 +37,10 @@ namespace detail { namespace is_simple
{
#ifdef BOOST_GEOMETRY_TEST_DEBUG
template <typename TurnIterator>
inline void debug_print_turns(TurnIterator first, TurnIterator beyond)
{
#ifdef GEOMETRY_TEST_DEBUG
std::cout << "turns:";
for (TurnIterator tit = first; tit != beyond; ++tit)
{
@ -55,14 +55,19 @@ inline void debug_print_turns(TurnIterator first, TurnIterator beyond)
<< "] ";
}
std::cout << std::endl << std::endl;
#endif // GEOMETRY_TEST_DEBUG
}
#else
template <typename TurnIterator>
inline void debug_print_turns(TurnIterator, TurnIterator)
{
}
#endif // BOOST_GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
template <typename MultiLinestring>
inline void debug_print_boundary_points(MultiLinestring const& multilinestring)
{
#ifdef GEOMETRY_TEST_DEBUG
typedef typename point_type<MultiLinestring>::type point_type;
typedef std::vector<point_type> point_vector;
@ -89,8 +94,13 @@ inline void debug_print_boundary_points(MultiLinestring const& multilinestring)
std::cout << " " << geometry::dsv(*pit);
}
std::cout << std::endl << std::endl;
#endif // GEOMETRY_TEST_DEBUG
}
#else
template <typename MultiLinestring>
inline void debug_print_boundary_points(MultiLinestring const&)
{
}
#endif // BOOST_GEOMETRY_TEST_DEBUG
}} // namespace detail::is_simple

View File

@ -42,7 +42,7 @@
#include <boost/geometry/algorithms/dispatch/is_valid.hpp>
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
#include <boost/geometry/io/dsv/write.hpp>
#include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
#endif
@ -184,7 +184,7 @@ public:
typedef typename ring_type<Polygon>::type ring_type;
// check validity of exterior ring
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "checking exterior ring..." << std::endl;
#endif
if ( !detail::is_valid::is_valid_ring
@ -199,7 +199,7 @@ public:
// check validity of interior rings
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "checking interior rings..." << std::endl;
#endif
if ( !are_valid_interior_rings(geometry::interior_rings(polygon)) )
@ -209,7 +209,7 @@ public:
// compute turns and check if all are acceptable
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "computing and analyzing turns..." << std::endl;
#endif
typedef typename geometry::rescale_policy_type
@ -243,7 +243,7 @@ public:
turns,
interrupt_policy);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "turns:";
for (typename std::deque<turn_info>::const_iterator tit = turns.begin();
tit != turns.end(); ++tit)
@ -276,7 +276,7 @@ public:
// check if all interior rings are inside the exterior ring
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "checking if holes are inside the exterior ring..."
<< std::endl;
#endif
@ -289,7 +289,7 @@ public:
// check whether the interior of the polygon is a connected set
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "checking connectivity of interior..." << std::endl;
#endif
typedef graph_vertex<typename turn_info::point_type> graph_vertex;
@ -309,7 +309,7 @@ public:
g.add_edge(v2, vip);
}
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
g.print();
#endif
return !g.has_cycles();

View File

@ -197,9 +197,7 @@ protected:
if ( is_entering(*it, *op_it) )
{
#ifdef GEOMETRY_TEST_DEBUG
detail::turns::debug_turn(*it, *op_it, "-> Entering");
#endif
entered = true;
if ( enter_count == 0 )
@ -213,9 +211,7 @@ protected:
}
else if ( is_leaving(*it, *op_it, entered) )
{
#ifdef GEOMETRY_TEST_DEBUG
detail::turns::debug_turn(*it, *op_it, "-> Leaving");
#endif
--enter_count;
if ( enter_count == 0 )
@ -230,9 +226,7 @@ protected:
else if ( FollowIsolatedPoints
&& is_isolated_point(*it, *op_it, entered) )
{
#ifdef GEOMETRY_TEST_DEBUG
detail::turns::debug_turn(*it, *op_it, "-> Isolated point");
#endif
action::isolated_point(current_piece, linestring,
current_segment_id,
@ -242,9 +236,7 @@ protected:
else if ( FollowContinueTurns
&& is_staying_inside(*it, *op_it, entered) )
{
#ifdef GEOMETRY_TEST_DEBUG
detail::turns::debug_turn(*it, *op_it, "-> Staying inside");
#endif
entered = true;
}

View File

@ -10,11 +10,14 @@
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_TURNS_DEBUG_TURN_HPP
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_TURNS_DEBUG_TURN_HPP
#ifdef BOOST_GEOMETRY_DEBUG_TURNS
#include <iostream>
#include <string>
#include <boost/geometry/io/wkt/write.hpp>
#include <boost/algorithm/string/predicate.hpp>
#endif // BOOST_GEOMETRY_DEBUG_TURNS
namespace boost { namespace geometry
{
@ -24,8 +27,8 @@ namespace detail { namespace turns
{
template <typename Turn, typename Operation>
#ifdef BOOST_GEOMETRY_DEBUG_TURNS
template <typename Turn, typename Operation>
inline void debug_turn(Turn const& turn, Operation op,
std::string const& header)
{
@ -44,6 +47,7 @@ inline void debug_turn(Turn const& turn, Operation op,
}
}
#else
template <typename Turn, typename Operation>
inline void debug_turn(Turn const& , Operation, const char*)
{
}

View File

@ -13,7 +13,7 @@
#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/geometries/box.hpp>
//#define GEOMETRY_TEST_DEBUG
//#define BOOST_GEOMETRY_TEST_DEBUG
void test_large_integers()
{

View File

@ -13,7 +13,7 @@
#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/geometries/box.hpp>
//#define GEOMETRY_TEST_DEBUG
//#define BOOST_GEOMETRY_TEST_DEBUG
void test_large_integers()
{

View File

@ -17,14 +17,14 @@
#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/geometries/box.hpp>
//#define GEOMETRY_TEST_DEBUG
//#define BOOST_GEOMETRY_TEST_DEBUG
template <typename Geometry>
void test(Geometry const& geometry, bool expected_value)
{
bool value = bgi::detail::is_valid(geometry);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::ostringstream out;
out << typeid(typename bg::coordinate_type<Geometry>::type).name()
<< " "

View File

@ -13,7 +13,7 @@
#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/geometries/box.hpp>
//#define GEOMETRY_TEST_DEBUG
//#define BOOST_GEOMETRY_TEST_DEBUG
void test_large_integers()
{

View File

@ -17,7 +17,7 @@
#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/geometries/box.hpp>
#define GEOMETRY_TEST_DEBUG
#define BOOST_GEOMETRY_TEST_DEBUG
template <typename Point, typename Indexable>
void test(Point const& pt, Indexable const& indexable,
@ -25,7 +25,7 @@ void test(Point const& pt, Indexable const& indexable,
{
typename bg::default_distance_result<Point, Indexable>::type value = bgi::detail::minmaxdist(pt, indexable);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::ostringstream out;
out << typeid(typename bg::coordinate_type<Point>::type).name()
<< " "

View File

@ -23,7 +23,7 @@ void test_content(Geometry const& geometry,
{
typename bgi::detail::default_content_result<Geometry>::type value = bgi::detail::content(geometry);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::ostringstream out;
out << typeid(typename bg::coordinate_type<Geometry>::type).name()
<< " "

View File

@ -20,7 +20,7 @@ void test_intersection_content(Geometry const& geometry1, Geometry const& geomet
{
typename bgi::detail::default_content_result<Geometry>::type value = bgi::detail::intersection_content(geometry1, geometry2);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::ostringstream out;
out << typeid(typename bg::coordinate_type<Geometry>::type).name()
<< " "

View File

@ -22,7 +22,7 @@ void test_margin(Geometry const& geometry,
{
typename bgi::detail::default_margin_result<Geometry>::type value = bgi::detail::comparable_margin(geometry);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::ostringstream out;
out << typeid(typename bg::coordinate_type<Geometry>::type).name()
<< " "

View File

@ -20,7 +20,7 @@ void test_union_content(Geometry const& geometry1, Geometry const& geometry2,
{
typename bgi::detail::default_content_result<Geometry>::type value = bgi::detail::union_content(geometry1, geometry2);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::ostringstream out;
out << typeid(typename bg::coordinate_type<Geometry>::type).name()
<< " "

View File

@ -13,7 +13,7 @@
#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/geometries/box.hpp>
//#define GEOMETRY_TEST_DEBUG
//#define BOOST_GEOMETRY_TEST_DEBUG
void test_large_integers()
{

View File

@ -23,7 +23,7 @@
#include <test_geometries/all_custom_ring.hpp>
#include <test_geometries/all_custom_polygon.hpp>
//#define GEOMETRY_TEST_DEBUG
//#define BOOST_GEOMETRY_TEST_DEBUG
#include <boost/variant/variant.hpp>

View File

@ -13,7 +13,7 @@
#define BOOST_TEST_MODULE test_difference_linear_linear
#endif
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
#define BOOST_GEOMETRY_DEBUG_TURNS
#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
#endif
@ -40,7 +40,7 @@ typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
BOOST_AUTO_TEST_CASE( test_difference_linestring_linestring )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** LINESTRING / LINESTRING DIFFERENCE ***" << std::endl;
std::cout << std::endl;
@ -422,7 +422,7 @@ BOOST_AUTO_TEST_CASE( test_difference_linestring_linestring )
BOOST_AUTO_TEST_CASE( test_difference_linestring_multilinestring )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** LINESTRING / MULTILINESTRING DIFFERENCE ***"
<< std::endl;
@ -646,7 +646,7 @@ BOOST_AUTO_TEST_CASE( test_difference_linestring_multilinestring )
BOOST_AUTO_TEST_CASE( test_difference_multilinestring_linestring )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** MULTILINESTRING / LINESTRING DIFFERENCE ***"
<< std::endl;
@ -706,7 +706,7 @@ BOOST_AUTO_TEST_CASE( test_difference_multilinestring_linestring )
BOOST_AUTO_TEST_CASE( test_difference_multilinestring_multilinestring )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** MULTILINESTRING / MULTILINESTRING DIFFERENCE ***"
<< std::endl;
@ -945,7 +945,7 @@ BOOST_AUTO_TEST_CASE( test_difference_multilinestring_multilinestring )
#ifndef BOOST_GEOMETRY_TEST_NO_DEGENERATE
BOOST_AUTO_TEST_CASE( test_difference_ml_ml_degenerate )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** MULTILINESTRING / MULTILINESTRING DIFFERENCE"
<< " (DEGENERATE) ***"
@ -1032,7 +1032,7 @@ BOOST_AUTO_TEST_CASE( test_difference_ml_ml_degenerate )
BOOST_AUTO_TEST_CASE( test_difference_ml_ml_spikes )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** MULTILINESTRING / MULTILINESTRING DIFFERENCE"
<< " (WITH SPIKES) ***"

View File

@ -13,7 +13,7 @@
#define BOOST_TEST_MODULE test_difference_pointlike_pointlike
#endif
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
#define BOOST_GEOMETRY_DEBUG_TURNS
#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
#endif
@ -36,7 +36,7 @@ typedef bg::model::multi_point<point_type> multi_point_type;
BOOST_AUTO_TEST_CASE( test_difference_point_point )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** POINT / POINT DIFFERENCE ***" << std::endl;
std::cout << std::endl;
@ -67,7 +67,7 @@ BOOST_AUTO_TEST_CASE( test_difference_point_point )
BOOST_AUTO_TEST_CASE( test_difference_multipoint_point )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** MULTIPOINT / POINT DIFFERENCE ***" << std::endl;
std::cout << std::endl;
@ -139,7 +139,7 @@ BOOST_AUTO_TEST_CASE( test_difference_multipoint_point )
BOOST_AUTO_TEST_CASE( test_difference_point_multipoint )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** POINT / MULTIPOINT DIFFERENCE ***" << std::endl;
std::cout << std::endl;
@ -178,7 +178,7 @@ BOOST_AUTO_TEST_CASE( test_difference_point_multipoint )
BOOST_AUTO_TEST_CASE( test_difference_multipoint_multipoint )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** MULTIPOINT / MULTIPOINT DIFFERENCE ***" << std::endl;
std::cout << std::endl;

View File

@ -107,7 +107,7 @@ struct test_disjoint
result = bg::disjoint(geometry2, geometry1);
BOOST_CHECK( result == expected_result );
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "G1 - G2: ";
pretty_print_geometry<Geometry1>::apply(geometry1) << " - ";
pretty_print_geometry<Geometry2>::apply(geometry2) << std::endl;

View File

@ -37,7 +37,7 @@ typedef bg::strategy::distance::pythagoras_box_box<> box_box_strategy;
template <typename Strategy>
void test_distance_polygon_polygon(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "polygon/polygon distance tests" << std::endl;
#endif
@ -66,7 +66,7 @@ void test_distance_polygon_polygon(Strategy const& strategy)
template <typename Strategy>
void test_distance_polygon_multipolygon(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "polygon/multipolygon distance tests" << std::endl;
#endif
@ -91,7 +91,7 @@ void test_distance_polygon_multipolygon(Strategy const& strategy)
template <typename Strategy>
void test_distance_multipolygon_multipolygon(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "multipolygon/multipolygon distance tests" << std::endl;
#endif
@ -118,7 +118,7 @@ void test_distance_multipolygon_multipolygon(Strategy const& strategy)
template <typename Strategy>
void test_distance_box_box(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "box/box distance tests" << std::endl;
#endif
@ -155,7 +155,7 @@ void test_distance_box_box(Strategy const& strategy)
template <typename Strategy>
void test_distance_polygon_box(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "polygon/box distance tests" << std::endl;
#endif
@ -187,7 +187,7 @@ void test_distance_polygon_box(Strategy const& strategy)
template <typename Strategy>
void test_distance_multipolygon_box(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "multipolygon/box distance tests" << std::endl;
#endif
@ -214,7 +214,7 @@ void test_distance_multipolygon_box(Strategy const& strategy)
template <typename Point, typename Strategy>
void test_more_empty_input_areal_areal(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "testing on empty inputs... " << std::flush;
#endif
@ -238,7 +238,7 @@ void test_more_empty_input_areal_areal(Strategy const& strategy)
test_empty_input(multipolygon_empty, polygon_empty, strategy);
test_empty_input(multipolygon_empty, multipolygon_empty, strategy);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "done!" << std::endl;
#endif
}

View File

@ -41,7 +41,7 @@ typedef bg::strategy::distance::projected_point<> point_segment_strategy;
template <typename Strategy>
void test_distance_segment_polygon(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "segment/polygon distance tests" << std::endl;
#endif
@ -69,7 +69,7 @@ void test_distance_segment_polygon(Strategy const& strategy)
template <typename Strategy>
void test_distance_linestring_polygon(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "linestring/polygon distance tests" << std::endl;
#endif
@ -93,7 +93,7 @@ void test_distance_linestring_polygon(Strategy const& strategy)
template <typename Strategy>
void test_distance_multilinestring_polygon(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "multilinestring/polygon distance tests" << std::endl;
#endif
@ -120,7 +120,7 @@ void test_distance_multilinestring_polygon(Strategy const& strategy)
template <typename Strategy>
void test_distance_segment_multipolygon(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "segment/multipolygon distance tests" << std::endl;
#endif
@ -155,7 +155,7 @@ void test_distance_segment_multipolygon(Strategy const& strategy)
template <typename Strategy>
void test_distance_linestring_multipolygon(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "linestring/multipolygon distance tests" << std::endl;
#endif
@ -190,7 +190,7 @@ void test_distance_linestring_multipolygon(Strategy const& strategy)
template <typename Strategy>
void test_distance_multilinestring_multipolygon(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "multilinestring/multipolygon distance tests" << std::endl;
#endif
@ -215,7 +215,7 @@ void test_distance_multilinestring_multipolygon(Strategy const& strategy)
template <typename Strategy>
void test_distance_segment_box(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "2D segment/box distance tests" << std::endl;
#endif
@ -653,7 +653,7 @@ void test_distance_segment_box(Strategy const& strategy)
template <typename Strategy>
void test_distance_linestring_box(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "linestring/box distance tests" << std::endl;
#endif
@ -683,7 +683,7 @@ void test_distance_linestring_box(Strategy const& strategy)
template <typename Strategy>
void test_distance_multilinestring_box(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "multilinestring/box distance tests" << std::endl;
#endif
@ -710,7 +710,7 @@ void test_distance_multilinestring_box(Strategy const& strategy)
template <typename Point, typename Strategy>
void test_more_empty_input_linear_areal(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "testing on empty inputs... " << std::flush;
#endif
@ -739,7 +739,7 @@ void test_more_empty_input_linear_areal(Strategy const& strategy)
test_empty_input(multiline_empty, polygon_empty, strategy);
test_empty_input(multiline_empty, multipolygon_empty, strategy);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "done!" << std::endl;
#endif
}

View File

@ -34,7 +34,7 @@ typedef bg::strategy::distance::projected_point<> point_segment_strategy;
template <typename Strategy>
void test_distance_segment_segment(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "segment/segment distance tests" << std::endl;
#endif
@ -62,7 +62,7 @@ void test_distance_segment_segment(Strategy const& strategy)
template <typename Strategy>
void test_distance_segment_linestring(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "segment/linestring distance tests" << std::endl;
#endif
@ -82,7 +82,7 @@ void test_distance_segment_linestring(Strategy const& strategy)
template <typename Strategy>
void test_distance_linestring_linestring(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "linestring/linestring distance tests" << std::endl;
#endif
@ -139,7 +139,7 @@ void test_distance_linestring_linestring(Strategy const& strategy)
template <typename Strategy>
void test_distance_segment_multilinestring(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "segment/multilinestring distance tests" << std::endl;
#endif
@ -162,7 +162,7 @@ void test_distance_segment_multilinestring(Strategy const& strategy)
template <typename Strategy>
void test_distance_linestring_multilinestring(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "linestring/multilinestring distance tests" << std::endl;
#endif
@ -186,7 +186,7 @@ void test_distance_linestring_multilinestring(Strategy const& strategy)
template <typename Strategy>
void test_distance_multilinestring_multilinestring(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "multilinestring/multilinestring distance tests" << std::endl;
#endif
@ -214,7 +214,7 @@ void test_distance_multilinestring_multilinestring(Strategy const& strategy)
template <typename Point, typename Strategy>
void test_more_empty_input_linear_linear(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "testing on empty inputs... " << std::flush;
#endif
@ -237,7 +237,7 @@ void test_more_empty_input_linear_linear(Strategy const& strategy)
test_empty_input(line_empty, multiline_empty, strategy);
test_empty_input(multiline_empty, multiline_empty, strategy);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "done!" << std::endl;
#endif
}

View File

@ -40,7 +40,7 @@ typedef bg::strategy::distance::pythagoras_point_box<> point_box_strategy;
template <typename Strategy>
void test_distance_point_polygon(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "point/polygon distance tests" << std::endl;
#endif
@ -69,7 +69,7 @@ void test_distance_point_polygon(Strategy const& strategy)
template <typename Strategy>
void test_distance_point_multipolygon(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "point/multipolygon distance tests" << std::endl;
#endif
@ -102,7 +102,7 @@ void test_distance_point_multipolygon(Strategy const& strategy)
template <typename Strategy>
void test_distance_multipoint_polygon(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "multipoint/polygon distance tests" << std::endl;
#endif
@ -131,7 +131,7 @@ void test_distance_multipoint_polygon(Strategy const& strategy)
template <typename Strategy>
void test_distance_multipoint_multipolygon(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "multipoint/multipolygon distance tests" << std::endl;
#endif
@ -167,7 +167,7 @@ void test_distance_multipoint_multipolygon(Strategy const& strategy)
template <typename Strategy>
void test_distance_point_box_2d(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "2D point/box distance tests" << std::endl;
#endif
@ -223,7 +223,7 @@ void test_distance_point_box_2d(Strategy const& strategy)
template <typename Strategy>
void test_distance_point_box_different_point_types(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "2D point/box distance tests with different points"
<< std::endl;
@ -281,7 +281,7 @@ void test_distance_point_box_different_point_types(Strategy const& strategy)
template <typename Strategy>
void test_distance_point_box_3d(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "3D point/box distance tests" << std::endl;
#endif
@ -418,7 +418,7 @@ void test_distance_point_box_3d(Strategy const& strategy)
template <typename Strategy>
void test_distance_multipoint_box_2d(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "2D multipoint/box distance tests" << std::endl;
#endif
@ -452,7 +452,7 @@ void test_distance_multipoint_box_2d(Strategy const& strategy)
template <typename Strategy>
void test_distance_multipoint_box_3d(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "3D multipoint/box distance tests" << std::endl;
#endif
@ -489,7 +489,7 @@ void test_distance_multipoint_box_3d(Strategy const& strategy)
template <typename Point, typename Strategy>
void test_more_empty_input_pointlike_areal(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "testing on empty inputs... " << std::flush;
#endif
@ -512,7 +512,7 @@ void test_more_empty_input_pointlike_areal(Strategy const& strategy)
test_empty_input(multipoint_empty, polygon_empty, strategy);
test_empty_input(multipoint_empty, multipolygon_empty, strategy);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "done!" << std::endl;
#endif
}

View File

@ -38,7 +38,7 @@ typedef bg::strategy::distance::projected_point<> point_segment_strategy;
template <typename Strategy>
void test_distance_point_segment(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "point/segment distance tests" << std::endl;
#endif
@ -56,7 +56,7 @@ void test_distance_point_segment(Strategy const& strategy)
template <typename Strategy>
void test_distance_point_linestring(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "point/linestring distance tests" << std::endl;
#endif
@ -75,7 +75,7 @@ void test_distance_point_linestring(Strategy const& strategy)
template <typename Strategy>
void test_distance_point_multilinestring(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "point/multilinestring distance tests" << std::endl;
#endif
@ -106,7 +106,7 @@ void test_distance_point_multilinestring(Strategy const& strategy)
template <typename Strategy>
void test_distance_linestring_multipoint(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "linestring/multipoint distance tests" << std::endl;
#endif
@ -134,7 +134,7 @@ void test_distance_linestring_multipoint(Strategy const& strategy)
template <typename Strategy>
void test_distance_multipoint_multilinestring(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "multipoint/multilinestring distance tests" << std::endl;
#endif
@ -162,7 +162,7 @@ void test_distance_multipoint_multilinestring(Strategy const& strategy)
template <typename Strategy>
void test_distance_multipoint_segment(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "multipoint/segment distance tests" << std::endl;
#endif
@ -187,7 +187,7 @@ void test_distance_multipoint_segment(Strategy const& strategy)
template <typename Point, typename Strategy>
void test_more_empty_input_pointlike_linear(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "testing on empty inputs... " << std::flush;
#endif
@ -210,7 +210,7 @@ void test_more_empty_input_pointlike_linear(Strategy const& strategy)
test_empty_input(multipoint_empty, line_empty, strategy);
test_empty_input(multipoint_empty, multiline_empty, strategy);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "done!" << std::endl;
#endif
}

View File

@ -32,7 +32,7 @@ typedef bg::strategy::distance::pythagoras<> point_point_strategy;
template <typename Strategy>
void test_distance_point_point(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "point/point distance tests" << std::endl;
#endif
@ -51,7 +51,7 @@ void test_distance_point_point(Strategy const& strategy)
template <typename Strategy>
void test_distance_point_multipoint(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "point/multipoint distance tests" << std::endl;
#endif
@ -73,7 +73,7 @@ void test_distance_point_multipoint(Strategy const& strategy)
template <typename Strategy>
void test_distance_multipoint_multipoint(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "multipoint/multipoint distance tests" << std::endl;
#endif
@ -95,7 +95,7 @@ void test_distance_multipoint_multipoint(Strategy const& strategy)
template <typename Point, typename Strategy>
void test_more_empty_input_pointlike_pointlike(Strategy const& strategy)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "testing on empty inputs... " << std::flush;
#endif
@ -112,7 +112,7 @@ void test_more_empty_input_pointlike_pointlike(Strategy const& strategy)
// both geometries are empty
test_empty_input(multipoint_empty, multipoint_empty, strategy);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "done!" << std::endl;
#endif
}

View File

@ -13,7 +13,7 @@
#define BOOST_TEST_MODULE test_intersection_linear_linear
#endif
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
#define BOOST_GEOMETRY_DEBUG_TURNS
#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
#endif
@ -40,7 +40,7 @@ typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
BOOST_AUTO_TEST_CASE( test_intersection_linestring_linestring )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** LINESTRING / LINESTRING INTERSECTION ***" << std::endl;
std::cout << std::endl;
@ -483,7 +483,7 @@ BOOST_AUTO_TEST_CASE( test_intersection_linestring_linestring )
BOOST_AUTO_TEST_CASE( test_intersection_linestring_multilinestring )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** LINESTRING / MULTILINESTRING INTERSECTION ***"
<< std::endl;
@ -692,7 +692,7 @@ BOOST_AUTO_TEST_CASE( test_intersection_linestring_multilinestring )
#ifndef BOOST_GEOMETRY_TEST_NO_DEGENERATE
BOOST_AUTO_TEST_CASE( test_intersection_l_ml_degenerate )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** LINESTRING / MULTILINESTRING INTERSECTION"
<< " (DEGENERATE) ***"
@ -779,7 +779,7 @@ BOOST_AUTO_TEST_CASE( test_intersection_l_ml_degenerate )
BOOST_AUTO_TEST_CASE( test_intersection_multilinestring_linestring )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** MULTILINESTRING / LINESTRING INTERSECTION ***"
<< std::endl;
@ -836,7 +836,7 @@ BOOST_AUTO_TEST_CASE( test_intersection_multilinestring_linestring )
BOOST_AUTO_TEST_CASE( test_intersection_multilinestring_multilinestring )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** MULTILINESTRING / MULTILINESTRING INTERSECTION ***"
<< std::endl;
@ -1134,7 +1134,7 @@ BOOST_AUTO_TEST_CASE( test_intersection_multilinestring_multilinestring )
#ifndef BOOST_GEOMETRY_TEST_NO_DEGENERATE
BOOST_AUTO_TEST_CASE( test_intersection_ml_ml_degenerate )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** MULTILINESTRING / MULTILINESTRING INTERSECTION"
<< " (DEGENERATE) ***"
@ -1275,7 +1275,7 @@ BOOST_AUTO_TEST_CASE( test_intersection_ml_ml_degenerate )
BOOST_AUTO_TEST_CASE( test_intersection_ml_ml_spikes )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** MULTILINESTRING / MULTILINESTRING INTERSECTION"
<< " (WITH SPIKES) ***"

View File

@ -13,7 +13,7 @@
#define BOOST_TEST_MODULE test_intersection_pointlike_pointlike
#endif
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
#define BOOST_GEOMETRY_DEBUG_TURNS
#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
#endif
@ -36,7 +36,7 @@ typedef bg::model::multi_point<point_type> multi_point_type;
BOOST_AUTO_TEST_CASE( test_intersection_point_point )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** POINT / POINT INTERSECTION ***" << std::endl;
std::cout << std::endl;
@ -66,7 +66,7 @@ BOOST_AUTO_TEST_CASE( test_intersection_point_point )
BOOST_AUTO_TEST_CASE( test_intersection_multipoint_point )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** MULTIPOINT / POINT INTERSECTION ***" << std::endl;
std::cout << std::endl;
@ -132,7 +132,7 @@ BOOST_AUTO_TEST_CASE( test_intersection_multipoint_point )
BOOST_AUTO_TEST_CASE( test_intersection_multipoint_multipoint )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** MULTIPOINT / MULTIPOINT INTERSECTION ***" << std::endl;
std::cout << std::endl;

View File

@ -38,7 +38,7 @@
#include "from_wkt.hpp"
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
#include "pretty_print_geometry.hpp"
#endif
@ -65,7 +65,7 @@ typedef bg::model::box<point_type> box_type;
template <typename Geometry>
void test_simple(Geometry const& geometry, bool expected_result)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "=======" << std::endl;
#endif
@ -76,7 +76,7 @@ void test_simple(Geometry const& geometry, bool expected_result)
<< " detected: " << simple
<< " wkt: " << bg::wkt(geometry) );
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "Geometry: ";
pretty_print_geometry<Geometry>::apply(std::cout, geometry);
std::cout << std::endl;
@ -95,7 +95,7 @@ void test_simple(Geometry const& geometry, bool expected_result)
BOOST_AUTO_TEST_CASE( test_is_simple_point )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
std::cout << "************************************" << std::endl;
std::cout << " is_simple: POINT " << std::endl;
@ -109,7 +109,7 @@ BOOST_AUTO_TEST_CASE( test_is_simple_point )
BOOST_AUTO_TEST_CASE( test_is_simple_multipoint )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
std::cout << "************************************" << std::endl;
std::cout << " is_simple: MULTIPOINT " << std::endl;
@ -125,7 +125,7 @@ BOOST_AUTO_TEST_CASE( test_is_simple_multipoint )
BOOST_AUTO_TEST_CASE( test_is_simple_segment )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
std::cout << "************************************" << std::endl;
std::cout << " is_simple: SEGMENT " << std::endl;
@ -139,7 +139,7 @@ BOOST_AUTO_TEST_CASE( test_is_simple_segment )
BOOST_AUTO_TEST_CASE( test_is_simple_linestring )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
std::cout << "************************************" << std::endl;
std::cout << " is_simple: LINESTRING " << std::endl;
@ -177,7 +177,7 @@ BOOST_AUTO_TEST_CASE( test_is_simple_linestring )
BOOST_AUTO_TEST_CASE( test_is_simple_multilinestring )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
std::cout << "************************************" << std::endl;
std::cout << " is_simple: MULTILINESTRING " << std::endl;
@ -274,7 +274,7 @@ BOOST_AUTO_TEST_CASE( test_is_simple_areal )
BOOST_AUTO_TEST_CASE( test_is_simple_variant )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
std::cout << "************************************" << std::endl;
std::cout << " is_simple: variant support" << std::endl;

View File

@ -52,7 +52,7 @@
#include "from_wkt.hpp"
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
#include "pretty_print_geometry.hpp"
#endif
@ -241,14 +241,14 @@ struct test_valid
template <typename G>
static inline void base_test(G const& g, bool expected_result)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "=======" << std::endl;
#endif
bool valid = ValidityTester::apply(g, expected_result);
boost::ignore_unused(valid);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "Geometry: ";
pretty_print_geometry<G>::apply(std::cout, g);
std::cout << std::endl;
@ -267,7 +267,7 @@ struct test_valid
if ( is_convertible_to_closed<Geometry>::apply(geometry) )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "...checking closed geometry..."
<< std::endl;
#endif
@ -277,7 +277,7 @@ struct test_valid
}
if ( is_convertible_to_cw<Geometry>::apply(geometry) )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "...checking cw open geometry..."
<< std::endl;
#endif
@ -286,7 +286,7 @@ struct test_valid
base_test(cw_geometry, expected_result);
if ( is_convertible_to_closed<CWGeometry>::apply(cw_geometry) )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "...checking cw closed geometry..."
<< std::endl;
#endif
@ -296,7 +296,7 @@ struct test_valid
}
}
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
#endif
}
@ -324,7 +324,7 @@ struct test_valid_variant
BOOST_AUTO_TEST_CASE( test_is_valid_point )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
std::cout << "************************************" << std::endl;
std::cout << " is_valid: POINT " << std::endl;
@ -340,7 +340,7 @@ BOOST_AUTO_TEST_CASE( test_is_valid_point )
BOOST_AUTO_TEST_CASE( test_is_valid_multipoint )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
std::cout << "************************************" << std::endl;
std::cout << " is_valid: MULTIPOINT " << std::endl;
@ -359,7 +359,7 @@ BOOST_AUTO_TEST_CASE( test_is_valid_multipoint )
BOOST_AUTO_TEST_CASE( test_is_valid_segment )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
std::cout << "************************************" << std::endl;
std::cout << " is_valid: SEGMENT " << std::endl;
@ -376,7 +376,7 @@ BOOST_AUTO_TEST_CASE( test_is_valid_segment )
BOOST_AUTO_TEST_CASE( test_is_valid_box )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
std::cout << "************************************" << std::endl;
std::cout << " is_valid: BOX " << std::endl;
@ -403,7 +403,7 @@ BOOST_AUTO_TEST_CASE( test_is_valid_box )
template <typename G, bool AllowSpikes>
void test_linestrings()
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "SPIKES ALLOWED? "
<< std::boolalpha
<< AllowSpikes
@ -473,7 +473,7 @@ void test_linestrings()
BOOST_AUTO_TEST_CASE( test_is_valid_linestring )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
std::cout << "************************************" << std::endl;
std::cout << " is_valid: LINESTRING " << std::endl;
@ -490,7 +490,7 @@ BOOST_AUTO_TEST_CASE( test_is_valid_linestring )
template <typename G, bool AllowSpikes>
void test_multilinestrings()
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "SPIKES ALLOWED? "
<< std::boolalpha
<< AllowSpikes
@ -535,7 +535,7 @@ void test_multilinestrings()
BOOST_AUTO_TEST_CASE( test_is_valid_multilinestring )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
std::cout << "************************************" << std::endl;
std::cout << " is_valid: MULTILINESTRING " << std::endl;
@ -553,7 +553,7 @@ BOOST_AUTO_TEST_CASE( test_is_valid_multilinestring )
template <typename Point, bool AllowDuplicates>
void test_open_rings()
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
std::cout << "************************************" << std::endl;
std::cout << " is_valid: RING (open) " << std::endl;
@ -644,7 +644,7 @@ void test_open_rings()
template <typename Point, bool AllowDuplicates>
void test_closed_rings()
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
std::cout << "************************************" << std::endl;
std::cout << " is_valid: RING (closed) " << std::endl;
@ -693,7 +693,7 @@ BOOST_AUTO_TEST_CASE( test_is_valid_ring )
template <typename Point, bool AllowDuplicates>
void test_open_polygons()
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
std::cout << "************************************" << std::endl;
std::cout << " is_valid: POLYGON (open) " << std::endl;
@ -902,7 +902,7 @@ BOOST_AUTO_TEST_CASE( test_is_valid_polygon )
template <typename Point, bool AllowDuplicates>
void test_open_multipolygons()
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
std::cout << "************************************" << std::endl;
std::cout << " is_valid: MULTIPOLYGON (open) " << std::endl;
@ -948,7 +948,7 @@ BOOST_AUTO_TEST_CASE( test_is_valid_multipolygon )
BOOST_AUTO_TEST_CASE( test_is_valid_variant )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
std::cout << "************************************" << std::endl;
std::cout << " is_valid: variant support" << std::endl;

View File

@ -13,7 +13,7 @@
#define BOOST_TEST_MODULE test_sym_difference_linear_linear
#endif
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
#define BOOST_GEOMETRY_DEBUG_TURNS
#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
#endif
@ -40,7 +40,7 @@ typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
BOOST_AUTO_TEST_CASE( test_sym_difference_linestring_linestring )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** LINESTRING / LINESTRING SYMMETRIC DIFFERENCE ***" << std::endl;
std::cout << std::endl;
@ -382,7 +382,7 @@ BOOST_AUTO_TEST_CASE( test_sym_difference_linestring_linestring )
BOOST_AUTO_TEST_CASE( test_sym_difference_linestring_multilinestring )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** LINESTRING / MULTILINESTRING SYMMETRIC DIFFERENCE ***"
<< std::endl;
@ -624,7 +624,7 @@ BOOST_AUTO_TEST_CASE( test_sym_difference_linestring_multilinestring )
BOOST_AUTO_TEST_CASE( test_sym_difference_multilinestring_linestring )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** MULTILINESTRING / LINESTRING SYMMETRIC DIFFERENCE ***"
<< std::endl;
@ -678,7 +678,7 @@ BOOST_AUTO_TEST_CASE( test_sym_difference_multilinestring_linestring )
BOOST_AUTO_TEST_CASE( test_sym_difference_multilinestring_multilinestring )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** MULTILINESTRING / MULTILINESTRING SYMMETRIC DIFFERENCE ***"
<< std::endl;

View File

@ -26,7 +26,7 @@ void test_area(Geometry const& geometry,
{
typename bg::default_area_result<Geometry>::type area = bg::area(geometry);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::ostringstream out;
out << typeid(typename bg::coordinate_type<Geometry>::type).name()
<< " "

View File

@ -46,7 +46,7 @@ void test_geometry(std::string const& wkt1,
<< " -> Expected: " << expected
<< " detected: " << detected);
#if !defined(GEOMETRY_TEST_DEBUG)
#if !defined(BOOST_GEOMETRY_TEST_DEBUG)
detected = bg::crosses(
geometry1,
boost::variant<Geometry2>(geometry2));

View File

@ -67,7 +67,7 @@ private:
if ( !vector_deque_already_tested && test_vector_and_deque )
{
vector_deque_already_tested = true;
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "Testing with vector and deque as output container..."
<< std::endl;
@ -81,12 +81,12 @@ private:
BOOST_CHECK(multilinestring_equals<false>::apply(mls_diff,
ls_deque_output));
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "Done!" << std::endl << std::endl;
#endif
}
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "Geometry #1: " << bg::wkt(geometry1) << std::endl;
std::cout << "Geometry #2: " << bg::wkt(geometry2) << std::endl;
std::cout << "difference : " << bg::wkt(mls_output) << std::endl;
@ -105,7 +105,7 @@ public:
MultiLineString const& mls_diff,
std::string const& case_id)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "test case: " << case_id << std::endl;
std::stringstream sstr;
sstr << "svgs/" << case_id << ".svg";
@ -121,7 +121,7 @@ public:
bg::reverse<Geometry2>(rg2);
test_get_turns_ll_invariance<>::apply(geometry1, geometry2);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl
<< "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
<< std::endl << std::endl;
@ -133,7 +133,7 @@ public:
base_test(rg1, geometry2, mls_diff, case_id, false, true);
base_test(rg1, rg2, mls_diff, case_id, false, true);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << std::endl;
#endif

View File

@ -95,7 +95,7 @@ void test_distance(Geometry1 const& geometry1,
{
typename bg::default_distance_result<Geometry1>::type distance = bg::distance(geometry1, geometry2);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::ostringstream out;
out << typeid(typename bg::coordinate_type<Geometry1>::type).name()
<< std::endl

View File

@ -70,7 +70,7 @@ void test_empty_input(Geometry1 const& geometry1, Geometry2 const& geometry2)
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
// pretty print geometry -- START
template <typename Geometry, typename GeometryTag>
struct pretty_print_geometry_dispatch
@ -119,7 +119,7 @@ struct pretty_print_geometry
}
};
// pretty print geometry -- END
#endif // GEOMETRY_TEST_DEBUG
#endif // BOOST_GEOMETRY_TEST_DEBUG
//========================================================================
@ -197,7 +197,7 @@ struct test_distance_of_geometries<Geometry1, Geometry2, 0, 0>
Strategy const& strategy,
bool test_reversed = true)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
typedef pretty_print_geometry<Geometry1> PPG1;
typedef pretty_print_geometry<Geometry2> PPG2;
PPG1::apply(geometry1, std::cout);
@ -286,7 +286,7 @@ struct test_distance_of_geometries<Geometry1, Geometry2, 0, 0>
default_comparable_distance_result
>::apply(cdist, expected_comparable_distance);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << string_from_type<typename bg::coordinate_type<Geometry1>::type>::name()
<< string_from_type<typename bg::coordinate_type<Geometry2>::type>::name()
<< " -> "
@ -342,7 +342,7 @@ struct test_distance_of_geometries<Geometry1, Geometry2, 0, 0>
default_comparable_distance_result
>::apply(cdist, expected_comparable_distance);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "distance[reversed args] (def. startegy) = "
<< dist_def << " ; "
<< "distance[reversed args] (passed startegy) = "
@ -411,7 +411,7 @@ struct test_distance_of_geometries
base::apply(segment, polygon, expected_distance,
expected_comparable_distance, strategy);
if ( bg::num_interior_rings(polygon) == 0 ) {
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "... testing also exterior ring ..." << std::endl;
#endif
test_distance_of_geometries
@ -554,7 +554,7 @@ struct test_distance_of_geometries
comparable_distance_result_type
>::apply(comparable_distance_generic, expected_comparable_distance);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "... testing with naive seg-box distance algorithm..."
<< std::endl;
std::cout << "distance (generic algorithm) = "

View File

@ -41,7 +41,7 @@ void test_expand(Box& box,
BOOST_CHECK_EQUAL(to_dsv(box), expected);
#if !defined(GEOMETRY_TEST_DEBUG)
#if !defined(BOOST_GEOMETRY_TEST_DEBUG)
bg::expand(box, boost::variant<Geometry>(geometry));
BOOST_CHECK_EQUAL(to_dsv(box), expected);
@ -60,7 +60,7 @@ void test_expand_other_strategy(Box& box,
BOOST_CHECK_EQUAL(to_dsv(box), expected);
#if !defined(GEOMETRY_TEST_DEBUG)
#if !defined(BOOST_GEOMETRY_TEST_DEBUG)
bg::expand(box, boost::variant<Geometry>(geometry));
BOOST_CHECK_EQUAL(to_dsv(box), expected);

View File

@ -138,7 +138,7 @@ public:
remove_duplicate_turns::apply(rturns_all);
remove_duplicate_turns::apply(rturns_wo_cont);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
std::cout << "### ORIGINAL TURNS ###" << std::endl;
bg_turns::print_turns(linear1, linear2, turns_all);

View File

@ -61,7 +61,7 @@ private:
set_operation_output("intersection", case_id,
geometry1, geometry2, mls_output);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "Geometry #1: " << bg::wkt(geometry1) << std::endl;
std::cout << "Geometry #2: " << bg::wkt(geometry2) << std::endl;
std::cout << "intersection : " << bg::wkt(mls_output) << std::endl;
@ -76,7 +76,7 @@ private:
if ( !vector_deque_already_tested && test_vector_and_deque )
{
vector_deque_already_tested = true;
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "Testing with vector and deque as output container..."
<< std::endl;
@ -90,7 +90,7 @@ private:
BOOST_CHECK(multilinestring_equals<false>::apply(mls_int1,
ls_deque_output));
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "Done!" << std::endl << std::endl;
#endif
}
@ -108,7 +108,7 @@ private:
<< " or: " << bg::wkt(mls_int2)
<< " computed: " << bg::wkt(mls_output) );
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "Geometry #1: " << bg::wkt(geometry2) << std::endl;
std::cout << "Geometry #2: " << bg::wkt(geometry1) << std::endl;
std::cout << "intersection : " << bg::wkt(mls_output) << std::endl;
@ -136,7 +136,7 @@ private:
bg::intersection(geometry2, geometry1, mls21_output);
bg::intersection(geometry2, geometry1, mp21_output);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "************************************" << std::endl;
std::cout << "Geometry #1: " << bg::wkt(geometry1) << std::endl;
std::cout << "Geometry #2: " << bg::wkt(geometry2) << std::endl;
@ -164,7 +164,7 @@ public:
MultiLineString const& mls_int2,
std::string const& case_id)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "test case: " << case_id << std::endl;
std::stringstream sstr;
sstr << "svgs/" << case_id << ".svg";
@ -180,7 +180,7 @@ public:
bg::reverse<Geometry2>(rg2);
test_get_turns_ll_invariance<>::apply(geometry1, geometry2);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl
<< "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
<< std::endl << std::endl;
@ -192,7 +192,7 @@ public:
// base_test(rg1, rg2, mls_int1, mls_int2);
base_test_all(geometry1, geometry2);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << std::endl;
#endif

View File

@ -23,7 +23,7 @@ void test_length(Geometry const& geometry, long double expected_length)
{
BOOST_AUTO(length, bg::length(geometry));
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::ostringstream out;
out << typeid(typename bg::coordinate_type<Geometry>::type).name()
<< std::endl
@ -44,7 +44,7 @@ void test_geometry(std::string const& wkt, double expected_length)
Geometry geometry;
bg::read_wkt(wkt, geometry);
test_length(geometry, expected_length);
#if !defined(GEOMETRY_TEST_DEBUG)
#if !defined(BOOST_GEOMETRY_TEST_DEBUG)
test_length(boost::variant<Geometry>(geometry), expected_length);
#endif
}

View File

@ -25,7 +25,7 @@ void test_perimeter(Geometry const& geometry, long double expected_perimeter)
{
BOOST_AUTO(perimeter, bg::perimeter(geometry));
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::ostringstream out;
out << typeid(typename bg::coordinate_type<Geometry>::type).name()
<< std::endl
@ -48,7 +48,7 @@ void test_geometry(std::string const& wkt, double expected_perimeter)
boost::variant<Geometry> v(geometry);
test_perimeter(geometry, expected_perimeter);
#if !defined(GEOMETRY_TEST_DEBUG)
#if !defined(BOOST_GEOMETRY_TEST_DEBUG)
test_perimeter(v, expected_perimeter);
#endif
}

View File

@ -205,7 +205,7 @@ private:
set_operation_output(op_name, case_id,
geometry1, geometry2, mp_output);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "Geometry #1: " << bg::wkt(geometry1) << std::endl;
std::cout << "Geometry #2: " << bg::wkt(geometry2) << std::endl;
std::cout << "expected " << op_name << " : "
@ -226,14 +226,14 @@ public:
MultiPoint const& mp_expected21,
std::string const& case_id)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "test case: " << case_id << std::endl;
#endif
base_test(geometry1, geometry2, mp_expected12, case_id);
base_test(geometry2, geometry1, mp_expected21, case_id);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << std::endl;
#endif

View File

@ -59,7 +59,7 @@ private:
set_operation_output("sym_difference", case_id,
geometry1, geometry2, mls_output);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "Geometry #1: " << bg::wkt(geometry1) << std::endl;
std::cout << "Geometry #2: " << bg::wkt(geometry2) << std::endl;
std::cout << "sym_difference : " << bg::wkt(mls_output) << std::endl;
@ -74,7 +74,7 @@ private:
if ( !vector_deque_already_tested && test_vector_and_deque )
{
vector_deque_already_tested = true;
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "Testing with vector and deque as output container..."
<< std::endl;
@ -88,7 +88,7 @@ private:
BOOST_CHECK(multilinestring_equals<false>::apply(mls_sym_diff,
ls_deque_output));
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "Done!" << std::endl << std::endl;
#endif
}
@ -104,7 +104,7 @@ private:
<< " -> Expected: " << bg::wkt(mls_sym_diff)
<< " computed: " << bg::wkt(mls_output) );
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "Geometry #1: " << bg::wkt(geometry2) << std::endl;
std::cout << "Geometry #2: " << bg::wkt(geometry1) << std::endl;
std::cout << "sym_difference : " << bg::wkt(mls_output) << std::endl;
@ -124,7 +124,7 @@ public:
MultiLineString const& mls_sym_diff,
std::string const& case_id)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "test case: " << case_id << std::endl;
std::stringstream sstr;
sstr << "svgs/" << case_id << ".svg";
@ -140,7 +140,7 @@ public:
bg::reverse<Geometry2>(rg2);
test_get_turns_ll_invariance<>::apply(geometry1, geometry2);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl
<< "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
<< std::endl << std::endl;
@ -152,7 +152,7 @@ public:
// base_test(rg1, geometry2, mls_sym_diff);
base_test(rg1, rg2, mls_sym_diff, case_id);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << std::endl;
#endif

View File

@ -59,7 +59,7 @@ private:
set_operation_output("union", case_id,
geometry1, geometry2, mls_output);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "Geometry #1: " << bg::wkt(geometry1) << std::endl;
std::cout << "Geometry #2: " << bg::wkt(geometry2) << std::endl;
std::cout << "union : " << bg::wkt(mls_output) << std::endl;
@ -74,7 +74,7 @@ private:
if ( !vector_deque_already_tested && test_vector_and_deque )
{
vector_deque_already_tested = true;
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "Testing with vector and deque as output container..."
<< std::endl;
@ -88,7 +88,7 @@ private:
BOOST_CHECK(multilinestring_equals<false>::apply(mls_union1,
ls_deque_output));
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "Done!" << std::endl << std::endl;
#endif
}
@ -104,7 +104,7 @@ private:
<< " -> Expected: " << bg::wkt(mls_union2)
<< " computed: " << bg::wkt(mls_output) );
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "Geometry #1: " << bg::wkt(geometry2) << std::endl;
std::cout << "Geometry #2: " << bg::wkt(geometry1) << std::endl;
std::cout << "union : " << bg::wkt(mls_output) << std::endl;
@ -125,7 +125,7 @@ public:
MultiLineString const& mls_union2,
std::string const& case_id)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "test case: " << case_id << std::endl;
std::stringstream sstr;
sstr << "svgs/" << case_id << ".svg";
@ -139,7 +139,7 @@ public:
bg::reverse<Geometry2>(rg2);
test_get_turns_ll_invariance<>::apply(geometry1, geometry2);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl
<< "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
<< std::endl << std::endl;
@ -151,7 +151,7 @@ public:
// base_test(rg1, geometry2, mls_sym_diff);
base_test(rg1, rg2, mls_union1, mls_union2, case_id);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << std::endl;
#endif

View File

@ -13,7 +13,7 @@
#define BOOST_TEST_MODULE test_union_linear_linear
#endif
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
#define BOOST_GEOMETRY_DEBUG_TURNS
#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
#endif
@ -40,7 +40,7 @@ typedef bg::model::multi_linestring<linestring_type> multi_linestring_type;
BOOST_AUTO_TEST_CASE( test_union_linestring_linestring )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** LINESTRING / LINESTRING UNION ***" << std::endl;
std::cout << std::endl;
@ -467,7 +467,7 @@ BOOST_AUTO_TEST_CASE( test_union_linestring_linestring )
BOOST_AUTO_TEST_CASE( test_union_linestring_multilinestring )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** LINESTRING / MULTILINESTRING UNION ***"
<< std::endl;
@ -697,7 +697,7 @@ BOOST_AUTO_TEST_CASE( test_union_linestring_multilinestring )
BOOST_AUTO_TEST_CASE( test_union_multilinestring_linestring )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** MULTILINESTRING / LINESTRING UNION ***"
<< std::endl;
@ -751,7 +751,7 @@ BOOST_AUTO_TEST_CASE( test_union_multilinestring_linestring )
BOOST_AUTO_TEST_CASE( test_union_multilinestring_multilinestring )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** MULTILINESTRING / MULTILINESTRING UNION ***"
<< std::endl;

View File

@ -13,7 +13,7 @@
#define BOOST_TEST_MODULE test_union_pointlike_pointlike
#endif
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
#define BOOST_GEOMETRY_DEBUG_TURNS
#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
#endif
@ -36,7 +36,7 @@ typedef bg::model::multi_point<point_type> multi_point_type;
BOOST_AUTO_TEST_CASE( test_union_point_point )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** POINT / POINT UNION ***" << std::endl;
std::cout << std::endl;
@ -66,7 +66,7 @@ BOOST_AUTO_TEST_CASE( test_union_point_point )
BOOST_AUTO_TEST_CASE( test_union_multipoint_point )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** MULTIPOINT / POINT UNION ***" << std::endl;
std::cout << std::endl;
@ -132,7 +132,7 @@ BOOST_AUTO_TEST_CASE( test_union_multipoint_point )
BOOST_AUTO_TEST_CASE( test_union_multipoint_multipoint )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** MULTIPOINT / MULTIPOINT UNION ***" << std::endl;
std::cout << std::endl;

View File

@ -85,7 +85,7 @@ struct test_concatenate_iterator
*c_first = *it_max + 1;
BOOST_CHECK( *c.begin() == new_value );
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "modified element of ";
std::cout << (second_container ? "2nd" : "1st");
@ -106,7 +106,7 @@ struct test_concatenate_iterator
std::string const& case_id,
std::string const& containers_id)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::stringstream sstream;
sstream << case_id << " [" << containers_id << "]";
@ -173,7 +173,7 @@ struct test_concatenate_iterator
test_size(const_begin, const_end, combined);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
print_container(std::cout, c1.begin(), c1.end(), "first :")
<< std::endl;
print_container(std::cout, c2.begin(), c2.end(), "second :")
@ -204,7 +204,7 @@ struct test_concatenate_iterator
// test std::count_if / std::remove_if
test_using_remove_if(begin, end, combined);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "====================" << std::endl << std::endl;
#endif
}
@ -215,7 +215,7 @@ template <typename Container1, typename Container2>
inline void test_concatenation_of_containers(Container1& c1, Container2& c2,
std::string const& containers_id)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
std::cout << "************************************" << std::endl
<< " TESTING CONTAINERS COMBINATION: "

View File

@ -133,7 +133,7 @@ struct test_flatten_iterator
BOOST_CHECK( *inner == new_value );
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "modified 1st element of 1st non-empty "
<< "inner container:" << std::endl;
@ -151,7 +151,7 @@ struct test_flatten_iterator
std::string const& case_id,
std::string const& container_id)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::stringstream sstream;
sstream << case_id << " [" << container_id << "]";
@ -219,7 +219,7 @@ struct test_flatten_iterator
test_size(begin, end, combined);
test_size(const_begin, const_end, combined);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
print_nested_container(std::cout, c.begin(), c.end(), "nested :")
<< std::endl;
print_container(std::cout, begin, end, "flattened :")
@ -244,7 +244,7 @@ struct test_flatten_iterator
// test std::count_if / std::remove_if
test_using_remove_if(begin, end, combined);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "====================" << std::endl << std::endl;
#endif
}
@ -339,7 +339,7 @@ inline void test_case_all_containers(std::string const& case_id)
typedef typename std::list<std::vector<int> > LV;
typedef typename std::list<std::list<int> > LL;
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
#endif
test_case_per_container<CaseNumber>::template apply<VV>(case_id, "VV");
@ -347,7 +347,7 @@ inline void test_case_all_containers(std::string const& case_id)
test_case_per_container<CaseNumber>::template apply<LV>(case_id, "LV");
test_case_per_container<CaseNumber>::template apply<LL>(case_id, "LL");
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "********************************************************"
<< std::endl << std::endl;

View File

@ -152,7 +152,7 @@ struct test_assignment
static inline void apply(Iterator it, ConstIterator cit,
Value const& value1, Value const& value2)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "== before assignment ==" << std::endl;
std::cout << "value1: " << bg::wkt(value1) << std::endl;
std::cout << "value2: " << bg::wkt(value2) << std::endl;
@ -171,7 +171,7 @@ struct test_assignment
BOOST_CHECK( bg::equals(*cit, value2) );
BOOST_CHECK( !bg::equals(*cit, value1) );
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "== after 1st assignment ==" << std::endl;
std::cout << "value1: " << bg::wkt(value1) << std::endl;
std::cout << "value2: " << bg::wkt(value2) << std::endl;
@ -185,7 +185,7 @@ struct test_assignment
BOOST_CHECK( bg::equals(*cit, value1) );
BOOST_CHECK( !bg::equals(*cit, value2) );
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "== after 2nd assignment ==" << std::endl;
std::cout << "value1: " << bg::wkt(value1) << std::endl;
std::cout << "value2: " << bg::wkt(value2) << std::endl;
@ -211,7 +211,7 @@ struct test_point_iterator_of_geometry
BOOST_CHECK( bg::equals(front, *--bg::points_rend(geometry)) );
BOOST_CHECK( bg::equals(back, *bg::points_rbegin(geometry)) );
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "front: " << bg::dsv(bg::points_front(geometry))
<< std::endl;
std::cout << "back : " << bg::dsv(bg::points_back(geometry))
@ -237,7 +237,7 @@ struct test_point_iterator_of_geometry
bg::points_end(point_range))
);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << header << " geometry: " << bg::wkt(geometry) << std::endl;
print_point_range(std::cout, begin, end, "point range: ");
std::cout << std::endl;
@ -264,13 +264,13 @@ struct test_point_iterator_of_geometry
{
base_test<Geometry>(geometry, point_range, "non-const");
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
#endif
base_test<Geometry const>(geometry, point_range, "const");
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
#endif
@ -353,7 +353,7 @@ struct test_point_iterator_of_geometry
}
// test with algorithms
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
print_point_range(std::cout, begin, end, "original:\n") << std::endl;
print_point_range(std::cout, rbegin, rend, "reverse traversal:\n")
<< std::endl;
@ -362,14 +362,14 @@ struct test_point_iterator_of_geometry
#endif
std::reverse(begin, end);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
print_point_range(std::cout, begin, end, "reversed:\n") << std::endl;
std::cout << bg::wkt(geometry) << std::endl;
std::cout << std::endl;
#endif
std::reverse(begin, end);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
print_point_range(std::cout, begin, end, "re-reversed:\n") << std::endl;
std::cout << bg::wkt(geometry) << std::endl;
std::cout << std::endl;
@ -387,11 +387,11 @@ struct test_point_iterator_of_geometry
bg::less<point>());
BOOST_CHECK( pit_max != const_end ); // to avoid warnings
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "max point: " << bg::dsv(*pit_max) << std::endl;
#endif
}
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << std::endl;
std::cout << std::endl;
@ -406,7 +406,7 @@ struct test_point_iterator_of_geometry
BOOST_AUTO_TEST_CASE( test_linestring_point_iterator )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "*** LINESTRING ***" << std::endl;
#endif
@ -423,7 +423,7 @@ BOOST_AUTO_TEST_CASE( test_linestring_point_iterator )
ba::tuple_list_of(3,3)(4,4)(5,5)
);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
#endif
}
@ -435,7 +435,7 @@ BOOST_AUTO_TEST_CASE( test_linestring_point_iterator )
BOOST_AUTO_TEST_CASE( test_polygon_point_iterator )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "*** POLYGON ***" << std::endl;
#endif
@ -464,7 +464,7 @@ BOOST_AUTO_TEST_CASE( test_polygon_point_iterator )
ba::tuple_list_of(3,3)(4,4)(5,5)(6,6)(7,7)(8,8)(9,9)
);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
#endif
}
@ -476,7 +476,7 @@ BOOST_AUTO_TEST_CASE( test_polygon_point_iterator )
BOOST_AUTO_TEST_CASE( test_multipoint_point_iterator )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "*** MULTIPOINT ***" << std::endl;
#endif
@ -493,7 +493,7 @@ BOOST_AUTO_TEST_CASE( test_multipoint_point_iterator )
ba::tuple_list_of(3,3)(4,4)(5,5)
);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
#endif
}
@ -505,7 +505,7 @@ BOOST_AUTO_TEST_CASE( test_multipoint_point_iterator )
BOOST_AUTO_TEST_CASE( test_multipoint_3d_point_iterator )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "*** MULTIPOINT 3D ***" << std::endl;
#endif
@ -522,7 +522,7 @@ BOOST_AUTO_TEST_CASE( test_multipoint_3d_point_iterator )
ba::tuple_list_of(3,3,3)(4,4,4)(5,5,5)
);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
#endif
}
@ -534,7 +534,7 @@ BOOST_AUTO_TEST_CASE( test_multipoint_3d_point_iterator )
BOOST_AUTO_TEST_CASE( test_multilinestring_point_iterator )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "*** MULTILINESTRING ***" << std::endl;
#endif
@ -563,7 +563,7 @@ BOOST_AUTO_TEST_CASE( test_multilinestring_point_iterator )
ba::tuple_list_of(1,1)(2,2)(3,3)(3,3)(4,4)(5,5)(6,6)
);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
#endif
}
@ -575,7 +575,7 @@ BOOST_AUTO_TEST_CASE( test_multilinestring_point_iterator )
BOOST_AUTO_TEST_CASE( test_multipolygon_point_iterator )
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "*** MULTIPOLYGON ***" << std::endl;
#endif
@ -615,7 +615,7 @@ BOOST_AUTO_TEST_CASE( test_multipolygon_point_iterator )
(1,1)(2,2)(10,10)(11,11)(12,12)(13,13)
);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl;
#endif
}

View File

@ -150,7 +150,7 @@ inline void test_using_remove_if(CombinedIterator first,
CombinedIterator
>::value_type value_type;
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl;
std::cout << "odd elements removed:" << std::endl;
print_container(std::cout, first, beyond, "before:") << std::endl;
@ -169,7 +169,7 @@ inline void test_using_remove_if(CombinedIterator first,
}
BOOST_CHECK( new_size == static_cast<std::size_t>(num_even) );
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
print_container(std::cout, first, new_beyond, "after :") << std::endl;
#endif
@ -189,7 +189,7 @@ inline void test_using_reverse(CombinedIterator first,
std::reverse(combined.begin(), combined.end());
test_equality(first, beyond, combined);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
print_container(std::cout, first, beyond, "reversed:") << std::endl;
#endif
@ -197,7 +197,7 @@ inline void test_using_reverse(CombinedIterator first,
std::reverse(combined.begin(), combined.end());
test_equality(first, beyond, combined);
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
print_container(std::cout, first, beyond, "re-reversed:") << std::endl;
#endif
}

View File

@ -89,7 +89,7 @@ struct check_sqrt<Argument, Result, Result, IsFundamental>
{
static inline void apply(Argument const& arg, Result const& result)
{
#ifdef GEOMETRY_TEST_DEBUG
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << "testing: " << typeid(Result).name()
<< " sqrt(" << typeid(Argument).name()
<< ")" << std::endl;