Skip to content

Commit

Permalink
[test] fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Kovalev authored and Anton Kovalev committed Sep 21, 2017
1 parent db4a341 commit 613020e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions test/algorithms/is_simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,12 @@ BOOST_AUTO_TEST_CASE( test_geometry_with_NaN_coordinates )
bg::read_wkt("LINESTRING(-1 1,1.115235e+308 1.738137e+308)", ls2);

// the intersection of the two linestrings is a new linestring
// (multilinestring with a single element) that has NaN coordinates
// (multilinestring with a single element) that is an isolated point
multi_linestring_type mls;
bg::intersection(ls1, ls2, mls);

test_simple(mls, true, false);
// "isolated point"-linestring is not simple
test_simple(mls, false, false);
}

BOOST_AUTO_TEST_CASE( test_is_simple_variant )
Expand Down
2 changes: 1 addition & 1 deletion test/algorithms/is_valid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ inline void test_open_rings()
typedef bg::model::ring<Point, false, true> CG; // ccw, closed ring
typedef bg::model::ring<Point, true, false> CW_OG; // cw, open ring
typedef bg::model::ring<Point, true, true> CW_CG; // cw, closed ring

typedef validity_tester_areal<AllowDuplicates> tester;
typedef test_valid<tester, OG, CG, CW_OG, CW_CG> test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,7 @@ BOOST_AUTO_TEST_CASE( test_intersection_ml_ml_degenerate )
(8.5655 2.85228),(5.26567 4.81254),(4 3.8),\
(1.4995 3.27036),(0.591231 3.43401),\
(-0.706503 3.66784),\
(-0.7654 8.88178e-16,-0.7654 0,5 3))"),
(-0.7654 0,5 3))"),
from_wkt<ML>("MULTILINESTRING((1.87562 6.68515),(1.60494 6),\
(1.18124 4.9275),(1.00439 4.47984),(0.91526 4.25422),\
(0.729883 3.78498),(0.614728 3.49349),\
Expand Down Expand Up @@ -1340,7 +1340,7 @@ BOOST_AUTO_TEST_CASE( test_intersection_ml_ml_degenerate )
(9.98265 0.00543606),(9.09826 -100.515944),\
(7.08745 -329.0674155),(5.06428 -559.024344),\
(3.23365 -767.0972558),(3.16036 -775.427199),\
(-0.7654 8.88178e-16,-0.7654 0,5 3))"),
(-0.7654 0,5 3))"),
#endif
"mlmli21",
1e-4
Expand All @@ -1355,7 +1355,7 @@ BOOST_AUTO_TEST_CASE( test_intersection_ml_ml_spikes )
{
#ifdef BOOST_GEOMETRY_TEST_DEBUG
std::cout << std::endl << std::endl << std::endl;
std::cout << "*** MULTILINESTRING / MULTILINESTRING INTERSECTION"
std::cout << "*** MULTILINESTRING / MULTILINESTRING INTERSECTION"
<< " (WITH SPIKES) ***"
<< std::endl;
std::cout << std::endl;
Expand Down

0 comments on commit 613020e

Please sign in to comment.