aboutsummaryrefslogtreecommitdiff
path: root/zencore/compress.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-09-20 10:15:12 +0200
committerStefan Boberg <[email protected]>2021-09-20 10:15:12 +0200
commit8d3024a7e09246e44bf6d9ea14a36e6b03032e85 (patch)
treec18c2536d108378e5cddcac21398efd8d28e437d /zencore/compress.cpp
parentAdded testing.h to wrap doctest.h (diff)
downloadzen-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/compress.cpp')
-rw-r--r--zencore/compress.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/zencore/compress.cpp b/zencore/compress.cpp
index 12a7b9ef8..8ca799e39 100644
--- a/zencore/compress.cpp
+++ b/zencore/compress.cpp
@@ -6,13 +6,13 @@
#include <zencore/compositebuffer.h>
#include <zencore/crc32.h>
#include <zencore/endian.h>
+#include <zencore/testing.h>
#include "../3rdparty/Oodle/include/oodle2.h"
#if ZEN_PLATFORM_WINDOWS
# pragma comment(lib, "oo2core_win64.lib")
#endif
-#include <doctest/doctest.h>
#include <lz4.h>
#include <functional>
#include <limits>
@@ -823,6 +823,8 @@ CompressedBuffer::TryGetCompressParameters(OodleCompressor& OutCompressor, Oodle
\/ \/ \/
*/
+#if ZEN_WITH_TESTS
+
TEST_CASE("CompressedBuffer")
{
uint8_t Zeroes[1024]{};
@@ -908,5 +910,6 @@ void
compress_forcelink()
{
}
+#endif
} // namespace zen