mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-10 23:42:12 +00:00
[geometry] merged to release
[SVN r85862]
This commit is contained in:
@@ -15,13 +15,8 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#define BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE
|
||||
#define TEST_ISOVIST
|
||||
|
||||
//#define BOOST_GEOMETRY_DEBUG_ASSEMBLE
|
||||
//#define BOOST_GEOMETRY_DEBUG_IDENTIFIER
|
||||
|
||||
|
||||
#include <algorithms/test_union.hpp>
|
||||
#include <algorithms/test_overlay.hpp>
|
||||
|
||||
@@ -148,7 +143,7 @@ void test_areal()
|
||||
|
||||
test_one<Polygon, Polygon, Polygon>("distance_zero",
|
||||
distance_zero[0], distance_zero[1],
|
||||
1, 0, 11, 9.0098387);
|
||||
1, 0, if_typed<ct, float>(9, 11), 9.0098387);
|
||||
|
||||
test_one<Polygon, Polygon, Polygon>("wrapped_a",
|
||||
wrapped[0], wrapped[1],
|
||||
@@ -229,7 +224,7 @@ void test_areal()
|
||||
test_one<Polygon, Polygon, Polygon>("ggl_list_20110627_phillip",
|
||||
ggl_list_20110627_phillip[0], ggl_list_20110627_phillip[1],
|
||||
1, 0,
|
||||
if_typed<ct, double>(5, if_typed_tt<ct>(8, 7)),
|
||||
if_typed<ct, double>(5, if_typed_tt<ct>(8, 8)),
|
||||
14729.07145);
|
||||
|
||||
|
||||
@@ -254,7 +249,7 @@ void test_areal()
|
||||
isovist1[0], isovist1[1],
|
||||
1,
|
||||
0,
|
||||
if_typed<ct, float>(71, if_typed<ct, double>(70, 73)),
|
||||
if_typed<ct, float>(72, if_typed<ct, double>(70, 73)),
|
||||
313.36036462, 0.1);
|
||||
|
||||
// SQL Server gives: 313.360374193241
|
||||
@@ -282,17 +277,17 @@ void test_areal()
|
||||
|
||||
// Robustness issues, followed out buffer-robustness-tests, test them also reverse
|
||||
test_one<Polygon, Polygon, Polygon>("buffer_rt_f", buffer_rt_f[0], buffer_rt_f[1],
|
||||
1, 0, if_typed<ct, double>(22, 23), 4.60853);
|
||||
1, 0, if_typed<ct, double>(21, 23), 4.60853);
|
||||
test_one<Polygon, Polygon, Polygon>("buffer_rt_f_rev", buffer_rt_f[1], buffer_rt_f[0],
|
||||
1, 0, if_typed<ct, double>(22, 23), 4.60853);
|
||||
1, 0, if_typed<ct, double>(21, 23), 4.60853);
|
||||
|
||||
test_one<Polygon, Polygon, Polygon>("buffer_rt_g", buffer_rt_g[0], buffer_rt_g[1],
|
||||
1, 0, 17, 16.571);
|
||||
1, 0, if_typed<ct, float>(18, 17), 16.571);
|
||||
test_one<Polygon, Polygon, Polygon>("buffer_rt_g_rev", buffer_rt_g[1], buffer_rt_g[0],
|
||||
1, 0, 17, 16.571);
|
||||
1, 0, if_typed<ct, float>(18, 17), 16.571);
|
||||
|
||||
test_one<Polygon, Polygon, Polygon>("buffer_rt_i", buffer_rt_i[0], buffer_rt_i[1],
|
||||
1, 0, 13, 13.6569);
|
||||
1, 0, if_typed<ct, float>(14, 13), 13.6569);
|
||||
|
||||
bool test_rt_i_rev = true;
|
||||
#ifndef _MSC_VER
|
||||
@@ -342,17 +337,17 @@ void test_areal()
|
||||
test_one<Polygon, Polygon, Polygon>("buffer_rt_t", buffer_rt_t[0], buffer_rt_t[1],
|
||||
1, 0, if_typed_tt<ct>(16, 14), 15.6569);
|
||||
test_one<Polygon, Polygon, Polygon>("buffer_rt_t_ref", buffer_rt_t[1], buffer_rt_t[0],
|
||||
1, 0, if_typed_tt<ct>(16, 14), 15.6569);
|
||||
1, 0, if_typed_tt<ct>(16, if_typed<ct, float>(15, 14)), 15.6569);
|
||||
|
||||
test_one<Polygon, Polygon, Polygon>("buffer_mp1", buffer_mp1[0], buffer_mp1[1],
|
||||
1, 0, 91, 22.815);
|
||||
1, 0, if_typed_tt<ct>(93, 91), 22.815);
|
||||
|
||||
if (boost::is_same<ct, double>::type::value)
|
||||
{
|
||||
// Contains robustness issue for collinear-opposite.
|
||||
// In double it delivers a polygon and a hole
|
||||
test_one<Polygon, Polygon, Polygon>("buffer_mp2", buffer_mp2[0], buffer_mp2[1],
|
||||
1, 1, 218, 36.7535642);
|
||||
1, 1, 217, 36.7535642);
|
||||
}
|
||||
else if (boost::is_same<ct, float>::type::value)
|
||||
{
|
||||
@@ -423,10 +418,6 @@ void test_all()
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
test_all<bg::model::d2::point_xy<double> >();
|
||||
#if defined(HAVE_TTMATH)
|
||||
std::cout << "Testing TTMATH" << std::endl;
|
||||
test_all<bg::model::d2::point_xy<ttmath_big> >();
|
||||
#endif
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
|
||||
test_all<bg::model::d2::point_xy<float> >();
|
||||
|
||||
Reference in New Issue
Block a user