diff options
author | tamasmeszaros <meszaros.q@gmail.com> | 2021-04-14 09:51:54 +0300 |
---|---|---|
committer | tamasmeszaros <meszaros.q@gmail.com> | 2021-04-21 17:08:38 +0300 |
commit | 949b0e63e8579a6c5ef87ea2e730e9b6c782aa0a (patch) | |
tree | 521d91ea0a833697b22902a7aed7f1c5ea96be0d /tests/libnest2d | |
parent | dca67822d1767dcfa1f7bc7a36844c04dae59ad9 (diff) |
Fix integer overflows in libnest2d tests
Diffstat (limited to 'tests/libnest2d')
-rw-r--r-- | tests/libnest2d/libnest2d_tests_main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/libnest2d/libnest2d_tests_main.cpp b/tests/libnest2d/libnest2d_tests_main.cpp index 1cec8dcba..181f130e5 100644 --- a/tests/libnest2d/libnest2d_tests_main.cpp +++ b/tests/libnest2d/libnest2d_tests_main.cpp @@ -1207,7 +1207,7 @@ TEST_CASE("Test for biggest bounding box area", "[Nesting], [NestKernels]") pconfig.object_function = [&pile_box](const Item &item) -> double { 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; }; @@ -1223,5 +1223,5 @@ TEST_CASE("Test for biggest bounding box area", "[Nesting], [NestKernels]") // Here the result shall be a stairway of boxes REQUIRE(pile.size() == N); - REQUIRE(bb.area() == N * N * W * W); + REQUIRE(bb.area() == double(N) * N * W * W); } |