update test

This commit is contained in:
QIDI TECH
2024-11-09 14:59:54 +08:00
parent c9ec3da208
commit cb4f6b9da4
35 changed files with 1372 additions and 6272 deletions

View File

@@ -4,10 +4,12 @@ add_executable(${_TEST_NAME}_tests
slic3r_jobs_tests.cpp
slic3r_version_tests.cpp
slic3r_arrangejob_tests.cpp
secretstore_tests.cpp
)
# mold linker for successful linking needs also to link TBB library and link it before libslic3r.
target_link_libraries(${_TEST_NAME}_tests test_common TBB::tbb TBB::tbbmalloc libslic3r_gui libslic3r)
if (MSVC)
target_link_libraries(${_TEST_NAME}_tests Setupapi.lib)
endif ()

View File

@@ -0,0 +1,8 @@
#include "catch2/catch.hpp"
#include "slic3r/Utils/Secrets.hpp"
/*TEST_CASE("Secret store test", "[secretstore]") {
REQUIRE(Slic3r::check_secrets());
}*/

View File

@@ -27,6 +27,7 @@ TEMPLATE_LIST_TEST_CASE("Empty worker should not block when queried for idle", "
REQUIRE(worker.is_idle());
}
TEMPLATE_LIST_TEST_CASE("Empty worker should not do anything", "[Jobs]", TestClasses) {
TestType worker{std::make_unique<Progress>()};
@@ -58,6 +59,7 @@ TEMPLATE_LIST_TEST_CASE("State should not be idle while running a job", "[Jobs]"
// make sure that the job starts BEFORE the worker.wait_for_idle() is called
std::this_thread::sleep_for(std::chrono::milliseconds(100));
worker.wait_for_idle();
REQUIRE(worker.is_idle());