diff options
| author | Stefan Boberg <[email protected]> | 2021-09-20 10:15:12 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-20 10:15:12 +0200 |
| commit | 8d3024a7e09246e44bf6d9ea14a36e6b03032e85 (patch) | |
| tree | c18c2536d108378e5cddcac21398efd8d28e437d /zencore/sharedbuffer.cpp | |
| parent | Added testing.h to wrap doctest.h (diff) | |
| download | zen-8d3024a7e09246e44bf6d9ea14a36e6b03032e85.tar.xz zen-8d3024a7e09246e44bf6d9ea14a36e6b03032e85.zip | |
It's not possible to compile out tests
Tests are now compiled in if `ZEN_WITH_TESTS=1`, and compiled out if not. Compiling tests out reduces the footprint of the resulting executables quite significantly.
Diffstat (limited to 'zencore/sharedbuffer.cpp')
| -rw-r--r-- | zencore/sharedbuffer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/zencore/sharedbuffer.cpp b/zencore/sharedbuffer.cpp index 2761d0b4d..200e06972 100644 --- a/zencore/sharedbuffer.cpp +++ b/zencore/sharedbuffer.cpp @@ -2,7 +2,8 @@ #include <zencore/sharedbuffer.h> -#include <doctest/doctest.h> +#include <zencore/testing.h> + #include <memory.h> #include <gsl/gsl-lite.hpp> @@ -129,6 +130,8 @@ SharedBuffer::Clone(MemoryView View) ////////////////////////////////////////////////////////////////////////// +#if ZEN_WITH_TESTS + void sharedbuffer_forcelink() { @@ -138,4 +141,6 @@ TEST_CASE("SharedBuffer") { } +#endif + } // namespace zen |