Sync to c987b4585
:
this is needed so we can later ff public/stable (currently at version_2.5.2) to version_2.6.0
This commit is contained in:
parent
2ed4c75446
commit
bbd870b26c
1324 changed files with 225330 additions and 327652 deletions
35
tests/libslic3r/test_utils.cpp
Normal file
35
tests/libslic3r/test_utils.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "libslic3r/libslic3r.h"
|
||||
|
||||
SCENARIO("Test fast_round_up()") {
|
||||
using namespace Slic3r;
|
||||
|
||||
THEN("fast_round_up<int>(1.5) is 2") {
|
||||
REQUIRE(fast_round_up<int>(1.5) == 2);
|
||||
}
|
||||
THEN("fast_round_up<int>(1.499999999999999) is 1") {
|
||||
REQUIRE(fast_round_up<int>(1.499999999999999) == 1);
|
||||
}
|
||||
THEN("fast_round_up<int>(0.5) is 1") {
|
||||
REQUIRE(fast_round_up<int>(0.5) == 1);
|
||||
}
|
||||
THEN("fast_round_up<int>(0.49999999999999994) is 0") {
|
||||
REQUIRE(fast_round_up<int>(0.49999999999999994) == 0);
|
||||
}
|
||||
THEN("fast_round_up<int>(-0.5) is 0") {
|
||||
REQUIRE(fast_round_up<int>(-0.5) == 0);
|
||||
}
|
||||
THEN("fast_round_up<int>(-0.51) is -1") {
|
||||
REQUIRE(fast_round_up<int>(-0.51) == -1);
|
||||
}
|
||||
THEN("fast_round_up<int>(-0.51) is -1") {
|
||||
REQUIRE(fast_round_up<int>(-0.51) == -1);
|
||||
}
|
||||
THEN("fast_round_up<int>(-1.5) is -1") {
|
||||
REQUIRE(fast_round_up<int>(-1.5) == -1);
|
||||
}
|
||||
THEN("fast_round_up<int>(-1.51) is -2") {
|
||||
REQUIRE(fast_round_up<int>(-1.51) == -2);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue