@@ -307,6 +307,13 @@ static std::string const mysql_report_2015_07_05_1
307307static std::string const mysql_report_2015_07_05_2
308308 = " MULTIPOLYGON(((19777 -21893,3.22595e+307 6.86823e+307,-40 -13,19777 -21893)),((-1322 4851,8.49998e+307 3.94481e+307,75 -69,8.64636e+307 3.94909e+307,-1.15292e+18 7.20576e+16,-1322 4851)))" ;
309309
310+ #if ! defined(BOOST_GEOMETRY_USE_RESCALING) \
311+ && defined (BOOST_GEOMETRY_USE_KRAMER_RULE ) \
312+ && ! defined (BOOST_GEOMETRY_TEST_FAILURES )
313+ // These testcases are failing for non-rescaled Kramer rule
314+ #define BOOST_GEOMETRY_EXCLUDE
315+ #endif
316+
310317template <bool Clockwise, typename P>
311318void test_all ()
312319{
@@ -396,17 +403,13 @@ void test_all()
396403 test_one<multi_polygon_type, polygon_type>(" rt_d" , rt_d, join_miter, end_flat, 19.8823 , 0.3 );
397404 test_one<multi_polygon_type, polygon_type>(" rt_e" , rt_e, join_miter, end_flat, 15.1198 , 0.3 );
398405 test_one<multi_polygon_type, polygon_type>(" rt_f" , rt_f, join_miter, end_flat, 4.60853 , 0.3 );
399- #if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
400406 test_one<multi_polygon_type, polygon_type>(" rt_g1" , rt_g1, join_miter, end_flat, 30.3137 , 1.0 );
401407 test_one<multi_polygon_type, polygon_type>(" rt_g2" , rt_g2, join_miter, end_flat, 18.5711 , 1.0 );
402- #endif
403408
404409 test_one<multi_polygon_type, polygon_type>(" rt_h" , rt_h, join_round, end_flat, 47.6012 , 1.0 );
405410 test_one<multi_polygon_type, polygon_type>(" rt_h" , rt_h, join_miter, end_flat, 61.7058 , 1.0 );
406411 test_one<multi_polygon_type, polygon_type>(" rt_i" , rt_i, join_round, end_flat, 10.7528 , 1.0 );
407- #if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
408412 test_one<multi_polygon_type, polygon_type>(" rt_i" , rt_i, join_miter, end_flat, 13.6569 , 1.0 );
409- #endif
410413 test_one<multi_polygon_type, polygon_type>(" rt_j" , rt_j, join_round, end_flat, 28.7309 , 1.0 );
411414 test_one<multi_polygon_type, polygon_type>(" rt_j" , rt_j, join_miter, end_flat, 35.1421 , 1.0 );
412415 test_one<multi_polygon_type, polygon_type>(" rt_k" , rt_k, join_round, end_flat, 42.0092 , 1.0 );
@@ -437,9 +440,7 @@ void test_all()
437440 test_one<multi_polygon_type, polygon_type>(" rt_p7" , rt_p7, join_miter, end_flat, 26.2279 , 1.0 );
438441#endif
439442
440- #if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
441443 test_one<multi_polygon_type, polygon_type>(" rt_p8" , rt_p8, join_miter, end_flat, 29.0563 , 1.0 );
442- #endif
443444 test_one<multi_polygon_type, polygon_type>(" rt_p9" , rt_p9, join_miter, end_flat, 26.1421 , 1.0 );
444445 test_one<multi_polygon_type, polygon_type>(" rt_p10" , rt_p10, join_miter, end_flat, 23.3995 , 1.0 );
445446
@@ -448,21 +449,19 @@ void test_all()
448449 test_one<multi_polygon_type, polygon_type>(" rt_p13" , rt_p13, join_miter, end_flat, 19.9142 , 1.0 );
449450 test_one<multi_polygon_type, polygon_type>(" rt_p14" , rt_p14, join_miter, end_flat, 20.8284 , 1.0 );
450451 test_one<multi_polygon_type, polygon_type>(" rt_p15" , rt_p15, join_miter, end_flat, 23.6569 , 1.0 );
451- #if defined(BOOST_GEOMETRY_USE_KRAMER) || defined(BOOST_GEOMETRY_TEST_FAILURES)
452452 test_one<multi_polygon_type, polygon_type>(" rt_p16" , rt_p16, join_miter, end_flat, 23.4853 , 1.0 );
453- #endif
454453
455454 test_one<multi_polygon_type, polygon_type>(" rt_p17" , rt_p17, join_miter, end_flat, 25.3137 , 1.0 );
456455
457- #if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES )
456+ #if ! defined(BOOST_GEOMETRY_EXCLUDE )
458457 test_one<multi_polygon_type, polygon_type>(" rt_p18" , rt_p18, join_miter, end_flat, 23.3137 , 1.0 );
459458#endif
460459 test_one<multi_polygon_type, polygon_type>(" rt_p19" , rt_p19, join_miter, end_flat, 25.5637 , 1.0 );
461- #if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES )
460+ #if ! defined(BOOST_GEOMETRY_EXCLUDE )
462461 test_one<multi_polygon_type, polygon_type>(" rt_p20" , rt_p20, join_miter, end_flat, 25.4853 , 1.0 );
463462#endif
464463 test_one<multi_polygon_type, polygon_type>(" rt_p21" , rt_p21, join_miter, end_flat, 17.1716 , 1.0 );
465- #if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES )
464+ #if ! defined(BOOST_GEOMETRY_EXCLUDE )
466465 test_one<multi_polygon_type, polygon_type>(" rt_p22" , rt_p22, join_miter, end_flat, 26.5711 , 1.0 );
467466#endif
468467
@@ -471,13 +470,11 @@ void test_all()
471470 test_one<multi_polygon_type, polygon_type>(" rt_q2" , rt_q2, join_miter, end_flat, 0.9697 , -0.25 );
472471
473472 test_one<multi_polygon_type, polygon_type>(" rt_r" , rt_r, join_miter, end_flat, 21.0761 , 1.0 );
474- #if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES )
473+ #if ! defined(BOOST_GEOMETRY_EXCLUDE )
475474 test_one<multi_polygon_type, polygon_type>(" rt_s1" , rt_s1, join_miter, end_flat, 20.4853 , 1.0 );
476475#endif
477476
478- #if defined(BOOST_GEOMETRY_USE_KRAMER) || defined(BOOST_GEOMETRY_TEST_FAILURES)
479477 test_one<multi_polygon_type, polygon_type>(" rt_s2" , rt_s2, join_miter, end_flat, 24.6495 , 1.0 );
480- #endif
481478
482479 test_one<multi_polygon_type, polygon_type>(" rt_t1" , rt_t , join_miter, end_flat, 15.6569 , 1.0 );
483480 test_one<multi_polygon_type, polygon_type>(" rt_t2" , rt_t , join_miter, end_flat, 0.1679 , -0.25 );
@@ -496,17 +493,15 @@ void test_all()
496493
497494 test_one<multi_polygon_type, polygon_type>(" rt_u8" , rt_u8, join_miter, end_flat, 70.9142 , 1.0 );
498495 test_one<multi_polygon_type, polygon_type>(" rt_u9" , rt_u9, join_miter, end_flat, 59.3063 , 1.0 );
499- #if defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
500- test_one<multi_polygon_type, polygon_type>(" rt_u10" , rt_u10, join_miter, end_flat, 144.0858 , 1.0 ); // PG: 144.085786772487
501- #endif
502- test_one<multi_polygon_type, polygon_type>(" rt_u10_51" , rt_u10, join_miter, end_flat, 0.1674 , -0.51 ); // PG: 0.167380307629637
496+ test_one<multi_polygon_type, polygon_type>(" rt_u10" , rt_u10, join_miter, end_flat, 144.0858 , 1.0 );
497+ test_one<multi_polygon_type, polygon_type>(" rt_u10_51" , rt_u10, join_miter, end_flat, 0.1674 , -0.51 );
503498 test_one<multi_polygon_type, polygon_type>(" rt_u10_c_51" , rt_u10_c, join_miter, end_flat, 0.066952 , -0.51 );
504499
505-
506- // TODO: now one small triangle missing due to clusters/uu turns
507- test_one<multi_polygon_type, polygon_type>(" rt_u10_50" , rt_u10, join_miter, end_flat, 0.2145 , -0.50 , ut_settings::ignore_validity ()); // PG: 0.214466094067263
508- test_one<multi_polygon_type, polygon_type>(" rt_u10_45" , rt_u10, join_miter, end_flat, 1.3000 , -0.45 ); // PG: 1.30004221251301
509- test_one<multi_polygon_type, polygon_type>(" rt_u10_25" , rt_u10, join_miter, end_flat, 9.6682 , -0.25 ); // PG: 9.66820888343117
500+ test_one<multi_polygon_type, polygon_type>( " rt_u10_51 " , rt_u10, join_miter, end_flat, 0.1674 , - 0.51 );
501+ // TODO: invalid - making a bow-tie
502+ test_one<multi_polygon_type, polygon_type>(" rt_u10_50" , rt_u10, join_miter, end_flat, 0.2145 , -0.50 , ut_settings::ignore_validity ()); // False positive
503+ test_one<multi_polygon_type, polygon_type>(" rt_u10_45" , rt_u10, join_miter, end_flat, 1.3000 , -0.45 );
504+ test_one<multi_polygon_type, polygon_type>(" rt_u10_25" , rt_u10, join_miter, end_flat, 9.6682 , -0.25 );
510505
511506 test_one<multi_polygon_type, polygon_type>(" rt_u11" , rt_u11, join_miter, end_flat, 131.3995 , 1.0 );
512507 test_one<multi_polygon_type, polygon_type>(" rt_u11_50" , rt_u11, join_miter, end_flat, 0.04289 , -0.50 );
@@ -555,5 +550,9 @@ int test_main(int, char* [])
555550 test_all<false , bg::model::point<default_test_type, 2 , bg::cs::cartesian> >();
556551#endif
557552
553+ #if defined(BOOST_GEOMETRY_TEST_FAILURES)
554+ BoostGeometryWriteExpectedFailures (1 , 9 );
555+ #endif
556+
558557 return 0 ;
559558}
0 commit comments