slic3rutils_tests_main.cpp 495 B

12345678910111213141516171819202122
  1. #include <catch_main.hpp>
  2. #include "slic3r/Utils/Http.hpp"
  3. TEST_CASE("Http", "[Http][NotWorking]") {
  4. Slic3r::Http g = Slic3r::Http::get("https://github.com/");
  5. unsigned status = 0;
  6. g.on_error([&status](std::string, std::string, unsigned http_status) {
  7. status = http_status;
  8. });
  9. g.on_complete([&status](std::string /* body */, unsigned http_status){
  10. status = http_status;
  11. });
  12. g.perform_sync();
  13. REQUIRE(status == 200);
  14. }