Add the full source of BambuStudio

using version 1.0.10
This commit is contained in:
lane.wei 2022-07-15 23:37:19 +08:00 committed by Lane.Wei
parent 30bcadab3e
commit 1555904bef
3771 changed files with 1251328 additions and 0 deletions

View file

@ -0,0 +1,17 @@
get_filename_component(_TEST_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
add_executable(${_TEST_NAME}_tests
${_TEST_NAME}_tests_main.cpp
)
target_link_libraries(${_TEST_NAME}_tests test_common libslic3r_gui libslic3r)
if (MSVC)
target_link_libraries(${_TEST_NAME}_tests Setupapi.lib)
endif ()
set_property(TARGET ${_TEST_NAME}_tests PROPERTY FOLDER "tests")
if (WIN32)
bambuslicer_copy_dlls(${_TEST_NAME}_tests)
endif()
# catch_discover_tests(${_TEST_NAME}_tests TEST_PREFIX "${_TEST_NAME}: ")
add_test(${_TEST_NAME}_tests ${_TEST_NAME}_tests "${CATCH_EXTRA_ARGS} exclude:[NotWorking]")

View file

@ -0,0 +1,60 @@
#include <catch_main.hpp>
#include "slic3r/Utils/Http.hpp"
TEST_CASE("Check SSL certificates paths", "[Http][NotWorking]") {
Slic3r::Http g = Slic3r::Http::get("https://github.com/");
unsigned status = 0;
g.on_error([&status](std::string, std::string, unsigned http_status) {
status = http_status;
});
g.on_complete([&status](std::string /* body */, unsigned http_status){
status = http_status;
});
g.perform_sync();
REQUIRE(status == 200);
}
TEST_CASE("Http digest authentication", "[Http][NotWorking]") {
Slic3r::Http g = Slic3r::Http::get("https://jigsaw.w3.org/HTTP/Digest/");
g.auth_digest("guest", "guest");
unsigned status = 0;
g.on_error([&status](std::string, std::string, unsigned http_status) {
status = http_status;
});
g.on_complete([&status](std::string /* body */, unsigned http_status){
status = http_status;
});
g.perform_sync();
REQUIRE(status == 200);
}
TEST_CASE("Http basic authentication", "[Http][NotWorking]") {
Slic3r::Http g = Slic3r::Http::get("https://jigsaw.w3.org/HTTP/Basic/");
g.auth_basic("guest", "guest");
unsigned status = 0;
g.on_error([&status](std::string, std::string, unsigned http_status) {
status = http_status;
});
g.on_complete([&status](std::string /* body */, unsigned http_status){
status = http_status;
});
g.perform_sync();
REQUIRE(status == 200);
}