mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 02:46:02 +08:00
Reactivated polygon test module of libseqarrange.
This commit is contained in:
parent
e1734793e0
commit
eac29863ed
@ -15,20 +15,21 @@ target_link_libraries(sequential_decimator PRIVATE libseqarrange)
|
||||
|
||||
|
||||
|
||||
#if (SLIC3R_BUILD_TESTS)
|
||||
# find_package(Catch2 3.8 REQUIRED)
|
||||
if (SLIC3R_BUILD_TESTS)
|
||||
find_package(Catch2 3.8 REQUIRED)
|
||||
|
||||
# add_executable(libseqarrange_tests test/prusaparts.cpp test/seq_test_polygon.cpp test/seq_test_sequential.cpp test/seq_test_preprocess.cpp test/seq_test_interface.cpp)
|
||||
# target_include_directories(libseqarrange_tests PRIVATE src )
|
||||
# target_link_libraries(libseqarrange_tests PRIVATE Catch2::Catch2WithMain libseqarrange)
|
||||
add_executable(libseqarrange_tests test/prusaparts.cpp test/seq_test_polygon.cpp)
|
||||
# test/seq_test_sequential.cpp test/seq_test_preprocess.cpp test/seq_test_interface.cpp
|
||||
target_include_directories(libseqarrange_tests PRIVATE src )
|
||||
target_link_libraries(libseqarrange_tests PRIVATE Catch2::Catch2WithMain libseqarrange)
|
||||
|
||||
# set(_catch_args "exclude:[NotWorking] exclude:[Slow]")
|
||||
# list(APPEND _catch_args "${CATCH_EXTRA_ARGS}")
|
||||
# add_test(NAME libseqarrange_tests
|
||||
# COMMAND libseqarrange_tests ${_catch_args}
|
||||
# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set(_catch_args "exclude:[NotWorking] exclude:[Slow]")
|
||||
list(APPEND _catch_args "${CATCH_EXTRA_ARGS}")
|
||||
add_test(NAME libseqarrange_tests
|
||||
COMMAND libseqarrange_tests ${_catch_args}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
#endif()
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
|
@ -542,10 +542,10 @@ TEST_CASE("Interface test 1", "[Sequential Arrangement Interface]")
|
||||
for (const auto& scheduled_object: scheduled_plates[plate].scheduled_objects)
|
||||
{
|
||||
cout << " ID: " << scheduled_object.id << " X: " << scheduled_object.x << " Y: " << scheduled_object.y << endl;
|
||||
REQUIRE(scheduled_object.x >= 0);
|
||||
REQUIRE(scheduled_object.x <= solver_configuration.x_plate_bounding_box_size * SEQ_SLICER_SCALE_FACTOR);
|
||||
REQUIRE(scheduled_object.y >= 0);
|
||||
REQUIRE(scheduled_object.y <= solver_configuration.y_plate_bounding_box_size * SEQ_SLICER_SCALE_FACTOR);
|
||||
REQUIRE(scheduled_object.x >= solver_configuration.plate_bounding_box.min.x() * SEQ_SLICER_SCALE_FACTOR);
|
||||
REQUIRE(scheduled_object.x <= solver_configuration.plate_bounding_box.max.x() * SEQ_SLICER_SCALE_FACTOR);
|
||||
REQUIRE(scheduled_object.y >= solver_configuration.plate_bounding_box.min.y() * SEQ_SLICER_SCALE_FACTOR);
|
||||
REQUIRE(scheduled_object.y <= solver_configuration.plate_bounding_box.max.y() * SEQ_SLICER_SCALE_FACTOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -607,10 +607,11 @@ TEST_CASE("Interface test 2", "[Sequential Arrangement Interface]")
|
||||
for (const auto& scheduled_object: scheduled_plates[plate].scheduled_objects)
|
||||
{
|
||||
cout << " ID: " << scheduled_object.id << " X: " << scheduled_object.x << " Y: " << scheduled_object.y << endl;
|
||||
REQUIRE(scheduled_object.x >= 0);
|
||||
REQUIRE(scheduled_object.x <= solver_configuration.x_plate_bounding_box_size * SEQ_SLICER_SCALE_FACTOR);
|
||||
REQUIRE(scheduled_object.y >= 0);
|
||||
REQUIRE(scheduled_object.y <= solver_configuration.y_plate_bounding_box_size * SEQ_SLICER_SCALE_FACTOR);
|
||||
|
||||
REQUIRE(scheduled_object.x >= solver_configuration.plate_bounding_box.min.x() * SEQ_SLICER_SCALE_FACTOR);
|
||||
REQUIRE(scheduled_object.x <= solver_configuration.plate_bounding_box.max.x() * SEQ_SLICER_SCALE_FACTOR);
|
||||
REQUIRE(scheduled_object.y >= solver_configuration.plate_bounding_box.min.y() * SEQ_SLICER_SCALE_FACTOR);
|
||||
REQUIRE(scheduled_object.y <= solver_configuration.plate_bounding_box.max.y() * SEQ_SLICER_SCALE_FACTOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user