Group test targets into logical "tests" directory. Disable DJDHeuristic
This commit is contained in:
parent
cdc9fb0d8f
commit
05431c0e6d
@ -18,6 +18,8 @@ if (APPLE)
|
|||||||
target_link_libraries(test_common INTERFACE "-liconv -framework IOKit" "-framework CoreFoundation" -lc++)
|
target_link_libraries(test_common INTERFACE "-liconv -framework IOKit" "-framework CoreFoundation" -lc++)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
|
|
||||||
add_subdirectory(libnest2d)
|
add_subdirectory(libnest2d)
|
||||||
add_subdirectory(timeutils)
|
add_subdirectory(timeutils)
|
||||||
add_subdirectory(sla_print)
|
add_subdirectory(sla_print)
|
||||||
|
@ -4,4 +4,5 @@ target_link_libraries(${_TEST_NAME}_tests test_common libslic3r
|
|||||||
#${Boost_LIBRARIES} ${TBB_LIBRARIES} ${Boost_LIBRARIES}
|
#${Boost_LIBRARIES} ${TBB_LIBRARIES} ${Boost_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
catch_discover_tests(${_TEST_NAME}_tests TEST_PREFIX "${_TEST_NAME}: ")
|
# catch_discover_tests(${_TEST_NAME}_tests TEST_PREFIX "${_TEST_NAME}: ")
|
||||||
|
add_test(${_TEST_NAME}_tests ${_TEST_NAME}_tests "--durations yes")
|
@ -1,6 +1,7 @@
|
|||||||
get_filename_component(_TEST_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
|
get_filename_component(_TEST_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
|
||||||
add_executable(${_TEST_NAME}_tests ${_TEST_NAME}_tests_main.cpp printer_parts.cpp printer_parts.hpp)
|
add_executable(${_TEST_NAME}_tests ${_TEST_NAME}_tests_main.cpp printer_parts.cpp printer_parts.hpp)
|
||||||
target_link_libraries(${_TEST_NAME}_tests test_common libnest2d )
|
target_link_libraries(${_TEST_NAME}_tests test_common libnest2d )
|
||||||
|
set_property(TARGET ${_TEST_NAME}_tests PROPERTY FOLDER "tests")
|
||||||
|
|
||||||
# catch_discover_tests(${_TEST_NAME}_tests TEST_PREFIX "${_TEST_NAME}: ")
|
# catch_discover_tests(${_TEST_NAME}_tests TEST_PREFIX "${_TEST_NAME}: ")
|
||||||
add_test(${_TEST_NAME}_tests ${_TEST_NAME}_tests "--durations yes")
|
add_test(${_TEST_NAME}_tests ${_TEST_NAME}_tests "--durations yes")
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
|
||||||
#include <libnest2d/libnest2d.hpp>
|
#include <libnest2d/libnest2d.hpp>
|
||||||
#include "printer_parts.hpp"
|
#include "printer_parts.hpp"
|
||||||
//#include <libnest2d/geometry_traits_nfp.hpp>
|
//#include <libnest2d/geometry_traits_nfp.hpp>
|
||||||
@ -371,7 +372,7 @@ TEST_CASE("ArrangeRectanglesTight", "[Nesting]")
|
|||||||
REQUIRE(getX(bin.center()) == 105);
|
REQUIRE(getX(bin.center()) == 105);
|
||||||
REQUIRE(getY(bin.center()) == 125);
|
REQUIRE(getY(bin.center()) == 125);
|
||||||
|
|
||||||
_Nester<BottomLeftPlacer, DJDHeuristic> arrange(bin);
|
_Nester<BottomLeftPlacer, FirstFitSelection> arrange(bin);
|
||||||
|
|
||||||
arrange.execute(rects.begin(), rects.end());
|
arrange.execute(rects.begin(), rects.end());
|
||||||
|
|
||||||
@ -439,7 +440,7 @@ TEST_CASE("ArrangeRectanglesLoose", "[Nesting]")
|
|||||||
|
|
||||||
Coord min_obj_distance = 5;
|
Coord min_obj_distance = 5;
|
||||||
|
|
||||||
_Nester<BottomLeftPlacer, DJDHeuristic> arrange(bin, min_obj_distance);
|
_Nester<BottomLeftPlacer, FirstFitSelection> arrange(bin, min_obj_distance);
|
||||||
|
|
||||||
arrange.execute(rects.begin(), rects.end());
|
arrange.execute(rects.begin(), rects.end());
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
get_filename_component(_TEST_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
|
get_filename_component(_TEST_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
|
||||||
add_executable(${_TEST_NAME}_tests ${_TEST_NAME}_tests.cpp)
|
add_executable(${_TEST_NAME}_tests ${_TEST_NAME}_tests.cpp)
|
||||||
target_link_libraries(${_TEST_NAME}_tests test_common libslic3r)
|
target_link_libraries(${_TEST_NAME}_tests test_common libslic3r)
|
||||||
|
set_property(TARGET ${_TEST_NAME}_tests PROPERTY FOLDER "tests")
|
||||||
|
|
||||||
#catch_discover_tests(${_TEST_NAME}_tests TEST_PREFIX "${_TEST_NAME}: ")
|
# catch_discover_tests(${_TEST_NAME}_tests TEST_PREFIX "${_TEST_NAME}: ")
|
||||||
add_test(${_TEST_NAME}_tests ${_TEST_NAME}_tests "--durations yes")
|
add_test(${_TEST_NAME}_tests ${_TEST_NAME}_tests "--durations yes")
|
||||||
|
@ -5,6 +5,7 @@ add_executable(${_TEST_NAME}_tests
|
|||||||
${PROJECT_SOURCE_DIR}/src/libslic3r/Time.hpp
|
${PROJECT_SOURCE_DIR}/src/libslic3r/Time.hpp
|
||||||
)
|
)
|
||||||
target_link_libraries(${_TEST_NAME}_tests test_common)
|
target_link_libraries(${_TEST_NAME}_tests test_common)
|
||||||
|
set_property(TARGET ${_TEST_NAME}_tests PROPERTY FOLDER "tests")
|
||||||
|
|
||||||
# catch_discover_tests(${_TEST_NAME}_tests TEST_PREFIX "${_TEST_NAME}: ")
|
# catch_discover_tests(${_TEST_NAME}_tests TEST_PREFIX "${_TEST_NAME}: ")
|
||||||
add_test(${_TEST_NAME}_tests ${_TEST_NAME}_tests "--durations yes")
|
add_test(${_TEST_NAME}_tests ${_TEST_NAME}_tests "--durations yes")
|
||||||
|
Loading…
Reference in New Issue
Block a user