mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 09:47:58 -06:00
Fix integer overflows in libnest2d tests
This commit is contained in:
parent
dca67822d1
commit
949b0e63e8
1 changed files with 2 additions and 2 deletions
|
@ -1207,7 +1207,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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1223,5 +1223,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…
Add table
Add a link
Reference in a new issue