Fix integer overflows in libnest2d tests
This commit is contained in:
parent
8845b0245a
commit
41a0e270ac
@ -1171,7 +1171,7 @@ TEST_CASE("Test for biggest bounding box area", "[Nesting], [NestKernels]")
|
|||||||
|
|
||||||
pconfig.object_function = [&pile_box](const Item &item) -> double {
|
pconfig.object_function = [&pile_box](const Item &item) -> double {
|
||||||
Box b = sl::boundingBox(item.boundingBox(), pile_box);
|
Box b = sl::boundingBox(item.boundingBox(), pile_box);
|
||||||
double area = b.area<double>() / (W * W);
|
double area = b.area<double>() / (double(W) * W);
|
||||||
return -area;
|
return -area;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1187,5 +1187,5 @@ TEST_CASE("Test for biggest bounding box area", "[Nesting], [NestKernels]")
|
|||||||
|
|
||||||
// Here the result shall be a stairway of boxes
|
// Here the result shall be a stairway of boxes
|
||||||
REQUIRE(pile.size() == N);
|
REQUIRE(pile.size() == N);
|
||||||
REQUIRE(bb.area() == N * N * W * W);
|
REQUIRE(bb.area() == double(N) * N * W * W);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user