Skip to content

Commit

Permalink
Fix unit tests for windows run
Browse files Browse the repository at this point in the history
  • Loading branch information
eyal0 committed Feb 12, 2021
1 parent c1e1982 commit cc1abf0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions path_finding_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,16 +247,16 @@ BOOST_AUTO_TEST_SUITE(nested_multipolygon_type_fp)

BOOST_AUTO_TEST_CASE(open_space) {
auto surface = PathFindingSurface(boost::none, multi_polygon_type_fp(), 5);
BOOST_CHECK_EQUAL(surface.in_surface({1,1}), make_optional(0UL));
BOOST_CHECK_EQUAL(surface.in_surface({1,1}), make_optional(size_t(0)));
}

BOOST_AUTO_TEST_CASE(barbell) {
multi_polygon_type_fp barbell{{{{0,0}, {0,100}, {40,100}, {40,2}, {60,2},
{60,100}, {100,100}, {100,0}, {0,0}}}};
auto surface = PathFindingSurface(boost::none, barbell, 5);
BOOST_CHECK_EQUAL(surface.in_surface({1,1}), make_optional(0UL));
BOOST_CHECK_EQUAL(surface.in_surface({1,1}), make_optional(size_t(0)));
BOOST_CHECK_EQUAL(surface.in_surface({6,6}), boost::none);
BOOST_CHECK_EQUAL(surface.in_surface({-10,-10}), make_optional(0UL));
BOOST_CHECK_EQUAL(surface.in_surface({-10,-10}), make_optional(size_t(0)));
BOOST_CHECK_EQUAL(surface.in_surface({10,10}), boost::none);
}

Expand All @@ -266,12 +266,12 @@ BOOST_AUTO_TEST_CASE(almost_doughnut) {
{51,80}, {51,100}, {100,100},
{100,0}, {0,0}}}};
auto surface = PathFindingSurface(almost_doughnut, multi_polygon_type_fp(), 5);
BOOST_CHECK_EQUAL(surface.in_surface({1,1}), make_optional(0UL));
BOOST_CHECK_EQUAL(surface.in_surface({6,6}), make_optional(0UL));
BOOST_CHECK_EQUAL(surface.in_surface({1,1}), make_optional(size_t(0)));
BOOST_CHECK_EQUAL(surface.in_surface({6,6}), make_optional(size_t(0)));
BOOST_CHECK_EQUAL(surface.in_surface({-10,-10}), boost::none);
BOOST_CHECK_EQUAL(surface.in_surface({50,1}), make_optional(0UL));
BOOST_CHECK_EQUAL(surface.in_surface({50,1}), make_optional(size_t(0)));
BOOST_CHECK_EQUAL(surface.in_surface({50,50}), boost::none);
BOOST_CHECK_EQUAL(surface.in_surface({50,90}), make_optional(0UL));
BOOST_CHECK_EQUAL(surface.in_surface({50,90}), make_optional(size_t(0)));
}

BOOST_AUTO_TEST_SUITE_END() // nested_multipolygon_type_fp
Expand Down Expand Up @@ -309,7 +309,7 @@ BOOST_AUTO_TEST_CASE(simple_limit0) {
bg::convert(bounding_box, keep_in);
auto surface = PathFindingSurface(keep_in, multi_polygon_type_fp(), 0.1);
auto ret = surface.find_path(point_type_fp(0,0), point_type_fp(1,1),
infinity, make_optional(0UL));
infinity, make_optional(size_t(0)));
BOOST_CHECK_EQUAL(ret, boost::none);
}

Expand Down

0 comments on commit cc1abf0

Please sign in to comment.