]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/test/algorithms/set_operations/difference/difference.cpp
e1a8116766eb987fb56550d86b9b09484eeb4ced
[ceph.git] / ceph / src / boost / libs / geometry / test / algorithms / set_operations / difference / difference.cpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2 // Unit Test
3
4 // Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
5
6 // This file was modified by Oracle on 2015, 2016.
7 // Modifications copyright (c) 2015-2016, Oracle and/or its affiliates.
8 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
9 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
10
11 // Use, modification and distribution is subject to the Boost Software License,
12 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
13 // http://www.boost.org/LICENSE_1_0.txt)
14
15 #include <iomanip>
16 #include <iostream>
17 #include <sstream>
18 #include <string>
19
20 #include <boost/geometry/algorithms/correct.hpp>
21 #include <boost/geometry/algorithms/is_valid.hpp>
22
23 #include <boost/geometry/io/wkt/wkt.hpp>
24
25 #include <boost/geometry/geometries/point_xy.hpp>
26
27 #include "test_difference.hpp"
28 #include <algorithms/test_overlay.hpp>
29 #include <algorithms/overlay/overlay_cases.hpp>
30 #include <algorithms/overlay/multi_overlay_cases.hpp>
31
32
33 #ifdef HAVE_TTMATH
34 # include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
35 #endif
36
37
38 // Convenience macros (points are not checked)
39 #define TEST_DIFFERENCE(caseid, clips1, area1, clips2, area2, clips3) \
40 (test_one<polygon, polygon, polygon>) \
41 ( #caseid, caseid[0], caseid[1], clips1, -1, area1, clips2, -1, area2, \
42 clips3, -1, area1 + area2)
43
44 #if !defined(BOOST_GEOMETRY_INCLUDE_SELF_TURNS)
45 #define TEST_DIFFERENCE_IGNORE(caseid, clips1, area1, clips2, area2, clips3) \
46 { ut_settings ignore_validity; ignore_validity.test_validity = false; \
47 (test_one<polygon, polygon, polygon>) \
48 ( #caseid, caseid[0], caseid[1], clips1, -1, area1, clips2, -1, area2, \
49 clips3, -1, area1 + area2, ignore_validity); }
50 #endif
51
52 template <typename P>
53 void test_all()
54 {
55 typedef bg::model::box<P> box;
56 typedef bg::model::polygon<P> polygon;
57 typedef bg::model::ring<P> ring;
58
59 typedef typename bg::coordinate_type<P>::type ct;
60
61 ut_settings sym_settings;
62 #if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
63 sym_settings.sym_difference = false;
64 #endif
65
66 test_one<polygon, polygon, polygon>("simplex_normal",
67 simplex_normal[0], simplex_normal[1],
68 3, 12, 2.52636706856656,
69 3, 12, 3.52636706856656,
70 sym_settings);
71
72 test_one<polygon, polygon, polygon>("simplex_with_empty",
73 simplex_normal[0], polygon_empty,
74 1, 4, 8.0,
75 0, 0, 0.0);
76
77 test_one<polygon, polygon, polygon>(
78 "star_ring", example_star, example_ring,
79 5, 22, 1.1901714,
80 5, 27, 1.6701714,
81 sym_settings);
82
83 test_one<polygon, polygon, polygon>("two_bends",
84 two_bends[0], two_bends[1],
85 1, 5, 8.0,
86 1, 5, 8.0);
87
88 test_one<polygon, polygon, polygon>("star_comb_15",
89 star_comb_15[0], star_comb_15[1],
90 30, 160, 227.658275102812,
91 30, 198, 480.485775259312,
92 sym_settings);
93
94 test_one<polygon, polygon, polygon>("new_hole",
95 new_hole[0], new_hole[1],
96 1, 9, 7.0,
97 1, 13, 14.0);
98
99
100 test_one<polygon, polygon, polygon>("crossed",
101 crossed[0], crossed[1],
102 1, 18, 19.5,
103 1, 7, 2.5);
104
105 test_one<polygon, polygon, polygon>("disjoint",
106 disjoint[0], disjoint[1],
107 1, 5, 1.0,
108 1, 5, 1.0);
109
110 // The too small one might be discarded (depending on point-type / compiler)
111 // We check area only
112 test_one<polygon, polygon, polygon>("distance_zero",
113 distance_zero[0], distance_zero[1],
114 -1, -1, 8.7048386,
115 -1, -1, 0.0098387,
116 tolerance(0.001));
117
118 test_one<polygon, polygon, polygon>("equal_holes_disjoint",
119 equal_holes_disjoint[0], equal_holes_disjoint[1],
120 1, 5, 9.0,
121 1, 5, 9.0);
122
123 test_one<polygon, polygon, polygon>("only_hole_intersections1",
124 only_hole_intersections[0], only_hole_intersections[1],
125 2, 10, 1.9090909,
126 4, 16, 10.9090909,
127 sym_settings);
128
129 test_one<polygon, polygon, polygon>("only_hole_intersection2",
130 only_hole_intersections[0], only_hole_intersections[2],
131 3, 20, 30.9090909,
132 4, 16, 10.9090909,
133 sym_settings);
134
135 test_one<polygon, polygon, polygon>("first_within_second",
136 first_within_second[1], first_within_second[0],
137 1, 10, 24,
138 0, 0, 0);
139
140 test_one<polygon, polygon, polygon>("fitting",
141 fitting[0], fitting[1],
142 1, 9, 21.0,
143 1, 4, 4.0,
144 1, 5, 25.0);
145
146 test_one<polygon, polygon, polygon>("identical",
147 identical[0], identical[1],
148 0, 0, 0.0,
149 0, 0, 0.0);
150
151 test_one<polygon, polygon, polygon>("intersect_exterior_and_interiors_winded",
152 intersect_exterior_and_interiors_winded[0], intersect_exterior_and_interiors_winded[1],
153 4, 20, 11.533333,
154 5, 26, 29.783333);
155
156 test_one<polygon, polygon, polygon>("intersect_holes_intersect_and_disjoint",
157 intersect_holes_intersect_and_disjoint[0], intersect_holes_intersect_and_disjoint[1],
158 2, 16, 15.75,
159 3, 17, 6.75);
160
161 test_one<polygon, polygon, polygon>("intersect_holes_intersect_and_touch",
162 intersect_holes_intersect_and_touch[0], intersect_holes_intersect_and_touch[1],
163 3, 21, 16.25,
164 3, 17, 6.25);
165
166 {
167 ut_settings settings = sym_settings;
168 settings.percentage = 0.01;
169 test_one<polygon, polygon, polygon>("intersect_holes_new_ring",
170 intersect_holes_new_ring[0], intersect_holes_new_ring[1],
171 3, 15, 9.8961,
172 4, 25, 121.8961,
173 settings);
174 }
175
176 test_one<polygon, polygon, polygon>("first_within_hole_of_second",
177 first_within_hole_of_second[0], first_within_hole_of_second[1],
178 1, 5, 1,
179 1, 10, 16);
180
181 test_one<polygon, polygon, polygon>("intersect_holes_disjoint",
182 intersect_holes_disjoint[0], intersect_holes_disjoint[1],
183 2, 14, 16.0,
184 2, 10, 6.0);
185
186 test_one<polygon, polygon, polygon>("intersect_holes_intersect",
187 intersect_holes_intersect[0], intersect_holes_intersect[1],
188 2, 16, 15.75,
189 2, 12, 5.75);
190
191 test_one<polygon, polygon, polygon>(
192 "case4", case_4[0], case_4[1],
193 6, 28, 2.77878787878788,
194 4, 22, 4.77878787878788,
195 sym_settings);
196
197 test_one<polygon, polygon, polygon>(
198 "case5", case_5[0], case_5[1],
199 8, 36, 2.43452380952381,
200 7, 33, 3.18452380952381);
201
202 #ifdef BOOST_GEOMETRY_TEST_INCLUDE_FAILING_TESTS
203 // Fails, a-b is partly generated, b-a does not have any output
204 // It failed already in 1.59
205 test_one<polygon, polygon, polygon>("case_58_iet",
206 case_58[0], case_58[2],
207 3, 12, 0.6666666667,
208 1, -1, 11.1666666667);
209 #endif
210
211 test_one<polygon, polygon, polygon>("case_80",
212 case_80[0], case_80[1],
213 1, 9, 44.5,
214 1, 10, 84.5);
215
216 #ifdef BOOST_GEOMETRY_TEST_INCLUDE_FAILING_TESTS
217 // Fails, holes are not subtracted
218 test_one<polygon, polygon, polygon>("case_81",
219 case_81[0], case_81[1],
220 1, 8, 80.5,
221 1, 8, 83.0,
222 1, 12, 80.5 + 83.0);
223 #endif
224
225 test_one<polygon, polygon, polygon>("case_100",
226 case_100[0], case_100[1],
227 1, 7, 3.125,
228 1, 7, 16.0,
229 1, 13, 16.0 + 3.125);
230
231 test_one<polygon, polygon, polygon>("case_101",
232 case_101[0], case_101[1],
233 3, 17, 13.75,
234 1, 4, 1.0);
235
236 test_one<polygon, polygon, polygon>("case_102",
237 case_102[0], case_102[1],
238 4, 18, 1.5,
239 3, 15, 4.0625);
240
241 TEST_DIFFERENCE(case_105, 4, 8.0, 1, 16.0, 5);
242 TEST_DIFFERENCE(case_106, 1, 17.5, 2, 32.5, 3);
243 TEST_DIFFERENCE(case_107, 2, 18.0, 2, 29.0, 4);
244
245 test_one<polygon, polygon, polygon>("winded",
246 winded[0], winded[1],
247 3, 37, 61,
248 1, 15, 13);
249
250 test_one<polygon, polygon, polygon>("within_holes_disjoint",
251 within_holes_disjoint[0], within_holes_disjoint[1],
252 2, 15, 25,
253 1, 5, 1);
254
255 test_one<polygon, polygon, polygon>("side_side",
256 side_side[0], side_side[1],
257 1, 5, 1,
258 1, 5, 1,
259 1, 7, 2);
260
261 test_one<polygon, polygon, polygon>("buffer_mp1",
262 buffer_mp1[0], buffer_mp1[1],
263 1, 61, 10.2717,
264 1, 61, 10.2717);
265
266 #if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
267 if ( BOOST_GEOMETRY_CONDITION((boost::is_same<ct, double>::value)) )
268 {
269 test_one<polygon, polygon, polygon>("buffer_mp2",
270 buffer_mp2[0], buffer_mp2[1],
271 1, 91, 12.09857,
272 1, 155, 24.19714);
273 }
274 #endif
275
276 /*** TODO: self-tangencies for difference
277 test_one<polygon, polygon, polygon>("wrapped_a",
278 wrapped[0], wrapped[1],
279 3, 1, 61,
280 1, 0, 13);
281
282 test_one<polygon, polygon, polygon>("wrapped_b",
283 wrapped[0], wrapped[2],
284 3, 1, 61,
285 1, 0, 13);
286 ***/
287
288 {
289 ut_settings settings;
290 #if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
291 settings.percentage = 0.1;
292 settings.test_validity = false;
293 #else
294 settings.percentage = 0.001;
295 #endif
296
297 // Isovist - the # output polygons differ per compiler/pointtype, (very) small
298 // rings might be discarded. We check area only
299 test_one<polygon, polygon, polygon>("isovist",
300 isovist1[0], isovist1[1],
301 -1, -1, 0.279132,
302 -1, -1, 224.8892,
303 settings);
304 }
305 // SQL Server gives: 0.279121891701124 and 224.889211358929
306 // PostGIS gives: 0.279121991127244 and 224.889205853156
307 // No robustness gives: 0.279121991127106 and 224.825363749290
308
309 #ifdef BOOST_GEOMETRY_TEST_INCLUDE_FAILING_TESTS
310 test_one<polygon, polygon, polygon>("geos_1",
311 geos_1[0], geos_1[1],
312 21, -1, 0.31640625,
313 9, -1, 0.01953125);
314
315 // Excluded this test in the normal suite, it is OK like this for many clang/gcc/msvc
316 // versions, but NOT OK for many other clang/gcc/msvc versions on other platforms
317 // It might depend on partition (order)
318 // 10, -1, 0.02148439); // change in partition might give these results
319
320 // SQL Server gives: 0.28937764436705 and 0.000786406897532288 with 44/35 rings
321 // PostGIS gives: 0.30859375 and 0.033203125 with 35/35 rings
322 #endif
323
324 {
325 // MSVC 14 expects 138.69214 and 211.85913: increase percentage
326
327 ut_settings settings = sym_settings;
328 settings.percentage = 0.01;
329 settings.test_validity = false;
330
331 test_one<polygon, polygon, polygon>("geos_2",
332 geos_2[0], geos_2[1],
333 1, -1, 138.6923828,
334 1, -1, 211.859375,
335 settings);
336 }
337
338 test_one<polygon, polygon, polygon>("geos_3",
339 geos_3[0], geos_3[1],
340 1, -1, 16211128.5,
341 1, -1, 13180420.0,
342 1, -1, 16211128.5 + 13180420.0,
343 sym_settings);
344
345 test_one<polygon, polygon, polygon>("geos_4",
346 geos_4[0], geos_4[1],
347 1, -1, 971.9163115,
348 1, -1, 1332.4163115,
349 sym_settings);
350
351 test_one<polygon, polygon, polygon>("ggl_list_20110306_javier",
352 ggl_list_20110306_javier[0], ggl_list_20110306_javier[1],
353 1, -1, 71495.3331,
354 2, -1, 8960.49049,
355 2, -1, 71495.3331 + 8960.49049);
356
357 test_one<polygon, polygon, polygon>("ggl_list_20110307_javier",
358 ggl_list_20110307_javier[0], ggl_list_20110307_javier[1],
359 1, if_typed<ct, float>(14, 13), 16815.6,
360 1, 4, 3200.4,
361 tolerance(0.01));
362
363 if ( BOOST_GEOMETRY_CONDITION((! boost::is_same<ct, float>::value)) )
364 {
365 test_one<polygon, polygon, polygon>("ggl_list_20110716_enrico",
366 ggl_list_20110716_enrico[0], ggl_list_20110716_enrico[1],
367 3, -1, 35723.8506317139,
368 1, -1, 58456.4964294434,
369 1, -1, 35723.8506317139 + 58456.4964294434);
370 }
371
372 #if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
373 {
374 // symmetric difference is not valid due to robustness issue, it has
375 // two turns (touch_only) and a midpoint is located in other polygon
376 ut_settings ignore_validity;
377 ignore_validity.test_validity = false;
378
379 test_one<polygon, polygon, polygon>("ggl_list_20110820_christophe",
380 ggl_list_20110820_christophe[0], ggl_list_20110820_christophe[1],
381 1, -1, 2.8570121719168924,
382 1, -1, 64.498061986388564,
383 ignore_validity);
384 }
385 #endif
386
387 test_one<polygon, polygon, polygon>("ggl_list_20120717_volker",
388 ggl_list_20120717_volker[0], ggl_list_20120717_volker[1],
389 1, 11, 3370866.2295081965,
390 1, 5, 384.2295081964694,
391 tolerance(0.01));
392
393 #if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
394 // 2011-07-02 / 2014-06-19
395 // Interesting FP-precision case.
396 // sql server gives: 6.62295817619452E-05
397 // PostGIS gives: 0.0 (no output)
398 // Boost.Geometry gave results depending on FP-type, and compiler, and operating system.
399 // Since rescaling to integer results are equal w.r.t. compiler/FP type,
400 // however, some long spikes are still generated in the resulting difference
401 test_one<polygon, polygon, polygon>("ggl_list_20110627_phillip",
402 ggl_list_20110627_phillip[0], ggl_list_20110627_phillip[1],
403 if_typed_tt<ct>(1, 1), -1,
404 if_typed_tt<ct>(0.0000000000001105367, 0.000125137888971949),
405 1, -1, 3577.40960816756,
406 tolerance(0.01)
407 );
408 #endif
409
410 // Ticket 8310, one should be completely subtracted from the other.
411 test_one<polygon, polygon, polygon>("ticket_8310a",
412 ticket_8310a[0], ticket_8310a[1],
413 1, 10, 10.11562724,
414 0, 0, 0);
415 test_one<polygon, polygon, polygon>("ticket_8310b",
416 ticket_8310b[0], ticket_8310b[1],
417 1, 10, 10.12655608,
418 0, 0, 0);
419 test_one<polygon, polygon, polygon>("ticket_8310c",
420 ticket_8310c[0], ticket_8310c[1],
421 1, 10, 10.03103292,
422 0, 0, 0);
423
424 #if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
425 test_one<polygon, polygon, polygon>("ticket_9081_15",
426 ticket_9081_15[0], ticket_9081_15[1],
427 2, 10, 0.0334529710902111,
428 1, 4, 5.3469555172380723e-010);
429 #endif
430
431 test_one<polygon, polygon, polygon>("ticket_9081_314",
432 ticket_9081_314[0], ticket_9081_314[1],
433 2, 12, 0.0451236449624935,
434 0, 0, 0);
435
436 #if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
437 test_one<polygon, polygon, polygon>("ticket_9563",
438 ticket_9563[0], ticket_9563[1],
439 0, 0, 0,
440 6, 24, 20.096189);
441 #endif
442
443 test_one<polygon, polygon, polygon>("ticket_10108_a",
444 ticket_10108_a[0], ticket_10108_a[1],
445 1, 4, 0.0145037,
446 1, 4, 0.029019232,
447 sym_settings);
448
449 #if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
450 test_one<polygon, polygon, polygon>("ticket_10108_b",
451 ticket_10108_b[0], ticket_10108_b[1],
452 1, 5, 1081.68697,
453 1, 5, 1342.65795);
454 #endif
455
456 test_one<polygon, polygon, polygon>("ticket_11725",
457 ticket_11725[0], ticket_11725[1],
458 1, -1, 3.0,
459 1, -1, 4.5,
460 1, -1, 7.5);
461
462 // From assemble-test, with a u/u case
463 test_one<polygon, polygon, polygon>("assemble_0210",
464 "POLYGON((0 0,0 10,10 10,10 0,0 0),(8.5 1,9.5 1,9.5 2,8.5 2,8.5 1))",
465 "POLYGON((2 0.5,0.5 2,0.5 8,2 9.5,6 9.5,8.5 8,8.5 2,7 0.5,2 0.5),(2 2,7 2,7 8,2 8,2 2))",
466 2, 23, 62.25,
467 0, 0, 0.0);
468
469 // Other combi's
470 {
471 test_one<polygon, polygon, ring>(
472 "star_ring_ring", example_star, example_ring,
473 5, 22, 1.1901714,
474 5, 27, 1.6701714,
475 sym_settings);
476
477 test_one<polygon, ring, polygon>(
478 "ring_star_ring", example_ring, example_star,
479 5, 27, 1.6701714,
480 5, 22, 1.1901714,
481 sym_settings);
482
483 static std::string const clip = "POLYGON((2.5 0.5,5.5 2.5))";
484
485 test_one<polygon, box, ring>("star_box",
486 clip, example_star,
487 4, 20, 2.833333, 4, 16, 0.833333);
488
489 test_one<polygon, ring, box>("box_star",
490 example_star, clip,
491 4, 16, 0.833333, 4, 20, 2.833333);
492 }
493
494 // Counter clockwise
495 {
496 typedef bg::model::polygon<P, false> polygon_ccw;
497 test_one<polygon, polygon_ccw, polygon_ccw>(
498 "star_ring_ccw", example_star, example_ring,
499 5, 22, 1.1901714,
500 5, 27, 1.6701714,
501 sym_settings);
502 test_one<polygon, polygon, polygon_ccw>(
503 "star_ring_ccw1", example_star, example_ring,
504 5, 22, 1.1901714,
505 5, 27, 1.6701714,
506 sym_settings);
507 test_one<polygon, polygon_ccw, polygon>(
508 "star_ring_ccw2", example_star, example_ring,
509 5, 22, 1.1901714,
510 5, 27, 1.6701714,
511 sym_settings);
512 }
513
514 // Multi/box (should be moved to multi)
515 {
516 typedef bg::model::multi_polygon<polygon> mp;
517
518 static std::string const clip = "POLYGON((2 2,4 4))";
519
520 test_one<polygon, box, mp>("simplex_multi_box_mp",
521 clip, case_multi_simplex[0],
522 2, -1, 0.53333333333, 3, -1, 8.53333333333);
523 test_one<polygon, mp, box>("simplex_multi_mp_box",
524 case_multi_simplex[0], clip,
525 3, -1, 8.53333333333, 2, -1, 0.53333333333);
526
527 }
528
529 /***
530 Experimental (cut), does not work:
531 test_one<polygon, polygon, polygon>(
532 "polygon_pseudo_line",
533 "POLYGON((0 0,0 4,4 4,4 0,0 0))",
534 "POLYGON((2 -2,2 -1,2 6,2 -2))",
535 5, 22, 1.1901714,
536 5, 27, 1.6701714);
537 ***/
538
539 // Should have 2 outputs
540 #ifdef BOOST_GEOMETRY_INCLUDE_SELF_TURNS
541 TEST_DIFFERENCE(mysql_21977775,
542 2, 160.856568913, 2, 92.3565689126, 4);
543 #else
544 TEST_DIFFERENCE_IGNORE(mysql_21977775,
545 1, 160.856568913, 2, 92.3565689126, 3);
546 #endif
547
548 TEST_DIFFERENCE(mysql_21965285, 1, 92.0, 1, 14.0, 1);
549
550 TEST_DIFFERENCE(mysql_23023665_1, 1, 92.0, 1, 142.5, 2);
551 TEST_DIFFERENCE(mysql_23023665_2, 1, 96.0, 1, 16.0, 2);
552 TEST_DIFFERENCE(mysql_23023665_3, 1, 225.0, 1, 66.0, 2);
553 #ifdef BOOST_GEOMETRY_INCLUDE_SELF_TURNS
554 TEST_DIFFERENCE(mysql_23023665_5, 2, 165.23735, 2, 105.73735, 4);
555 #else
556 TEST_DIFFERENCE_IGNORE(mysql_23023665_5, 1, 165.23735, 2, 105.73735, 3);
557 #endif
558
559 TEST_DIFFERENCE(mysql_23023665_6, 2, 105.68756, 3, 10.18756, 5);
560
561 #ifdef BOOST_GEOMETRY_INCLUDE_SELF_TURNS
562 TEST_DIFFERENCE(mysql_23023665_13, 3, 99.74526, 3, 37.74526, 6);
563 #else
564 TEST_DIFFERENCE_IGNORE(mysql_23023665_13, 2, 99.74526, 3, 37.74526, 5);
565 #endif
566 }
567
568
569 // Test cases for integer coordinates / ccw / open
570 template <typename Point, bool ClockWise, bool Closed>
571 void test_specific()
572 {
573 typedef bg::model::polygon<Point, ClockWise, Closed> polygon;
574
575 test_one<polygon, polygon, polygon>("ggl_list_20120717_volker",
576 ggl_list_20120717_volker[0], ggl_list_20120717_volker[1],
577 1, 11, 3371540,
578 1, 4, 385,
579 1, 16, 3371540 + 385);
580
581 test_one<polygon, polygon, polygon>("ticket_10658",
582 ticket_10658[0], ticket_10658[1],
583 1, 6, 1510434,
584 0, 0, 0);
585
586 test_one<polygon, polygon, polygon>("ticket_11121",
587 ticket_11121[0], ticket_11121[1],
588 2, 8, 489763.5,
589 1, 4, 6731652.0);
590
591 // Generates spikes, both a-b and b-a
592 #ifdef BOOST_GEOMETRY_INCLUDE_SELF_TURNS
593 TEST_DIFFERENCE(ticket_11676, 2, 2537992.5, 2, 294963.5, 3);
594 #else
595 TEST_DIFFERENCE_IGNORE(ticket_11676, 1, 2537992.5, 2, 294963.5, 2);
596 #endif
597 }
598
599
600 int test_main(int, char* [])
601 {
602 test_all<bg::model::d2::point_xy<double> >();
603
604 test_specific<bg::model::d2::point_xy<int>, false, false>();
605
606 #if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
607 test_all<bg::model::d2::point_xy<float> >();
608
609 #ifdef HAVE_TTMATH
610 std::cout << "Testing TTMATH" << std::endl;
611 test_all<bg::model::d2::point_xy<ttmath_big> >();
612 #endif
613 #endif
614
615 return 0;
616 }