Fix failing libnest2d tests

Fix the test itself
This commit is contained in:
tamasmeszaros 2023-03-13 13:52:21 +01:00
parent eb31dcec44
commit 1154f51aab

View File

@ -1024,9 +1024,15 @@ TEST_CASE("pointOnPolygonContour", "[Geometry]") {
REQUIRE(getX(first) == getX(ecache.coords(0))); REQUIRE(getX(first) == getX(ecache.coords(0)));
REQUIRE(getY(first) == getY(ecache.coords(0))); REQUIRE(getY(first) == getY(ecache.coords(0)));
auto last = *std::prev(input.end()); if constexpr (ClosureTypeV<PolygonImpl> == Closure::CLOSED) {
REQUIRE(getX(last) == getX(ecache.coords(1.0))); auto last = *std::prev(input.end());
REQUIRE(getY(last) == getY(ecache.coords(1.0))); REQUIRE(getX(last) == getX(ecache.coords(1.0)));
REQUIRE(getY(last) == getY(ecache.coords(1.0)));
} else {
auto last = *input.begin();
REQUIRE(getX(last) == getX(ecache.coords(1.0)));
REQUIRE(getY(last) == getY(ecache.coords(1.0)));
}
for(int i = 0; i <= 100; i++) { for(int i = 0; i <= 100; i++) {
auto v = ecache.coords(i*(0.01)); auto v = ecache.coords(i*(0.01));