fff_print_tests.cpp 616 B

123456789101112131415161718
  1. #include <catch_main.hpp>
  2. #include "libslic3r/libslic3r.h"
  3. // __has_feature() is used later for Clang, this is for compatibility with other compilers (such as GCC and MSVC)
  4. #ifndef __has_feature
  5. # define __has_feature(x) 0
  6. #endif
  7. // Print reports about memory leaks but exit with zero exit code when any memory leaks is found to make unit tests pass.
  8. // After merging the stable branch (2.4.1) with the master branch, this should be deleted.
  9. #if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
  10. extern "C" {
  11. const char *__lsan_default_options() {
  12. return "exitcode=0";
  13. }
  14. }
  15. #endif