Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLukas Matena <lukasmatena@seznam.cz>2022-02-24 14:55:53 +0300
committerLukas Matena <lukasmatena@seznam.cz>2022-02-24 15:05:05 +0300
commite058f794d9eb14e89d2d32b8b459438b0854be56 (patch)
treecd0ed4d4929bdec954d12ffbf12e71f6ca792c6f /tests
parent3cd15ac005287f1d12aa63c6fb072fb8acc3170b (diff)
parent54b2c67e75c9b992c6929b7b32b2f1f98bb38b44 (diff)
Merge branch 'stable'
Diffstat (limited to 'tests')
-rw-r--r--tests/fff_print/fff_print_tests.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/fff_print/fff_print_tests.cpp b/tests/fff_print/fff_print_tests.cpp
index 46358e5eb..cbdb2b12b 100644
--- a/tests/fff_print/fff_print_tests.cpp
+++ b/tests/fff_print/fff_print_tests.cpp
@@ -1,3 +1,18 @@
#include <catch_main.hpp>
#include "libslic3r/libslic3r.h"
+
+// __has_feature() is used later for Clang, this is for compatibility with other compilers (such as GCC and MSVC)
+#ifndef __has_feature
+# define __has_feature(x) 0
+#endif
+
+// Print reports about memory leaks but exit with zero exit code when any memory leaks is found to make unit tests pass.
+// After merging the stable branch (2.4.1) with the master branch, this should be deleted.
+#if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
+extern "C" {
+ const char *__lsan_default_options() {
+ return "exitcode=0";
+ }
+}
+#endif \ No newline at end of file