Added test projects for libslic3r and fff_print.
Added test_geometry.cpp from upstream slic3r, thanks @lordofhyphens Added circle_taubin_newton() for circle center calculation, thanks @lordofhyphens
This commit is contained in:
parent
a7c843d213
commit
42a858b999
11 changed files with 548 additions and 14 deletions
tests/libslic3r
15
tests/libslic3r/libslic3r_tests.cpp
Normal file
15
tests/libslic3r/libslic3r_tests.cpp
Normal file
|
@ -0,0 +1,15 @@
|
|||
#define CATCH_CONFIG_MAIN
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "libslic3r/libslic3r.h"
|
||||
|
||||
namespace {
|
||||
|
||||
TEST_CASE("sort_remove_duplicates", "[utils]") {
|
||||
std::vector<int> data_src = { 3, 0, 2, 1, 15, 3, 5, 6, 3, 1, 0 };
|
||||
std::vector<int> data_dst = { 0, 1, 2, 3, 5, 6, 15 };
|
||||
Slic3r::sort_remove_duplicates(data_src);
|
||||
REQUIRE(data_src == data_dst);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue